]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
build: minor adjustments master
authorbones_was_here <bones_was_here@xonotic.au>
Thu, 11 Apr 2024 17:55:08 +0000 (03:55 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sun, 14 Apr 2024 16:24:08 +0000 (02:24 +1000)
VS2019: get more of the targets to build (needed to specify modern C
standard for all of them, and SDK "10.0" seems to mean "use latest
version installed").
VS2019: improve README.md instructions.

Makefile: fix PEDANTIC=1 test builds and warning spam.

sys: properly fix warnings related to SDL's wrapping of main() for all
platforms.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
633 files changed:
.gitattributes
.github/workflows/build.yml [new file with mode: 0644]
.gitignore
Darkplaces.app/Contents/Info.plist
Debug-darkplaces-sdl2-vs2019-Win32/bih.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/builddate.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cap_avi.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cap_ogg.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cd_shared.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_cmd.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_collision.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_demo.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_ents.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_ents4.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_ents5.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_ents_nq.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_ents_qw.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_input.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_main.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_parse.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_particles.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_screen.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_video.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cl_video_libavw.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/clvm_cmds.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cmd.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/collision.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/com_crc16.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/com_ents.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/com_ents4.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/com_game.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/com_infostring.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/com_msg.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/common.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/console.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/crypto.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/csprogs.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/curves.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/cvar.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/CL.command.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/CL.read.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/CL.write.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.lastbuildstate [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.write.1u.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.command.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.delete.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.read.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.write.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/rc.command.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/rc.read.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/rc.write.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplaces-sdl2-vs2019.exe.recipe [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplaces-sdl2-vs2019.ilk [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplaces-sdl2-vs2019.log [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/darkplaces.res [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/dpvsimpledecode.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/filematch.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/fractalnoise.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/fs.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/ft2.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/gl_backend.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/gl_draw.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/gl_rmain.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/gl_rsurf.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/gl_textures.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/hmac.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/host.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/image.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/image_png.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/jpeg.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/keys.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/lhnet.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/libcurl.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/mathlib.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/matrixlib.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/mdfour.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/menu.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/meshqueue.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/mod_skeletal_animatevertices_generic.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/mod_skeletal_animatevertices_sse.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/model_alias.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/model_brush.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/model_shared.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/model_sprite.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/mvm_cmds.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/netconn.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/palette.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/polygon.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/portals.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/protocol.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/prvm_cmds.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/prvm_edict.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/prvm_exec.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/r_explosion.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/r_lightning.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/r_modules.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/r_shadow.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/r_sky.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/r_sprites.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/r_stats.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sbar.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/snd_main.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/snd_mem.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/snd_mix.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/snd_ogg.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/snd_sdl.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/snd_wav.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/snd_xmp.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sv_ccmds.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sv_demo.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sv_ents.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sv_ents4.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sv_ents5.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sv_ents_csqc.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sv_ents_nq.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sv_main.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sv_move.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sv_phys.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sv_save.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sv_send.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sv_user.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/svbsp.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/svvm_cmds.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sys_sdl.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/sys_shared.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/taskqueue.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/thread_sdl.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/utf8lib.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/vc142.idb [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/vid_sdl.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/vid_shared.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/view.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/wad.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/world.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-Win32/zone.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/bih.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/builddate.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cap_avi.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cap_ogg.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cd_shared.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_cmd.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_collision.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_demo.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_ents.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_ents4.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_ents5.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_ents_nq.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_ents_qw.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_input.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_main.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_parse.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_particles.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_screen.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_video.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cl_video_libavw.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/clvm_cmds.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cmd.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/collision.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/com_crc16.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/com_ents.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/com_ents4.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/com_game.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/com_infostring.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/com_msg.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/common.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/console.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/convex.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/crypto.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/csprogs.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/curves.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/cvar.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.command.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.read.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.write.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.lastbuildstate [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.write.1u.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.command.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.delete.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.read.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.write.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.command.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.read.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.write.1.tlog [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.exe.recipe [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.ilk [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.log [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/darkplaces.res [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/dpvsimpledecode.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/filematch.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/fractalnoise.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/fs.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/ft2.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/gl_backend.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/gl_draw.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/gl_rmain.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/gl_rsurf.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/gl_textures.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/hmac.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/host.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/image.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/image_png.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/jpeg.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/keys.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/lhnet.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/libcurl.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/mathlib.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/matrixlib.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/mdfour.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/menu.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/meshqueue.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_generic.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_sse.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/model_alias.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/model_brush.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/model_shared.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/model_sprite.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/mvm_cmds.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/netconn.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/palette.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/polygon.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/portals.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/protocol.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/prvm_cmds.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/prvm_edict.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/prvm_exec.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/r_explosion.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/r_lightning.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/r_modules.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/r_shadow.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/r_sky.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/r_sprites.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/r_stats.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sbar.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/snd_main.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/snd_mem.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/snd_mix.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/snd_ogg.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/snd_sdl.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/snd_wav.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/snd_xmp.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sv_ccmds.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sv_demo.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sv_ents.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sv_ents4.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sv_ents5.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sv_ents_csqc.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sv_ents_nq.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sv_main.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sv_move.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sv_phys.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sv_save.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sv_send.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sv_user.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/svbsp.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/svvm_cmds.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sys_sdl.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/sys_shared.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/taskqueue.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/thread_sdl.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/utf8lib.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/vc142.idb [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/vid_sdl.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/vid_shared.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/view.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/wad.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/world.obj [deleted file]
Debug-darkplaces-sdl2-vs2019-x64/zone.obj [deleted file]
README.md
Release-darkplaces-sdl2-vs2019-x64/bih.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/builddate.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cap_avi.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cap_ogg.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cd_shared.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_cmd.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_collision.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_demo.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_ents.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_ents4.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_ents5.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_ents_nq.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_ents_qw.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_input.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_main.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_parse.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_particles.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_screen.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_video.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cl_video_libavw.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/clvm_cmds.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cmd.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/collision.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/com_crc16.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/com_ents.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/com_ents4.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/com_game.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/com_infostring.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/com_msg.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/common.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/console.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/crypto.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/csprogs.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/curves.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/cvar.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.command.1.tlog [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.read.1.tlog [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.write.1.tlog [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.lastbuildstate [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.write.1u.tlog [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.command.1.tlog [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.read.1.tlog [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.write.1.tlog [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.command.1.tlog [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.read.1.tlog [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.write.1.tlog [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.exe.recipe [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.iobj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.ipdb [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.log [deleted file]
Release-darkplaces-sdl2-vs2019-x64/darkplaces.res [deleted file]
Release-darkplaces-sdl2-vs2019-x64/dpvsimpledecode.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/filematch.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/fractalnoise.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/fs.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/ft2.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/gl_backend.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/gl_draw.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/gl_rmain.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/gl_rsurf.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/gl_textures.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/hmac.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/host.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/image.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/image_png.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/jpeg.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/keys.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/lhnet.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/libcurl.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/mathlib.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/matrixlib.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/mdfour.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/menu.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/meshqueue.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_generic.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_sse.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/model_alias.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/model_brush.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/model_shared.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/model_sprite.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/mvm_cmds.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/netconn.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/palette.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/polygon.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/portals.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/protocol.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/prvm_cmds.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/prvm_edict.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/prvm_exec.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/r_explosion.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/r_lightning.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/r_modules.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/r_shadow.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/r_sky.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/r_sprites.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/r_stats.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sbar.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/snd_main.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/snd_mem.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/snd_mix.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/snd_ogg.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/snd_sdl.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/snd_wav.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/snd_xmp.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sv_ccmds.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sv_demo.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sv_ents.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sv_ents4.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sv_ents5.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sv_ents_csqc.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sv_ents_nq.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sv_main.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sv_move.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sv_phys.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sv_save.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sv_send.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sv_user.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/svbsp.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/svvm_cmds.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sys_sdl.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/sys_shared.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/taskqueue.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/thread_sdl.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/utf8lib.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/vid_sdl.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/vid_shared.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/view.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/wad.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/world.obj [deleted file]
Release-darkplaces-sdl2-vs2019-x64/zone.obj [deleted file]
builddate.c
cap_ogg.c
cd_shared.c
cl_cmd.c
cl_collision.c
cl_demo.c
cl_input.c
cl_main.c
cl_parse.c
cl_particles.c
cl_particles.h
cl_screen.c
cl_screen.h
cl_video.c
cl_video_jamdecode.c
cl_video_libavw.c
client.h
clvm_cmds.c
cmd.c
cmd.h
collision.h
com_game.c
com_infostring.c
com_infostring.h
com_msg.c
common.c
common.h
console.c
console.h
crypto.c
crypto.h
csprogs.c
csprogs.h
cvar.c
cvar.h
darkplaces-sdl2-vs2017.vcxproj [deleted file]
darkplaces-sdl2-vs2019.vcxproj
darkplaces-vs2017.sln [deleted file]
darkplaces.h
dpdefs/csprogsdefs.qc
dpdefs/dpextensions.qc
dpdefs/menudefs.qc
dpdefs/progsdefs.qc
dpvsimpledecode.c
draw.h
filematch.c
fs.c
fs.h
ft2.c
ft2.h
ft2_fontdefs.h
gl_backend.c
gl_draw.c
gl_rmain.c
gl_rsurf.c
gl_textures.c
glquake.h
host.c
host.h
image.c
jpeg.c
keys.c
keys.h
lhnet.c
lhnet.h
libcurl.c
libcurl.h
makefile
makefile.inc
mathlib.h
mdfour.c
menu.c
menu.h
model_alias.c
model_brush.c
model_shared.c
model_shared.h
model_sprite.c
mvm_cmds.c
netconn.c [changed mode: 0755->0644]
netconn.h
packages.config
packages/sdl2.nuget.2.0.22/.signature.p7s [deleted file]
packages/sdl2.nuget.2.0.22/build/configurations.autopkg [deleted file]
packages/sdl2.nuget.2.0.22/build/native/default-propertiesui.xml [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_assert.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_atomic.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_audio.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_bits.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_blendmode.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_clipboard.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_config.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_android.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_iphoneos.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_macosx.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_minimal.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_pandora.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_psp.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_windows.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_winrt.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_wiz.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_copying.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_cpuinfo.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_egl.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_endian.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_error.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_events.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_filesystem.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_gamecontroller.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_gesture.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_haptic.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_hidapi.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_hints.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_joystick.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_keyboard.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_keycode.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_loadso.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_locale.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_log.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_main.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_messagebox.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_metal.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_misc.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_mouse.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_mutex.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_name.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengl.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengl_glext.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_gl2.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_gl2ext.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_gl2platform.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_khrplatform.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_pixels.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_platform.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_power.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_quit.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_rect.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_render.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_revision.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_rwops.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_scancode.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_sensor.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_shape.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_stdinc.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_surface.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_system.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_syswm.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_test.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_assert.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_common.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_compare.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_crc32.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_font.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_fuzzer.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_harness.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_images.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_log.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_md5.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_memory.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_random.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_thread.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_timer.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_touch.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_types.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_version.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_video.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/SDL_vulkan.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/begin_code.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/include/close_code.h [deleted file]
packages/sdl2.nuget.2.0.22/build/native/sdl2.nuget-propertiesui-2af5e039-b5f8-4f99-b0b6-6b64e12c6528.xml [deleted file]
packages/sdl2.nuget.2.0.22/build/native/sdl2.nuget.targets [deleted file]
packages/sdl2.nuget.2.0.22/build/publisher-info.txt [deleted file]
packages/sdl2.nuget.2.0.22/sdl2.nuget.2.0.22.nupkg [deleted file]
packages/sdl2.nuget.redist.2.0.22/.signature.p7s [deleted file]
packages/sdl2.nuget.redist.2.0.22/build/configurations.autopkg [deleted file]
packages/sdl2.nuget.redist.2.0.22/build/native/default-propertiesui.xml [deleted file]
packages/sdl2.nuget.redist.2.0.22/build/native/sdl2.nuget.redist.targets [deleted file]
packages/sdl2.nuget.redist.2.0.22/build/publisher-info.txt [deleted file]
packages/sdl2.nuget.redist.2.0.22/sdl2.nuget.redist.2.0.22.nupkg [deleted file]
phys.c [new file with mode: 0644]
phys.h [new file with mode: 0644]
progsvm.h
protocol.c
protocol.h
prvm_cmds.c
prvm_cmds.h
prvm_edict.c
prvm_exec.c
prvm_execprogram.h
prvm_offsets.h
qdefs.h
quakedef.h
r_modules.c
r_shadow.c
r_sky.c
r_stats.c
render.h
sbar.c
sbar.h
screen.h
server.h
snd_main.c
snd_main.h
snd_mix.c
sv_ccmds.c
sv_demo.c
sv_main.c
sv_phys.c
sv_save.c
sv_send.c
sv_user.c
svvm_cmds.c
sys.h
sys_null.c [new file with mode: 0644]
sys_sdl.c
sys_shared.c
sys_unix.c [deleted file]
taskqueue.c
todo
utf8lib.c
utf8lib.h
vid.h
vid_null.c
vid_sdl.c
vid_shared.c
view.c
vs2012_sdl2_win32.props [deleted file]
vs2012_sdl2_win64.props [deleted file]
world.c
world.h
zone.c
zone.h

index c8716cc00e4e11ae2a536addca590515c27f8f19..7e8260ee271ee66f1360ae10d8c0ee771291b834 100644 (file)
@@ -165,9 +165,9 @@ POSITIONS -diff -crlf
 *.psd -diff -crlf
 *.py crlf=input
 *.q3map1 crlf=input
-*.qc crlf=input
+*.qc crlf=input linguist-language=C
 *.qdt crlf=input
-*.qh crlf=input
+*.qh crlf=input linguist-language=C
 *.rb crlf=input
 *.rc2 crlf=input
 *.rc -crlf
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644 (file)
index 0000000..27fbd2d
--- /dev/null
@@ -0,0 +1,45 @@
+name: CI
+
+on:
+  # Run on pushes to tags, the "master" branch, and PR's
+  push:
+    branches:
+      - master
+  pull_request:
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+    container:
+      image: debian:latest
+    steps:
+      # Must install git before checking out the repo otherwise github doesn't fetch the .git directory.
+      - name: Install dependencies
+        run: |
+          apt update
+          apt install --yes build-essential git libjpeg-dev libsdl2-dev libcurl4-openssl-dev libpng-dev libfreetype-dev libvorbis-dev
+
+      - name: Fetch repository
+        uses: actions/checkout@v4.1.1
+        with:
+          # make `git describe` show the correct commit hash
+          fetch-depth: '0'
+
+      - name: Compile DP
+        run: |
+          # prevent git complaining about dubious ownership of the repo
+          chown -R root:root .
+          # fail if `git describe` doesn't work (required for the buildstring)
+          git describe --always
+          # fail if there's any warnings
+          export CC="cc -Werror"
+          make sdl-release
+
+      - name: Upload Linux artifacts
+        uses: actions/upload-artifact@v4
+        with:
+          name: Linux
+          path: |
+            darkplaces-sdl
+
index 5ba9ca0f22b30415bea8d957208fbf017f9c81c6..4c4c53c9aedc82d5ecf50e147a54518cae8cee0f 100644 (file)
@@ -3,6 +3,16 @@ obj/
 *.o
 *.i
 *.s
+
+# MSVC build objects
+Debug-darkplaces-sdl2-vs*/
+Release-darkplaces-sdl2-vs*/
+*.obj
+*.tlog
+# MSVC NuGet packages, VS downloads them automatically.
+# Other platforms also provide SDL2 headers rather than storing old ones here.
+packages/
+
 ChangeLog
 darkplaces-agl
 darkplaces-glx
index b2aa11d6172f12f59605db72be7d6c020dea8d20..f6331a15dda2cc262b674039adc18110f41625fb 100644 (file)
        <string>????</string>
        <key>CFBundleVersion</key>
        <string>1.0</string>
+       <key>LSApplicationCategoryType</key>
+       <string>public.app-category.action-games</string>
+       <key>LSMinimumSystemVersion</key>
+       <string>10.4.0</string>
+       <key>LSMinimumSystemVersionByArchitecture</key>
+       <dict>
+               <key>x86_64</key>
+               <string>10.6.0</string>
+       </dict>
 </dict>
 </plist>
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/bih.obj b/Debug-darkplaces-sdl2-vs2019-Win32/bih.obj
deleted file mode 100644 (file)
index 9e4b5c4..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/bih.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/builddate.obj b/Debug-darkplaces-sdl2-vs2019-Win32/builddate.obj
deleted file mode 100644 (file)
index e684096..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/builddate.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cap_avi.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cap_avi.obj
deleted file mode 100644 (file)
index 2730241..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cap_avi.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cap_ogg.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cap_ogg.obj
deleted file mode 100644 (file)
index 35fa1e1..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cap_ogg.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cd_shared.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cd_shared.obj
deleted file mode 100644 (file)
index 1e95d56..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cd_shared.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_cmd.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_cmd.obj
deleted file mode 100644 (file)
index f51daa9..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_cmd.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_collision.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_collision.obj
deleted file mode 100644 (file)
index ab4a551..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_collision.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_demo.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_demo.obj
deleted file mode 100644 (file)
index 4fba89f..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_demo.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents.obj
deleted file mode 100644 (file)
index 0f8f546..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents4.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents4.obj
deleted file mode 100644 (file)
index b6b0930..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents4.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents5.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents5.obj
deleted file mode 100644 (file)
index a9ea1b2..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents5.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents_nq.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents_nq.obj
deleted file mode 100644 (file)
index 3fc7c7c..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents_nq.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents_qw.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents_qw.obj
deleted file mode 100644 (file)
index b0f59b4..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_ents_qw.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_input.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_input.obj
deleted file mode 100644 (file)
index 122f885..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_input.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_main.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_main.obj
deleted file mode 100644 (file)
index 7b5df75..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_main.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_parse.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_parse.obj
deleted file mode 100644 (file)
index dda63d4..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_parse.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_particles.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_particles.obj
deleted file mode 100644 (file)
index 4496ab1..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_particles.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_screen.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_screen.obj
deleted file mode 100644 (file)
index 69690a1..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_screen.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_video.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_video.obj
deleted file mode 100644 (file)
index d6a492c..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_video.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cl_video_libavw.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cl_video_libavw.obj
deleted file mode 100644 (file)
index f910374..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cl_video_libavw.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/clvm_cmds.obj b/Debug-darkplaces-sdl2-vs2019-Win32/clvm_cmds.obj
deleted file mode 100644 (file)
index f41c4f2..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/clvm_cmds.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cmd.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cmd.obj
deleted file mode 100644 (file)
index fbfa4c9..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cmd.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/collision.obj b/Debug-darkplaces-sdl2-vs2019-Win32/collision.obj
deleted file mode 100644 (file)
index e1ab931..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/collision.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/com_crc16.obj b/Debug-darkplaces-sdl2-vs2019-Win32/com_crc16.obj
deleted file mode 100644 (file)
index 3b8287d..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/com_crc16.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/com_ents.obj b/Debug-darkplaces-sdl2-vs2019-Win32/com_ents.obj
deleted file mode 100644 (file)
index abe1d25..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/com_ents.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/com_ents4.obj b/Debug-darkplaces-sdl2-vs2019-Win32/com_ents4.obj
deleted file mode 100644 (file)
index 85f9308..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/com_ents4.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/com_game.obj b/Debug-darkplaces-sdl2-vs2019-Win32/com_game.obj
deleted file mode 100644 (file)
index b673994..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/com_game.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/com_infostring.obj b/Debug-darkplaces-sdl2-vs2019-Win32/com_infostring.obj
deleted file mode 100644 (file)
index d852579..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/com_infostring.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/com_msg.obj b/Debug-darkplaces-sdl2-vs2019-Win32/com_msg.obj
deleted file mode 100644 (file)
index c5d05cc..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/com_msg.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/common.obj b/Debug-darkplaces-sdl2-vs2019-Win32/common.obj
deleted file mode 100644 (file)
index d52183f..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/common.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/console.obj b/Debug-darkplaces-sdl2-vs2019-Win32/console.obj
deleted file mode 100644 (file)
index 8ccfadf..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/console.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/crypto.obj b/Debug-darkplaces-sdl2-vs2019-Win32/crypto.obj
deleted file mode 100644 (file)
index f3de2df..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/crypto.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/csprogs.obj b/Debug-darkplaces-sdl2-vs2019-Win32/csprogs.obj
deleted file mode 100644 (file)
index 8e757ad..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/csprogs.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/curves.obj b/Debug-darkplaces-sdl2-vs2019-Win32/curves.obj
deleted file mode 100644 (file)
index cf3c3be..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/curves.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/cvar.obj b/Debug-darkplaces-sdl2-vs2019-Win32/cvar.obj
deleted file mode 100644 (file)
index 82b3236..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/cvar.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/CL.command.1.tlog b/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/CL.command.1.tlog
deleted file mode 100644 (file)
index 651617b..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/CL.command.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/CL.read.1.tlog b/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/CL.read.1.tlog
deleted file mode 100644 (file)
index 5fb2e19..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/CL.read.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/CL.write.1.tlog b/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/CL.write.1.tlog
deleted file mode 100644 (file)
index 0d7daa3..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/CL.write.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.lastbuildstate b/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.lastbuildstate
deleted file mode 100644 (file)
index 98f50cd..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30037:VCServicingVersionATL=14.29.30038:VCServicingVersionCrtHeaders=14.29.30040:VCServicingVersionCompilers=14.29.30040:TargetPlatformVersion=10.0.19041.0:\r
-Debug|Win32|C:\Users\havoc\Source\Repos\darkplaces\|\r
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.write.1u.tlog b/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.write.1u.tlog
deleted file mode 100644 (file)
index 4423c08..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.write.1u.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.command.1.tlog b/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.command.1.tlog
deleted file mode 100644 (file)
index f8efc6f..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.command.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.delete.1.tlog b/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.delete.1.tlog
deleted file mode 100644 (file)
index bd1f521..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.delete.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.read.1.tlog b/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.read.1.tlog
deleted file mode 100644 (file)
index 17ad702..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.read.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.write.1.tlog b/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.write.1.tlog
deleted file mode 100644 (file)
index bf7540a..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/link.write.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/rc.command.1.tlog b/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/rc.command.1.tlog
deleted file mode 100644 (file)
index acaa2ff..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/rc.command.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/rc.read.1.tlog b/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/rc.read.1.tlog
deleted file mode 100644 (file)
index c884522..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/rc.read.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/rc.write.1.tlog b/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/rc.write.1.tlog
deleted file mode 100644 (file)
index cd41146..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/darkplac.72D93E63.tlog/rc.write.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplaces-sdl2-vs2019.exe.recipe b/Debug-darkplaces-sdl2-vs2019-Win32/darkplaces-sdl2-vs2019.exe.recipe
deleted file mode 100644 (file)
index ccf8419..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project>\r
-  <ProjectOutputs>\r
-    <ProjectOutput>\r
-      <FullPath>C:\Users\havoc\Source\Repos\darkplaces\darkplaces-sdl2-vs2019.exe</FullPath>\r
-    </ProjectOutput>\r
-  </ProjectOutputs>\r
-  <ContentFiles />\r
-  <SatelliteDlls />\r
-  <NonRecipeFileRefs />\r
-</Project>
\ No newline at end of file
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplaces-sdl2-vs2019.ilk b/Debug-darkplaces-sdl2-vs2019-Win32/darkplaces-sdl2-vs2019.ilk
deleted file mode 100644 (file)
index c05c3e2..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/darkplaces-sdl2-vs2019.ilk and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplaces-sdl2-vs2019.log b/Debug-darkplaces-sdl2-vs2019-Win32/darkplaces-sdl2-vs2019.log
deleted file mode 100644 (file)
index 5c352d8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-  darkplaces-sdl2-vs2019.vcxproj -> C:\Users\havoc\Source\Repos\darkplaces\darkplaces-sdl2-vs2019.exe\r
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/darkplaces.res b/Debug-darkplaces-sdl2-vs2019-Win32/darkplaces.res
deleted file mode 100644 (file)
index 7acb942..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/darkplaces.res and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/dpvsimpledecode.obj b/Debug-darkplaces-sdl2-vs2019-Win32/dpvsimpledecode.obj
deleted file mode 100644 (file)
index a27f97a..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/dpvsimpledecode.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/filematch.obj b/Debug-darkplaces-sdl2-vs2019-Win32/filematch.obj
deleted file mode 100644 (file)
index 21ebf3f..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/filematch.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/fractalnoise.obj b/Debug-darkplaces-sdl2-vs2019-Win32/fractalnoise.obj
deleted file mode 100644 (file)
index b910af0..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/fractalnoise.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/fs.obj b/Debug-darkplaces-sdl2-vs2019-Win32/fs.obj
deleted file mode 100644 (file)
index 7ebfaf1..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/fs.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/ft2.obj b/Debug-darkplaces-sdl2-vs2019-Win32/ft2.obj
deleted file mode 100644 (file)
index 68c6a19..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/ft2.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/gl_backend.obj b/Debug-darkplaces-sdl2-vs2019-Win32/gl_backend.obj
deleted file mode 100644 (file)
index a1cfb57..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/gl_backend.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/gl_draw.obj b/Debug-darkplaces-sdl2-vs2019-Win32/gl_draw.obj
deleted file mode 100644 (file)
index b612180..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/gl_draw.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/gl_rmain.obj b/Debug-darkplaces-sdl2-vs2019-Win32/gl_rmain.obj
deleted file mode 100644 (file)
index d3a627e..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/gl_rmain.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/gl_rsurf.obj b/Debug-darkplaces-sdl2-vs2019-Win32/gl_rsurf.obj
deleted file mode 100644 (file)
index 38ad7da..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/gl_rsurf.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/gl_textures.obj b/Debug-darkplaces-sdl2-vs2019-Win32/gl_textures.obj
deleted file mode 100644 (file)
index 61466b2..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/gl_textures.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/hmac.obj b/Debug-darkplaces-sdl2-vs2019-Win32/hmac.obj
deleted file mode 100644 (file)
index b169de8..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/hmac.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/host.obj b/Debug-darkplaces-sdl2-vs2019-Win32/host.obj
deleted file mode 100644 (file)
index cd48d1c..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/host.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/image.obj b/Debug-darkplaces-sdl2-vs2019-Win32/image.obj
deleted file mode 100644 (file)
index ec30f83..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/image.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/image_png.obj b/Debug-darkplaces-sdl2-vs2019-Win32/image_png.obj
deleted file mode 100644 (file)
index 3b864cc..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/image_png.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/jpeg.obj b/Debug-darkplaces-sdl2-vs2019-Win32/jpeg.obj
deleted file mode 100644 (file)
index 8b68194..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/jpeg.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/keys.obj b/Debug-darkplaces-sdl2-vs2019-Win32/keys.obj
deleted file mode 100644 (file)
index dadbabe..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/keys.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/lhnet.obj b/Debug-darkplaces-sdl2-vs2019-Win32/lhnet.obj
deleted file mode 100644 (file)
index c42b0af..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/lhnet.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/libcurl.obj b/Debug-darkplaces-sdl2-vs2019-Win32/libcurl.obj
deleted file mode 100644 (file)
index b057354..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/libcurl.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/mathlib.obj b/Debug-darkplaces-sdl2-vs2019-Win32/mathlib.obj
deleted file mode 100644 (file)
index 8a7ca92..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/mathlib.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/matrixlib.obj b/Debug-darkplaces-sdl2-vs2019-Win32/matrixlib.obj
deleted file mode 100644 (file)
index 18bdedd..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/matrixlib.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/mdfour.obj b/Debug-darkplaces-sdl2-vs2019-Win32/mdfour.obj
deleted file mode 100644 (file)
index d1c1469..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/mdfour.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/menu.obj b/Debug-darkplaces-sdl2-vs2019-Win32/menu.obj
deleted file mode 100644 (file)
index fd57990..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/menu.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/meshqueue.obj b/Debug-darkplaces-sdl2-vs2019-Win32/meshqueue.obj
deleted file mode 100644 (file)
index 0b654d1..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/meshqueue.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/mod_skeletal_animatevertices_generic.obj b/Debug-darkplaces-sdl2-vs2019-Win32/mod_skeletal_animatevertices_generic.obj
deleted file mode 100644 (file)
index 299bd3c..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/mod_skeletal_animatevertices_generic.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/mod_skeletal_animatevertices_sse.obj b/Debug-darkplaces-sdl2-vs2019-Win32/mod_skeletal_animatevertices_sse.obj
deleted file mode 100644 (file)
index 71cea4b..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/mod_skeletal_animatevertices_sse.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/model_alias.obj b/Debug-darkplaces-sdl2-vs2019-Win32/model_alias.obj
deleted file mode 100644 (file)
index 544c14d..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/model_alias.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/model_brush.obj b/Debug-darkplaces-sdl2-vs2019-Win32/model_brush.obj
deleted file mode 100644 (file)
index a1b7395..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/model_brush.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/model_shared.obj b/Debug-darkplaces-sdl2-vs2019-Win32/model_shared.obj
deleted file mode 100644 (file)
index 03c0624..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/model_shared.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/model_sprite.obj b/Debug-darkplaces-sdl2-vs2019-Win32/model_sprite.obj
deleted file mode 100644 (file)
index ef3e649..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/model_sprite.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/mvm_cmds.obj b/Debug-darkplaces-sdl2-vs2019-Win32/mvm_cmds.obj
deleted file mode 100644 (file)
index 5cc387d..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/mvm_cmds.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/netconn.obj b/Debug-darkplaces-sdl2-vs2019-Win32/netconn.obj
deleted file mode 100644 (file)
index 89e3db1..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/netconn.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/palette.obj b/Debug-darkplaces-sdl2-vs2019-Win32/palette.obj
deleted file mode 100644 (file)
index 05cbc08..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/palette.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/polygon.obj b/Debug-darkplaces-sdl2-vs2019-Win32/polygon.obj
deleted file mode 100644 (file)
index 921bfbc..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/polygon.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/portals.obj b/Debug-darkplaces-sdl2-vs2019-Win32/portals.obj
deleted file mode 100644 (file)
index 6db192e..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/portals.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/protocol.obj b/Debug-darkplaces-sdl2-vs2019-Win32/protocol.obj
deleted file mode 100644 (file)
index 3ba2335..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/protocol.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/prvm_cmds.obj b/Debug-darkplaces-sdl2-vs2019-Win32/prvm_cmds.obj
deleted file mode 100644 (file)
index 13956c0..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/prvm_cmds.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/prvm_edict.obj b/Debug-darkplaces-sdl2-vs2019-Win32/prvm_edict.obj
deleted file mode 100644 (file)
index 869f461..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/prvm_edict.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/prvm_exec.obj b/Debug-darkplaces-sdl2-vs2019-Win32/prvm_exec.obj
deleted file mode 100644 (file)
index adc5321..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/prvm_exec.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/r_explosion.obj b/Debug-darkplaces-sdl2-vs2019-Win32/r_explosion.obj
deleted file mode 100644 (file)
index 55c2dda..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/r_explosion.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/r_lightning.obj b/Debug-darkplaces-sdl2-vs2019-Win32/r_lightning.obj
deleted file mode 100644 (file)
index 638fd94..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/r_lightning.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/r_modules.obj b/Debug-darkplaces-sdl2-vs2019-Win32/r_modules.obj
deleted file mode 100644 (file)
index 0505644..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/r_modules.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/r_shadow.obj b/Debug-darkplaces-sdl2-vs2019-Win32/r_shadow.obj
deleted file mode 100644 (file)
index 30d70b8..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/r_shadow.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/r_sky.obj b/Debug-darkplaces-sdl2-vs2019-Win32/r_sky.obj
deleted file mode 100644 (file)
index 0a11c10..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/r_sky.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/r_sprites.obj b/Debug-darkplaces-sdl2-vs2019-Win32/r_sprites.obj
deleted file mode 100644 (file)
index 47da32d..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/r_sprites.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/r_stats.obj b/Debug-darkplaces-sdl2-vs2019-Win32/r_stats.obj
deleted file mode 100644 (file)
index 659e948..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/r_stats.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sbar.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sbar.obj
deleted file mode 100644 (file)
index 731886a..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sbar.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/snd_main.obj b/Debug-darkplaces-sdl2-vs2019-Win32/snd_main.obj
deleted file mode 100644 (file)
index 1ce0ba1..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/snd_main.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/snd_mem.obj b/Debug-darkplaces-sdl2-vs2019-Win32/snd_mem.obj
deleted file mode 100644 (file)
index 4ab9fb9..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/snd_mem.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/snd_mix.obj b/Debug-darkplaces-sdl2-vs2019-Win32/snd_mix.obj
deleted file mode 100644 (file)
index d66d2b8..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/snd_mix.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/snd_ogg.obj b/Debug-darkplaces-sdl2-vs2019-Win32/snd_ogg.obj
deleted file mode 100644 (file)
index 9e9acc3..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/snd_ogg.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/snd_sdl.obj b/Debug-darkplaces-sdl2-vs2019-Win32/snd_sdl.obj
deleted file mode 100644 (file)
index 80ed313..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/snd_sdl.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/snd_wav.obj b/Debug-darkplaces-sdl2-vs2019-Win32/snd_wav.obj
deleted file mode 100644 (file)
index 0f3c7cc..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/snd_wav.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/snd_xmp.obj b/Debug-darkplaces-sdl2-vs2019-Win32/snd_xmp.obj
deleted file mode 100644 (file)
index d05200b..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/snd_xmp.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sv_ccmds.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sv_ccmds.obj
deleted file mode 100644 (file)
index 01020c4..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sv_ccmds.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sv_demo.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sv_demo.obj
deleted file mode 100644 (file)
index eef0c07..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sv_demo.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents.obj
deleted file mode 100644 (file)
index 6e63e76..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents4.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents4.obj
deleted file mode 100644 (file)
index 550ba35..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents4.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents5.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents5.obj
deleted file mode 100644 (file)
index a067c9c..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents5.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents_csqc.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents_csqc.obj
deleted file mode 100644 (file)
index a2d407e..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents_csqc.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents_nq.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents_nq.obj
deleted file mode 100644 (file)
index dd67784..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sv_ents_nq.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sv_main.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sv_main.obj
deleted file mode 100644 (file)
index 82e633a..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sv_main.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sv_move.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sv_move.obj
deleted file mode 100644 (file)
index 69b9ab0..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sv_move.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sv_phys.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sv_phys.obj
deleted file mode 100644 (file)
index 12140a8..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sv_phys.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sv_save.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sv_save.obj
deleted file mode 100644 (file)
index c0a891b..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sv_save.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sv_send.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sv_send.obj
deleted file mode 100644 (file)
index 6eead26..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sv_send.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sv_user.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sv_user.obj
deleted file mode 100644 (file)
index 617489d..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sv_user.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/svbsp.obj b/Debug-darkplaces-sdl2-vs2019-Win32/svbsp.obj
deleted file mode 100644 (file)
index 3acb1b8..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/svbsp.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/svvm_cmds.obj b/Debug-darkplaces-sdl2-vs2019-Win32/svvm_cmds.obj
deleted file mode 100644 (file)
index 63685c2..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/svvm_cmds.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sys_sdl.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sys_sdl.obj
deleted file mode 100644 (file)
index f3f4e99..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sys_sdl.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/sys_shared.obj b/Debug-darkplaces-sdl2-vs2019-Win32/sys_shared.obj
deleted file mode 100644 (file)
index 1a62db0..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/sys_shared.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/taskqueue.obj b/Debug-darkplaces-sdl2-vs2019-Win32/taskqueue.obj
deleted file mode 100644 (file)
index 0c2fb2e..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/taskqueue.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/thread_sdl.obj b/Debug-darkplaces-sdl2-vs2019-Win32/thread_sdl.obj
deleted file mode 100644 (file)
index 8fa0925..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/thread_sdl.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/utf8lib.obj b/Debug-darkplaces-sdl2-vs2019-Win32/utf8lib.obj
deleted file mode 100644 (file)
index d85aa4b..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/utf8lib.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/vc142.idb b/Debug-darkplaces-sdl2-vs2019-Win32/vc142.idb
deleted file mode 100644 (file)
index f5a1038..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/vc142.idb and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/vid_sdl.obj b/Debug-darkplaces-sdl2-vs2019-Win32/vid_sdl.obj
deleted file mode 100644 (file)
index 2bed016..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/vid_sdl.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/vid_shared.obj b/Debug-darkplaces-sdl2-vs2019-Win32/vid_shared.obj
deleted file mode 100644 (file)
index d28ccb0..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/vid_shared.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/view.obj b/Debug-darkplaces-sdl2-vs2019-Win32/view.obj
deleted file mode 100644 (file)
index 2d108c7..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/view.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/wad.obj b/Debug-darkplaces-sdl2-vs2019-Win32/wad.obj
deleted file mode 100644 (file)
index fad3368..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/wad.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/world.obj b/Debug-darkplaces-sdl2-vs2019-Win32/world.obj
deleted file mode 100644 (file)
index eecae09..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/world.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-Win32/zone.obj b/Debug-darkplaces-sdl2-vs2019-Win32/zone.obj
deleted file mode 100644 (file)
index c49afab..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-Win32/zone.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/bih.obj b/Debug-darkplaces-sdl2-vs2019-x64/bih.obj
deleted file mode 100644 (file)
index 7186689..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/bih.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/builddate.obj b/Debug-darkplaces-sdl2-vs2019-x64/builddate.obj
deleted file mode 100644 (file)
index 330d930..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/builddate.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cap_avi.obj b/Debug-darkplaces-sdl2-vs2019-x64/cap_avi.obj
deleted file mode 100644 (file)
index 1e4d17d..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cap_avi.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cap_ogg.obj b/Debug-darkplaces-sdl2-vs2019-x64/cap_ogg.obj
deleted file mode 100644 (file)
index 70259dc..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cap_ogg.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cd_shared.obj b/Debug-darkplaces-sdl2-vs2019-x64/cd_shared.obj
deleted file mode 100644 (file)
index 832fd96..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cd_shared.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_cmd.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_cmd.obj
deleted file mode 100644 (file)
index fbacda8..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_cmd.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_collision.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_collision.obj
deleted file mode 100644 (file)
index 38572b1..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_collision.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_demo.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_demo.obj
deleted file mode 100644 (file)
index 571ca0b..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_demo.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_ents.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_ents.obj
deleted file mode 100644 (file)
index ebbac5e..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_ents.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_ents4.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_ents4.obj
deleted file mode 100644 (file)
index 7d8a6a8..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_ents4.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_ents5.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_ents5.obj
deleted file mode 100644 (file)
index c5c39b2..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_ents5.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_ents_nq.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_ents_nq.obj
deleted file mode 100644 (file)
index 99584ce..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_ents_nq.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_ents_qw.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_ents_qw.obj
deleted file mode 100644 (file)
index 3af72d1..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_ents_qw.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_input.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_input.obj
deleted file mode 100644 (file)
index 7c54cb6..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_input.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_main.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_main.obj
deleted file mode 100644 (file)
index 4645a1e..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_main.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_parse.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_parse.obj
deleted file mode 100644 (file)
index 3566133..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_parse.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_particles.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_particles.obj
deleted file mode 100644 (file)
index 243f091..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_particles.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_screen.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_screen.obj
deleted file mode 100644 (file)
index d486cf8..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_screen.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_video.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_video.obj
deleted file mode 100644 (file)
index d225106..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_video.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cl_video_libavw.obj b/Debug-darkplaces-sdl2-vs2019-x64/cl_video_libavw.obj
deleted file mode 100644 (file)
index 91c5dcf..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cl_video_libavw.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/clvm_cmds.obj b/Debug-darkplaces-sdl2-vs2019-x64/clvm_cmds.obj
deleted file mode 100644 (file)
index b607896..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/clvm_cmds.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cmd.obj b/Debug-darkplaces-sdl2-vs2019-x64/cmd.obj
deleted file mode 100644 (file)
index 9881932..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cmd.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/collision.obj b/Debug-darkplaces-sdl2-vs2019-x64/collision.obj
deleted file mode 100644 (file)
index c3620d9..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/collision.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/com_crc16.obj b/Debug-darkplaces-sdl2-vs2019-x64/com_crc16.obj
deleted file mode 100644 (file)
index dda60e5..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/com_crc16.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/com_ents.obj b/Debug-darkplaces-sdl2-vs2019-x64/com_ents.obj
deleted file mode 100644 (file)
index 6616e8d..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/com_ents.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/com_ents4.obj b/Debug-darkplaces-sdl2-vs2019-x64/com_ents4.obj
deleted file mode 100644 (file)
index 210b816..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/com_ents4.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/com_game.obj b/Debug-darkplaces-sdl2-vs2019-x64/com_game.obj
deleted file mode 100644 (file)
index b6436eb..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/com_game.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/com_infostring.obj b/Debug-darkplaces-sdl2-vs2019-x64/com_infostring.obj
deleted file mode 100644 (file)
index dffd156..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/com_infostring.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/com_msg.obj b/Debug-darkplaces-sdl2-vs2019-x64/com_msg.obj
deleted file mode 100644 (file)
index e0d5433..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/com_msg.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/common.obj b/Debug-darkplaces-sdl2-vs2019-x64/common.obj
deleted file mode 100644 (file)
index 287766e..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/common.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/console.obj b/Debug-darkplaces-sdl2-vs2019-x64/console.obj
deleted file mode 100644 (file)
index acd991c..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/console.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/convex.obj b/Debug-darkplaces-sdl2-vs2019-x64/convex.obj
deleted file mode 100644 (file)
index 00e9fe2..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/convex.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/crypto.obj b/Debug-darkplaces-sdl2-vs2019-x64/crypto.obj
deleted file mode 100644 (file)
index 5da19e9..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/crypto.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/csprogs.obj b/Debug-darkplaces-sdl2-vs2019-x64/csprogs.obj
deleted file mode 100644 (file)
index 8f56d79..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/csprogs.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/curves.obj b/Debug-darkplaces-sdl2-vs2019-x64/curves.obj
deleted file mode 100644 (file)
index fbd7ebe..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/curves.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/cvar.obj b/Debug-darkplaces-sdl2-vs2019-x64/cvar.obj
deleted file mode 100644 (file)
index 3af8400..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/cvar.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.command.1.tlog b/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.command.1.tlog
deleted file mode 100644 (file)
index 41d0569..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.command.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.read.1.tlog b/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.read.1.tlog
deleted file mode 100644 (file)
index d08af70..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.read.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.write.1.tlog b/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.write.1.tlog
deleted file mode 100644 (file)
index 36a48d6..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.write.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.lastbuildstate b/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.lastbuildstate
deleted file mode 100644 (file)
index e7aa3fa..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30037:VCServicingVersionATL=14.29.30038:VCServicingVersionCrtHeaders=14.29.30040:VCServicingVersionCompilers=14.29.30040:TargetPlatformVersion=10.0.19041.0:\r
-Debug|x64|C:\Users\havoc\Source\Repos\darkplaces\|\r
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.write.1u.tlog b/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.write.1u.tlog
deleted file mode 100644 (file)
index a188496..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.write.1u.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.command.1.tlog b/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.command.1.tlog
deleted file mode 100644 (file)
index 57f0ef7..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.command.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.delete.1.tlog b/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.delete.1.tlog
deleted file mode 100644 (file)
index a028892..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.delete.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.read.1.tlog b/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.read.1.tlog
deleted file mode 100644 (file)
index 0d87ae6..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.read.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.write.1.tlog b/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.write.1.tlog
deleted file mode 100644 (file)
index 6185f7b..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.write.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.command.1.tlog b/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.command.1.tlog
deleted file mode 100644 (file)
index 6bccddf..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.command.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.read.1.tlog b/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.read.1.tlog
deleted file mode 100644 (file)
index c884522..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.read.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.write.1.tlog b/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.write.1.tlog
deleted file mode 100644 (file)
index aa0d88a..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.write.1.tlog and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.exe.recipe b/Debug-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.exe.recipe
deleted file mode 100644 (file)
index ccf8419..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project>\r
-  <ProjectOutputs>\r
-    <ProjectOutput>\r
-      <FullPath>C:\Users\havoc\Source\Repos\darkplaces\darkplaces-sdl2-vs2019.exe</FullPath>\r
-    </ProjectOutput>\r
-  </ProjectOutputs>\r
-  <ContentFiles />\r
-  <SatelliteDlls />\r
-  <NonRecipeFileRefs />\r
-</Project>
\ No newline at end of file
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.ilk b/Debug-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.ilk
deleted file mode 100644 (file)
index 72e1681..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.ilk and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.log b/Debug-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.log
deleted file mode 100644 (file)
index 766d5cd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-cl : command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release\r
-  convex.c\r
-  darkplaces-sdl2-vs2019.vcxproj -> C:\Users\havoc\Source\Repos\darkplaces\darkplaces-sdl2-vs2019.exe\r
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/darkplaces.res b/Debug-darkplaces-sdl2-vs2019-x64/darkplaces.res
deleted file mode 100644 (file)
index 7acb942..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/darkplaces.res and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/dpvsimpledecode.obj b/Debug-darkplaces-sdl2-vs2019-x64/dpvsimpledecode.obj
deleted file mode 100644 (file)
index 5e9b592..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/dpvsimpledecode.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/filematch.obj b/Debug-darkplaces-sdl2-vs2019-x64/filematch.obj
deleted file mode 100644 (file)
index bdaf9f6..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/filematch.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/fractalnoise.obj b/Debug-darkplaces-sdl2-vs2019-x64/fractalnoise.obj
deleted file mode 100644 (file)
index b804b8f..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/fractalnoise.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/fs.obj b/Debug-darkplaces-sdl2-vs2019-x64/fs.obj
deleted file mode 100644 (file)
index aa6eb73..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/fs.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/ft2.obj b/Debug-darkplaces-sdl2-vs2019-x64/ft2.obj
deleted file mode 100644 (file)
index e6fb76f..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/ft2.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/gl_backend.obj b/Debug-darkplaces-sdl2-vs2019-x64/gl_backend.obj
deleted file mode 100644 (file)
index a379b10..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/gl_backend.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/gl_draw.obj b/Debug-darkplaces-sdl2-vs2019-x64/gl_draw.obj
deleted file mode 100644 (file)
index 6fc5eab..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/gl_draw.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/gl_rmain.obj b/Debug-darkplaces-sdl2-vs2019-x64/gl_rmain.obj
deleted file mode 100644 (file)
index 9196638..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/gl_rmain.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/gl_rsurf.obj b/Debug-darkplaces-sdl2-vs2019-x64/gl_rsurf.obj
deleted file mode 100644 (file)
index 83e6b58..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/gl_rsurf.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/gl_textures.obj b/Debug-darkplaces-sdl2-vs2019-x64/gl_textures.obj
deleted file mode 100644 (file)
index 9a48935..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/gl_textures.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/hmac.obj b/Debug-darkplaces-sdl2-vs2019-x64/hmac.obj
deleted file mode 100644 (file)
index 6747633..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/hmac.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/host.obj b/Debug-darkplaces-sdl2-vs2019-x64/host.obj
deleted file mode 100644 (file)
index d18bf8a..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/host.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/image.obj b/Debug-darkplaces-sdl2-vs2019-x64/image.obj
deleted file mode 100644 (file)
index ec30cea..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/image.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/image_png.obj b/Debug-darkplaces-sdl2-vs2019-x64/image_png.obj
deleted file mode 100644 (file)
index 3cec3e7..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/image_png.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/jpeg.obj b/Debug-darkplaces-sdl2-vs2019-x64/jpeg.obj
deleted file mode 100644 (file)
index 1f3ad4c..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/jpeg.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/keys.obj b/Debug-darkplaces-sdl2-vs2019-x64/keys.obj
deleted file mode 100644 (file)
index b547760..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/keys.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/lhnet.obj b/Debug-darkplaces-sdl2-vs2019-x64/lhnet.obj
deleted file mode 100644 (file)
index bc2b74d..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/lhnet.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/libcurl.obj b/Debug-darkplaces-sdl2-vs2019-x64/libcurl.obj
deleted file mode 100644 (file)
index 52b26f4..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/libcurl.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/mathlib.obj b/Debug-darkplaces-sdl2-vs2019-x64/mathlib.obj
deleted file mode 100644 (file)
index ac17fda..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/mathlib.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/matrixlib.obj b/Debug-darkplaces-sdl2-vs2019-x64/matrixlib.obj
deleted file mode 100644 (file)
index 9b86818..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/matrixlib.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/mdfour.obj b/Debug-darkplaces-sdl2-vs2019-x64/mdfour.obj
deleted file mode 100644 (file)
index abfb3ab..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/mdfour.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/menu.obj b/Debug-darkplaces-sdl2-vs2019-x64/menu.obj
deleted file mode 100644 (file)
index 2122e00..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/menu.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/meshqueue.obj b/Debug-darkplaces-sdl2-vs2019-x64/meshqueue.obj
deleted file mode 100644 (file)
index 5bfeed6..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/meshqueue.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_generic.obj b/Debug-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_generic.obj
deleted file mode 100644 (file)
index 878a0c0..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_generic.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_sse.obj b/Debug-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_sse.obj
deleted file mode 100644 (file)
index f4457c2..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_sse.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/model_alias.obj b/Debug-darkplaces-sdl2-vs2019-x64/model_alias.obj
deleted file mode 100644 (file)
index 823794b..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/model_alias.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/model_brush.obj b/Debug-darkplaces-sdl2-vs2019-x64/model_brush.obj
deleted file mode 100644 (file)
index 5426867..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/model_brush.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/model_shared.obj b/Debug-darkplaces-sdl2-vs2019-x64/model_shared.obj
deleted file mode 100644 (file)
index 32b0b8f..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/model_shared.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/model_sprite.obj b/Debug-darkplaces-sdl2-vs2019-x64/model_sprite.obj
deleted file mode 100644 (file)
index 23c2e90..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/model_sprite.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/mvm_cmds.obj b/Debug-darkplaces-sdl2-vs2019-x64/mvm_cmds.obj
deleted file mode 100644 (file)
index 0a9da69..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/mvm_cmds.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/netconn.obj b/Debug-darkplaces-sdl2-vs2019-x64/netconn.obj
deleted file mode 100644 (file)
index 4e17467..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/netconn.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/palette.obj b/Debug-darkplaces-sdl2-vs2019-x64/palette.obj
deleted file mode 100644 (file)
index d7a8b2f..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/palette.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/polygon.obj b/Debug-darkplaces-sdl2-vs2019-x64/polygon.obj
deleted file mode 100644 (file)
index 892f33a..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/polygon.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/portals.obj b/Debug-darkplaces-sdl2-vs2019-x64/portals.obj
deleted file mode 100644 (file)
index a2dc036..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/portals.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/protocol.obj b/Debug-darkplaces-sdl2-vs2019-x64/protocol.obj
deleted file mode 100644 (file)
index d799315..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/protocol.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/prvm_cmds.obj b/Debug-darkplaces-sdl2-vs2019-x64/prvm_cmds.obj
deleted file mode 100644 (file)
index c76ba97..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/prvm_cmds.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/prvm_edict.obj b/Debug-darkplaces-sdl2-vs2019-x64/prvm_edict.obj
deleted file mode 100644 (file)
index 1a180c5..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/prvm_edict.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/prvm_exec.obj b/Debug-darkplaces-sdl2-vs2019-x64/prvm_exec.obj
deleted file mode 100644 (file)
index 4f41f27..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/prvm_exec.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/r_explosion.obj b/Debug-darkplaces-sdl2-vs2019-x64/r_explosion.obj
deleted file mode 100644 (file)
index aaf07a2..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/r_explosion.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/r_lightning.obj b/Debug-darkplaces-sdl2-vs2019-x64/r_lightning.obj
deleted file mode 100644 (file)
index fb557e2..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/r_lightning.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/r_modules.obj b/Debug-darkplaces-sdl2-vs2019-x64/r_modules.obj
deleted file mode 100644 (file)
index 4051bae..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/r_modules.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/r_shadow.obj b/Debug-darkplaces-sdl2-vs2019-x64/r_shadow.obj
deleted file mode 100644 (file)
index 4746368..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/r_shadow.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/r_sky.obj b/Debug-darkplaces-sdl2-vs2019-x64/r_sky.obj
deleted file mode 100644 (file)
index 2f3e515..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/r_sky.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/r_sprites.obj b/Debug-darkplaces-sdl2-vs2019-x64/r_sprites.obj
deleted file mode 100644 (file)
index d286524..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/r_sprites.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/r_stats.obj b/Debug-darkplaces-sdl2-vs2019-x64/r_stats.obj
deleted file mode 100644 (file)
index d0eb54e..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/r_stats.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sbar.obj b/Debug-darkplaces-sdl2-vs2019-x64/sbar.obj
deleted file mode 100644 (file)
index 6103f0b..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sbar.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/snd_main.obj b/Debug-darkplaces-sdl2-vs2019-x64/snd_main.obj
deleted file mode 100644 (file)
index fb789c4..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/snd_main.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/snd_mem.obj b/Debug-darkplaces-sdl2-vs2019-x64/snd_mem.obj
deleted file mode 100644 (file)
index e5163f9..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/snd_mem.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/snd_mix.obj b/Debug-darkplaces-sdl2-vs2019-x64/snd_mix.obj
deleted file mode 100644 (file)
index 5d9cb89..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/snd_mix.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/snd_ogg.obj b/Debug-darkplaces-sdl2-vs2019-x64/snd_ogg.obj
deleted file mode 100644 (file)
index 07aabab..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/snd_ogg.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/snd_sdl.obj b/Debug-darkplaces-sdl2-vs2019-x64/snd_sdl.obj
deleted file mode 100644 (file)
index 69ff84a..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/snd_sdl.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/snd_wav.obj b/Debug-darkplaces-sdl2-vs2019-x64/snd_wav.obj
deleted file mode 100644 (file)
index 067ada8..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/snd_wav.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/snd_xmp.obj b/Debug-darkplaces-sdl2-vs2019-x64/snd_xmp.obj
deleted file mode 100644 (file)
index 1610b23..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/snd_xmp.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sv_ccmds.obj b/Debug-darkplaces-sdl2-vs2019-x64/sv_ccmds.obj
deleted file mode 100644 (file)
index 7ded1bb..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sv_ccmds.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sv_demo.obj b/Debug-darkplaces-sdl2-vs2019-x64/sv_demo.obj
deleted file mode 100644 (file)
index ad5b602..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sv_demo.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sv_ents.obj b/Debug-darkplaces-sdl2-vs2019-x64/sv_ents.obj
deleted file mode 100644 (file)
index 210abd1..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sv_ents.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sv_ents4.obj b/Debug-darkplaces-sdl2-vs2019-x64/sv_ents4.obj
deleted file mode 100644 (file)
index fad4539..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sv_ents4.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sv_ents5.obj b/Debug-darkplaces-sdl2-vs2019-x64/sv_ents5.obj
deleted file mode 100644 (file)
index 9a98d5d..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sv_ents5.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sv_ents_csqc.obj b/Debug-darkplaces-sdl2-vs2019-x64/sv_ents_csqc.obj
deleted file mode 100644 (file)
index f2ffa12..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sv_ents_csqc.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sv_ents_nq.obj b/Debug-darkplaces-sdl2-vs2019-x64/sv_ents_nq.obj
deleted file mode 100644 (file)
index 321a771..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sv_ents_nq.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sv_main.obj b/Debug-darkplaces-sdl2-vs2019-x64/sv_main.obj
deleted file mode 100644 (file)
index 0029348..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sv_main.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sv_move.obj b/Debug-darkplaces-sdl2-vs2019-x64/sv_move.obj
deleted file mode 100644 (file)
index bc0b9ee..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sv_move.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sv_phys.obj b/Debug-darkplaces-sdl2-vs2019-x64/sv_phys.obj
deleted file mode 100644 (file)
index c02dc58..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sv_phys.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sv_save.obj b/Debug-darkplaces-sdl2-vs2019-x64/sv_save.obj
deleted file mode 100644 (file)
index e410a7d..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sv_save.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sv_send.obj b/Debug-darkplaces-sdl2-vs2019-x64/sv_send.obj
deleted file mode 100644 (file)
index 18905e2..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sv_send.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sv_user.obj b/Debug-darkplaces-sdl2-vs2019-x64/sv_user.obj
deleted file mode 100644 (file)
index 9e7a616..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sv_user.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/svbsp.obj b/Debug-darkplaces-sdl2-vs2019-x64/svbsp.obj
deleted file mode 100644 (file)
index e1b3973..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/svbsp.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/svvm_cmds.obj b/Debug-darkplaces-sdl2-vs2019-x64/svvm_cmds.obj
deleted file mode 100644 (file)
index c177462..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/svvm_cmds.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sys_sdl.obj b/Debug-darkplaces-sdl2-vs2019-x64/sys_sdl.obj
deleted file mode 100644 (file)
index cf9e963..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sys_sdl.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/sys_shared.obj b/Debug-darkplaces-sdl2-vs2019-x64/sys_shared.obj
deleted file mode 100644 (file)
index 35f0d32..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/sys_shared.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/taskqueue.obj b/Debug-darkplaces-sdl2-vs2019-x64/taskqueue.obj
deleted file mode 100644 (file)
index e6abbaa..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/taskqueue.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/thread_sdl.obj b/Debug-darkplaces-sdl2-vs2019-x64/thread_sdl.obj
deleted file mode 100644 (file)
index 6e6a6cf..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/thread_sdl.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/utf8lib.obj b/Debug-darkplaces-sdl2-vs2019-x64/utf8lib.obj
deleted file mode 100644 (file)
index ac4f030..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/utf8lib.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/vc142.idb b/Debug-darkplaces-sdl2-vs2019-x64/vc142.idb
deleted file mode 100644 (file)
index b2d29e8..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/vc142.idb and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/vid_sdl.obj b/Debug-darkplaces-sdl2-vs2019-x64/vid_sdl.obj
deleted file mode 100644 (file)
index 0203e5a..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/vid_sdl.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/vid_shared.obj b/Debug-darkplaces-sdl2-vs2019-x64/vid_shared.obj
deleted file mode 100644 (file)
index df73fe3..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/vid_shared.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/view.obj b/Debug-darkplaces-sdl2-vs2019-x64/view.obj
deleted file mode 100644 (file)
index e5202d9..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/view.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/wad.obj b/Debug-darkplaces-sdl2-vs2019-x64/wad.obj
deleted file mode 100644 (file)
index 5cddd1a..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/wad.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/world.obj b/Debug-darkplaces-sdl2-vs2019-x64/world.obj
deleted file mode 100644 (file)
index 6b4413b..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/world.obj and /dev/null differ
diff --git a/Debug-darkplaces-sdl2-vs2019-x64/zone.obj b/Debug-darkplaces-sdl2-vs2019-x64/zone.obj
deleted file mode 100644 (file)
index 22a667b..0000000
Binary files a/Debug-darkplaces-sdl2-vs2019-x64/zone.obj and /dev/null differ
index f03bf95be25efd0e253205a1371e98051df4a069..df037d5c395d915012a76c835b768496c7d7751f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -13,18 +13,56 @@ Developed by LadyHavoc. See [CREDITS](CREDITS.md) for a list of contributors.
 #darkplaces on irc.anynet.org
 
 ### [Matrix](https://matrix.org/docs/guides/introduction)
-Space: [#darkplaces:matrix.org](https://matrix.to/#/#darkplaces:matrix.org)
+[![#darkplaces:matrix.org](https://img.shields.io/matrix/darkplaces:matrix.org?color=660000&label=%23darkplaces%3Amatrix.org)](https://matrix.to/#/#darkplaces:matrix.org)
+
+## Downloading and running
+
+Linux x86_64 builds are available in [GitHub CI](https://github.com/DarkPlacesEngine/darkplaces/actions?query=branch%3Amaster) artifacts.  
+
+More complete builds are available in [xonotic.org](https://beta.xonotic.org/autobuild/) engine zips.  
+These support Windows, Linux and macOS, and include the current libraries needed for all features.
+
+DarkPlaces supports many Quake-based games and you can select which it will run by renaming the executable so it's prefixed with the game's name, for example `rogue-sdl.exe`, or by passing a cmdline argument  
+such as `-rogue`.  This changes various engine behaviours and cvar defaults to suit the game.  
+The supported list and related details are defined in [com_game.c](https://github.com/DarkPlacesEngine/darkplaces/blob/master/com_game.c).
+
+Mods which aren't listed there can be run with (for example) `-game quake15` in which case DP will use the same behaviours and cvar defaults as for id1 Quake.
+
+## Quake Virtual File System
+
+All of Quake's data access is through a hierarchical file system, the contents
+of the file system can be transparently merged from several sources.
+
+The "base directory" is the path to the directory holding the quake.exe and
+all game directories.  This can be overridden with the "-basedir" command
+line parm to allow code debugging in a different directory.  The base
+directory is only used during filesystem initialization.
+
+The "game directory" is the first tree on the search path and directory that
+all generated files (savegames, screenshots, demos, config files) will be
+saved to.  This can be overridden with the "-game" command line parameter.
+If multiple "-game <gamedir>" args are passed the last one is the "primary"
+and files will be saved there, the rest are read-only.
 
 ## Build instructions (WIP)
 
-You will need the following packages regardless of platform:
-* SDL2
-* libjpeg
-* libpng
-* libvorbis
-* libogg
+These instructions are adequate for Quake, but for Xonotic please refer to [its wiki](https://gitlab.com/xonotic/xonotic/-/wikis/Compiling).
+
+### Required packages
 
-### Windows (MSYS2):
+The minimum SDL version is 2.0.18 for Linux and 2.24.0 for Windows.  
+The supported compilers are GCC and Clang.  
+The following package names are for Debian, see below for Windows and Mac.
+
+##### Client
+Build (mandatory): `build-essential` `libjpeg-dev` `libsdl2-dev`  
+Runtime (optional): `libcurl` `libpng` `libfreetype6` `libvorbisfile`  
+
+##### Dedicated Server
+Build (mandatory): `build-essential` `libjpeg-dev` `zlib1g-dev`  
+Runtime (optional): `libcurl` `libpng`  
+
+### Windows (MSYS2 MinGW):
 
 1. Install MSYS2, found [here](https://www.msys2.org/).
 2. Once you've installed MSYS2 and have fully updated it, open a MinGW64 terminal (***not an MSYS2 terminal***) and input the following command:
@@ -48,13 +86,28 @@ brew install sdl2 libjpeg-turbo libpng libvorbis curl
 
 ### Unix (General)
 
-From a terminal, in the engine's root directory, input `make`. On macOS, input `make` with a target such as `make sdl-release`.
+From a terminal, in the engine's root directory, input `make help` to list the targets.  
+To build the main executable, input `make sdl-release` which creates the file called  
+`darkplaces-sdl` or `darkplaces-sdl.exe` (Windows).
+
+If you get errors (that don't seem to be about missing dependencies) try `make clean` before compiling, especially if you updated your system since the last time you compiled.
+
+
+### Windows (Visual Studio 2019)
+
+Not recommended due to poor support for C standards, and lack of maintenance.
+
+DarkPlaces requires C11, so Windows SDK 10.0.20348.0 or later is needed.  
+To install it, run the Visual Studio Installer, click "Modify", click "Individual components", type "Windows SDK" in the search box, select the latest Windows SDK and de-select older versions.  
+You will also need "NuGet package manager" selected (to download SDL2 headers the first time you build).
+Click "Modify" to apply the changes.  
+
+Open `darkplaces-vs2019.sln`, select build type (`Debug` or `Release`) and platform (`Win32` or `x64`), and choose "Build Solution" from the "Build" menu to create files `darkplaces-sdl2-vs2019.exe` and `SDL2.dll`.
 
-Input `make help` for options.
+The Release build crashes. The Debug x64 build doesn't crash (but is rather slow) so this will be Fun for someone to debug.
 
-### Windows (Visual Studio)
+To get a build suitable for playing you'll need to use MinGW GCC, or download the autobuild from Xonotic (see above).
 
-Instructions coming soon.
 
 ## Contributing
 
diff --git a/Release-darkplaces-sdl2-vs2019-x64/bih.obj b/Release-darkplaces-sdl2-vs2019-x64/bih.obj
deleted file mode 100644 (file)
index 0a96a81..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/bih.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/builddate.obj b/Release-darkplaces-sdl2-vs2019-x64/builddate.obj
deleted file mode 100644 (file)
index 77bb7e4..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/builddate.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cap_avi.obj b/Release-darkplaces-sdl2-vs2019-x64/cap_avi.obj
deleted file mode 100644 (file)
index 46c1b07..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cap_avi.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cap_ogg.obj b/Release-darkplaces-sdl2-vs2019-x64/cap_ogg.obj
deleted file mode 100644 (file)
index 097a682..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cap_ogg.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cd_shared.obj b/Release-darkplaces-sdl2-vs2019-x64/cd_shared.obj
deleted file mode 100644 (file)
index f23ad60..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cd_shared.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_cmd.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_cmd.obj
deleted file mode 100644 (file)
index d2cab89..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_cmd.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_collision.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_collision.obj
deleted file mode 100644 (file)
index 5d49121..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_collision.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_demo.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_demo.obj
deleted file mode 100644 (file)
index c1ee7f9..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_demo.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_ents.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_ents.obj
deleted file mode 100644 (file)
index ab4885f..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_ents.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_ents4.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_ents4.obj
deleted file mode 100644 (file)
index c682138..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_ents4.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_ents5.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_ents5.obj
deleted file mode 100644 (file)
index 877c66b..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_ents5.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_ents_nq.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_ents_nq.obj
deleted file mode 100644 (file)
index adab19a..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_ents_nq.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_ents_qw.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_ents_qw.obj
deleted file mode 100644 (file)
index bfd91d0..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_ents_qw.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_input.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_input.obj
deleted file mode 100644 (file)
index d0934c6..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_input.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_main.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_main.obj
deleted file mode 100644 (file)
index ff4cfad..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_main.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_parse.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_parse.obj
deleted file mode 100644 (file)
index bede44a..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_parse.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_particles.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_particles.obj
deleted file mode 100644 (file)
index fe1fbd3..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_particles.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_screen.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_screen.obj
deleted file mode 100644 (file)
index 95519aa..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_screen.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_video.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_video.obj
deleted file mode 100644 (file)
index 14928b8..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_video.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cl_video_libavw.obj b/Release-darkplaces-sdl2-vs2019-x64/cl_video_libavw.obj
deleted file mode 100644 (file)
index c405a45..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cl_video_libavw.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/clvm_cmds.obj b/Release-darkplaces-sdl2-vs2019-x64/clvm_cmds.obj
deleted file mode 100644 (file)
index c8a203b..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/clvm_cmds.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cmd.obj b/Release-darkplaces-sdl2-vs2019-x64/cmd.obj
deleted file mode 100644 (file)
index 5a85487..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cmd.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/collision.obj b/Release-darkplaces-sdl2-vs2019-x64/collision.obj
deleted file mode 100644 (file)
index 80dcf45..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/collision.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/com_crc16.obj b/Release-darkplaces-sdl2-vs2019-x64/com_crc16.obj
deleted file mode 100644 (file)
index 41dd502..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/com_crc16.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/com_ents.obj b/Release-darkplaces-sdl2-vs2019-x64/com_ents.obj
deleted file mode 100644 (file)
index 9404043..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/com_ents.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/com_ents4.obj b/Release-darkplaces-sdl2-vs2019-x64/com_ents4.obj
deleted file mode 100644 (file)
index a5bfd9b..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/com_ents4.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/com_game.obj b/Release-darkplaces-sdl2-vs2019-x64/com_game.obj
deleted file mode 100644 (file)
index b34625c..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/com_game.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/com_infostring.obj b/Release-darkplaces-sdl2-vs2019-x64/com_infostring.obj
deleted file mode 100644 (file)
index bb2e10e..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/com_infostring.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/com_msg.obj b/Release-darkplaces-sdl2-vs2019-x64/com_msg.obj
deleted file mode 100644 (file)
index d3189fb..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/com_msg.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/common.obj b/Release-darkplaces-sdl2-vs2019-x64/common.obj
deleted file mode 100644 (file)
index b996d51..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/common.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/console.obj b/Release-darkplaces-sdl2-vs2019-x64/console.obj
deleted file mode 100644 (file)
index 30781a6..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/console.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/crypto.obj b/Release-darkplaces-sdl2-vs2019-x64/crypto.obj
deleted file mode 100644 (file)
index d326df4..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/crypto.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/csprogs.obj b/Release-darkplaces-sdl2-vs2019-x64/csprogs.obj
deleted file mode 100644 (file)
index 9dd04ea..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/csprogs.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/curves.obj b/Release-darkplaces-sdl2-vs2019-x64/curves.obj
deleted file mode 100644 (file)
index 9a988ce..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/curves.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/cvar.obj b/Release-darkplaces-sdl2-vs2019-x64/cvar.obj
deleted file mode 100644 (file)
index c48ce3c..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/cvar.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.command.1.tlog b/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.command.1.tlog
deleted file mode 100644 (file)
index 5e611ef..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.command.1.tlog and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.read.1.tlog b/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.read.1.tlog
deleted file mode 100644 (file)
index b19043a..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.read.1.tlog and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.write.1.tlog b/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.write.1.tlog
deleted file mode 100644 (file)
index 8e63add..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/CL.write.1.tlog and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.lastbuildstate b/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.lastbuildstate
deleted file mode 100644 (file)
index 619767b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30037:VCServicingVersionATL=14.29.30038:VCServicingVersionCrtHeaders=14.29.30040:VCServicingVersionCompilers=14.29.30040:TargetPlatformVersion=10.0.19041.0:\r
-Release|x64|C:\Users\havoc\Source\Repos\darkplaces\|\r
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.write.1u.tlog b/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.write.1u.tlog
deleted file mode 100644 (file)
index 85af472..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/darkplaces-sdl2-vs2019.write.1u.tlog and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.command.1.tlog b/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.command.1.tlog
deleted file mode 100644 (file)
index e439397..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.command.1.tlog and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.read.1.tlog b/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.read.1.tlog
deleted file mode 100644 (file)
index 61c05fd..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.read.1.tlog and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.write.1.tlog b/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.write.1.tlog
deleted file mode 100644 (file)
index 8ffa36b..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/link.write.1.tlog and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.command.1.tlog b/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.command.1.tlog
deleted file mode 100644 (file)
index 5b77175..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.command.1.tlog and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.read.1.tlog b/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.read.1.tlog
deleted file mode 100644 (file)
index c884522..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.read.1.tlog and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.write.1.tlog b/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.write.1.tlog
deleted file mode 100644 (file)
index 17e6962..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/darkplac.72D93E63.tlog/rc.write.1.tlog and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.exe.recipe b/Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.exe.recipe
deleted file mode 100644 (file)
index ccf8419..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project>\r
-  <ProjectOutputs>\r
-    <ProjectOutput>\r
-      <FullPath>C:\Users\havoc\Source\Repos\darkplaces\darkplaces-sdl2-vs2019.exe</FullPath>\r
-    </ProjectOutput>\r
-  </ProjectOutputs>\r
-  <ContentFiles />\r
-  <SatelliteDlls />\r
-  <NonRecipeFileRefs />\r
-</Project>
\ No newline at end of file
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.iobj b/Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.iobj
deleted file mode 100644 (file)
index d912d00..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.iobj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.ipdb b/Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.ipdb
deleted file mode 100644 (file)
index 6f878ef..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.ipdb and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.log b/Release-darkplaces-sdl2-vs2019-x64/darkplaces-sdl2-vs2019.log
deleted file mode 100644 (file)
index 931d450..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-  bih.c\r
-  builddate.c\r
-  cap_avi.c\r
-  cap_ogg.c\r
-  cd_shared.c\r
-  cl_cmd.c\r
-  cl_collision.c\r
-  cl_demo.c\r
-  cl_ents.c\r
-  cl_ents4.c\r
-  cl_ents5.c\r
-  cl_ents_nq.c\r
-  cl_ents_qw.c\r
-  cl_input.c\r
-  cl_main.c\r
-  cl_parse.c\r
-  cl_particles.c\r
-  cl_screen.c\r
-  cl_video.c\r
-  cl_video_libavw.c\r
-  clvm_cmds.c\r
-  cmd.c\r
-  collision.c\r
-  com_crc16.c\r
-  com_ents.c\r
-  com_ents4.c\r
-  com_game.c\r
-  com_infostring.c\r
-  com_msg.c\r
-  common.c\r
-  console.c\r
-  csprogs.c\r
-  curves.c\r
-  cvar.c\r
-  dpvsimpledecode.c\r
-  filematch.c\r
-  fractalnoise.c\r
-  fs.c\r
-  ft2.c\r
-  gl_backend.c\r
-  gl_draw.c\r
-  gl_rmain.c\r
-  gl_rsurf.c\r
-  gl_textures.c\r
-  hmac.c\r
-  host.c\r
-  image.c\r
-  image_png.c\r
-  jpeg.c\r
-  keys.c\r
-  lhnet.c\r
-  libcurl.c\r
-  mathlib.c\r
-  matrixlib.c\r
-  mdfour.c\r
-  menu.c\r
-  meshqueue.c\r
-  mod_skeletal_animatevertices_generic.c\r
-  mod_skeletal_animatevertices_sse.c\r
-  model_alias.c\r
-  model_brush.c\r
-  model_shared.c\r
-  model_sprite.c\r
-  mvm_cmds.c\r
-  netconn.c\r
-  palette.c\r
-  polygon.c\r
-  portals.c\r
-  protocol.c\r
-  prvm_cmds.c\r
-  prvm_edict.c\r
-  prvm_exec.c\r
-  r_explosion.c\r
-  r_lightning.c\r
-  r_modules.c\r
-  r_shadow.c\r
-  r_stats.c\r
-  r_sky.c\r
-  r_sprites.c\r
-  sbar.c\r
-  snd_main.c\r
-  snd_mem.c\r
-  snd_mix.c\r
-  snd_ogg.c\r
-  snd_sdl.c\r
-  snd_wav.c\r
-  snd_xmp.c\r
-  sv_ccmds.c\r
-  sv_demo.c\r
-  sv_ents.c\r
-  sv_ents4.c\r
-  sv_ents5.c\r
-  sv_ents_nq.c\r
-  sv_ents_csqc.c\r
-  sv_main.c\r
-  sv_move.c\r
-  sv_phys.c\r
-  sv_save.c\r
-  sv_send.c\r
-  sv_user.c\r
-  svbsp.c\r
-  svvm_cmds.c\r
-  sys_sdl.c\r
-  sys_shared.c\r
-  taskqueue.c\r
-  thread_sdl.c\r
-  utf8lib.c\r
-  vid_sdl.c\r
-  vid_shared.c\r
-  view.c\r
-  wad.c\r
-  world.c\r
-  zone.c\r
-  crypto.c\r
-     Creating library C:\Users\havoc\Source\Repos\darkplaces\\darkplaces-sdl2-vs2019.lib and object C:\Users\havoc\Source\Repos\darkplaces\\darkplaces-sdl2-vs2019.exp\r
-  Generating code\r
-  Previous IPDB not found, fall back to full compilation.\r
-  All 3374 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.\r
-  Finished generating code\r
-  darkplaces-sdl2-vs2019.vcxproj -> C:\Users\havoc\Source\Repos\darkplaces\darkplaces-sdl2-vs2019.exe\r
diff --git a/Release-darkplaces-sdl2-vs2019-x64/darkplaces.res b/Release-darkplaces-sdl2-vs2019-x64/darkplaces.res
deleted file mode 100644 (file)
index 7acb942..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/darkplaces.res and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/dpvsimpledecode.obj b/Release-darkplaces-sdl2-vs2019-x64/dpvsimpledecode.obj
deleted file mode 100644 (file)
index 1ffbfbe..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/dpvsimpledecode.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/filematch.obj b/Release-darkplaces-sdl2-vs2019-x64/filematch.obj
deleted file mode 100644 (file)
index 21e8d27..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/filematch.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/fractalnoise.obj b/Release-darkplaces-sdl2-vs2019-x64/fractalnoise.obj
deleted file mode 100644 (file)
index 1d7205f..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/fractalnoise.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/fs.obj b/Release-darkplaces-sdl2-vs2019-x64/fs.obj
deleted file mode 100644 (file)
index a110965..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/fs.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/ft2.obj b/Release-darkplaces-sdl2-vs2019-x64/ft2.obj
deleted file mode 100644 (file)
index 0e8cd27..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/ft2.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/gl_backend.obj b/Release-darkplaces-sdl2-vs2019-x64/gl_backend.obj
deleted file mode 100644 (file)
index c11bc33..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/gl_backend.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/gl_draw.obj b/Release-darkplaces-sdl2-vs2019-x64/gl_draw.obj
deleted file mode 100644 (file)
index 0a7066d..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/gl_draw.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/gl_rmain.obj b/Release-darkplaces-sdl2-vs2019-x64/gl_rmain.obj
deleted file mode 100644 (file)
index 18ad470..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/gl_rmain.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/gl_rsurf.obj b/Release-darkplaces-sdl2-vs2019-x64/gl_rsurf.obj
deleted file mode 100644 (file)
index f480978..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/gl_rsurf.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/gl_textures.obj b/Release-darkplaces-sdl2-vs2019-x64/gl_textures.obj
deleted file mode 100644 (file)
index e325d95..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/gl_textures.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/hmac.obj b/Release-darkplaces-sdl2-vs2019-x64/hmac.obj
deleted file mode 100644 (file)
index e5858b5..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/hmac.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/host.obj b/Release-darkplaces-sdl2-vs2019-x64/host.obj
deleted file mode 100644 (file)
index 18858ad..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/host.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/image.obj b/Release-darkplaces-sdl2-vs2019-x64/image.obj
deleted file mode 100644 (file)
index c64a35c..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/image.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/image_png.obj b/Release-darkplaces-sdl2-vs2019-x64/image_png.obj
deleted file mode 100644 (file)
index 2e626a4..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/image_png.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/jpeg.obj b/Release-darkplaces-sdl2-vs2019-x64/jpeg.obj
deleted file mode 100644 (file)
index 2818314..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/jpeg.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/keys.obj b/Release-darkplaces-sdl2-vs2019-x64/keys.obj
deleted file mode 100644 (file)
index 2da8e63..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/keys.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/lhnet.obj b/Release-darkplaces-sdl2-vs2019-x64/lhnet.obj
deleted file mode 100644 (file)
index b743aae..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/lhnet.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/libcurl.obj b/Release-darkplaces-sdl2-vs2019-x64/libcurl.obj
deleted file mode 100644 (file)
index 95410ce..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/libcurl.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/mathlib.obj b/Release-darkplaces-sdl2-vs2019-x64/mathlib.obj
deleted file mode 100644 (file)
index 96580bf..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/mathlib.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/matrixlib.obj b/Release-darkplaces-sdl2-vs2019-x64/matrixlib.obj
deleted file mode 100644 (file)
index 649fc10..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/matrixlib.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/mdfour.obj b/Release-darkplaces-sdl2-vs2019-x64/mdfour.obj
deleted file mode 100644 (file)
index 5a61de8..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/mdfour.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/menu.obj b/Release-darkplaces-sdl2-vs2019-x64/menu.obj
deleted file mode 100644 (file)
index 1db0945..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/menu.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/meshqueue.obj b/Release-darkplaces-sdl2-vs2019-x64/meshqueue.obj
deleted file mode 100644 (file)
index ebe4299..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/meshqueue.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_generic.obj b/Release-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_generic.obj
deleted file mode 100644 (file)
index 57814a7..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_generic.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_sse.obj b/Release-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_sse.obj
deleted file mode 100644 (file)
index ccd9a2a..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/mod_skeletal_animatevertices_sse.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/model_alias.obj b/Release-darkplaces-sdl2-vs2019-x64/model_alias.obj
deleted file mode 100644 (file)
index 4d9acb2..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/model_alias.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/model_brush.obj b/Release-darkplaces-sdl2-vs2019-x64/model_brush.obj
deleted file mode 100644 (file)
index 29d8ef1..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/model_brush.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/model_shared.obj b/Release-darkplaces-sdl2-vs2019-x64/model_shared.obj
deleted file mode 100644 (file)
index 91379f6..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/model_shared.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/model_sprite.obj b/Release-darkplaces-sdl2-vs2019-x64/model_sprite.obj
deleted file mode 100644 (file)
index 71932d9..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/model_sprite.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/mvm_cmds.obj b/Release-darkplaces-sdl2-vs2019-x64/mvm_cmds.obj
deleted file mode 100644 (file)
index 825ea58..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/mvm_cmds.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/netconn.obj b/Release-darkplaces-sdl2-vs2019-x64/netconn.obj
deleted file mode 100644 (file)
index 8be7577..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/netconn.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/palette.obj b/Release-darkplaces-sdl2-vs2019-x64/palette.obj
deleted file mode 100644 (file)
index 44cf716..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/palette.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/polygon.obj b/Release-darkplaces-sdl2-vs2019-x64/polygon.obj
deleted file mode 100644 (file)
index 48507da..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/polygon.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/portals.obj b/Release-darkplaces-sdl2-vs2019-x64/portals.obj
deleted file mode 100644 (file)
index 918c399..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/portals.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/protocol.obj b/Release-darkplaces-sdl2-vs2019-x64/protocol.obj
deleted file mode 100644 (file)
index 93ff11a..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/protocol.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/prvm_cmds.obj b/Release-darkplaces-sdl2-vs2019-x64/prvm_cmds.obj
deleted file mode 100644 (file)
index 55a4a0d..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/prvm_cmds.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/prvm_edict.obj b/Release-darkplaces-sdl2-vs2019-x64/prvm_edict.obj
deleted file mode 100644 (file)
index 4922f4a..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/prvm_edict.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/prvm_exec.obj b/Release-darkplaces-sdl2-vs2019-x64/prvm_exec.obj
deleted file mode 100644 (file)
index 6d14b4b..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/prvm_exec.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/r_explosion.obj b/Release-darkplaces-sdl2-vs2019-x64/r_explosion.obj
deleted file mode 100644 (file)
index 50ae0bc..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/r_explosion.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/r_lightning.obj b/Release-darkplaces-sdl2-vs2019-x64/r_lightning.obj
deleted file mode 100644 (file)
index 09202ee..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/r_lightning.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/r_modules.obj b/Release-darkplaces-sdl2-vs2019-x64/r_modules.obj
deleted file mode 100644 (file)
index af8a932..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/r_modules.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/r_shadow.obj b/Release-darkplaces-sdl2-vs2019-x64/r_shadow.obj
deleted file mode 100644 (file)
index 18f0592..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/r_shadow.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/r_sky.obj b/Release-darkplaces-sdl2-vs2019-x64/r_sky.obj
deleted file mode 100644 (file)
index 840de09..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/r_sky.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/r_sprites.obj b/Release-darkplaces-sdl2-vs2019-x64/r_sprites.obj
deleted file mode 100644 (file)
index 62b83d4..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/r_sprites.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/r_stats.obj b/Release-darkplaces-sdl2-vs2019-x64/r_stats.obj
deleted file mode 100644 (file)
index bcde0b9..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/r_stats.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sbar.obj b/Release-darkplaces-sdl2-vs2019-x64/sbar.obj
deleted file mode 100644 (file)
index 01a68a5..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sbar.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/snd_main.obj b/Release-darkplaces-sdl2-vs2019-x64/snd_main.obj
deleted file mode 100644 (file)
index 2c9321f..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/snd_main.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/snd_mem.obj b/Release-darkplaces-sdl2-vs2019-x64/snd_mem.obj
deleted file mode 100644 (file)
index 9b2d821..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/snd_mem.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/snd_mix.obj b/Release-darkplaces-sdl2-vs2019-x64/snd_mix.obj
deleted file mode 100644 (file)
index 447576c..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/snd_mix.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/snd_ogg.obj b/Release-darkplaces-sdl2-vs2019-x64/snd_ogg.obj
deleted file mode 100644 (file)
index 0aa99c8..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/snd_ogg.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/snd_sdl.obj b/Release-darkplaces-sdl2-vs2019-x64/snd_sdl.obj
deleted file mode 100644 (file)
index 15407b2..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/snd_sdl.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/snd_wav.obj b/Release-darkplaces-sdl2-vs2019-x64/snd_wav.obj
deleted file mode 100644 (file)
index ad2bd45..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/snd_wav.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/snd_xmp.obj b/Release-darkplaces-sdl2-vs2019-x64/snd_xmp.obj
deleted file mode 100644 (file)
index fee0b2f..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/snd_xmp.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sv_ccmds.obj b/Release-darkplaces-sdl2-vs2019-x64/sv_ccmds.obj
deleted file mode 100644 (file)
index c44e6f9..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sv_ccmds.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sv_demo.obj b/Release-darkplaces-sdl2-vs2019-x64/sv_demo.obj
deleted file mode 100644 (file)
index f1914e9..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sv_demo.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sv_ents.obj b/Release-darkplaces-sdl2-vs2019-x64/sv_ents.obj
deleted file mode 100644 (file)
index 44465c5..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sv_ents.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sv_ents4.obj b/Release-darkplaces-sdl2-vs2019-x64/sv_ents4.obj
deleted file mode 100644 (file)
index 9a7c6cf..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sv_ents4.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sv_ents5.obj b/Release-darkplaces-sdl2-vs2019-x64/sv_ents5.obj
deleted file mode 100644 (file)
index 0ec918b..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sv_ents5.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sv_ents_csqc.obj b/Release-darkplaces-sdl2-vs2019-x64/sv_ents_csqc.obj
deleted file mode 100644 (file)
index 826d553..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sv_ents_csqc.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sv_ents_nq.obj b/Release-darkplaces-sdl2-vs2019-x64/sv_ents_nq.obj
deleted file mode 100644 (file)
index dac548f..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sv_ents_nq.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sv_main.obj b/Release-darkplaces-sdl2-vs2019-x64/sv_main.obj
deleted file mode 100644 (file)
index 0388707..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sv_main.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sv_move.obj b/Release-darkplaces-sdl2-vs2019-x64/sv_move.obj
deleted file mode 100644 (file)
index 98d5288..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sv_move.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sv_phys.obj b/Release-darkplaces-sdl2-vs2019-x64/sv_phys.obj
deleted file mode 100644 (file)
index 934f051..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sv_phys.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sv_save.obj b/Release-darkplaces-sdl2-vs2019-x64/sv_save.obj
deleted file mode 100644 (file)
index ee7574a..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sv_save.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sv_send.obj b/Release-darkplaces-sdl2-vs2019-x64/sv_send.obj
deleted file mode 100644 (file)
index 3339e52..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sv_send.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sv_user.obj b/Release-darkplaces-sdl2-vs2019-x64/sv_user.obj
deleted file mode 100644 (file)
index d14c275..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sv_user.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/svbsp.obj b/Release-darkplaces-sdl2-vs2019-x64/svbsp.obj
deleted file mode 100644 (file)
index 0abecdf..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/svbsp.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/svvm_cmds.obj b/Release-darkplaces-sdl2-vs2019-x64/svvm_cmds.obj
deleted file mode 100644 (file)
index 6660e5d..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/svvm_cmds.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sys_sdl.obj b/Release-darkplaces-sdl2-vs2019-x64/sys_sdl.obj
deleted file mode 100644 (file)
index a976962..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sys_sdl.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/sys_shared.obj b/Release-darkplaces-sdl2-vs2019-x64/sys_shared.obj
deleted file mode 100644 (file)
index 9e7a064..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/sys_shared.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/taskqueue.obj b/Release-darkplaces-sdl2-vs2019-x64/taskqueue.obj
deleted file mode 100644 (file)
index 1085428..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/taskqueue.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/thread_sdl.obj b/Release-darkplaces-sdl2-vs2019-x64/thread_sdl.obj
deleted file mode 100644 (file)
index b78e473..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/thread_sdl.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/utf8lib.obj b/Release-darkplaces-sdl2-vs2019-x64/utf8lib.obj
deleted file mode 100644 (file)
index 6fdc450..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/utf8lib.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/vid_sdl.obj b/Release-darkplaces-sdl2-vs2019-x64/vid_sdl.obj
deleted file mode 100644 (file)
index f2b0faf..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/vid_sdl.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/vid_shared.obj b/Release-darkplaces-sdl2-vs2019-x64/vid_shared.obj
deleted file mode 100644 (file)
index 97188a7..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/vid_shared.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/view.obj b/Release-darkplaces-sdl2-vs2019-x64/view.obj
deleted file mode 100644 (file)
index 98ba854..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/view.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/wad.obj b/Release-darkplaces-sdl2-vs2019-x64/wad.obj
deleted file mode 100644 (file)
index cb9636e..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/wad.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/world.obj b/Release-darkplaces-sdl2-vs2019-x64/world.obj
deleted file mode 100644 (file)
index e071d67..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/world.obj and /dev/null differ
diff --git a/Release-darkplaces-sdl2-vs2019-x64/zone.obj b/Release-darkplaces-sdl2-vs2019-x64/zone.obj
deleted file mode 100644 (file)
index ebac603..0000000
Binary files a/Release-darkplaces-sdl2-vs2019-x64/zone.obj and /dev/null differ
index e38d9b18fc8655a3f6eb129290838aec07a39a86..7106dc9b669e41a19a90e92c539e150da6f6f1cd 100644 (file)
@@ -3,14 +3,15 @@
 
 extern const char *buildstring;
 const char *buildstring =
-#ifndef NO_BUILD_TIMESTAMPS
-__TIME__ " " __DATE__ " "
-#endif
-#ifdef SVNREVISION
-STRINGIFY(SVNREVISION)
+#ifdef VCREVISION
+STRINGIFY(VCREVISION)
 #else
 "-"
 #endif
+#ifndef NO_BUILD_TIMESTAMPS
+//" " __TIME__
+" " __DATE__
+#endif
 #ifdef BUILDTYPE
 " " STRINGIFY(BUILDTYPE)
 #endif
index 6218e8ad5fd71d51040d5a90ace806fa4d46becc..e0f85994c661605f6791bde5e1f43ccf2c5c0ea7 100644 (file)
--- a/cap_ogg.c
+++ b/cap_ogg.c
@@ -586,6 +586,7 @@ void SCR_CaptureVideo_Ogg_Init(void)
        Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_keyframe_mininterval);
        Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_keyframe_auto_threshold);
        Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_noise_sensitivity);
+       Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_sharpness);
        Cvar_RegisterVariable(&cl_capturevideo_ogg_vorbis_quality);
 }
 
index 88551e0a43ee6fa7d16844dd7ae3e13f3d0c30ba..389675f80395cf66dceede7da6c3fde86ea1f9d5 100644 (file)
@@ -321,7 +321,7 @@ static void CD_f(cmd_state_t *cmd)
                        return;
                }
                for (n = 1; n <= ret; n++)
-                       strlcpy(remap[n], Cmd_Argv(cmd, n+1), sizeof(*remap));
+                       dp_strlcpy(remap[n], Cmd_Argv(cmd, n+1), sizeof(*remap));
 #endif
                return;
        }
@@ -473,7 +473,7 @@ static void CDAudio_StartPlaylist(qbool resume)
                                        break;
                                // if we don't find the desired track, use the first one
                                if (count == 0)
-                                       strlcpy(trackname, com_token, sizeof(trackname));
+                                       dp_strlcpy(trackname, com_token, sizeof(trackname));
                        }
                }
                if (count > 0)
@@ -503,7 +503,7 @@ static void CDAudio_StartPlaylist(qbool resume)
                                                break;
                                        if (listindex == current)
                                        {
-                                               strlcpy(trackname, com_token, sizeof(trackname));
+                                               dp_strlcpy(trackname, com_token, sizeof(trackname));
                                                break;
                                        }
                                }
index 9277ad50964b77614057f9673895fd83a0cfd15b..4556d2cf7ec8292c6b8bd0395945c69c8e102850 100644 (file)
--- a/cl_cmd.c
+++ b/cl_cmd.c
@@ -28,7 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "cl_collision.h"
 
-cvar_t cl_name = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "name", "player", "player name"};
+/// User-visible names of these CF_USERINFO cvars must be matched in CL_SetInfo()!
+cvar_t cl_name = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "_cl_name", "player", "player name"};
 cvar_t cl_rate = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "rate", "20000", "connection speed"};
 cvar_t cl_rate_burstsize = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "rate_burstsize", "1024", "rate control burst size"};
 cvar_t cl_topcolor = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "topcolor", "0", "color of your shirt"};
@@ -37,6 +38,7 @@ cvar_t cl_team = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "team", "none", "QW team
 cvar_t cl_skin = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "skin", "", "QW player skin name (example: base)"};
 cvar_t cl_noaim = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "noaim", "1", "QW option to disable vertical autoaim"};
 cvar_t cl_pmodel = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "pmodel", "0", "current player model number in nehahra"};
+
 cvar_t r_fixtrans_auto = {CF_CLIENT, "r_fixtrans_auto", "0", "automatically fixtrans textures (when set to 2, it also saves the fixed versions to a fixtrans directory)"};
 
 extern cvar_t rcon_secure;
@@ -113,40 +115,40 @@ void CL_ForwardToServer (const char *s)
                                        if (cl.stats[STAT_ITEMS] & IT_QUAD)
                                        {
                                                if (temp[0])
-                                                       strlcat(temp, " ", sizeof(temp));
-                                               strlcat(temp, "quad", sizeof(temp));
+                                                       dp_strlcat(temp, " ", sizeof(temp));
+                                               dp_strlcat(temp, "quad", sizeof(temp));
                                        }
                                        if (cl.stats[STAT_ITEMS] & IT_INVULNERABILITY)
                                        {
                                                if (temp[0])
-                                                       strlcat(temp, " ", sizeof(temp));
-                                               strlcat(temp, "pent", sizeof(temp));
+                                                       dp_strlcat(temp, " ", sizeof(temp));
+                                               dp_strlcat(temp, "pent", sizeof(temp));
                                        }
                                        if (cl.stats[STAT_ITEMS] & IT_INVISIBILITY)
                                        {
                                                if (temp[0])
-                                                       strlcat(temp, " ", sizeof(temp));
-                                               strlcat(temp, "eyes", sizeof(temp));
+                                                       dp_strlcat(temp, " ", sizeof(temp));
+                                               dp_strlcat(temp, "eyes", sizeof(temp));
                                        }
                                        break;
                                case 'w': // weapon status (outputs "SSG:NG:SNG:GL:RL:LG" with the text between : characters omitted if you lack the weapon)
                                        if (cl.stats[STAT_ITEMS] & IT_SUPER_SHOTGUN)
-                                               strlcat(temp, "SSG", sizeof(temp));
-                                       strlcat(temp, ":", sizeof(temp));
+                                               dp_strlcat(temp, "SSG", sizeof(temp));
+                                       dp_strlcat(temp, ":", sizeof(temp));
                                        if (cl.stats[STAT_ITEMS] & IT_NAILGUN)
-                                               strlcat(temp, "NG", sizeof(temp));
-                                       strlcat(temp, ":", sizeof(temp));
+                                               dp_strlcat(temp, "NG", sizeof(temp));
+                                       dp_strlcat(temp, ":", sizeof(temp));
                                        if (cl.stats[STAT_ITEMS] & IT_SUPER_NAILGUN)
-                                               strlcat(temp, "SNG", sizeof(temp));
-                                       strlcat(temp, ":", sizeof(temp));
+                                               dp_strlcat(temp, "SNG", sizeof(temp));
+                                       dp_strlcat(temp, ":", sizeof(temp));
                                        if (cl.stats[STAT_ITEMS] & IT_GRENADE_LAUNCHER)
-                                               strlcat(temp, "GL", sizeof(temp));
-                                       strlcat(temp, ":", sizeof(temp));
+                                               dp_strlcat(temp, "GL", sizeof(temp));
+                                       dp_strlcat(temp, ":", sizeof(temp));
                                        if (cl.stats[STAT_ITEMS] & IT_ROCKET_LAUNCHER)
-                                               strlcat(temp, "RL", sizeof(temp));
-                                       strlcat(temp, ":", sizeof(temp));
+                                               dp_strlcat(temp, "RL", sizeof(temp));
+                                       dp_strlcat(temp, ":", sizeof(temp));
                                        if (cl.stats[STAT_ITEMS] & IT_LIGHTNING)
-                                               strlcat(temp, "LG", sizeof(temp));
+                                               dp_strlcat(temp, "LG", sizeof(temp));
                                        break;
                                default:
                                        // not a recognized macro, print it as-is...
@@ -216,6 +218,32 @@ static void CL_SendCvar_f(cmd_state_t *cmd)
        }
 }
 
+/*
+==================
+CL_Name_f
+
+The logic from div0-stable's Host_Name_f() is now in SV_Name_f().
+==================
+*/
+static void CL_Name_f(cmd_state_t *cmd)
+{
+       char *newNameSource;
+
+       if (Cmd_Argc(cmd) == 1)
+       {
+               Con_Printf("name: \"%s^7\"\n", cl_name.string);
+               return;
+       }
+
+       // in the single-arg case any enclosing quotes shall be stripped
+       newNameSource = (char *)(Cmd_Argc(cmd) == 2 ? Cmd_Argv(cmd, 1) : Cmd_Args(cmd));
+
+       if (strlen(newNameSource) >= MAX_SCOREBOARDNAME) // may as well truncate before networking
+               newNameSource[MAX_SCOREBOARDNAME - 1] = '\0'; // this is fine (cbuf stores length)
+
+       Cvar_SetQuick(&cl_name, newNameSource);
+}
+
 /*
 ==================
 CL_Color_f
@@ -566,7 +594,7 @@ static void CL_Rcon_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
                        ++cls.rcon_trying;
                        if(i >= MAX_RCONS)
                                NetConn_WriteString(mysocket, "\377\377\377\377getchallenge", &cls.rcon_address); // otherwise we'll request the challenge later
-                       strlcpy(cls.rcon_commands[cls.rcon_ringpos], Cmd_Args(cmd), sizeof(cls.rcon_commands[cls.rcon_ringpos]));
+                       dp_strlcpy(cls.rcon_commands[cls.rcon_ringpos], Cmd_Args(cmd), sizeof(cls.rcon_commands[cls.rcon_ringpos]));
                        cls.rcon_addresses[cls.rcon_ringpos] = cls.rcon_address;
                        cls.rcon_timeout[cls.rcon_ringpos] = host.realtime + rcon_secure_challengetimeout.value;
                        cls.rcon_ringpos = (cls.rcon_ringpos + 1) % MAX_RCONS;
@@ -580,7 +608,7 @@ static void CL_Rcon_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
                        if(HMAC_MDFOUR_16BYTES((unsigned char *) (buf + 24), (unsigned char *) argbuf, (int)strlen(argbuf), (unsigned char *) rcon_password.string, n))
                        {
                                buf[40] = ' ';
-                               strlcpy(buf + 41, argbuf, sizeof(buf) - 41);
+                               dp_strlcpy(buf + 41, argbuf, sizeof(buf) - 41);
                                NetConn_Write(mysocket, buf, 41 + (int)strlen(buf + 41), &cls.rcon_address);
                        }
                }
@@ -611,7 +639,7 @@ static void CL_FullServerinfo_f(cmd_state_t *cmd) // credit: taken from QuakeWor
                return;
        }
 
-       strlcpy (cl.qw_serverinfo, Cmd_Argv(cmd, 1), sizeof(cl.qw_serverinfo));
+       dp_strlcpy (cl.qw_serverinfo, Cmd_Argv(cmd, 1), sizeof(cl.qw_serverinfo));
        InfoString_GetValue(cl.qw_serverinfo, "teamplay", temp, sizeof(temp));
        cl.qw_teamplay = atoi(temp);
 }
@@ -645,7 +673,7 @@ static void CL_FullInfo_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
                if (len >= sizeof(key)) {
                        len = sizeof(key) - 1;
                }
-               strlcpy(key, s, len + 1);
+               dp_strlcpy(key, s, len + 1);
                s += len;
                if (!*s)
                {
@@ -658,7 +686,7 @@ static void CL_FullInfo_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
                if (len >= sizeof(value)) {
                        len = sizeof(value) - 1;
                }
-               strlcpy(value, s, len + 1);
+               dp_strlcpy(value, s, len + 1);
 
                CL_SetInfo(key, value, false, false, false, false);
 
@@ -715,8 +743,16 @@ void CL_InitCommands(void)
 {
        dpsnprintf(cls.userinfo, sizeof(cls.userinfo), "\\name\\player\\team\\none\\topcolor\\0\\bottomcolor\\0\\rate\\10000\\msg\\1\\noaim\\1\\*ver\\dp");
 
+       /* In Quake `name` is a command that concatenates its arguments (quotes unnecessary)
+        * which is expected in most DP-based games.
+        * In QuakeWorld it's a cvar which requires quotes if spaces are used.
+        */
        Cvar_RegisterVariable(&cl_name);
-       Cvar_RegisterVirtual(&cl_name, "_cl_name");
+       if ((0)) // TODO: if (gamemode == GAME_QUAKEWORLD)
+               Cvar_RegisterVirtual(&cl_name, "name");
+       else
+               Cmd_AddCommand(CF_CLIENT, "name", CL_Name_f, "change your player name");
+
        Cvar_RegisterVariable(&cl_rate);
        Cvar_RegisterVirtual(&cl_rate, "_cl_rate");
        Cvar_RegisterVariable(&cl_rate_burstsize);
index 97303e7a92a9775678e2b5b5c7eefaaeba384cb2..2ba9dc499a8b65f9a8e078d59b85b70d0e62ef3a 100644 (file)
@@ -169,7 +169,7 @@ void CL_LinkEdict(prvm_edict_t *ent)
        VectorCopy(mins, PRVM_clientedictvector(ent, absmin));
        VectorCopy(maxs, PRVM_clientedictvector(ent, absmax));
 
-       World_LinkEdict(&cl.world, ent, mins, maxs);
+       World_LinkEdict(&cl.world, ent, mins, maxs, cl_areagrid_link_SOLID_NOT.integer);
 }
 
 int CL_GenericHitSuperContentsMask(const prvm_edict_t *passedict)
@@ -978,7 +978,7 @@ trace_t CL_Cache_TraceLineSurfaces(const vec3_t start, const vec3_t end, int typ
                if (!model)
                        continue;
                // animated models are not suitable for caching
-               if ((&touch->priv.server->frameblend[0] && (touch->priv.server->frameblend[0].lerp != 1.0 || touch->priv.server->frameblend[0].subframe != 0)) || touch->priv.server->skeleton.relativetransforms)
+               if ((touch->priv.server->frameblend[0].lerp != 1.0 || touch->priv.server->frameblend[0].subframe != 0) || touch->priv.server->skeleton.relativetransforms)
                        continue;
                if (type == MOVE_NOMONSTERS && PRVM_clientedictfloat(touch, solid) != SOLID_BSP)
                        continue;
index beab8f84ed84354dc28d5f813e3a77ae4b13895b..a11d63b5ba33f5939dc7de352f4940d2e1b85030 100644 (file)
--- a/cl_demo.c
+++ b/cl_demo.c
@@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 extern cvar_t cl_capturevideo;
 extern cvar_t cl_capturevideo_demo_stop;
 #endif
-int old_vsync = 0;
 
 static void CL_FinishTimeDemo (void);
 
@@ -245,6 +244,13 @@ void CL_ReadDemoMessage(void)
                        }
                }
 
+               /* At signon 1 the cl_begindownloads command starts the world and, if applicable,
+                * boots up CSQC which may be required to parse the next message.
+                * That will be delayed if curl must first (down)load the map.
+                */
+               if (cls.signon == 1 && cl.loadcsqc) // waiting for CL_VM_Init() to be called
+                       return;
+
                // get the next message
                FS_Read(cls.demofile, &cl_message.cursize, 4);
                cl_message.cursize = LittleLong(cl_message.cursize);
@@ -342,6 +348,7 @@ void CL_Record_f(cmd_state_t *cmd)
        int c, track;
        char name[MAX_OSPATH];
        char vabuf[1024];
+       int vabuf_len;
 
        c = Cmd_Argc(cmd);
        if (c != 2 && c != 3 && c != 4)
@@ -375,12 +382,15 @@ void CL_Record_f(cmd_state_t *cmd)
                track = -1;
 
        // get the demo name
-       strlcpy (name, Cmd_Argv(cmd, 1), sizeof (name));
+       dp_strlcpy (name, Cmd_Argv(cmd, 1), sizeof (name));
        FS_DefaultExtension (name, ".dem", sizeof (name));
 
        // start the map up
        if (c > 2)
-               Cmd_ExecuteString ( cmd, va(vabuf, sizeof(vabuf), "map %s", Cmd_Argv(cmd, 2)), src_local, false);
+       {
+               vabuf_len = dpsnprintf(vabuf, sizeof(vabuf), "map %s", Cmd_Argv(cmd, 2));
+               Cmd_ExecuteString(cmd, vabuf, vabuf_len, src_local, false);
+       }
 
        // open the demo file
        Con_Printf("recording to %s.\n", name);
@@ -390,7 +400,7 @@ void CL_Record_f(cmd_state_t *cmd)
                Con_Print(CON_ERROR "ERROR: couldn't open.\n");
                return;
        }
-       strlcpy(cls.demoname, name, sizeof(cls.demoname));
+       dp_strlcpy(cls.demoname, name, sizeof(cls.demoname));
 
        cls.forcetrack = track;
        FS_Printf(cls.demofile, "%i\n", cls.forcetrack);
@@ -408,7 +418,7 @@ void CL_PlayDemo(const char *demo)
        qfile_t *f;
 
        // open the demo file
-       strlcpy (name, demo, sizeof (name));
+       dp_strlcpy (name, demo, sizeof (name));
        FS_DefaultExtension (name, ".dem", sizeof (name));
        f = FS_OpenVirtualFile(name, false);
        if (!f)
@@ -430,7 +440,7 @@ void CL_PlayDemo(const char *demo)
 
        Con_Printf("Playing demo %s.\n", name);
        cls.demofile = f;
-       strlcpy(cls.demoname, name, sizeof(cls.demoname));
+       dp_strlcpy(cls.demoname, name, sizeof(cls.demoname));
 
        cls.demoplayback = true;
        cls.state = ca_connected;
@@ -510,7 +520,7 @@ static void CL_FinishTimeDemo (void)
        fpsmax = cls.td_onesecondmaxfps;
        // LadyHavoc: timedemo now prints out 7 digits of fraction, and min/avg/max
        Con_Printf("%i frames %5.7f seconds %5.7f fps, one-second fps min/avg/max: %.0f %.0f %.0f (%i seconds)\n", frames, time, totalfpsavg, fpsmin, fpsavg, fpsmax, cls.td_onesecondavgcount);
-       Log_Printf("benchmark.log", "date %s | enginedate %s | demo %s | commandline %s | run %d | result %i frames %5.7f seconds %5.7f fps, one-second fps min/avg/max: %.0f %.0f %.0f (%i seconds)\n", Sys_TimeString("%Y-%m-%d %H:%M:%S"), buildstring, cls.demoname, cmdline.string, benchmark_runs + 1, frames, time, totalfpsavg, fpsmin, fpsavg, fpsmax, cls.td_onesecondavgcount);
+       Log_Printf("benchmark.log", "date %s | enginedate %s | demo %s | commandline %s | run %d | result %i frames %5.7f seconds %5.7f fps, one-second fps min/avg/max: %.0f %.0f %.0f (%i seconds)\n", Sys_TimeString("%Y-%m-%d %H:%M:%S"), engineversion, cls.demoname, cmdline.string, benchmark_runs + 1, frames, time, totalfpsavg, fpsmin, fpsavg, fpsmax, cls.td_onesecondavgcount);
        if (Sys_CheckParm("-benchmark"))
        {
                ++benchmark_runs;
@@ -586,6 +596,9 @@ static void CL_FinishTimeDemo (void)
                else
                        host.state = host_shutdown;
        }
+
+       // Might need to re-enable vsync
+       Cvar_Callback(&vid_vsync);
 }
 
 /*
@@ -618,6 +631,9 @@ void CL_TimeDemo_f(cmd_state_t *cmd)
        cls.timedemo = host.restless = true;
        cls.td_frames = -2;             // skip the first frame
        cls.demonum = -1;               // stop demo loop
+
+       // Might need to disable vsync
+       Cvar_Callback(&vid_vsync);
 }
 
 /*
@@ -650,7 +666,7 @@ static void CL_Startdemos_f(cmd_state_t *cmd)
        Con_DPrintf("%i demo(s) in loop\n", c);
 
        for (i=1 ; i<c+1 ; i++)
-               strlcpy (cls.demos[i-1], Cmd_Argv(cmd, i), sizeof (cls.demos[i-1]));
+               dp_strlcpy (cls.demos[i-1], Cmd_Argv(cmd, i), sizeof (cls.demos[i-1]));
 
        // LadyHavoc: clear the remaining slots
        for (;i <= MAX_DEMOS;i++)
index 0e9bc59d3ae47ee457802bba834392d285838f78..f41c4c91b757bddecfaaac8e7f3df427c4fd318b 100644 (file)
@@ -211,7 +211,7 @@ static void IN_BestWeapon_Register(const char *name, int impulse, int weaponbit,
                Con_Printf("no slot left for weapon definition; increase IN_BESTWEAPON_MAX\n");
                return; // sorry
        }
-       strlcpy(in_bestweapon_info[i].name, name, sizeof(in_bestweapon_info[i].name));
+       dp_strlcpy(in_bestweapon_info[i].name, name, sizeof(in_bestweapon_info[i].name));
        in_bestweapon_info[i].impulse = impulse;
        if(weaponbit != -1)
                in_bestweapon_info[i].weaponbit = weaponbit;
@@ -527,7 +527,7 @@ void CL_Input (void)
        IN_Move ();
 
        // send mouse move to csqc
-       if (cl.csqc_loaded && cl_csqc_generatemousemoveevents.integer)
+       if (CLVM_prog->loaded && cl_csqc_generatemousemoveevents.integer)
        {
                if (cl.csqc_wantsmousemove)
                {
@@ -1538,8 +1538,8 @@ void CL_UpdateMoveVars(void)
        else
        {
                cl.moveflags = 0;
-               cl.movevars_ticrate = (cls.demoplayback ? 1.0f : host_timescale.value) / bound(10.0f, cl_netfps.value, 1000.0f);
-               cl.movevars_timescale = (cls.demoplayback ? 1.0f : host_timescale.value);
+               cl.movevars_ticrate = 0; // bones_was_here: no guessing, unavailable ticrate triggers better fallbacks
+               cl.movevars_timescale = (cls.demoplayback || host_timescale.value <= 0) ? 1.0f : host_timescale.value;
                cl.movevars_gravity = sv_gravity.value;
                cl.movevars_stopspeed = cl_movement_stopspeed.value;
                cl.movevars_maxspeed = cl_movement_maxspeed.value;
@@ -1777,7 +1777,8 @@ void CL_SendMove(void)
        usercmd_t *cmd;
        sizebuf_t buf;
        unsigned char data[1024];
-       float packettime;
+       float packettime, sv_frametime, lag, frames_per_tic;
+       qbool opportune_moment;
        qbool quemove;
        qbool important;
 
@@ -1806,7 +1807,7 @@ void CL_SendMove(void)
        if (in_button7.state  & 3) bits |=  64;
        if (in_button8.state  & 3) bits |= 128;
        if (in_use.state      & 3) bits |= 256;
-       if (key_dest != key_game || key_consoleactive) bits |= 512;
+       if (key_dest != key_game || key_consoleactive || !vid_activewindow) bits |= 512;
        if (cl_prydoncursor.integer > 0) bits |= 1024;
        if (in_button9.state  & 3)  bits |=   2048;
        if (in_button10.state  & 3) bits |=   4096;
@@ -1893,8 +1894,14 @@ void CL_SendMove(void)
        if (quemove)
                cl.movecmd[0] = cl.cmd;
 
-       // don't predict more than 200fps
-       if (cl.timesincepacket >= 0.005)
+       /* Accumulating cl.realframetime to prevent low packet rates,
+        * previously with cl_maxfps == cl_netfps it did not send every frame because
+        * host.realtime - cl.lastpackettime was often well below (or above) cl_packetinterval.
+        */
+       cl.timesincepacket += cl.realframetime;
+
+       // don't predict more than 256fps
+       if (cl.timesincepacket >= 1/256)
                cl.movement_replay = true; // redo the prediction
 
        // now decide whether to actually send this move
@@ -1907,32 +1914,46 @@ void CL_SendMove(void)
        // don't send too often or else network connections can get clogged by a
        // high renderer framerate
        packettime = 1.0f / bound(10.0f, cl_netfps.value, 1000.0f);
-       if (cl.movevars_timescale && cl.movevars_ticrate)
+       if (cl.movevars_ticrate)
        {
-               // try to ensure at least 1 packet per server frame
-               // and apply soft limit of 2, hard limit < 4 (packettime reduced further below)
-               float maxtic = cl.movevars_ticrate / cl.movevars_timescale;
-               packettime = bound(maxtic * 0.5f, packettime, maxtic);
+               packettime = bound(cl.movevars_ticrate * 0.5f, packettime, cl.movevars_ticrate);
+               sv_frametime = cl.movevars_ticrate;
        }
-       // bones_was_here: reduce packettime to (largest multiple of realframetime) <= packettime
-       // prevents packet rates lower than cl_netfps or server frame rate
-       // eg: cl_netfps 60 and cl_maxfps 250 would otherwise send only 50 netfps
-       // with this line that config sends 62.5 netfps
-       // (this causes it to emit packets at a steady beat)
-       packettime = floor(packettime / (float)cl.realframetime) * (float)cl.realframetime;
+       else // fallback, may be affected by server->client network problems
+               sv_frametime = (cl.mtime[0] - cl.mtime[1]) / cl.movevars_timescale;
 
        // always send if buttons changed or an impulse is pending
        // even if it violates the rate limit!
        important = (cl.cmd.impulse || (cl_netimmediatebuttons.integer && cl.cmd.buttons != cl.movecmd[1].buttons));
 
-       // don't send too often (cl_netfps), allowing a small margin for float error
-       // bones_was_here: accumulate realframetime to prevent low packet rates
-       // previously with cl_maxfps == cl_netfps it did not send every frame as
-       // host.realtime - cl.lastpackettime was often well below (or above) packettime
-       if (!important && cl.timesincepacket < packettime * 0.99999f)
+       lag = cl.mtime[0] - cl.cmd.time;
+       frames_per_tic = sv_frametime / cl.realframetime;
+//     opportune_moment = lag <= cl.realframetime * 2; // FAIL: can miss the moment with uncapped fps
+//     opportune_moment = lag <= cl.realframetime * frames_per_tic * 0.5; // FAIL: too early at high fps, reducing multi causes misses at moderate fps
+       opportune_moment = lag <= cl.realframetime * (frames_per_tic <= 1 ? 1 : sqrt(frames_per_tic)); // perfect
+
+       // Two methods for deciding when to send
+       if (!important)
        {
-               cl.timesincepacket += cl.realframetime;
-               return;
+               // Traditional time interval, now used as fallback
+               if (sv_frametime <= 0 || lag > sv_frametime || lag < 0) // unknown ticrate || lag/PL || still connecting
+               {
+                       if (cl.timesincepacket < packettime * 0.99999f)
+                       {
+//                             Con_Printf("^6moveft %f realft %f lag %f tic %f inputsince %d\n", cl.cmd.frametime, cl.realframetime, lag, sv_frametime, cl.opt_inputs_since_update);
+                               return;
+                       }
+               }
+               // Server-synchronised, for better pings
+               // Sends at least once per server frame
+               else // cl.opt_inputs_since_update is usable
+               {
+                       if (!opportune_moment || cl.opt_inputs_since_update >= sv_frametime / packettime)
+                       {
+//                             Con_Printf("^1moveft %f realft %f lag %f tic %f inputsince %d\n", cl.cmd.frametime, cl.realframetime, lag, sv_frametime, cl.opt_inputs_since_update);
+                               return;
+                       }
+               }
        }
 
        // don't choke the connection with packets (obey rate limit)
@@ -1943,8 +1964,13 @@ void CL_SendMove(void)
        if (!NetConn_CanSend(cls.netcon) && !important)
                return;
 
+//     Con_Printf("%smoveft %f realft %f lag %f tic %f inputsince %d important %d\n", (lag < 0.0005 || !opportune_moment) ? "^3" : "^2", cl.cmd.frametime, cl.realframetime, lag, sv_frametime, cl.opt_inputs_since_update, important);
+
+       if (opportune_moment) // this check is needed for optimal timing especially with cl_netimmediatebuttons
+               ++cl.opt_inputs_since_update;
+
        // reset the packet timing accumulator
-       cl.timesincepacket = cl.realframetime;
+       cl.timesincepacket = 0;
 
        buf.maxsize = sizeof(data);
        buf.cursize = 0;
index 45cb43d6f1f39b176e7f6a137daa1c5289b8cf95..b4d7760c328b40db27b44b224684aa11557fc521 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -104,9 +104,13 @@ cvar_t cl_minfps_qualityhysteresis = {CF_CLIENT | CF_ARCHIVE, "cl_minfps_quality
 cvar_t cl_minfps_qualitystepmax = {CF_CLIENT | CF_ARCHIVE, "cl_minfps_qualitystepmax", "0.1", "maximum quality change in a single frame"};
 cvar_t cl_minfps_force = {CF_CLIENT, "cl_minfps_force", "0", "also apply quality reductions in timedemo/capturevideo"};
 cvar_t cl_maxfps = {CF_CLIENT | CF_ARCHIVE, "cl_maxfps", "0", "maximum fps cap, 0 = unlimited, if game is running faster than this it will wait before running another frame (useful to make cpu time available to other programs)"};
-cvar_t cl_maxfps_alwayssleep = {CF_CLIENT | CF_ARCHIVE, "cl_maxfps_alwayssleep","1", "gives up some processing time to other applications each frame, value in milliseconds, disabled if cl_maxfps is 0"};
+cvar_t cl_maxfps_alwayssleep = {CF_CLIENT | CF_ARCHIVE, "cl_maxfps_alwayssleep", "0", "gives up some processing time to other applications each frame, value in milliseconds, disabled if a timedemo is running"};
 cvar_t cl_maxidlefps = {CF_CLIENT | CF_ARCHIVE, "cl_maxidlefps", "20", "maximum fps cap when the game is not the active window (makes cpu time available to other programs"};
 
+cvar_t cl_areagrid_link_SOLID_NOT = {CF_CLIENT, "cl_areagrid_link_SOLID_NOT", "1", "set to 0 to prevent SOLID_NOT entities from being linked to the area grid, and unlink any that are already linked (in the code paths that would otherwise link them), for better performance"};
+cvar_t cl_gameplayfix_nudgeoutofsolid_separation = {CF_CLIENT, "cl_gameplayfix_nudgeoutofsolid_separation", "0.03125", "keep objects this distance apart to prevent collision issues on seams"};
+
+
 client_static_t        cls;
 client_state_t cl;
 
@@ -253,7 +257,7 @@ void CL_SetInfo(const char *key, const char *value, qbool send, qbool allowstark
                        MSG_WriteByte(&cls.netcon->message, qw_clc_stringcmd);
                        MSG_WriteString(&cls.netcon->message, va(vabuf, sizeof(vabuf), "setinfo \"%s\" \"%s\"", key, value));
                }
-               else if (!strcasecmp(key, "name"))
+               else if (!strcasecmp(key, "_cl_name") || !strcasecmp(key, "name"))
                {
                        MSG_WriteByte(&cls.netcon->message, clc_stringcmd);
                        MSG_WriteString(&cls.netcon->message, va(vabuf, sizeof(vabuf), "name \"%s\"", value));
@@ -387,11 +391,13 @@ void CL_DisconnectEx(qbool kicked, const char *fmt, ... )
 
        Con_DPrintf("CL_Disconnect\n");
 
-    Cvar_SetValueQuick(&csqc_progcrc, -1);
+       Cvar_SetValueQuick(&csqc_progcrc, -1);
        Cvar_SetValueQuick(&csqc_progsize, -1);
        CL_VM_ShutDown();
-// stop sounds (especially looping!)
-       S_StopAllSounds ();
+       // stop sounds (especially looping!)
+       S_StopAllSounds();
+       // prevent dlcache assets from this server from interfering with the next one
+       FS_UnloadPacks_dlcache();
 
        cl.parsingtextexpectingpingforscores = 0; // just in case no reply has come yet
 
@@ -433,6 +439,8 @@ void CL_DisconnectEx(qbool kicked, const char *fmt, ... )
                                MSG_WriteByte(&buf, clc_disconnect);
                                if(cls.protocol == PROTOCOL_DARKPLACES8)
                                        MSG_WriteString(&buf, reason);
+                               // DP8 TODO: write a simpler func that Sys_HandleCrash() calls
+                               // to send a disconnect message indicating we crashed
                        }
                        NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, 10000, 0, false);
                        NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, 10000, 0, false);
@@ -441,16 +449,20 @@ void CL_DisconnectEx(qbool kicked, const char *fmt, ... )
 
                NetConn_Close(cls.netcon);
                cls.netcon = NULL;
-               if(fmt)
-                       Con_Printf("Disconnect: %s\n", reason);
+
+               // It's possible for a server to disconnect a player with an empty reason
+               // which is checked here rather than above so we don't print "Disconnect by user".
+               if(fmt && reason[0] != '\0')
+                       dpsnprintf(cl_connect_status, sizeof(cl_connect_status), "Disconnect: %s", reason);
                else
-                       Con_Printf("Disconnected\n");
+                       dp_strlcpy(cl_connect_status, "Disconnected", sizeof(cl_connect_status));
+               Con_Printf("%s\n", cl_connect_status);
        }
        cls.state = ca_disconnected;
        cl.islocalgame = false;
-
-       cls.demoplayback = cls.timedemo = host.restless = false;
        cls.signon = 0;
+       cls.demoplayback = cls.timedemo = host.restless = false;
+       Cvar_Callback(&vid_vsync); // might need to re-enable vsync
 
        Cvar_Callback(&cl_netport);
 
@@ -486,7 +498,7 @@ static void CL_Reconnect_f(cmd_state_t *cmd)
                if (temp[0])
                        CL_EstablishConnection(temp, -1);
                else
-                       Con_Printf("Reconnect to what server?  (you have not connected to a server yet)\n");
+                       Con_Printf(CON_WARN "Reconnect to what server?  (you have not connected to a server yet)\n");
                return;
        }
        // if connected, do something based on protocol
@@ -566,18 +578,13 @@ void CL_EstablishConnection(const char *address, int firstarg)
        if (Sys_CheckParm("-benchmark"))
                return;
 
-       // clear menu's connect error message
-#ifdef CONFIG_MENU
-       M_Update_Return_Reason("");
-#endif
-
        // make sure the client ports are open before attempting to connect
        NetConn_UpdateSockets();
 
        if (LHNETADDRESS_FromString(&cls.connect_address, address, 26000) && (cls.connect_mysocket = NetConn_ChooseClientSocketForAddress(&cls.connect_address)))
        {
                cls.connect_trying = true;
-               cls.connect_remainingtries = 3;
+               cls.connect_remainingtries = 10;
                cls.connect_nextsendtime = 0;
 
                // only NOW, set connect_userinfo
@@ -595,16 +602,13 @@ void CL_EstablishConnection(const char *address, int firstarg)
                        *cls.connect_userinfo = 0;
                }
 
-#ifdef CONFIG_MENU
-               M_Update_Return_Reason("Trying to connect...");
-#endif
+               dp_strlcpy(cl_connect_status, "Connect: pending...", sizeof(cl_connect_status));
+               SCR_BeginLoadingPlaque(false);
        }
        else
        {
-               Con_Print("Unable to find a suitable network socket to connect to server.\n");
-#ifdef CONFIG_MENU
-               M_Update_Return_Reason("No network");
-#endif
+               Con_Printf(CON_ERROR "Connect: failed, unable to find a network socket suitable to reach %s\n", address);
+               dp_strlcpy(cl_connect_status, "Connect: failed, no network", sizeof(cl_connect_status));
        }
 }
 
@@ -886,7 +890,7 @@ void CL_AllocLightFlash(entity_render_t *ent, matrix4x4_t *matrix, float radius,
                dl->die = 0;
        dl->cubemapname[0] = 0;
        if (cubemapname && cubemapname[0])
-               strlcpy(dl->cubemapname, cubemapname, sizeof(dl->cubemapname));
+               dp_strlcpy(dl->cubemapname, cubemapname, sizeof(dl->cubemapname));
        dl->style = style;
        dl->shadow = shadowenable;
        dl->corona = corona;
@@ -1168,6 +1172,7 @@ static void CL_UpdateNetworkEntity(entity_t *e, int recursionlimit, qbool interp
        // someone or watching a cutscene of some sort
        if (cl_nolerp.integer || cls.timedemo)
                interpolate = false;
+
        if (e == cl.entities + cl.playerentity && cl.movement_predicted && (!cl.fixangle[1] || !cl.fixangle[0]))
        {
                VectorCopy(cl.movement_origin, origin);
@@ -2086,7 +2091,7 @@ void CL_UpdateWorld(void)
                CL_UpdateViewModel();
 
                // when csqc is loaded, it will call this in CSQC_UpdateView
-               if (!cl.csqc_loaded)
+               if (!CLVM_prog->loaded || CLVM_prog->flag & PRVM_CSQC_SIMPLE)
                {
                        // clear the CL_Mesh_Scene() used for some engine effects
                        CL_MeshEntities_Scene_Clear();
@@ -2155,7 +2160,7 @@ static void CL_Fog_HeightTexture_f(cmd_state_t *cmd)
        r_refdef.fog_end = atof(Cmd_Argv(cmd, 7));
        r_refdef.fog_height = atof(Cmd_Argv(cmd, 8));
        r_refdef.fog_fadedepth = atof(Cmd_Argv(cmd, 9));
-       strlcpy(r_refdef.fog_height_texturename, Cmd_Argv(cmd, 10), sizeof(r_refdef.fog_height_texturename));
+       dp_strlcpy(r_refdef.fog_height_texturename, Cmd_Argv(cmd, 10), sizeof(r_refdef.fog_height_texturename));
 }
 
 
@@ -2220,7 +2225,7 @@ void CL_Locs_FindLocationName(char *buffer, size_t buffersize, vec3_t point)
        cl_locnode_t *loc;
        loc = CL_Locs_FindNearest(point);
        if (loc)
-               strlcpy(buffer, loc->name, buffersize);
+               dp_strlcpy(buffer, loc->name, buffersize);
        else
                dpsnprintf(buffer, buffersize, "LOC=%.0f:%.0f:%.0f", point[0], point[1], point[2]);
 }
@@ -2790,27 +2795,27 @@ void CL_StartVideo(void)
                NetConn_UpdateSockets();
 #endif
                VID_Start();
-               CDAudio_Startup();
        }
 }
 
 extern cvar_t host_framerate;
 extern cvar_t host_speeds;
-
+extern qbool serverlist_querystage;
 double CL_Frame (double time)
 {
        static double clframetime;
        static double cl_timer = 0;
        static double time1 = 0, time2 = 0, time3 = 0;
        int pass1, pass2, pass3;
+       float maxfps;
 
        CL_VM_PreventInformationLeaks();
 
-       // get new key events
-       Key_EventQueue_Unblock();
-       SndSys_SendKeyEvents();
-       Sys_SendKeyEvents();
-
+       /*
+        * If the accumulator hasn't become positive, don't
+        * run the frame. Everything that happens before this
+        * point will happen even if we're sleeping this frame.
+        */
        if((cl_timer += time) < 0)
                return cl_timer;
 
@@ -2818,7 +2823,11 @@ double CL_Frame (double time)
        if (cl_timer > 0.1)
                cl_timer = 0.1;
 
-       if (cls.state != ca_dedicated && (cl_timer > 0 || cls.timedemo || ((vid_activewindow ? cl_maxfps : cl_maxidlefps).value < 1)))
+       // Run at full speed when querying servers, compared to waking up early to parse
+       // this is simpler and gives pings more representative of what can be expected when playing.
+       maxfps = (vid_activewindow || serverlist_querystage ? cl_maxfps : cl_maxidlefps).value;
+
+       if (cls.state != ca_dedicated && (cl_timer > 0 || cls.timedemo || maxfps <= 0))
        {
                R_TimeReport("---");
                Collision_Cache_NewFrame();
@@ -2827,7 +2836,6 @@ double CL_Frame (double time)
                // decide the simulation time
                if (cls.capturevideo.active)
                {
-                       //***
                        if (cls.capturevideo.realtime)
                                clframetime = cl.realframetime = max(time, 1.0 / cls.capturevideo.framerate);
                        else
@@ -2836,21 +2844,19 @@ double CL_Frame (double time)
                                cl.realframetime = max(time, clframetime);
                        }
                }
-               else if (vid_activewindow && cl_maxfps.value >= 1 && !cls.timedemo)
-
-#else
-               if (vid_activewindow && cl_maxfps.value >= 1 && !cls.timedemo)
+               else
 #endif
                {
-                       clframetime = cl.realframetime = max(cl_timer, 1.0 / cl_maxfps.value);
-                       // when running slow, we need to sleep to keep input responsive
-                       if (cl_maxfps_alwayssleep.value > 0)
-                               Sys_Sleep((int)bound(0, cl_maxfps_alwayssleep.value * 1000, 100000));
+                       if (maxfps <= 0 || cls.timedemo)
+                               clframetime = cl.realframetime = cl_timer;
+                       else
+                               // networking assumes at least 10fps
+                               clframetime = cl.realframetime = bound(cl_timer, 1 / maxfps, 0.1);
+
+                       // on some legacy systems, we need to sleep to keep input responsive
+                       if (cl_maxfps_alwayssleep.value > 0 && !cls.timedemo)
+                               Sys_Sleep(min(cl_maxfps_alwayssleep.value / 1000, 0.05));
                }
-               else if (!vid_activewindow && cl_maxidlefps.value >= 1 && !cls.timedemo)
-                       clframetime = cl.realframetime = max(cl_timer, 1.0 / cl_maxidlefps.value);
-               else
-                       clframetime = cl.realframetime = cl_timer;
 
                // apply slowmo scaling
                clframetime *= cl.movevars_timescale;
@@ -2966,7 +2972,6 @@ void CL_Shutdown (void)
                MR_Shutdown();
 #endif
 
-       CDAudio_Shutdown ();
        S_Terminate ();
        
        R_Modules_Shutdown();
@@ -2978,7 +2983,6 @@ void CL_Shutdown (void)
        CL_MeshEntities_Shutdown();
 
        Key_Shutdown();
-       S_Shutdown();
 
        Mem_FreePool (&cls.permanentmempool);
        Mem_FreePool (&cls.levelmempool);
@@ -3010,7 +3014,6 @@ void CL_Init (void)
                VID_Init();
                Render_Init();
                S_Init();
-               CDAudio_Init();
                Key_Init();
                V_Init();
 
@@ -3100,7 +3103,8 @@ void CL_Init (void)
 
                // for QW connections
                Cvar_RegisterVariable(&qport);
-               Cvar_SetValueQuick(&qport, (rand() * RAND_MAX + rand()) & 0xffff);
+               // multiplying by RAND_MAX necessary for Windows, for which RAND_MAX is only 32767.
+               Cvar_SetValueQuick(&qport, ((unsigned int)rand() * RAND_MAX + (unsigned int)rand()) & 0xffff);
 
                Cmd_AddCommand(CF_CLIENT, "timerefresh", CL_TimeRefresh_f, "turn quickly and print rendering statistcs");
 
@@ -3126,13 +3130,16 @@ void CL_Init (void)
                Cvar_RegisterVariable (&cl_maxfps_alwayssleep);
                Cvar_RegisterVariable (&cl_maxidlefps);
 
+               Cvar_RegisterVariable (&cl_areagrid_link_SOLID_NOT);
+               Cvar_RegisterVariable (&cl_gameplayfix_nudgeoutofsolid_separation);
+
                CL_Parse_Init();
                CL_Particles_Init();
                CL_Screen_Init();
 
                CL_Video_Init();
 
-               NetConn_UpdateSockets_Client();
+               Cvar_Callback(&cl_netport);
 
                host.hook.ConnectLocal = CL_EstablishConnection_Local;
                host.hook.Disconnect = CL_DisconnectEx;
index 1afbcbe7fd83cc51e0c8d12df82e71e91285cbb9..dbeda3864f362d9fc8721b9b4822841b138203ab 100644 (file)
@@ -199,6 +199,13 @@ static void QW_CL_NextUpload_f(cmd_state_t *cmd);
 //static qbool QW_CL_IsUploading(void);
 static void QW_CL_StopUpload_f(cmd_state_t *cmd);
 
+static inline void CL_SetSignonStage_WithMsg(int signon_stage)
+{
+       cls.signon = signon_stage;
+       dpsnprintf(cl_connect_status, sizeof(cl_connect_status), "Connect: signon stage %i of %i", cls.signon, SIGNONS);
+       Con_DPrint(cl_connect_status);
+}
+
 /*
 ==================
 CL_ParseStartSoundPacket
@@ -333,10 +340,7 @@ void CL_KeepaliveMessage (qbool readmessages)
                if(cls.state != ca_dedicated)
                {
                        if(countdownupdate <= 0) // check if time stepped backwards
-                       {
-                               SCR_UpdateLoadingScreenIfShown();
                                countdownupdate = 2;
-                       }
                }
        }
 
@@ -399,14 +403,14 @@ void CL_ParseEntityLump(char *entdata)
                if (com_token[0] == '}')
                        break; // end of worldspawn
                if (com_token[0] == '_')
-                       strlcpy (key, com_token + 1, sizeof (key));
+                       dp_strlcpy (key, com_token + 1, sizeof (key));
                else
-                       strlcpy (key, com_token, sizeof (key));
+                       dp_strlcpy (key, com_token, sizeof (key));
                while (key[strlen(key)-1] == ' ') // remove trailing spaces
                        key[strlen(key)-1] = 0;
                if (!COM_ParseToken_Simple(&data, false, false, true))
                        return; // error
-               strlcpy (value, com_token, sizeof (value));
+               dp_strlcpy (value, com_token, sizeof (value));
                if (!strcmp("sky", key))
                {
                        loadedsky = true;
@@ -483,9 +487,9 @@ static void CL_SetupWorldModel(void)
        // set up csqc world for collision culling
        if (cl.worldmodel)
        {
-               strlcpy(cl.worldname, cl.worldmodel->name, sizeof(cl.worldname));
+               dp_strlcpy(cl.worldname, cl.worldmodel->name, sizeof(cl.worldname));
                FS_StripExtension(cl.worldname, cl.worldnamenoextension, sizeof(cl.worldnamenoextension));
-               strlcpy(cl.worldbasename, !strncmp(cl.worldnamenoextension, "maps/", 5) ? cl.worldnamenoextension + 5 : cl.worldnamenoextension, sizeof(cl.worldbasename));
+               dp_strlcpy(cl.worldbasename, !strncmp(cl.worldnamenoextension, "maps/", 5) ? cl.worldnamenoextension + 5 : cl.worldnamenoextension, sizeof(cl.worldbasename));
                Cvar_SetQuick(&cl_worldmessage, cl.worldmessage);
                Cvar_SetQuick(&cl_worldname, cl.worldname);
                Cvar_SetQuick(&cl_worldnamenoextension, cl.worldnamenoextension);
@@ -557,7 +561,7 @@ static qbool QW_CL_CheckOrDownloadFile(const char *filename)
        if (!cls.netcon)
                return true;
 
-       strlcpy(cls.qw_downloadname, filename, sizeof(cls.qw_downloadname));
+       dp_strlcpy(cls.qw_downloadname, filename, sizeof(cls.qw_downloadname));
        Con_Printf("Downloading %s\n", filename);
 
        if (!cls.qw_downloadmemory)
@@ -617,7 +621,7 @@ static void QW_CL_RequestNextDownload(void)
                // if we're still in signon stages, request the next one
                if (cls.signon != SIGNONS)
                {
-                       cls.signon = SIGNONS-1;
+                       CL_SetSignonStage_WithMsg(SIGNONS - 1);
                        // we'll go to SIGNONS when the first entity update is received
                        MSG_WriteByte(&cls.netcon->message, qw_clc_stringcmd);
                        MSG_WriteString(&cls.netcon->message, va(vabuf, sizeof(vabuf), "begin %i", cl.qw_servercount));
@@ -834,7 +838,7 @@ static void QW_CL_ParseModelList(void)
                        Host_Error("Server sent too many model precaches");
                if (strlen(str) >= MAX_QPATH)
                        Host_Error("Server sent a precache name of %i characters (max %i)", (int)strlen(str), MAX_QPATH - 1);
-               strlcpy(cl.model_name[nummodels], str, sizeof (cl.model_name[nummodels]));
+               dp_strlcpy(cl.model_name[nummodels], str, sizeof (cl.model_name[nummodels]));
        }
 
        n = MSG_ReadByte(&cl_message);
@@ -845,7 +849,7 @@ static void QW_CL_ParseModelList(void)
                return;
        }
 
-       cls.signon = 2;
+       CL_SetSignonStage_WithMsg(2);
        cls.qw_downloadnumber = 0;
        cls.qw_downloadtype = dl_model;
        QW_CL_RequestNextDownload();
@@ -869,7 +873,7 @@ static void QW_CL_ParseSoundList(void)
                        Host_Error("Server sent too many sound precaches");
                if (strlen(str) >= MAX_QPATH)
                        Host_Error("Server sent a precache name of %i characters (max %i)", (int)strlen(str), MAX_QPATH - 1);
-               strlcpy(cl.sound_name[numsounds], str, sizeof (cl.sound_name[numsounds]));
+               dp_strlcpy(cl.sound_name[numsounds], str, sizeof (cl.sound_name[numsounds]));
        }
 
        n = MSG_ReadByte(&cl_message);
@@ -881,7 +885,7 @@ static void QW_CL_ParseSoundList(void)
                return;
        }
 
-       cls.signon = 2;
+       CL_SetSignonStage_WithMsg(2);
        cls.qw_downloadnumber = 0;
        cls.qw_downloadtype = dl_sound;
        QW_CL_RequestNextDownload();
@@ -901,7 +905,7 @@ static void QW_CL_Changing_f(cmd_state_t *cmd)
 
        S_StopAllSounds();
        cl.intermission = 0;
-       cls.signon = 1; // not active anymore, but not disconnected
+       CL_SetSignonStage_WithMsg(1); // not active anymore, but not disconnected
        Con_Printf("\nChanging map...\n");
 }
 
@@ -983,7 +987,7 @@ static void QW_CL_ProcessUserInfo(int slot)
        InfoString_GetValue(cl.scores[slot].qw_userinfo, "team", cl.scores[slot].qw_team, sizeof(cl.scores[slot].qw_team));
        InfoString_GetValue(cl.scores[slot].qw_userinfo, "skin", cl.scores[slot].qw_skin, sizeof(cl.scores[slot].qw_skin));
        if (!cl.scores[slot].qw_skin[0])
-               strlcpy(cl.scores[slot].qw_skin, "base", sizeof(cl.scores[slot].qw_skin));
+               dp_strlcpy(cl.scores[slot].qw_skin, "base", sizeof(cl.scores[slot].qw_skin));
        // TODO: skin cache
 }
 
@@ -999,7 +1003,7 @@ static void QW_CL_UpdateUserInfo(void)
                return;
        }
        cl.scores[slot].qw_userid = MSG_ReadLong(&cl_message);
-       strlcpy(cl.scores[slot].qw_userinfo, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(cl.scores[slot].qw_userinfo));
+       dp_strlcpy(cl.scores[slot].qw_userinfo, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(cl.scores[slot].qw_userinfo));
 
        QW_CL_ProcessUserInfo(slot);
 }
@@ -1010,8 +1014,8 @@ static void QW_CL_SetInfo(void)
        char key[2048];
        char value[2048];
        slot = MSG_ReadByte(&cl_message);
-       strlcpy(key, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(key));
-       strlcpy(value, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(value));
+       dp_strlcpy(key, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(key));
+       dp_strlcpy(value, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(value));
        if (slot >= cl.maxclients)
        {
                Con_Printf("svc_setinfo >= cl.maxclients\n");
@@ -1027,8 +1031,8 @@ static void QW_CL_ServerInfo(void)
        char key[2048];
        char value[2048];
        char temp[32];
-       strlcpy(key, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(key));
-       strlcpy(value, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(value));
+       dp_strlcpy(key, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(key));
+       dp_strlcpy(value, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(value));
        Con_DPrintf("SERVERINFO: %s=%s\n", key, value);
        InfoString_SetValue(cl.qw_serverinfo, sizeof(cl.qw_serverinfo), key, value);
        InfoString_GetValue(cl.qw_serverinfo, "teamplay", temp, sizeof(temp));
@@ -1063,9 +1067,10 @@ static void CL_UpdateItemsAndWeapon(void)
        // check for important changes
 
        // set flash times
+       // UBSan: unsigned literals because left shifting by 31 causes signed overflow, although it works as expected on x86.
        if (cl.olditems != cl.stats[STAT_ITEMS])
                for (j = 0;j < 32;j++)
-                       if ((cl.stats[STAT_ITEMS] & (1<<j)) && !(cl.olditems & (1<<j)))
+                       if ((cl.stats[STAT_ITEMS] & (1u<<j)) && !(cl.olditems & (1u<<j)))
                                cl.item_gettime[j] = cl.time;
        cl.olditems = cl.stats[STAT_ITEMS];
 
@@ -1526,7 +1531,7 @@ static void CL_DownloadBegin_f(cmd_state_t *cmd)
        CL_StopDownload(0, 0);
 
        // we're really beginning a download now, so initialize stuff
-       strlcpy(cls.qw_downloadname, Cmd_Argv(cmd, 2), sizeof(cls.qw_downloadname));
+       dp_strlcpy(cls.qw_downloadname, Cmd_Argv(cmd, 2), sizeof(cls.qw_downloadname));
        cls.qw_downloadmemorymaxsize = size;
        cls.qw_downloadmemory = (unsigned char *) Mem_Alloc(cls.permanentmempool, cls.qw_downloadmemorymaxsize);
        cls.qw_downloadnumber++;
@@ -1605,8 +1610,10 @@ CL_SignonReply
 An svc_signonnum has been received, perform a client side setup
 =====================
 */
-static void CL_SignonReply (void)
+static void CL_SignonReply(int signon_stage)
 {
+       CL_SetSignonStage_WithMsg(signon_stage);
+
        Con_DPrintf("CL_SignonReply: %i\n", cls.signon);
 
        switch (cls.signon)
@@ -1618,16 +1625,13 @@ static void CL_SignonReply (void)
                        // (so that the server can see the player name while downloading)
                        CL_SendPlayerInfo();
 
-                       // execute cl_begindownloads next frame
-                       // (after any commands added by svc_stufftext have been executed)
-                       // when done with downloads the "prespawn" will be sent
-                       Cbuf_AddText(cmd_local, "\ncl_begindownloads\n");
-
                        //MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
                        //MSG_WriteString (&cls.netcon->message, "prespawn");
                }
-               else // playing a demo...  make sure loading occurs as soon as possible
-                       CL_BeginDownloads(false);
+               // execute cl_begindownloads next frame
+               // (after any commands added by svc_stufftext have been executed)
+               // when done with downloads the "prespawn" will be sent
+               Cbuf_AddText(cmd_local, "\ncl_begindownloads\n");
                break;
 
        case 2:
@@ -1690,8 +1694,11 @@ static void CL_ParseServerInfo (void)
        {
                SCR_BeginLoadingPlaque(false);
                S_StopAllSounds();
+               // prevent dlcache assets from the previous map from interfering with this one
+               FS_UnloadPacks_dlcache();
                // free q3 shaders so that any newly downloaded shaders will be active
-               Mod_FreeQ3Shaders();
+               // bones_was_here: we free the q3 shaders later in CL_SignonReply
+               //Mod_FreeQ3Shaders();
        }
 
        // check memory integrity
@@ -1729,7 +1736,7 @@ static void CL_ParseServerInfo (void)
 
                str = MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring));
                Con_Printf("server gamedir is %s\n", str);
-               strlcpy(gamedir[0], str, sizeof(gamedir[0]));
+               dp_strlcpy(gamedir[0], str, sizeof(gamedir[0]));
 
                // change gamedir if needed
                if (!FS_ChangeGameDirs(1, gamedir, true, false))
@@ -1747,7 +1754,7 @@ static void CL_ParseServerInfo (void)
 
                // get the full level name
                str = MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring));
-               strlcpy (cl.worldmessage, str, sizeof(cl.worldmessage));
+               dp_strlcpy (cl.worldmessage, str, sizeof(cl.worldmessage));
 
                // get the movevars that are defined in the qw protocol
                cl.movevars_gravity            = MSG_ReadFloat(&cl_message);
@@ -1787,16 +1794,16 @@ static void CL_ParseServerInfo (void)
                cl.loadfinished = false;
 
                cls.state = ca_connected;
-               cls.signon = 1;
+               CL_SetSignonStage_WithMsg(1);
 
                // note: on QW protocol we can't set up the gameworld until after
                // downloads finish...
                // (we don't even know the name of the map yet)
                // this also means cl_autodemo does not work on QW protocol...
 
-               strlcpy(cl.worldname, "", sizeof(cl.worldname));
-               strlcpy(cl.worldnamenoextension, "", sizeof(cl.worldnamenoextension));
-               strlcpy(cl.worldbasename, "qw", sizeof(cl.worldbasename));
+               dp_strlcpy(cl.worldname, "", sizeof(cl.worldname));
+               dp_strlcpy(cl.worldnamenoextension, "", sizeof(cl.worldnamenoextension));
+               dp_strlcpy(cl.worldbasename, "qw", sizeof(cl.worldbasename));
                Cvar_SetQuick(&cl_worldname, cl.worldname);
                Cvar_SetQuick(&cl_worldnamenoextension, cl.worldnamenoextension);
                Cvar_SetQuick(&cl_worldbasename, cl.worldbasename);
@@ -1824,7 +1831,7 @@ static void CL_ParseServerInfo (void)
 
        // parse signon message
                str = MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring));
-               strlcpy (cl.worldmessage, str, sizeof(cl.worldmessage));
+               dp_strlcpy (cl.worldmessage, str, sizeof(cl.worldmessage));
 
        // seperate the printfs so the server message can have a color
                if (cls.protocol != PROTOCOL_NEHAHRAMOVIE) // no messages when playing the Nehahra movie
@@ -1843,7 +1850,7 @@ static void CL_ParseServerInfo (void)
                                Host_Error ("Server sent too many model precaches");
                        if (strlen(str) >= MAX_QPATH)
                                Host_Error ("Server sent a precache name of %i characters (max %i)", (int)strlen(str), MAX_QPATH - 1);
-                       strlcpy (cl.model_name[nummodels], str, sizeof (cl.model_name[nummodels]));
+                       dp_strlcpy (cl.model_name[nummodels], str, sizeof (cl.model_name[nummodels]));
                }
                // parse sound precache list
                for (numsounds=1 ; ; numsounds++)
@@ -1855,13 +1862,13 @@ static void CL_ParseServerInfo (void)
                                Host_Error("Server sent too many sound precaches");
                        if (strlen(str) >= MAX_QPATH)
                                Host_Error("Server sent a precache name of %i characters (max %i)", (int)strlen(str), MAX_QPATH - 1);
-                       strlcpy (cl.sound_name[numsounds], str, sizeof (cl.sound_name[numsounds]));
+                       dp_strlcpy (cl.sound_name[numsounds], str, sizeof (cl.sound_name[numsounds]));
                }
 
                // set the base name for level-specific things...  this gets updated again by CL_SetupWorldModel later
-               strlcpy(cl.worldname, cl.model_name[1], sizeof(cl.worldname));
+               dp_strlcpy(cl.worldname, cl.model_name[1], sizeof(cl.worldname));
                FS_StripExtension(cl.worldname, cl.worldnamenoextension, sizeof(cl.worldnamenoextension));
-               strlcpy(cl.worldbasename, !strncmp(cl.worldnamenoextension, "maps/", 5) ? cl.worldnamenoextension + 5 : cl.worldnamenoextension, sizeof(cl.worldbasename));
+               dp_strlcpy(cl.worldbasename, !strncmp(cl.worldnamenoextension, "maps/", 5) ? cl.worldnamenoextension + 5 : cl.worldnamenoextension, sizeof(cl.worldbasename));
                Cvar_SetQuick(&cl_worldmessage, cl.worldmessage);
                Cvar_SetQuick(&cl_worldname, cl.worldname);
                Cvar_SetQuick(&cl_worldnamenoextension, cl.worldnamenoextension);
@@ -1943,7 +1950,7 @@ static void CL_ParseServerInfo (void)
                                cls.forcetrack = -1;
                                FS_Printf (cls.demofile, "%i\n", cls.forcetrack);
                                cls.demorecording = true;
-                               strlcpy(cls.demoname, demofile, sizeof(cls.demoname));
+                               dp_strlcpy(cls.demoname, demofile, sizeof(cls.demoname));
                                cls.demo_lastcsprogssize = -1;
                                cls.demo_lastcsprogscrc = -1;
                        }
@@ -3026,10 +3033,10 @@ static void CL_IPLog_Add(const char *address, const char *name, qbool checkexist
        sz_name = strlen(name) + 1;
        cl_iplog_items[cl_iplog_numitems].address = (char *) Mem_Alloc(cls.permanentmempool, sz_address);
        cl_iplog_items[cl_iplog_numitems].name = (char *) Mem_Alloc(cls.permanentmempool, sz_name);
-       strlcpy(cl_iplog_items[cl_iplog_numitems].address, address, sz_address);
+       dp_strlcpy(cl_iplog_items[cl_iplog_numitems].address, address, sz_address);
        // TODO: maybe it would be better to strip weird characters from name when
        // copying it here rather than using a straight strcpy?
-       strlcpy(cl_iplog_items[cl_iplog_numitems].name, name, sz_name);
+       dp_strlcpy(cl_iplog_items[cl_iplog_numitems].name, name, sz_name);
        cl_iplog_numitems++;
        if (addtofile)
        {
@@ -3281,9 +3288,10 @@ extern cvar_t host_timescale;
 extern cvar_t cl_lerpexcess;
 static void CL_NetworkTimeReceived(double newtime)
 {
+       cl.opt_inputs_since_update = 0;
        cl.mtime[1] = cl.mtime[0];
        cl.mtime[0] = newtime;
-       if (cl_nolerp.integer || cls.timedemo || cl.mtime[1] == cl.mtime[0] || cls.signon < SIGNONS)
+       if (cls.timedemo || cl.mtime[1] == cl.mtime[0] || cls.signon < SIGNONS)
                cl.time = cl.mtime[1] = newtime;
        else if (cls.demoplayback)
        {
@@ -3306,27 +3314,32 @@ static void CL_NetworkTimeReceived(double newtime)
                                Con_DPrintf("--- cl.time > cl.mtime[0] (%f > %f ... %f)\n", cl.time, cl.mtime[1], cl.mtime[0]);
                }
 
-               if (cl_nettimesyncboundmode.integer < 4)
-               {
-                       // doesn't make sense for modes > 3
-                       cl.time += (cl.mtime[1] - cl.time) * bound(0, cl_nettimesyncfactor.value, 1);
-                       timehigh = cl.mtime[1] + (cl.mtime[0] - cl.mtime[1]) * cl_nettimesyncboundtolerance.value;
-               }
-
+selectmode:
                switch (cl_nettimesyncboundmode.integer)
                {
+               default:
+                       Cvar_SetQuick(&cl_nettimesyncboundmode, cl_nettimesyncboundmode.defstring);
+                       goto selectmode;
                case 1:
-                       cl.time = bound(cl.mtime[1], cl.time, cl.mtime[0]);
-                       break;
-
                case 2:
-                       if (cl.time < cl.mtime[1] || cl.time > timehigh)
-                               cl.time = cl.mtime[1];
-                       break;
-
                case 3:
-                       if ((cl.time < cl.mtime[1] && cl.oldtime < cl.mtime[1]) || (cl.time > timehigh && cl.oldtime > timehigh))
-                               cl.time = cl.mtime[1];
+                       // doesn't make sense for modes > 3
+                       cl.time += (cl.mtime[1] - cl.time) * bound(0, cl_nettimesyncfactor.value, 1);
+                       timehigh = cl.mtime[1] + (cl.mtime[0] - cl.mtime[1]) * cl_nettimesyncboundtolerance.value;
+                       switch (cl_nettimesyncboundmode.integer)
+                       {
+                       case 1:
+                               cl.time = bound(cl.mtime[1], cl.time, cl.mtime[0]);
+                               break;
+                       case 2:
+                               if (cl.time < cl.mtime[1] || cl.time > timehigh)
+                                       cl.time = cl.mtime[1];
+                               break;
+                       case 3:
+                               if ((cl.time < cl.mtime[1] && cl.oldtime < cl.mtime[1]) || (cl.time > timehigh && cl.oldtime > timehigh))
+                                       cl.time = cl.mtime[1];
+                               break;
+                       }
                        break;
 
                case 4:
@@ -3432,6 +3445,7 @@ void CL_ParseServerMessage(void)
        qbool   qwplayerupdatereceived;
        qbool   strip_pqc;
        char vabuf[1024];
+       size_t cl_readstring_len;
 
        // LadyHavoc: moved demo message writing from before the packet parse to
        // after the packet parse so that CL_Stop_f can be called by cl_autodemo
@@ -3505,7 +3519,7 @@ void CL_ParseServerMessage(void)
                                {
                                        char description[32*64], logtemp[64];
                                        int count;
-                                       strlcpy(description, "packet dump: ", sizeof(description));
+                                       dp_strlcpy(description, "packet dump: ", sizeof(description));
                                        i = cmdcount - 32;
                                        if (i < 0)
                                                i = 0;
@@ -3514,7 +3528,7 @@ void CL_ParseServerMessage(void)
                                        while(count > 0)
                                        {
                                                dpsnprintf(logtemp, sizeof(logtemp), "%3i:%s ", cmdlog[i], cmdlogname[i]);
-                                               strlcat(description, logtemp, sizeof(description));
+                                               dp_strlcat(description, logtemp, sizeof(description));
                                                count--;
                                                i++;
                                                i &= 31;
@@ -3538,22 +3552,28 @@ void CL_ParseServerMessage(void)
 
                        case qw_svc_print:
                                i = MSG_ReadByte(&cl_message);
-                               temp = MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring));
+                               cl_readstring_len = MSG_ReadString_len(&cl_message, cl_readstring, sizeof(cl_readstring));
+                               temp = cl_readstring;
                                if (CL_ExaminePrintString(temp)) // look for anything interesting like player IP addresses or ping reports
                                {
                                        if (i == 3) // chat
-                                               CSQC_AddPrintText(va(vabuf, sizeof(vabuf), "\1%s", temp));      //[515]: csqc
+                                       {
+                                               cl_readstring_len = dpsnprintf(vabuf, sizeof(vabuf), "\1%s", temp);
+                                               CSQC_AddPrintText(vabuf, cl_readstring_len);    //[515]: csqc
+                                       }
                                        else
-                                               CSQC_AddPrintText(temp);
+                                               CSQC_AddPrintText(temp, cl_readstring_len);
                                }
                                break;
 
                        case qw_svc_centerprint:
-                               CL_VM_Parse_CenterPrint(MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)));     //[515]: csqc
+                               cl_readstring_len = MSG_ReadString_len(&cl_message, cl_readstring, sizeof(cl_readstring));
+                               CL_VM_Parse_CenterPrint(cl_readstring, cl_readstring_len);      //[515]: csqc
                                break;
 
                        case qw_svc_stufftext:
-                               CL_VM_Parse_StuffCmd(MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)));        //[515]: csqc
+                               cl_readstring_len = MSG_ReadString_len(&cl_message, cl_readstring, sizeof(cl_readstring));
+                               CL_VM_Parse_StuffCmd(cl_readstring, cl_readstring_len); //[515]: csqc
                                break;
 
                        case qw_svc_damage:
@@ -3586,7 +3606,7 @@ void CL_ParseServerMessage(void)
                                        Con_Printf ("svc_lightstyle >= MAX_LIGHTSTYLES");
                                        break;
                                }
-                               strlcpy (cl.lightstyle[i].map,  MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof (cl.lightstyle[i].map));
+                               dp_strlcpy (cl.lightstyle[i].map,  MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof (cl.lightstyle[i].map));
                                cl.lightstyle[i].map[MAX_STYLESTRING - 1] = 0;
                                cl.lightstyle[i].length = (int)strlen(cl.lightstyle[i].map);
                                break;
@@ -3696,7 +3716,7 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case qw_svc_sellscreen:
-                               Cmd_ExecuteString(cmd_local, "help", src_local, true);
+                               Cmd_ExecuteString(cmd_local, "help", 4, src_local, true);
                                break;
 
                        case qw_svc_smallkick:
@@ -3767,20 +3787,14 @@ void CL_ParseServerMessage(void)
                                EntityFrameQW_CL_ReadFrame(false);
                                // first update is the final signon stage
                                if (cls.signon == SIGNONS - 1)
-                               {
-                                       cls.signon = SIGNONS;
-                                       CL_SignonReply ();
-                               }
+                                       CL_SignonReply(SIGNONS);
                                break;
 
                        case qw_svc_deltapacketentities:
                                EntityFrameQW_CL_ReadFrame(true);
                                // first update is the final signon stage
                                if (cls.signon == SIGNONS - 1)
-                               {
-                                       cls.signon = SIGNONS;
-                                       CL_SignonReply ();
-                               }
+                                       CL_SignonReply(SIGNONS);
                                break;
 
                        case qw_svc_maxspeed:
@@ -3840,11 +3854,8 @@ void CL_ParseServerMessage(void)
                                cmdlogname[cmdindex] = temp;
                                SHOWNET("fast update");
                                if (cls.signon == SIGNONS - 1)
-                               {
                                        // first update is the final signon stage
-                                       cls.signon = SIGNONS;
-                                       CL_SignonReply ();
-                               }
+                                       CL_SignonReply(SIGNONS);
                                EntityFrameQuake_ReadEntity (cmd&127);
                                continue;
                        }
@@ -3865,7 +3876,7 @@ void CL_ParseServerMessage(void)
                                {
                                        char description[32*64], tempdesc[64];
                                        int count;
-                                       strlcpy (description, "packet dump: ", sizeof(description));
+                                       dp_strlcpy (description, "packet dump: ", sizeof(description));
                                        i = cmdcount - 32;
                                        if (i < 0)
                                                i = 0;
@@ -3874,7 +3885,7 @@ void CL_ParseServerMessage(void)
                                        while(count > 0)
                                        {
                                                dpsnprintf (tempdesc, sizeof (tempdesc), "%3i:%s ", cmdlog[i], cmdlogname[i]);
-                                               strlcat (description, tempdesc, sizeof (description));
+                                               dp_strlcat (description, tempdesc, sizeof (description));
                                                count--;
                                                i++;
                                                i &= 31;
@@ -3917,17 +3928,20 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case svc_print:
-                               temp = MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring));
+                               cl_readstring_len = MSG_ReadString_len(&cl_message, cl_readstring, sizeof(cl_readstring));
+                               temp = cl_readstring;
                                if (CL_ExaminePrintString(temp)) // look for anything interesting like player IP addresses or ping reports
-                                       CSQC_AddPrintText(temp);        //[515]: csqc
+                                       CSQC_AddPrintText(temp, cl_readstring_len);     //[515]: csqc
                                break;
 
                        case svc_centerprint:
-                               CL_VM_Parse_CenterPrint(MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)));     //[515]: csqc
+                               cl_readstring_len = MSG_ReadString_len(&cl_message, cl_readstring, sizeof(cl_readstring));
+                               CL_VM_Parse_CenterPrint(cl_readstring, cl_readstring_len);      //[515]: csqc
                                break;
 
                        case svc_stufftext:
-                               temp = MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring));
+                               cl_readstring_len = MSG_ReadString_len(&cl_message, cl_readstring, sizeof(cl_readstring));
+                               temp = cl_readstring;
                                /* if(utf8_enable.integer)
                                {
                                        strip_pqc = true;
@@ -3958,11 +3972,15 @@ void CL_ParseServerMessage(void)
                                        if(*temp == 0x01)
                                        {
                                                ++temp;
+                                               --cl_readstring_len;
                                                while(*temp >= 0x01 && *temp <= 0x1F)
+                                               {
                                                        ++temp;
+                                                       --cl_readstring_len;
+                                               }
                                        }
                                }
-                               CL_VM_Parse_StuffCmd(temp);     //[515]: csqc
+                               CL_VM_Parse_StuffCmd(temp, cl_readstring_len);  //[515]: csqc
                                break;
 
                        case svc_damage:
@@ -4007,7 +4025,7 @@ void CL_ParseServerMessage(void)
                                        Con_Printf ("svc_lightstyle >= MAX_LIGHTSTYLES");
                                        break;
                                }
-                               strlcpy (cl.lightstyle[i].map,  MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof (cl.lightstyle[i].map));
+                               dp_strlcpy (cl.lightstyle[i].map,  MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof (cl.lightstyle[i].map));
                                cl.lightstyle[i].map[MAX_STYLESTRING - 1] = 0;
                                cl.lightstyle[i].length = (int)strlen(cl.lightstyle[i].map);
                                break;
@@ -4064,7 +4082,7 @@ void CL_ParseServerMessage(void)
                                i = MSG_ReadByte(&cl_message);
                                if (i >= cl.maxclients)
                                        Host_Error ("CL_ParseServerMessage: svc_updatename >= cl.maxclients");
-                               strlcpy (cl.scores[i].name, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof (cl.scores[i].name));
+                               dp_strlcpy (cl.scores[i].name, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof (cl.scores[i].name));
                                break;
 
                        case svc_updatefrags:
@@ -4135,8 +4153,7 @@ void CL_ParseServerMessage(void)
                                // reconnect somehow, so allow signon 1 even if at signon 1
                                if (i <= cls.signon && i != 1)
                                        Host_Error ("Received signon %i when at %i", i, cls.signon);
-                               cls.signon = i;
-                               CL_SignonReply ();
+                               CL_SignonReply(i);
                                break;
 
                        case svc_killedmonster:
@@ -4202,7 +4219,7 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case svc_sellscreen:
-                               Cmd_ExecuteString(cmd_local, "help", src_local, true);
+                               Cmd_ExecuteString(cmd_local, "help", 4, src_local, true);
                                break;
                        case svc_hidelmp:
                                if (gamemode == GAME_TENEBRAE)
@@ -4240,11 +4257,8 @@ void CL_ParseServerMessage(void)
                                break;
                        case svc_entities:
                                if (cls.signon == SIGNONS - 1)
-                               {
                                        // first update is the final signon stage
-                                       cls.signon = SIGNONS;
-                                       CL_SignonReply ();
-                               }
+                                       CL_SignonReply(SIGNONS);
                                if (cls.protocol == PROTOCOL_DARKPLACES1 || cls.protocol == PROTOCOL_DARKPLACES2 || cls.protocol == PROTOCOL_DARKPLACES3)
                                        EntityFrame_CL_ReadFrame();
                                else if (cls.protocol == PROTOCOL_DARKPLACES4)
index 64fe93b8ce10c176dccba3eb10cbb553a51d1bc3..bb8840da27ca60a7855f6cd49d157b4617a41ba1 100644 (file)
@@ -192,10 +192,11 @@ static const int tex_bulletdecal[8] = {8, 9, 10, 11, 12, 13, 14, 15};
 static const int tex_blooddecal[8] = {16, 17, 18, 19, 20, 21, 22, 23};
 static const int tex_bloodparticle[8] = {24, 25, 26, 27, 28, 29, 30, 31};
 static const int tex_rainsplash = 32;
-static const int tex_particle = 63;
+static const int tex_square = 33;
+static const int tex_beam = 60;
 static const int tex_bubble = 62;
 static const int tex_raindrop = 61;
-static const int tex_beam = 60;
+static const int tex_particle = 63;
 
 particleeffectinfo_t baselineparticleeffectinfo =
 {
@@ -279,7 +280,7 @@ cvar_t cl_particles = {CF_CLIENT | CF_ARCHIVE, "cl_particles", "1", "enables par
 cvar_t cl_particles_quality = {CF_CLIENT | CF_ARCHIVE, "cl_particles_quality", "1", "multiplies number of particles"};
 cvar_t cl_particles_alpha = {CF_CLIENT | CF_ARCHIVE, "cl_particles_alpha", "1", "multiplies opacity of particles"};
 cvar_t cl_particles_size = {CF_CLIENT | CF_ARCHIVE, "cl_particles_size", "1", "multiplies particle size"};
-cvar_t cl_particles_quake = {CF_CLIENT | CF_ARCHIVE, "cl_particles_quake", "0", "makes particle effects look mostly like the ones in Quake"};
+cvar_t cl_particles_quake = {CF_CLIENT | CF_ARCHIVE, "cl_particles_quake", "0", "0: Fancy particles; 1: Disc particles like GLQuake; 2: Square particles like software-rendered Quake"};
 cvar_t cl_particles_blood = {CF_CLIENT | CF_ARCHIVE, "cl_particles_blood", "1", "enables blood effects"};
 cvar_t cl_particles_blood_alpha = {CF_CLIENT | CF_ARCHIVE, "cl_particles_blood_alpha", "1", "opacity of blood, does not affect decals"};
 cvar_t cl_particles_blood_decal_alpha = {CF_CLIENT | CF_ARCHIVE, "cl_particles_blood_decal_alpha", "1", "opacity of blood decal"};
@@ -332,7 +333,7 @@ static void CL_Particles_ParseEffectInfo(const char *textstart, const char *text
                                break;
                        if (argc < 16)
                        {
-                               strlcpy(argv[argc], com_token, sizeof(argv[argc]));
+                               dp_strlcpy(argv[argc], com_token, sizeof(argv[argc]));
                                argc++;
                        }
                }
@@ -362,7 +363,7 @@ static void CL_Particles_ParseEffectInfo(const char *textstart, const char *text
                                }
                                else
                                {
-                                       strlcpy(particleeffectname[effectnameindex], argv[1], sizeof(particleeffectname[effectnameindex]));
+                                       dp_strlcpy(particleeffectname[effectnameindex], argv[1], sizeof(particleeffectname[effectnameindex]));
                                        break;
                                }
                        }
@@ -545,15 +546,15 @@ static void CL_Particles_LoadEffectInfo(const char *customfile)
        memset(particleeffectinfo, 0, sizeof(particleeffectinfo));
        memset(particleeffectname, 0, sizeof(particleeffectname));
        for (i = 0;i < EFFECT_TOTAL;i++)
-               strlcpy(particleeffectname[i], standardeffectnames[i], sizeof(particleeffectname[i]));
+               dp_strlcpy(particleeffectname[i], standardeffectnames[i], sizeof(particleeffectname[i]));
        for (filepass = 0;;filepass++)
        {
                if (filepass == 0)
                {
                        if (customfile)
-                               strlcpy(filename, customfile, sizeof(filename));
+                               dp_strlcpy(filename, customfile, sizeof(filename));
                        else
-                               strlcpy(filename, "effectinfo.txt", sizeof(filename));
+                               dp_strlcpy(filename, "effectinfo.txt", sizeof(filename));
                }
                else if (filepass == 1)
                {
@@ -629,28 +630,71 @@ void CL_Particles_Shutdown (void)
 void CL_SpawnDecalParticleForSurface(int hitent, const vec3_t org, const vec3_t normal, int color1, int color2, int texnum, float size, float alpha);
 void CL_SpawnDecalParticleForPoint(const vec3_t org, float maxdist, float size, float alpha, int texnum, int color1, int color2);
 
-// list of all 26 parameters:
-// ptype - any of the pt_ enum values (pt_static, pt_blood, etc), see ptype_t near the top of this file
-// pcolor1,pcolor2 - minimum and maximum ranges of color, randomly interpolated to decide particle color
-// ptex - any of the tex_ values such as tex_smoke[rand()&7] or tex_particle
-// psize - size of particle (or thickness for PARTICLE_SPARK and PARTICLE_*BEAM)
-// palpha - opacity of particle as 0-255 (can be more than 255)
-// palphafade - rate of fade per second (so 256 would mean a 256 alpha particle would fade to nothing in 1 second)
-// ptime - how long the particle can live (note it is also removed if alpha drops to nothing)
-// pgravity - how much effect gravity has on the particle (0-1)
-// pbounce - how much bounce the particle has when it hits a surface (0-1), -1 makes a blood splat when it hits a surface, 0 does not even check for collisions
-// px,py,pz - starting origin of particle
-// pvx,pvy,pvz - starting velocity of particle
-// pfriction - how much the particle slows down per second (0-1 typically, can slowdown faster than 1)
-// blendmode - one of the PBLEND_ values
-// orientation - one of the PARTICLE_ values
-// staincolor1, staincolor2: minimum and maximum ranges of stain color, randomly interpolated to decide stain color (-1 to use none)
-// staintex: any of the tex_ values such as tex_smoke[rand()&7] or tex_particle (-1 to use none)
-// stainalpha: opacity of the stain as factor for alpha
-// stainsize: size of the stain as factor for palpha
-// angle: base rotation of the particle geometry around its center normal
-// spin: rotation speed of the particle geometry around its center normal
-particle_t *CL_NewParticle(const vec3_t sortorigin, unsigned short ptypeindex, int pcolor1, int pcolor2, int ptex, float psize, float psizeincrease, float palpha, float palphafade, float pgravity, float pbounce, float px, float py, float pz, float pvx, float pvy, float pvz, float pairfriction, float pliquidfriction, float originjitter, float velocityjitter, qbool pqualityreduction, float lifetime, float stretch, pblend_t blendmode, porientation_t orientation, int staincolor1, int staincolor2, int staintex, float stainalpha, float stainsize, float angle, float spin, float tint[4])
+
+
+/**
+ * @brief      Creates a new particle and returns a pointer to it
+ *
+ * @param[in]  sortorigin         ?
+ * @param[in]  ptypeindex         Any of the pt_ enum values (pt_static, pt_blood, etc), see ptype_t near the top of this file
+ * @param[in]  pcolor1,pcolor2    Minimum and maximum range of color, randomly interpolated with pcolor2 to decide particle color
+ * @param[in]  ptex               Any of the tex_ values such as tex_smoke[rand()&7] or tex_particle
+ * @param[in]  psize              Size of particle (or thickness for PARTICLE_SPARK and PARTICLE_*BEAM)
+ * @param[in]  psizeincrease      ?
+ * @param[in]  palpha             Opacity of particle as 0-255 (can be more than 255)
+ * @param[in]  palphafade         Rate of fade per second (so 256 would mean a 256 alpha particle would fade to nothing in 1 second)
+ * @param[in]  pgravity           How much effect gravity has on the particle (0-1)
+ * @param[in]  pbounce            How much bounce the particle has when it hits a surface (0-1), -1 makes a blood splat when it hits a surface, 0 does not even check for collisions
+ * @param[in]  px,py,pz           Starting origin of particle
+ * @param[in]  pvx,pvy,pvz        Starting velocity of particle
+ * @param[in]  pairfriction       How much the particle slows down, in air, per second (0-1 typically, can slowdown faster than 1)
+ * @param[in]  pliquidfriction    How much the particle slows down, in liquids, per second (0-1 typically, can slowdown faster than 1)
+ * @param[in]  originjitter       ?
+ * @param[in]  velocityjitter     ?
+ * @param[in]  pqualityreduction  ?
+ * @param[in]  lifetime           How long the particle can live (note it is also removed if alpha drops to nothing)
+ * @param[in]  stretch            ?
+ * @param[in]  blendmode          One of the PBLEND_ values
+ * @param[in]  orientation        One of the PARTICLE_ values
+ * @param[in]  staincolor1        Minimum and maximum ranges of stain color, randomly interpolated to decide stain color (-1 to use none)
+ * @param[in]  staincolor2        Minimum and maximum ranges of stain color, randomly interpolated to decide stain color (-1 to use none)
+ * @param[in]  staintex           Any of the tex_ values such as tex_smoke[rand()&7] or tex_particle
+ * @param[in]  angle              Base rotation of the particle geometry around its center normal
+ * @param[in]  spin               Rotation speed of the particle geometry around its center normal
+ * @param[in]  tint               The tint
+ *
+ * @return     Pointer to the new particle
+ */
+particle_t *CL_NewParticle(
+       const vec3_t sortorigin,
+       unsigned short ptypeindex,
+       int pcolor1, int pcolor2,
+       int ptex,
+       float psize,
+       float psizeincrease,
+       float palpha,
+       float palphafade,
+       float pgravity,
+       float pbounce,
+       float px, float py, float pz,
+       float pvx, float pvy, float pvz,
+       float pairfriction,
+       float pliquidfriction,
+       float originjitter,
+       float velocityjitter,
+       qbool pqualityreduction,
+       float lifetime,
+       float stretch,
+       pblend_t blendmode,
+       porientation_t orientation,
+       int staincolor1,
+       int staincolor2,
+       int staintex,
+       float stainalpha,
+       float stainsize,
+       float angle,
+       float spin,
+       float tint[4])
 {
        int l1, l2, r, g, b;
        particle_t *part;
@@ -802,6 +846,89 @@ particle_t *CL_NewParticle(const vec3_t sortorigin, unsigned short ptypeindex, i
        return part;
 }
 
+
+
+/**
+ * @brief      Creates a simple particle, a square like Quake, or a disc like GLQuake
+ *
+ * @param[in]  origin                                                 ?
+ * @param[in]  color_1,color_2                                        Minimum and maximum range of color, randomly interpolated with pcolor2 to decide particle color
+ * @param[in]  gravity                                                How much effect gravity has on the particle (0-1)
+ * @param[in]  offset_x,offset_y,offset_z                             Starting origin of particle
+ * @param[in]  velocity_offset_x,velocity_offset_y,velocity_offset_z  Starting velocity of particle
+ * @param[in]  air_friction                                           How much the particle slows down, in air, per second (0-1 typically, can slowdown faster than 1)
+ * @param[in]  liquid_friction                                        How much the particle slows down, in liquids, per second (0-1 typically, can slowdown faster than 1)
+ * @param[in]  origin_jitter                                          ?
+ * @param[in]  velocity_jitter                                        ?
+ * @param[in]  lifetime                                               How long the particle can live (note it is also removed if alpha drops to nothing)
+ *
+ * @return     Pointer to the new particle
+ */
+particle_t *CL_NewQuakeParticle(
+       const vec3_t origin,
+       const int color_1,
+       const int color_2,
+       const float gravity,
+       const float offset_x,
+       const float offset_y,
+       const float offset_z,
+       const float velocity_offset_x,
+       const float velocity_offset_y,
+       const float velocity_offset_z,
+       const float air_friction,
+       const float liquid_friction,
+       const float origin_jitter,
+       const float velocity_jitter,
+       const float lifetime)
+{
+       int texture;
+
+       // Set the particle texture based on the value of cl_particles_quake; defaulting to the GLQuake disc
+       if (cl_particles_quake.integer == 2)
+               texture = tex_square;
+       else
+               texture = tex_particle;
+
+       return CL_NewParticle(
+               origin,
+               pt_alphastatic,      // type
+               color_1,
+               color_2,
+               texture,
+               0.8f,                // size
+               0,                   // size increase
+               255,                 // alpha
+               0,                   // alpha fade
+               gravity,
+               0,                   // bounce
+               offset_x,
+               offset_y,
+               offset_z,
+               velocity_offset_x,
+               velocity_offset_y,
+               velocity_offset_z,
+               air_friction,
+               liquid_friction,
+               origin_jitter,
+               velocity_jitter,
+               true,                // quality reduction
+               lifetime,
+               1,                   // stretch
+               PBLEND_ALPHA,        // blend mode
+               PARTICLE_BILLBOARD,  // orientation
+               -1,                  // stain color 1
+               -1,                  // stain color 2
+               -1,                  // stain texture
+               1,                   // stain alpha
+               1,                   // stain size
+               0,                   // angle
+               0,                   // spin
+               NULL                 // tint
+       );
+}
+
+
+
 static void CL_ImmediateBloodStain(particle_t *part)
 {
        vec3_t v;
@@ -914,7 +1041,23 @@ static void CL_ParticleEffect_Fallback(int effectnameindex, float count, const v
                                for (;count > 0;count--)
                                {
                                        int k = particlepalette[(palettecolor & ~7) + (rand()&7)];
-                                       CL_NewParticle(center, pt_alphastatic, k, k, tex_particle, 1.5, 0, 255, 0, 0.15, 0, lhrandom(originmins[0], originmaxs[0]), lhrandom(originmins[1], originmaxs[1]), lhrandom(originmins[2], originmaxs[2]), lhrandom(velocitymins[0], velocitymaxs[0]), lhrandom(velocitymins[1], velocitymaxs[1]), lhrandom(velocitymins[2], velocitymaxs[2]), 0, 0, 8, 3, true, lhrandom(0.1, 0.4), 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
+                                       CL_NewQuakeParticle(
+                                               center,                                      // origin
+                                               k,                                           // color 1
+                                               k,                                           // color 2
+                                               0.15,                                        // gravity
+                                               lhrandom(originmins[0], originmaxs[0]),      // offset x
+                                               lhrandom(originmins[1], originmaxs[1]),      // offset y
+                                               lhrandom(originmins[2], originmaxs[2]),      // offset z
+                                               lhrandom(velocitymins[0], velocitymaxs[0]),  // velocity offset x
+                                               lhrandom(velocitymins[1], velocitymaxs[1]),  // velocity offset y
+                                               lhrandom(velocitymins[2], velocitymaxs[2]),  // velocity offset z
+                                               0,                                           // air friction
+                                               0,                                           // liquid friction
+                                               8,                                           // origin jitter
+                                               3,                                           // velocity jitter
+                                               lhrandom(0.1, 0.4)                           // lifetime
+                                       );
                                }
                        }
                }
@@ -1278,7 +1421,7 @@ static void CL_ParticleEffect_Fallback(int effectnameindex, float count, const v
                                        if (cl_particles_quake.integer)
                                        {
                                                color = particlepalette[67 + (rand()&3)];
-                                               CL_NewParticle(center, pt_alphastatic, color, color, tex_particle, 1.5f, 0, 255, 0, 0.25, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 3, 0, true, 2, 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
+                                               CL_NewQuakeParticle(center, color, color, 0.25, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 3, 0, 2);
                                        }
                                        else
                                        {
@@ -1292,7 +1435,7 @@ static void CL_ParticleEffect_Fallback(int effectnameindex, float count, const v
                                        {
                                                dec = 6;
                                                color = particlepalette[67 + (rand()&3)];
-                                               CL_NewParticle(center, pt_alphastatic, color, color, tex_particle, 1.5f, 0, 255, 0, 0.25, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 3, 0, true, 2, 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
+                                               CL_NewQuakeParticle(center, color, color, 0.25, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 3, 0, 2);
                                        }
                                        else
                                        {
@@ -1309,7 +1452,7 @@ static void CL_ParticleEffect_Fallback(int effectnameindex, float count, const v
                                        {
                                                r = rand()&3;
                                                color = particlepalette[ramp3[r]];
-                                               CL_NewParticle(center, pt_alphastatic, color, color, tex_particle, 1.5f, 0, 255, 0, -0.10, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 3, 0, true, 0.1372549*(6-r), 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
+                                               CL_NewQuakeParticle(center, color, color, -0.10, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 3, 0, 0.1372549 * (6 - r));
                                        }
                                        else
                                        {
@@ -1323,7 +1466,7 @@ static void CL_ParticleEffect_Fallback(int effectnameindex, float count, const v
                                        {
                                                r = 2 + (rand()%4);
                                                color = particlepalette[ramp3[r]];
-                                               CL_NewParticle(center, pt_alphastatic, color, color, tex_particle, 1.5f, 0, 255, 0, -0.15, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 3, 0, true, 0.1372549*(6-r), 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
+                                               CL_NewQuakeParticle(center, color, color, -0.15, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 3, 0, 0.1372549 * (6 - r));
                                        }
                                        else
                                        {
@@ -1336,8 +1479,8 @@ static void CL_ParticleEffect_Fallback(int effectnameindex, float count, const v
                                        {
                                                dec = 6;
                                                color = particlepalette[52 + (rand()&7)];
-                                               CL_NewParticle(center, pt_alphastatic, color, color, tex_particle, 1.5f, 0, 255, 0, 0, 0, pos[0], pos[1], pos[2], 30*dir[1], 30*-dir[0], 0, 0, 0, 0, 0, true, 0.5, 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
-                                               CL_NewParticle(center, pt_alphastatic, color, color, tex_particle, 1.5f, 0, 255, 0, 0, 0, pos[0], pos[1], pos[2], 30*-dir[1], 30*dir[0], 0, 0, 0, 0, 0, true, 0.5, 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
+                                               CL_NewQuakeParticle(center, color, color, 0, pos[0], pos[1], pos[2], 30*dir[1], 30*-dir[0], 0, 0, 0, 0, 0, 0.5);
+                                               CL_NewQuakeParticle(center, color, color, 0, pos[0], pos[1], pos[2], 30*-dir[1], 30*dir[0], 0, 0, 0, 0, 0, 0.5);
                                        }
                                        else if (gamemode == GAME_GOODVSBAD2)
                                        {
@@ -1356,8 +1499,8 @@ static void CL_ParticleEffect_Fallback(int effectnameindex, float count, const v
                                        {
                                                dec = 6;
                                                color = particlepalette[230 + (rand()&7)];
-                                               CL_NewParticle(center, pt_alphastatic, color, color, tex_particle, 1.5f, 0, 255, 0, 0, 0, pos[0], pos[1], pos[2], 30*dir[1], 30*-dir[0], 0, 0, 0, 0, 0, true, 0.5, 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
-                                               CL_NewParticle(center, pt_alphastatic, color, color, tex_particle, 1.5f, 0, 255, 0, 0, 0, pos[0], pos[1], pos[2], 30*-dir[1], 30*dir[0], 0, 0, 0, 0, 0, true, 0.5, 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
+                                               CL_NewQuakeParticle(center, color, color, 0, pos[0], pos[1], pos[2], 30 *  dir[1], 30 * -dir[0], 0, 0, 0, 0, 0, 0.5);
+                                               CL_NewQuakeParticle(center, color, color, 0, pos[0], pos[1], pos[2], 30 * -dir[1], 30 *  dir[0], 0, 0, 0, 0, 0, 0.5);
                                        }
                                        else
                                        {
@@ -1370,7 +1513,7 @@ static void CL_ParticleEffect_Fallback(int effectnameindex, float count, const v
                                        if (cl_particles_quake.integer)
                                        {
                                                color = particlepalette[152 + (rand()&3)];
-                                               CL_NewParticle(center, pt_alphastatic, color, color, tex_particle, 1.5f, 0, 255, 0, 0, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 8, 0, true, 0.3, 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
+                                               CL_NewQuakeParticle(center, color, color, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 8, 0, 0.3);
                                        }
                                        else if (gamemode == GAME_GOODVSBAD2)
                                        {
@@ -1793,27 +1936,57 @@ void CL_ParticleExplosion (const vec3_t org)
 {
        int i;
        trace_t trace;
-       //vec3_t v;
-       //vec3_t v2;
+       particle_t *particle;
+
        R_Stain(org, 96, 40, 40, 40, 64, 88, 88, 88, 64);
        CL_SpawnDecalParticleForPoint(org, 40, 48, 255, tex_bulletdecal[rand()&7], 0xFFFFFF, 0xFFFFFF);
 
        if (cl_particles_quake.integer)
        {
-               for (i = 0;i < 1024;i++)
+               for (i = 0; i < 1024; i++)
                {
-                       int r, color;
-                       r = rand()&3;
+                       int color;
+                       int r = rand()&3;
+
                        if (i & 1)
                        {
                                color = particlepalette[ramp1[r]];
-                               CL_NewParticle(org, pt_alphastatic, color, color, tex_particle, 1.5f, 0, 255, 0, 0, 0, org[0], org[1], org[2], 0, 0, 0, -4, -4, 16, 256, true, 0.1006 * (8 - r), 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
+
+                               particle = CL_NewQuakeParticle(
+                                       org,
+                                       color, color,
+                                       0.05,                        // gravity
+                                       org[0], org[1], org[2],      // offset
+                                       0, 0, 0,                     // velocity
+                                       2,                           // air friction
+                                       0,                           // liquid friction
+                                       16,                          // origin jitter
+                                       256,                         // velocity jitter
+                                       5                            // lifetime
+                               );
+                               particle->typeindex = pt_explode;
                        }
                        else
                        {
                                color = particlepalette[ramp2[r]];
-                               CL_NewParticle(org, pt_alphastatic, color, color, tex_particle, 1.5f, 0, 255, 0, 0, 0, org[0], org[1], org[2], 0, 0, 0, 1, 1, 16, 256, true, 0.0669 * (8 - r), 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
+
+                               particle = CL_NewQuakeParticle(
+                                       org,
+                                       color, color,
+                                       0.05,                        // gravity
+                                       org[0], org[1], org[2],      // offset
+                                       0, 0, 0,                     // velocity
+                                       0,                           // air friction
+                                       0,                           // liquid friction
+                                       16,                          // origin jitter
+                                       256,                         // velocity jitter
+                                       5                            // lifetime
+                               );
+
+                               particle->typeindex = pt_explode2;
                        }
+
+                       particle->time2 = r;  // time2 is used to progress the colour ramp index
                }
        }
        else
@@ -1867,7 +2040,7 @@ void CL_ParticleExplosion2 (const vec3_t org, int colorStart, int colorLength)
        {
                k = particlepalette[colorStart + (i % colorLength)];
                if (cl_particles_quake.integer)
-                       CL_NewParticle(org, pt_alphastatic, k, k, tex_particle, 1, 0, 255, 0, 0, 0, org[0], org[1], org[2], 0, 0, 0, -4, -4, 16, 256, true, 0.3, 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
+                       CL_NewQuakeParticle(org, k, k, 0, org[0], org[1], org[2], 0, 0, 0, -4, -4, 16, 256, 0.3);
                else
                        CL_NewParticle(org, pt_alphastatic, k, k, tex_particle, lhrandom(0.5, 1.5), 0, 255, 512, 0, 0, org[0], org[1], org[2], 0, 0, 0, lhrandom(1.5, 3), lhrandom(1.5, 3), 8, 192, true, 0, 1, PBLEND_ALPHA, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
        }
@@ -1916,7 +2089,9 @@ void CL_ParticleRain (const vec3_t mins, const vec3_t maxs, const vec3_t dir, in
 {
        int k;
        float minz, maxz, lifetime = 30;
+       float particle_size;
        vec3_t org;
+
        if (!cl_particles.integer) return;
        if (dir[2] < 0) // falling
        {
@@ -1939,28 +2114,27 @@ void CL_ParticleRain (const vec3_t mins, const vec3_t maxs, const vec3_t dir, in
        {
        case 0:
                if (!cl_particles_rain.integer) break;
+
                count *= 4; // ick, this should be in the mod or maps?
+               particle_size = (gamemode == GAME_GOODVSBAD2) ? 20 : 0.5;
 
                while(count--)
                {
                        k = particlepalette[colorbase + (rand()&3)];
                        VectorSet(org, lhrandom(mins[0], maxs[0]), lhrandom(mins[1], maxs[1]), lhrandom(minz, maxz));
-                       if (gamemode == GAME_GOODVSBAD2)
-                               CL_NewParticle(org, pt_rain, k, k, tex_particle, 20, 0, lhrandom(32, 64), 0, 0, -1, org[0], org[1], org[2], dir[0], dir[1], dir[2], 0, 0, 0, 0, true, lifetime, 1, PBLEND_ADD, PARTICLE_SPARK, -1, -1, -1, 1, 1, 0, 0, NULL);
-                       else
-                               CL_NewParticle(org, pt_rain, k, k, tex_particle, 0.5, 0, lhrandom(32, 64), 0, 0, -1, org[0], org[1], org[2], dir[0], dir[1], dir[2], 0, 0, 0, 0, true, lifetime, 1, PBLEND_ADD, PARTICLE_SPARK, -1, -1, -1, 1, 1, 0, 0, NULL);
+                       CL_NewParticle(org, pt_rain, k, k, tex_particle, particle_size, 0, lhrandom(32, 64), 0, 0, -1, org[0], org[1], org[2], dir[0], dir[1], dir[2], 0, 0, 0, 0, true, lifetime, 1, PBLEND_ADD, PARTICLE_SPARK, -1, -1, -1, 1, 1, 0, 0, NULL);
                }
                break;
        case 1:
                if (!cl_particles_snow.integer) break;
+
+               particle_size = (gamemode == GAME_GOODVSBAD2) ? 20 : 1.0;
+
                while(count--)
                {
                        k = particlepalette[colorbase + (rand()&3)];
                        VectorSet(org, lhrandom(mins[0], maxs[0]), lhrandom(mins[1], maxs[1]), lhrandom(minz, maxz));
-                       if (gamemode == GAME_GOODVSBAD2)
-                               CL_NewParticle(org, pt_snow, k, k, tex_particle, 20, 0, lhrandom(64, 128), 0, 0, -1, org[0], org[1], org[2], dir[0], dir[1], dir[2], 0, 0, 0, 0, true, lifetime, 1, PBLEND_ADD, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
-                       else
-                               CL_NewParticle(org, pt_snow, k, k, tex_particle, 1, 0, lhrandom(64, 128), 0, 0, -1, org[0], org[1], org[2], dir[0], dir[1], dir[2], 0, 0, 0, 0, true, lifetime, 1, PBLEND_ADD, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
+                       CL_NewParticle(org, pt_snow, k, k, tex_particle, 1, 0, lhrandom(64, 128), 0, 0, -1, org[0], org[1], org[2], dir[0], dir[1], dir[2], 0, 0, 0, 0, true, lifetime, 1, PBLEND_ADD, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
                }
                break;
        default:
@@ -2357,7 +2531,7 @@ static void R_InitParticleTexture (void)
 
                        if (COM_ParseToken_Simple(&bufptr, true, false, true) && strcmp(com_token, "\n"))
                        {
-                               strlcpy(texturename, com_token, sizeof(texturename));
+                               dp_strlcpy(texturename, com_token, sizeof(texturename));
                                s1 = atof(com_token);
                                if (COM_ParseToken_Simple(&bufptr, true, false, true) && strcmp(com_token, "\n"))
                                {
@@ -2369,9 +2543,9 @@ static void R_InitParticleTexture (void)
                                                if (COM_ParseToken_Simple(&bufptr, true, false, true) && strcmp(com_token, "\n"))
                                                {
                                                        t2 = atof(com_token);
-                                                       strlcpy(texturename, "particles/particlefont.tga", sizeof(texturename));
+                                                       dp_strlcpy(texturename, "particles/particlefont.tga", sizeof(texturename));
                                                        if (COM_ParseToken_Simple(&bufptr, true, false, true) && strcmp(com_token, "\n"))
-                                                               strlcpy(texturename, com_token, sizeof(texturename));
+                                                               dp_strlcpy(texturename, com_token, sizeof(texturename));
                                                }
                                        }
                                }
@@ -2741,10 +2915,16 @@ void R_DrawParticles (void)
        int hitent;
        trace_t trace;
        qbool update;
+       float pt_explode_frame_interval, pt_explode2_frame_interval;
+       int color;
 
        frametime = bound(0, cl.time - cl.particles_updatetime, 1);
        cl.particles_updatetime = bound(cl.time - 1, cl.particles_updatetime + frametime, cl.time + 1);
 
+       // Handling of the colour ramp for pt_explode and pt_explode2
+       pt_explode_frame_interval = frametime * 10;
+       pt_explode2_frame_interval = frametime * 15;
+
        // LadyHavoc: early out conditions
        if (!cl.num_particles)
                return;
@@ -2919,7 +3099,35 @@ void R_DrawParticles (void)
                                        a = CL_PointSuperContents(p->org);
                                        if (a & (SUPERCONTENTS_SOLID | SUPERCONTENTS_LIQUIDSMASK))
                                                goto killparticle;
-                                       break;
+                                       case pt_explode:
+                                               // Progress the particle colour up the ramp
+                                               p->time2 += pt_explode_frame_interval;
+                                               if (p->time2 >= 8)
+                                               {
+                                                       p->die = -1;
+                                               }
+                                               else {
+                                                       color = particlepalette[ramp1[(int)p->time2]];
+                                                       p->color[0] = color >> 16;
+                                                       p->color[1] = color >>  8;
+                                                       p->color[2] = color >>  0;
+                                               }
+                                               break;
+
+                                       case pt_explode2:
+                                               // Progress the particle colour up the ramp
+                                               p->time2 += pt_explode2_frame_interval;
+                                               if (p->time2 >= 8)
+                                               {
+                                                       p->die = -1;
+                                               }
+                                               else {
+                                                       color = particlepalette[ramp2[(int)p->time2]];
+                                                       p->color[0] = color >> 16;
+                                                       p->color[1] = color >>  8;
+                                                       p->color[2] = color >>  0;
+                                               }
+                                               break;
                                default:
                                        break;
                                }
index 8e07e19e79a40b7e79c413a9856b26bfee302067..ed8bb320fdd04891b19bdf9fb7886ee4d0c90b83 100644 (file)
@@ -58,7 +58,22 @@ particletype_t;
 
 typedef enum ptype_e
 {
-       pt_dead, pt_alphastatic, pt_static, pt_spark, pt_beam, pt_rain, pt_raindecal, pt_snow, pt_bubble, pt_blood, pt_smoke, pt_decal, pt_entityparticle, pt_total
+       pt_dead,
+       pt_alphastatic,
+       pt_static,
+       pt_spark,
+       pt_beam,
+       pt_rain,
+       pt_raindecal,
+       pt_snow,
+       pt_bubble,
+       pt_blood,
+       pt_smoke,
+       pt_decal,
+       pt_entityparticle,
+       pt_explode,   // used for Quake-style explosion particle colour ramping
+       pt_explode2,  // used for Quake-style explosion particle colour ramping
+       pt_total
 }
 ptype_t;
 
@@ -108,6 +123,7 @@ void CL_Particles_Clear(void);
 void CL_Particles_Init(void);
 void CL_Particles_Shutdown(void);
 particle_t *CL_NewParticle(const vec3_t sortorigin, unsigned short ptypeindex, int pcolor1, int pcolor2, int ptex, float psize, float psizeincrease, float palpha, float palphafade, float pgravity, float pbounce, float px, float py, float pz, float pvx, float pvy, float pvz, float pairfriction, float pliquidfriction, float originjitter, float velocityjitter, qbool pqualityreduction, float lifetime, float stretch, pblend_t blendmode, porientation_t orientation, int staincolor1, int staincolor2, int staintex, float stainalpha, float stainsize, float angle, float spin, float tint[4]);
+particle_t *CL_NewQuakeParticle(const vec3_t origin, const int color_1, const int color_2, const float gravity, const float offset_x, const float offset_y, const float offset_z, const float velocity_offset_x, const float velocity_offset_y, const float velocity_offset_z, const float air_friction, const float liquid_friction, const float origin_jitter, const float velocity_jitter, const float lifetime);
 
 typedef enum effectnameindex_s
 {
index 44b493e4771d4105abb1e3750fe54951a9f174f3..04d25a01b946241eb92e92288b73f103390275bc 100644 (file)
@@ -23,7 +23,8 @@ cvar_t scr_conalphafactor = {CF_CLIENT | CF_ARCHIVE, "scr_conalphafactor", "1",
 cvar_t scr_conalpha2factor = {CF_CLIENT | CF_ARCHIVE, "scr_conalpha2factor", "0", "opacity of console background gfx/conback2 relative to scr_conalpha; when 0, gfx/conback2 is not drawn"};
 cvar_t scr_conalpha3factor = {CF_CLIENT | CF_ARCHIVE, "scr_conalpha3factor", "0", "opacity of console background gfx/conback3 relative to scr_conalpha; when 0, gfx/conback3 is not drawn"};
 cvar_t scr_conbrightness = {CF_CLIENT | CF_ARCHIVE, "scr_conbrightness", "1", "brightness of console background (0 = black, 1 = image)"};
-cvar_t scr_conforcewhiledisconnected = {CF_CLIENT, "scr_conforcewhiledisconnected", "1", "forces fullscreen console while disconnected"};
+cvar_t scr_conforcewhiledisconnected = {CF_CLIENT, "scr_conforcewhiledisconnected", "1", "1 forces fullscreen console while disconnected, 2 also forces it when the listen server has started but the client is still loading"};
+cvar_t scr_conheight = {CF_CLIENT | CF_ARCHIVE, "scr_conheight", "0.5", "fraction of screen height occupied by console (reduced as necessary for visibility of loading progress and infobar)"};
 cvar_t scr_conscroll_x = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll_x", "0", "scroll speed of gfx/conback in x direction"};
 cvar_t scr_conscroll_y = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll_y", "0", "scroll speed of gfx/conback in y direction"};
 cvar_t scr_conscroll2_x = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll2_x", "0", "scroll speed of gfx/conback2 in x direction"};
@@ -48,7 +49,7 @@ cvar_t scr_loadingscreen_count = {CF_CLIENT, "scr_loadingscreen_count","1", "num
 cvar_t scr_loadingscreen_firstforstartup = {CF_CLIENT, "scr_loadingscreen_firstforstartup","0", "remove loading.tga from random scr_loadingscreen_count selection and only display it on client startup, 0 = normal, 1 = firstforstartup"};
 cvar_t scr_loadingscreen_barcolor = {CF_CLIENT, "scr_loadingscreen_barcolor", "0 0 1", "rgb color of loadingscreen progress bar"};
 cvar_t scr_loadingscreen_barheight = {CF_CLIENT, "scr_loadingscreen_barheight", "8", "the height of the loadingscreen progress bar"};
-cvar_t scr_loadingscreen_maxfps = {CF_CLIENT, "scr_loadingscreen_maxfps", "10", "restrict maximal FPS for loading screen so it will not update very often (this will make lesser loading times on a maps loading large number of models)"};
+cvar_t scr_loadingscreen_maxfps = {CF_CLIENT, "scr_loadingscreen_maxfps", "20", "maximum FPS for loading screen so it will not update very often (this reduces loading time with lots of models)"};
 cvar_t scr_infobar_height = {CF_CLIENT, "scr_infobar_height", "8", "the height of the infobar items"};
 cvar_t vid_conwidthauto = {CF_CLIENT | CF_ARCHIVE, "vid_conwidthauto", "1", "automatically update vid_conwidth to match aspect ratio"};
 cvar_t vid_conwidth = {CF_CLIENT | CF_ARCHIVE, "vid_conwidth", "640", "virtual width of 2D graphics system (note: changes may be overwritten, see vid_conwidthauto)"};
@@ -99,8 +100,10 @@ int jpeg_supported = false;
 
 qbool  scr_initialized;                // ready to draw
 
-float          scr_con_current;
-int                    scr_con_margin_bottom;
+qbool scr_loading = false;  // we are in a loading screen
+
+unsigned int        scr_con_current;
+static unsigned int scr_con_margin_bottom;
 
 extern int     con_vislines;
 
@@ -139,7 +142,7 @@ for a few moments
 */
 void SCR_CenterPrint(const char *str)
 {
-       strlcpy (scr_centerstring, str, sizeof (scr_centerstring));
+       dp_strlcpy (scr_centerstring, str, sizeof (scr_centerstring));
        scr_centertime_off = scr_centertime.value;
        scr_centertime_start = cl.time;
 
@@ -153,6 +156,48 @@ void SCR_CenterPrint(const char *str)
        }
 }
 
+/*
+============
+SCR_Centerprint_f
+
+Print something to the center of the screen using SCR_Centerprint
+============
+*/
+static void SCR_Centerprint_f (cmd_state_t *cmd)
+{
+       char msg[MAX_INPUTLINE];
+       unsigned int i, c, p;
+       c = Cmd_Argc(cmd);
+       if(c >= 2)
+       {
+               dp_strlcpy(msg, Cmd_Argv(cmd,1), sizeof(msg));
+               for(i = 2; i < c; ++i)
+               {
+                       dp_strlcat(msg, " ", sizeof(msg));
+                       dp_strlcat(msg, Cmd_Argv(cmd, i), sizeof(msg));
+               }
+               c = (unsigned int)strlen(msg);
+               for(p = 0, i = 0; i < c; ++i)
+               {
+                       if(msg[i] == '\\')
+                       {
+                               if(msg[i+1] == 'n')
+                                       msg[p++] = '\n';
+                               else if(msg[i+1] == '\\')
+                                       msg[p++] = '\\';
+                               else {
+                                       msg[p++] = '\\';
+                                       msg[p++] = msg[i+1];
+                               }
+                               ++i;
+                       } else {
+                               msg[p++] = msg[i];
+                       }
+               }
+               msg[p] = '\0';
+               SCR_CenterPrint(msg);
+       }
+}
 
 static void SCR_DrawCenterString (void)
 {
@@ -590,11 +635,13 @@ SCR_DrawInfobar
 */
 static void SCR_DrawInfobar(void)
 {
-       int offset = 0;
+       unsigned int offset = 0;
        offset += SCR_DrawQWDownload(offset);
        offset += SCR_DrawCurlDownload(offset);
        if(scr_infobartime_off > 0)
                offset += SCR_DrawInfobarString(offset);
+       if(!offset && scr_loading)
+               offset = scr_loadingscreen_barheight.integer;
        if(offset != scr_con_margin_bottom)
                Con_DPrintf("broken console margin calculation: %d != %d\n", offset, scr_con_margin_bottom);
 }
@@ -635,7 +682,7 @@ static void SCR_InfoBar_f(cmd_state_t *cmd)
        if(Cmd_Argc(cmd) == 3)
        {
                scr_infobartime_off = atof(Cmd_Argv(cmd, 1));
-               strlcpy(scr_infobarstring, Cmd_Argv(cmd, 2), sizeof(scr_infobarstring));
+               dp_strlcpy(scr_infobarstring, Cmd_Argv(cmd, 2), sizeof(scr_infobarstring));
        }
        else
        {
@@ -651,8 +698,6 @@ SCR_SetUpToDrawConsole
 */
 static void SCR_SetUpToDrawConsole (void)
 {
-       // lines of console to display
-       float conlines;
 #ifdef CONFIG_MENU
        static int framecounter = 0;
 #endif
@@ -678,13 +723,11 @@ static void SCR_SetUpToDrawConsole (void)
        else
                key_consoleactive &= ~KEY_CONSOLEACTIVE_FORCED;
 
-// decide on the height of the console
+       // decide on the height of the console
        if (key_consoleactive & KEY_CONSOLEACTIVE_USER)
-               conlines = vid_conheight.integer/2;     // half screen
+               scr_con_current = vid_conheight.integer * scr_conheight.value;
        else
-               conlines = 0;                           // none visible
-
-       scr_con_current = conlines;
+               scr_con_current = 0; // none visible
 }
 
 /*
@@ -694,37 +737,21 @@ SCR_DrawConsole
 */
 void SCR_DrawConsole (void)
 {
+       // infobar and loading progress are not drawn simultaneously
        scr_con_margin_bottom = SCR_InfobarHeight();
+       if (!scr_con_margin_bottom && scr_loading)
+               scr_con_margin_bottom = scr_loadingscreen_barheight.integer;
        if (key_consoleactive & KEY_CONSOLEACTIVE_FORCED)
        {
                // full screen
                Con_DrawConsole (vid_conheight.integer - scr_con_margin_bottom);
        }
        else if (scr_con_current)
-               Con_DrawConsole (min((int)scr_con_current, vid_conheight.integer - scr_con_margin_bottom));
+               Con_DrawConsole (min(scr_con_current, vid_conheight.integer - scr_con_margin_bottom));
        else
                con_vislines = 0;
 }
 
-qbool scr_loading = false;
-
-/*
-===============
-SCR_BeginLoadingPlaque
-
-================
-*/
-void SCR_BeginLoadingPlaque (qbool startup)
-{
-       scr_loading = true;
-       SCR_UpdateLoadingScreen(false, startup);
-}
-
-void SCR_EndLoadingPlaque(void)
-{
-       scr_loading = false;
-}
-
 //=============================================================================
 
 /*
@@ -779,6 +806,7 @@ void CL_Screen_Init(void)
        Cvar_RegisterVariable (&scr_conscroll3_y);
        Cvar_RegisterVariable (&scr_conbrightness);
        Cvar_RegisterVariable (&scr_conforcewhiledisconnected);
+       Cvar_RegisterVariable (&scr_conheight);
 #ifdef CONFIG_MENU
        Cvar_RegisterVariable (&scr_menuforcewhiledisconnected);
 #endif
@@ -856,6 +884,7 @@ void CL_Screen_Init(void)
        if (Sys_CheckParm ("-noconsole"))
                Cvar_SetQuick(&scr_conforcewhiledisconnected, "0");
 
+       Cmd_AddCommand(CF_CLIENT, "cprint", SCR_Centerprint_f, "print something at the screen center");
        Cmd_AddCommand(CF_CLIENT, "sizeup",SCR_SizeUp_f, "increase view size (increases viewsize cvar)");
        Cmd_AddCommand(CF_CLIENT, "sizedown",SCR_SizeDown_f, "decrease view size (decreases viewsize cvar)");
        Cmd_AddCommand(CF_CLIENT, "screenshot",SCR_ScreenShot_f, "takes a screenshot of the next rendered frame");
@@ -889,7 +918,7 @@ void SCR_ScreenShot_f(cmd_state_t *cmd)
        if (Cmd_Argc(cmd) == 2)
        {
                const char *ext;
-               strlcpy(filename, Cmd_Argv(cmd, 1), sizeof(filename));
+               dp_strlcpy(filename, Cmd_Argv(cmd, 1), sizeof(filename));
                ext = FS_FileExtension(filename);
                if (!strcasecmp(ext, "jpg"))
                {
@@ -982,7 +1011,7 @@ void SCR_ScreenShot_f(cmd_state_t *cmd)
                {
                        if(SCR_ScreenShot (filename, buffer1, buffer2, 0, 0, vid.width, vid.height, false, false, false, false, false, true, scr_screenshot_alpha.integer != 0))
                        {
-                               strlcpy(filename + strlen(filename) - 3, "tga", 4);
+                               dp_strlcpy(filename + strlen(filename) - 3, "tga", 4);
                                Con_Printf("Wrote %s\n", filename);
                        }
                }
@@ -1197,19 +1226,13 @@ static void SCR_CaptureVideo_VideoFrame(int newframestepframenum)
        cls.capturevideo.videoframes(newframestepframenum - cls.capturevideo.framestepframe);
        cls.capturevideo.framestepframe = newframestepframenum;
 
-       if(cl_capturevideo_printfps.integer)
+       if(cl_capturevideo_printfps.integer && host.realtime > cls.capturevideo.lastfpstime + 1)
        {
-               char buf[80];
-               double t = host.realtime;
-               if(t > cls.capturevideo.lastfpstime + 1)
-               {
-                       double fps1 = (cls.capturevideo.frame - cls.capturevideo.lastfpsframe) / (t - cls.capturevideo.lastfpstime + 0.0000001);
-                       double fps  = (cls.capturevideo.frame                                ) / (t - cls.capturevideo.starttime   + 0.0000001);
-                       dpsnprintf(buf, sizeof(buf), "capturevideo: (%.1fs) last second %.3ffps, total %.3ffps\n", cls.capturevideo.frame / cls.capturevideo.framerate, fps1, fps);
-                       Sys_Print(buf);
-                       cls.capturevideo.lastfpstime = t;
-                       cls.capturevideo.lastfpsframe = cls.capturevideo.frame;
-               }
+               double fps1 = (cls.capturevideo.frame - cls.capturevideo.lastfpsframe) / (host.realtime - cls.capturevideo.lastfpstime + 0.0000001);
+               double fps  = (cls.capturevideo.frame                                ) / (host.realtime - cls.capturevideo.starttime   + 0.0000001);
+               Sys_Printf("capturevideo: (%.1fs) last second %.3ffps, total %.3ffps\n", cls.capturevideo.frame / cls.capturevideo.framerate, fps1, fps);
+               cls.capturevideo.lastfpstime = host.realtime;
+               cls.capturevideo.lastfpsframe = cls.capturevideo.frame;
        }
 }
 
@@ -1313,7 +1336,7 @@ static void R_Envmap_f(cmd_state_t *cmd)
                return;
        }
 
-       strlcpy (basename, Cmd_Argv(cmd, 1), sizeof (basename));
+       dp_strlcpy (basename, Cmd_Argv(cmd, 1), sizeof (basename));
        size = atoi(Cmd_Argv(cmd, 2));
        if (size != 128 && size != 256 && size != 512 && size != 1024)
        {
@@ -1389,8 +1412,8 @@ void SHOWLMP_decodeshow(void)
        int k;
        char lmplabel[256], picname[256];
        float x, y;
-       strlcpy (lmplabel,MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof (lmplabel));
-       strlcpy (picname, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof (picname));
+       dp_strlcpy (lmplabel,MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof (lmplabel));
+       dp_strlcpy (picname, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof (picname));
        if (gamemode == GAME_NEHAHRA) // LadyHavoc: nasty old legacy junk
        {
                x = MSG_ReadByte(&cl_message);
@@ -1421,8 +1444,8 @@ void SHOWLMP_decodeshow(void)
                        if (!cl.showlmps[k].isactive)
                                break;
        cl.showlmps[k].isactive = true;
-       strlcpy (cl.showlmps[k].label, lmplabel, sizeof (cl.showlmps[k].label));
-       strlcpy (cl.showlmps[k].pic, picname, sizeof (cl.showlmps[k].pic));
+       dp_strlcpy (cl.showlmps[k].label, lmplabel, sizeof (cl.showlmps[k].label));
+       dp_strlcpy (cl.showlmps[k].pic, picname, sizeof (cl.showlmps[k].pic));
        cl.showlmps[k].x = x;
        cl.showlmps[k].y = y;
        cl.num_showlmps = max(cl.num_showlmps, k + 1);
@@ -1570,32 +1593,27 @@ typedef struct loadingscreenstack_s
 }
 loadingscreenstack_t;
 static loadingscreenstack_t *loadingscreenstack = NULL;
-static qbool loadingscreendone = false;
-static qbool loadingscreencleared = false;
-static float loadingscreenheight = 0;
-rtexture_t *loadingscreentexture = NULL;
+rtexture_t *loadingscreentexture = NULL; // last framebuffer before loading screen, kept for the background
 static float loadingscreentexture_vertex3f[12];
 static float loadingscreentexture_texcoord2f[8];
 static int loadingscreenpic_number = 0;
+/// User-friendly connection status for the menu and/or loading screen,
+/// colours and \n not supported.
+char cl_connect_status[MAX_QPATH]; // should match size of loadingscreenstack_t msg[]
 
 static void SCR_DrawLoadingScreen(void);
 static void SCR_DrawScreen (void)
 {
        Draw_Frame();
-
+       DrawQ_Start();
        R_Mesh_Start();
-
        R_UpdateVariables();
 
-       // this will be set back to 0 by R_RenderView during CL_VM_UpdateView
-       r_refdef.draw2dstage = 1;
-       R_ResetViewRendering2D_Common(0, NULL, NULL, 0, 0, vid.width, vid.height, vid_conwidth.integer, vid_conheight.integer);
-
        // Quake uses clockwise winding, so these are swapped
        r_refdef.view.cullface_front = GL_BACK;
        r_refdef.view.cullface_back = GL_FRONT;
 
-       if (cls.signon == SIGNONS)
+       if (!scr_loading && cls.signon == SIGNONS)
        {
                float size;
 
@@ -1664,7 +1682,7 @@ static void SCR_DrawScreen (void)
 
                // if CSQC is loaded, it is required to provide the CSQC_UpdateView function,
                // and won't render a view if it does not call that.
-               if (cl.csqc_loaded)
+               if (CLVM_prog->loaded && !(CLVM_prog->flag & PRVM_CSQC_SIMPLE))
                        CL_VM_UpdateView(r_stereo_side ? 0.0 : max(0.0, cl.time - cl.oldtime));
                else
                {
@@ -1675,19 +1693,6 @@ static void SCR_DrawScreen (void)
                        R_RenderView(0, NULL, NULL, r_refdef.view.x, r_refdef.view.y, r_refdef.view.width, r_refdef.view.height);
                }
        }
-       else if (key_dest == key_game && key_consoleactive == 0 && (cls.state == ca_connected || cls.connect_trying))
-       {
-               // draw the loading screen for a while if we're still connecting and not forcing the console or menu to show up
-               char temp[64];
-               if (cls.signon > 0)
-                       SCR_PushLoadingScreen(va(temp, sizeof(temp), "Connect: Signon stage %i of %i", cls.signon, SIGNONS), 1.0);
-               else if (cls.connect_remainingtries > 0)
-                       SCR_PushLoadingScreen(va(temp, sizeof(temp), "Connect: Trying...  %i", cls.connect_remainingtries), 1.0);
-               else
-                       SCR_PushLoadingScreen(va(temp, sizeof(temp), "Connect: Waiting %i seconds for reply", 10 + cls.connect_remainingtries), 1.0);
-               SCR_DrawLoadingScreen();
-               SCR_PopLoadingScreen(false);
-       }
 
        // Don't apply debugging stuff like r_showsurfaces to the UI
        r_refdef.view.showdebug = false;
@@ -1737,10 +1742,6 @@ static void SCR_DrawScreen (void)
 
        // draw 2D stuff
 
-       // Don't flicker when starting a local server.
-       if(scr_loading && !loadingscreenstack && ((!cls.signon && !sv.active) || (cls.signon == SIGNONS)))
-               SCR_EndLoadingPlaque();
-
        if(!scr_con_current && !(key_consoleactive & KEY_CONSOLEACTIVE_FORCED))
                if ((key_dest == key_game || key_dest == key_message) && !r_letterbox.value && !scr_loading)
                        Con_DrawNotify ();      // only draw notify in game
@@ -1750,13 +1751,17 @@ static void SCR_DrawScreen (void)
        else
                host.paused = false;
 
-       if (cls.signon == SIGNONS)
+       if (!scr_loading && cls.signon == SIGNONS)
        {
                SCR_DrawNet ();
                SCR_DrawTurtle ();
                SCR_DrawPause ();
                if (!r_letterbox.value)
+               {
                        Sbar_Draw();
+                       if (CLVM_prog->loaded && CLVM_prog->flag & PRVM_CSQC_SIMPLE)
+                               CL_VM_DrawHud(r_stereo_side ? 0.0 : max(0.0, cl.time - cl.oldtime));
+               }
                SHOWLMP_drawall();
                SCR_CheckDrawCenterString();
        }
@@ -1768,13 +1773,29 @@ static void SCR_DrawScreen (void)
        CL_DrawVideo();
        R_Shadow_EditLights_DrawSelectedLightProperties();
 
-       SCR_DrawConsole();
-       
-       if(!scr_loading) {
-               SCR_DrawBrand();
+       if (scr_loading)
+       {
+               // connect_status replaces any dummy_status
+               if ((!loadingscreenstack || loadingscreenstack->msg[0] == '\0') && cl_connect_status[0] != '\0')
+               {
+                       loadingscreenstack_t connect_status, *og_ptr = loadingscreenstack;
 
-               SCR_DrawInfobar();
+                       connect_status.absolute_loading_amount_min = 0;
+                       dp_strlcpy(connect_status.msg, cl_connect_status, sizeof(cl_connect_status));
+                       loadingscreenstack = &connect_status;
+                       SCR_DrawLoadingScreen();
+                       loadingscreenstack = og_ptr;
+               }
+               else
+                       SCR_DrawLoadingScreen();
+       }
 
+       SCR_DrawConsole();
+       SCR_DrawInfobar();
+
+       if (!scr_loading)
+       {
+               SCR_DrawBrand();
                SCR_DrawTouchscreenOverlay();
        }
        if (r_timereport_active)
@@ -1786,9 +1807,8 @@ static void SCR_DrawScreen (void)
        if(!scr_loading)
                Sbar_ShowFPS();
 
-       DrawQ_Finish();
-
        R_Mesh_Finish();
+       DrawQ_Finish();
        R_RenderTarget_FreeUnused(false);
 }
 
@@ -1825,19 +1845,67 @@ static void SCR_SetLoadingScreenTexture(void)
        loadingscreentexture_texcoord2f[6] = 0;loadingscreentexture_texcoord2f[7] = 0;
 }
 
-void SCR_UpdateLoadingScreenIfShown(void)
+static void SCR_ChooseLoadingPic(qbool startup)
 {
-       if(loadingscreendone)
-               SCR_UpdateLoadingScreen(loadingscreencleared, false);
+       if(startup && scr_loadingscreen_firstforstartup.integer)
+               loadingscreenpic_number = 0;
+       else if(scr_loadingscreen_firstforstartup.integer)
+               if(scr_loadingscreen_count.integer > 1)
+                       loadingscreenpic_number = rand() % (scr_loadingscreen_count.integer - 1) + 1;
+               else
+                       loadingscreenpic_number = 0;
+       else
+               loadingscreenpic_number = rand() % (scr_loadingscreen_count.integer > 1 ? scr_loadingscreen_count.integer : 1);
 }
 
+/*
+===============
+SCR_BeginLoadingPlaque
+
+================
+*/
+void SCR_BeginLoadingPlaque(qbool startup)
+{
+       loadingscreenstack_t dummy_status;
+
+       // we need to push a dummy status so CL_UpdateScreen knows we have things to load...
+       if (!loadingscreenstack)
+       {
+               dummy_status.msg[0] = '\0';
+               dummy_status.absolute_loading_amount_min = 0;
+               loadingscreenstack = &dummy_status;
+       }
+
+       SCR_DeferLoadingPlaque(startup);
+       if (scr_loadingscreen_background.integer)
+               SCR_SetLoadingScreenTexture();
+       CL_UpdateScreen();
+
+       if (loadingscreenstack == &dummy_status)
+               loadingscreenstack = NULL;
+}
+
+void SCR_DeferLoadingPlaque(qbool startup)
+{
+       SCR_ChooseLoadingPic(startup);
+       scr_loading = true;
+}
+
+void SCR_EndLoadingPlaque(void)
+{
+       scr_loading = false;
+       SCR_ClearLoadingScreenTexture();
+}
+
+//=============================================================================
+
 void SCR_PushLoadingScreen (const char *msg, float len_in_parent)
 {
        loadingscreenstack_t *s = (loadingscreenstack_t *) Z_Malloc(sizeof(loadingscreenstack_t));
        s->prev = loadingscreenstack;
        loadingscreenstack = s;
 
-       strlcpy(s->msg, msg, sizeof(s->msg));
+       dp_strlcpy(s->msg, msg, sizeof(s->msg));
        s->relative_completion = 0;
 
        if(s->prev)
@@ -1853,7 +1921,8 @@ void SCR_PushLoadingScreen (const char *msg, float len_in_parent)
                s->absolute_loading_amount_len = 1;
        }
 
-               SCR_UpdateLoadingScreenIfShown();
+       if (scr_loading)
+               CL_UpdateScreen();
 }
 
 void SCR_PopLoadingScreen (qbool redraw)
@@ -1871,8 +1940,8 @@ void SCR_PopLoadingScreen (qbool redraw)
                s->prev->relative_completion = (s->absolute_loading_amount_min + s->absolute_loading_amount_len - s->prev->absolute_loading_amount_min) / s->prev->absolute_loading_amount_len;
        Z_Free(s);
 
-       if(redraw)
-               SCR_UpdateLoadingScreenIfShown();
+       if (scr_loading && redraw)
+               CL_UpdateScreen();
 }
 
 void SCR_ClearLoadingScreen (qbool redraw)
@@ -1898,7 +1967,6 @@ static float SCR_DrawLoadingStack_r(loadingscreenstack_t *s, float y, float size
                        len = strlen(s->msg);
                        x = (vid_conwidth.integer - DrawQ_TextWidth(s->msg, len, size, size, true, FONT_INFOBAR)) / 2;
                        y -= size;
-                       DrawQ_Fill(0, y, vid_conwidth.integer, size, 0, 0, 0, 1, 0);
                        DrawQ_String(x, y, s->msg, len, size, size, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
                        total += size;
                }
@@ -1909,7 +1977,6 @@ static float SCR_DrawLoadingStack_r(loadingscreenstack_t *s, float y, float size
                len = strlen(s->msg);
                x = (vid_conwidth.integer - DrawQ_TextWidth(s->msg, len, size, size, true, FONT_INFOBAR)) / 2;
                y -= size;
-               DrawQ_Fill(0, y, vid_conwidth.integer, size, 0, 0, 0, 1, 0);
                DrawQ_String(x, y, s->msg, len, size, size, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
                total += size;
        }
@@ -1922,7 +1989,7 @@ static void SCR_DrawLoadingStack(void)
        float verts[12];
        float colors[16];
 
-       loadingscreenheight = SCR_DrawLoadingStack_r(loadingscreenstack, vid_conheight.integer, scr_loadingscreen_barheight.value);
+       SCR_DrawLoadingStack_r(loadingscreenstack, vid_conheight.integer, scr_loadingscreen_barheight.value);
        if(loadingscreenstack)
        {
                // height = 32; // sorry, using the actual one is ugly
@@ -1930,7 +1997,7 @@ static void SCR_DrawLoadingStack(void)
                GL_DepthRange(0, 1);
                GL_PolygonOffset(0, 0);
                GL_DepthTest(false);
-//             R_Mesh_ResetTextureState();
+               //R_Mesh_ResetTextureState();
                verts[2] = verts[5] = verts[8] = verts[11] = 0;
                verts[0] = verts[9] = 0;
                verts[1] = verts[4] = vid_conheight.integer - scr_loadingscreen_barheight.value;
@@ -1940,9 +2007,6 @@ static void SCR_DrawLoadingStack(void)
 #if _MSC_VER >= 1400
 #define sscanf sscanf_s
 #endif
-               //                                        ^^^^^^^^^^ blue component
-               //                              ^^^^^^ bottom row
-               //          ^^^^^^^^^^^^ alpha is always on
                colors[0] = 0; colors[1] = 0; colors[2] = 0; colors[3] = 1;
                colors[4] = 0; colors[5] = 0; colors[6] = 0; colors[7] = 1;
                sscanf(scr_loadingscreen_barcolor.string, "%f %f %f", &colors[8], &colors[9], &colors[10]); colors[11] = 1;
@@ -1951,40 +2015,31 @@ static void SCR_DrawLoadingStack(void)
                R_Mesh_PrepareVertices_Generic_Arrays(4, verts, colors, NULL);
                R_SetupShader_Generic_NoTexture(true, true);
                R_Mesh_Draw(0, 4, 0, 2, polygonelement3i, NULL, 0, polygonelement3s, NULL, 0);
-
-               // make sure everything is cleared, including the progress indicator
-               if(loadingscreenheight < 8)
-                       loadingscreenheight = 8;
        }
 }
 
-static cachepic_t *loadingscreenpic;
-static float loadingscreenpic_vertex3f[12];
-static float loadingscreenpic_texcoord2f[8];
-
-static void SCR_DrawLoadingScreen_SharedSetup (qbool clear)
+static void SCR_DrawLoadingScreen (void)
 {
-       r_viewport_t viewport;
+       cachepic_t *loadingscreenpic;
+       float loadingscreenpic_vertex3f[12];
+       float loadingscreenpic_texcoord2f[8];
        float x, y, w, h, sw, sh, f;
        char vabuf[1024];
-       // release mouse grab while loading
-       if (!vid.fullscreen)
-               VID_SetMouse(false, false, false);
-//     CHECKGLERROR
-       r_refdef.draw2dstage = true;
-       R_Viewport_InitOrtho(&viewport, &identitymatrix, 0, 0, vid.width, vid.height, 0, 0, vid_conwidth.integer, vid_conheight.integer, -10, 100, NULL);
-       R_Mesh_SetRenderTargets(0, NULL, NULL, NULL, NULL, NULL);
-       R_SetViewport(&viewport);
-       GL_ColorMask(1,1,1,1);
-       // when starting up a new video mode, make sure the screen is cleared to black
-       if (clear || loadingscreentexture)
-               GL_Clear(GL_COLOR_BUFFER_BIT, NULL, 1.0f, 0);
-       R_Textures_Frame();
-       R_Mesh_Start();
-       R_EntityMatrix(&identitymatrix);
-       // draw the loading plaque
-       loadingscreenpic = Draw_CachePic_Flags (loadingscreenpic_number ? va(vabuf, sizeof(vabuf), "%s%d", scr_loadingscreen_picture.string, loadingscreenpic_number+1) : scr_loadingscreen_picture.string, loadingscreenpic_number ? CACHEPICFLAG_NOTPERSISTENT : 0);
 
+       GL_BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+       GL_DepthRange(0, 1);
+       GL_PolygonOffset(0, 0);
+       GL_DepthTest(false);
+       GL_Color(1,1,1,1);
+
+       if(loadingscreentexture)
+       {
+               R_Mesh_PrepareVertices_Generic_Arrays(4, loadingscreentexture_vertex3f, NULL, loadingscreentexture_texcoord2f);
+               R_SetupShader_Generic(loadingscreentexture, false, true, true);
+               R_Mesh_Draw(0, 4, 0, 2, polygonelement3i, NULL, 0, polygonelement3s, NULL, 0);
+       }
+
+       loadingscreenpic = Draw_CachePic_Flags(loadingscreenpic_number ? va(vabuf, sizeof(vabuf), "%s%d", scr_loadingscreen_picture.string, loadingscreenpic_number+1) : scr_loadingscreen_picture.string, loadingscreenpic_number ? CACHEPICFLAG_NOTPERSISTENT : 0);
        w = Draw_GetPicWidth(loadingscreenpic);
        h = Draw_GetPicHeight(loadingscreenpic);
 
@@ -2035,117 +2090,12 @@ static void SCR_DrawLoadingScreen_SharedSetup (qbool clear)
        loadingscreenpic_texcoord2f[2] = 1;loadingscreenpic_texcoord2f[3] = 0;
        loadingscreenpic_texcoord2f[4] = 1;loadingscreenpic_texcoord2f[5] = 1;
        loadingscreenpic_texcoord2f[6] = 0;loadingscreenpic_texcoord2f[7] = 1;
-}
 
-static void SCR_DrawLoadingScreen (void)
-{
-       // we only need to draw the image if it isn't already there
-       GL_BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-       GL_DepthRange(0, 1);
-       GL_PolygonOffset(0, 0);
-       GL_DepthTest(false);
-//     R_Mesh_ResetTextureState();
-       GL_Color(1,1,1,1);
-       if(loadingscreentexture)
-       {
-               R_Mesh_PrepareVertices_Generic_Arrays(4, loadingscreentexture_vertex3f, NULL, loadingscreentexture_texcoord2f);
-               R_SetupShader_Generic(loadingscreentexture, false, true, true);
-               R_Mesh_Draw(0, 4, 0, 2, polygonelement3i, NULL, 0, polygonelement3s, NULL, 0);
-       }
        R_Mesh_PrepareVertices_Generic_Arrays(4, loadingscreenpic_vertex3f, NULL, loadingscreenpic_texcoord2f);
        R_SetupShader_Generic(Draw_GetPicTexture(loadingscreenpic), true, true, false);
        R_Mesh_Draw(0, 4, 0, 2, polygonelement3i, NULL, 0, polygonelement3s, NULL, 0);
-       SCR_DrawLoadingStack();
-}
-
-static double loadingscreen_lastupdate;
-
-static void SCR_UpdateVars(void);
-
-void SCR_UpdateLoadingScreen (qbool clear, qbool startup)
-{
-       keydest_t       old_key_dest;
-       int                     old_key_consoleactive;
 
-       // don't do anything if not initialized yet
-       if (vid_hidden || cls.state == ca_dedicated)
-               return;
-
-       // limit update rate
-       if (scr_loadingscreen_maxfps.value)
-       {
-               double t = Sys_DirtyTime();
-               if ((t - loadingscreen_lastupdate) < 1.0f/scr_loadingscreen_maxfps.value)
-                       return;
-               loadingscreen_lastupdate = t;
-       }
-
-       // set up the r_texture_gammaramps texture which we need for rendering the loadingscreenpic
-       R_UpdateVariables();
-
-       if(!scr_loadingscreen_background.integer)
-               clear = true;
-       
-       if(loadingscreendone)
-               clear |= loadingscreencleared;
-
-       if(!loadingscreendone)
-       {
-               if(startup && scr_loadingscreen_firstforstartup.integer)
-                       loadingscreenpic_number = 0;
-               else if(scr_loadingscreen_firstforstartup.integer)
-                       if(scr_loadingscreen_count.integer > 1)
-                               loadingscreenpic_number = rand() % (scr_loadingscreen_count.integer - 1) + 1;
-                       else
-                               loadingscreenpic_number = 0;
-               else
-                       loadingscreenpic_number = rand() % (scr_loadingscreen_count.integer > 1 ? scr_loadingscreen_count.integer : 1);
-       }
-
-       if(clear)
-               SCR_ClearLoadingScreenTexture();
-       else if(!loadingscreendone)
-               SCR_SetLoadingScreenTexture();
-
-       if(!loadingscreendone)
-       {
-               loadingscreendone = true;
-               loadingscreenheight = 0;
-       }
-       loadingscreencleared = clear;
-
-#ifdef USE_GLES2
-       SCR_DrawLoadingScreen_SharedSetup(clear);
-       SCR_DrawLoadingScreen();
-#else
-       SCR_DrawLoadingScreen_SharedSetup(clear);
-       if (vid.stereobuffer)
-       {
-               qglDrawBuffer(GL_BACK_LEFT);
-               SCR_DrawLoadingScreen();
-               qglDrawBuffer(GL_BACK_RIGHT);
-               SCR_DrawLoadingScreen();
-       }
-       else
-       {
-               qglDrawBuffer(GL_BACK);
-               SCR_DrawLoadingScreen();
-       }
-#endif
-
-       DrawQ_Finish();
-       R_Mesh_Finish();
-       // refresh
-       VID_Finish();
-
-       // this goes into the event loop, and should prevent unresponsive cursor on vista
-       old_key_dest = key_dest;
-       old_key_consoleactive = key_consoleactive;
-       key_dest = key_void;
-       key_consoleactive = false;
-       Key_EventQueue_Block(); Sys_SendKeyEvents();
-       key_dest = old_key_dest;
-       key_consoleactive = old_key_consoleactive;
+       SCR_DrawLoadingStack();
 }
 
 qbool R_Stereo_ColorMasking(void)
@@ -2158,7 +2108,7 @@ qbool R_Stereo_Active(void)
        return (vid.stereobuffer || r_stereo_sidebyside.integer || r_stereo_horizontal.integer || r_stereo_vertical.integer || R_Stereo_ColorMasking());
 }
 
-void SCR_UpdateVars(void)
+static void SCR_UpdateVars(void)
 {
        float conwidth = bound(160, vid_conwidth.value, 32768);
        float conheight = bound(90, vid_conheight.value, 24576);
@@ -2203,9 +2153,10 @@ extern cvar_t cl_minfps_qualitymultiply;
 extern cvar_t cl_minfps_qualityhysteresis;
 extern cvar_t cl_minfps_qualitystepmax;
 extern cvar_t cl_minfps_force;
-static double cl_updatescreen_quality = 1;
 void CL_UpdateScreen(void)
 {
+       static double cl_updatescreen_quality = 1;
+
        vec3_t vieworigin;
        static double drawscreenstart = 0.0;
        double drawscreendelta;
@@ -2294,8 +2245,6 @@ void CL_UpdateScreen(void)
        if (!scr_initialized || !con_initialized || !scr_refresh.integer)
                return;                         // not initialized yet
 
-       loadingscreendone = false;
-
        if(IS_NEXUIZ_DERIVED(gamemode))
        {
                // play a bit with the palette (experimental)
@@ -2319,6 +2268,20 @@ void CL_UpdateScreen(void)
                return;
        }
 
+       if (scr_loading)
+       {
+               if(!loadingscreenstack && !cls.connect_trying && (cls.state != ca_connected || cls.signon == SIGNONS))
+                       SCR_EndLoadingPlaque();
+               else if (scr_loadingscreen_maxfps.value > 0)
+               {
+                       static float lastupdate;
+                       float now = Sys_DirtyTime();
+                       if (now - lastupdate < min(1.0f / scr_loadingscreen_maxfps.value, 0.1))
+                               return;
+                       lastupdate = now;
+               }
+       }
+
        SCR_UpdateVars();
 
        R_FrameData_NewFrame();
@@ -2403,18 +2366,6 @@ void CL_UpdateScreen(void)
 #endif
 
        qglFlush(); // ensure that the commands are submitted to the GPU before we do other things
-
-       if (!vid_activewindow)
-               VID_SetMouse(false, false, false);
-       else if (key_consoleactive)
-               VID_SetMouse(vid.fullscreen, false, false);
-       else if (key_dest == key_menu_grabbed)
-               VID_SetMouse(true, vid_mouse.integer && !in_client_mouse && !vid_touchscreen.integer, !vid_touchscreen.integer);
-       else if (key_dest == key_menu)
-               VID_SetMouse(vid.fullscreen, vid_mouse.integer && !in_client_mouse && !vid_touchscreen.integer, !vid_touchscreen.integer);
-       else
-               VID_SetMouse(vid.fullscreen, vid_mouse.integer && !cl.csqc_wantsmousemove && cl_prydoncursor.integer <= 0 && (!cls.demoplayback || cl_demo_mousegrab.integer) && !vid_touchscreen.integer, !vid_touchscreen.integer);
-
        VID_Finish();
 }
 
index aef5a234fae02c7ac165044f220e825b76d37b54..57cfd282a135f2b2c027afda24556d6f455f51e9 100644 (file)
@@ -17,6 +17,8 @@ extern struct cvar_s scr_screenshot_png;
 extern struct cvar_s scr_screenshot_gammaboost;
 extern struct cvar_s scr_screenshot_name;
 
+extern char cl_connect_status[MAX_QPATH];
+
 void CL_Screen_NewMap(void);
 void CL_Screen_Init(void);
 void CL_Screen_Shutdown(void);
index 2804661b2b8c38c437ac6a51a779a27ee89b32e0..2d5cc453b4b703bb8e3b19194667e322ba88aeae 100644 (file)
@@ -214,7 +214,7 @@ static void LoadSubtitles( clvideo_t *video, const char *subtitlesfile )
 
 static clvideo_t* OpenVideo( clvideo_t *video, const char *filename, const char *name, int owner, const char *subtitlesfile )
 {
-       strlcpy(video->filename, filename, sizeof(video->filename));
+       dp_strlcpy(video->filename, filename, sizeof(video->filename));
        dpsnprintf(video->name, sizeof(video->name), CLVIDEOPREFIX "%s", name);
        video->ownertag = owner;
        if( strncmp( name, CLVIDEOPREFIX, sizeof( CLVIDEOPREFIX ) - 1 ) )
index 04bd63489dfe7253df7ebc91b387e1474809aee8..49d8e96e86da312514943a89fd4be4e3c43a38f2 100644 (file)
@@ -151,7 +151,7 @@ void *jam_open(clvideo_t *video, char *filename, const char **errorstring)
        {
                sfx_t* sfx;
                FS_StripExtension(filename, wavename, namelen);
-               strlcat(wavename, ".wav", namelen);
+               dp_strlcat(wavename, ".wav", namelen);
                sfx = S_PrecacheSound(wavename, false, false);
                if (sfx != NULL)
                        s->sndchan = S_StartSound (-1, 0, sfx, vec3_origin, 1.0f, 0);
index 83f4921c35677005afeb608254a0697add198831..b0181be0dd7d71f409aa74ca2bbe0a0abae342f4 100644 (file)
@@ -335,7 +335,7 @@ void *LibAvW_OpenVideo(clvideo_t *video, char *filename, const char **errorstrin
        if (wavename)
        {
                FS_StripExtension(filename, wavename, len-1);
-               strlcat(wavename, ".wav", len);
+               dp_strlcat(wavename, ".wav", len);
                s->sfx = S_PrecacheSound(wavename, false, false);
                s->sndchan = -1;
                Z_Free(wavename);
index 2006e61fa8cbfa4f78daec849660494d12fd3468..9523196d85ca49f6369986df12b1abc0f25c6946 100644 (file)
--- a/client.h
+++ b/client.h
@@ -894,7 +894,7 @@ typedef struct client_state_s
        char sound_name[MAX_SOUNDS][MAX_QPATH];
 
        // for display on solo scoreboard
-       char worldmessage[40]; // map title (not related to filename)
+       char worldmessage[MAX_QPATH]; // map title (not related to filename)
        // variants of map name
        char worldbasename[MAX_QPATH]; // %s
        char worldname[MAX_QPATH]; // maps/%s.bsp
@@ -1048,6 +1048,8 @@ typedef struct client_state_s
 
        // time accumulated since an input packet was sent
        float timesincepacket;
+       // how many optimally timed inputs we sent since we received an update from the server
+       uint8_t opt_inputs_since_update;
 
        // movement parameters for client prediction
        unsigned int moveflags;
@@ -1107,7 +1109,6 @@ typedef struct client_state_s
        // csqc stuff:
        // server entity number corresponding to a clientside entity
        unsigned short csqc_server2csqcentitynumber[MAX_EDICTS];
-       qbool csqc_loaded;
        vec3_t csqc_vieworigin;
        vec3_t csqc_viewangles;
        vec3_t csqc_vieworiginfromengine;
@@ -1116,6 +1117,7 @@ typedef struct client_state_s
        qbool csqc_usecsqclistener;
        matrix4x4_t csqc_listenermatrix;
        char csqc_printtextbuf[MAX_INPUTLINE];
+       size_t csqc_printtextbuf_len; ///< strlen
 
        // collision culling data
        world_t world;
@@ -1133,6 +1135,9 @@ typedef struct client_state_s
 
        // used by EntityState5_ReadUpdate
        skeleton_t *engineskeletonobjects;
+
+       // used by underwater sound filter (snd_waterfx)
+       qbool view_underwater;
 }
 client_state_t;
 
@@ -1165,7 +1170,6 @@ extern cvar_t cl_anglespeedkey;
 extern cvar_t cl_autofire;
 
 extern cvar_t cl_shownet;
-extern cvar_t cl_nolerp;
 extern cvar_t cl_nettimesyncfactor;
 extern cvar_t cl_nettimesyncboundmode;
 extern cvar_t cl_nettimesyncboundtolerance;
@@ -1201,6 +1205,8 @@ extern cvar_t cl_prydoncursor_notrace;
 
 extern cvar_t cl_locs_enable;
 
+extern cvar_t cl_areagrid_link_SOLID_NOT;
+
 extern client_state_t cl;
 
 extern void CL_AllocLightFlash (entity_render_t *ent, matrix4x4_t *matrix, float radius, float red, float green, float blue, float decay, float lifetime, char *cubemapname, int style, int shadowenable, vec_t corona, vec_t coronasizescale, vec_t ambientscale, vec_t diffusescale, vec_t specularscale, int flags);
index 2a2cefa68a67f07024856b4f513eae87c56bbb55..f3e986ed278ca2a07e3122653cf4cc7455f4b0ed 100644 (file)
@@ -296,7 +296,7 @@ static void VM_CL_traceline (prvm_prog_t *prog)
        move = (int)PRVM_G_FLOAT(OFS_PARM2);
        ent = PRVM_G_EDICT(OFS_PARM3);
 
-       if (VEC_IS_NAN(v1[0]) || VEC_IS_NAN(v1[1]) || VEC_IS_NAN(v1[2]) || VEC_IS_NAN(v2[0]) || VEC_IS_NAN(v2[1]) || VEC_IS_NAN(v2[2]))
+       if (isnan(v1[0]) || isnan(v1[1]) || isnan(v1[2]) || isnan(v2[0]) || isnan(v2[1]) || isnan(v2[2]))
                prog->error_cmd("%s: NAN errors detected in traceline('%f %f %f', '%f %f %f', %i, entity %i)\n", prog->name, v1[0], v1[1], v1[2], v2[0], v2[1], v2[2], move, PRVM_EDICT_TO_PROG(ent));
 
        trace = CL_TraceLine(v1, v2, move, ent, CL_GenericHitSuperContentsMask(ent), 0, 0, collision_extendtracelinelength.value, CL_HitNetworkBrushModels(move), CL_HitNetworkPlayers(move), &svent, true, false);
@@ -336,7 +336,7 @@ static void VM_CL_tracebox (prvm_prog_t *prog)
        move = (int)PRVM_G_FLOAT(OFS_PARM4);
        ent = PRVM_G_EDICT(OFS_PARM5);
 
-       if (VEC_IS_NAN(v1[0]) || VEC_IS_NAN(v1[1]) || VEC_IS_NAN(v1[2]) || VEC_IS_NAN(v2[0]) || VEC_IS_NAN(v2[1]) || VEC_IS_NAN(v2[2]))
+       if (isnan(v1[0]) || isnan(v1[1]) || isnan(v1[2]) || isnan(v2[0]) || isnan(v2[1]) || isnan(v2[2]))
                prog->error_cmd("%s: NAN errors detected in tracebox('%f %f %f', '%f %f %f', '%f %f %f', '%f %f %f', %i, entity %i)\n", prog->name, v1[0], v1[1], v1[2], m1[0], m1[1], m1[2], m2[0], m2[1], m2[2], v2[0], v2[1], v2[2], move, PRVM_EDICT_TO_PROG(ent));
 
        trace = CL_TraceBox(v1, m1, m2, v2, move, ent, CL_GenericHitSuperContentsMask(ent), 0, 0, collision_extendtraceboxlength.value, CL_HitNetworkBrushModels(move), CL_HitNetworkPlayers(move), &svent, true);
@@ -469,7 +469,7 @@ static void VM_CL_findradius (prvm_prog_t *prog)
        else
                chainfield = prog->fieldoffsets.chain;
        if(chainfield < 0)
-               prog->error_cmd("VM_findchain: %s doesnt have the specified chain field !", prog->name);
+               prog->error_cmd("VM_CL_findradius: %s doesnt have the specified chain field !", prog->name);
 
        chain = (prvm_edict_t *)prog->edicts;
 
@@ -519,6 +519,42 @@ static void VM_CL_findradius (prvm_prog_t *prog)
        VM_RETURN_EDICT(chain);
 }
 
+// #566 entity(vector mins, vector maxs) findbox
+// #566 entity(vector mins, vector maxs, .entity tofield) findbox_tofield
+static void VM_CL_findbox (prvm_prog_t *prog)
+{
+       prvm_edict_t *chain;
+       int i, numtouchedicts;
+       static prvm_edict_t *touchedicts[MAX_EDICTS];
+       int chainfield;
+
+       VM_SAFEPARMCOUNTRANGE(2, 3, VM_CL_findbox);
+
+       if(prog->argc == 3)
+               chainfield = PRVM_G_INT(OFS_PARM2);
+       else
+               chainfield = prog->fieldoffsets.chain;
+       if(chainfield < 0)
+               prog->error_cmd("VM_CL_findbox: %s doesnt have the specified chain field !", prog->name);
+
+       chain = (prvm_edict_t *)prog->edicts;
+
+       numtouchedicts = World_EntitiesInBox(&cl.world, PRVM_G_VECTOR(OFS_PARM0), PRVM_G_VECTOR(OFS_PARM1), MAX_EDICTS, touchedicts);
+       if (numtouchedicts > MAX_EDICTS)
+       {
+               // this never happens   //[515]: for what then ?
+               Con_Printf("World_EntitiesInBox returned %i edicts, max was %i\n", numtouchedicts, MAX_EDICTS);
+               numtouchedicts = MAX_EDICTS;
+       }
+       for (i = 0; i < numtouchedicts; ++i)
+       {
+               PRVM_EDICTFIELDEDICT(touchedicts[i], chainfield) = PRVM_EDICT_TO_PROG(chain);
+               chain = touchedicts[i];
+       }
+
+       VM_RETURN_EDICT(chain);
+}
+
 // #34 float() droptofloor
 static void VM_CL_droptofloor (prvm_prog_t *prog)
 {
@@ -547,7 +583,12 @@ static void VM_CL_droptofloor (prvm_prog_t *prog)
        VectorCopy(PRVM_clientedictvector(ent, mins), mins);
        VectorCopy(PRVM_clientedictvector(ent, maxs), maxs);
        VectorCopy(PRVM_clientedictvector(ent, origin), end);
-       end[2] -= 256;
+       if (cl.worldmodel->brush.isq3bsp)
+               end[2] -= 4096;
+       else if (cl.worldmodel->brush.isq2bsp)
+               end[2] -= 128;
+       else
+               end[2] -= 256; // Quake, QuakeWorld
 
        trace = CL_TraceBox(start, mins, maxs, end, MOVE_NORMAL, ent, CL_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value, true, true, NULL, true);
 
@@ -577,7 +618,7 @@ static void VM_CL_lightstyle (prvm_prog_t *prog)
                VM_Warning(prog, "VM_CL_lightstyle >= MAX_LIGHTSTYLES\n");
                return;
        }
-       strlcpy (cl.lightstyle[i].map, c, sizeof (cl.lightstyle[i].map));
+       dp_strlcpy (cl.lightstyle[i].map, c, sizeof (cl.lightstyle[i].map));
        cl.lightstyle[i].map[MAX_STYLESTRING - 1] = 0;
        cl.lightstyle[i].length = (int)strlen(cl.lightstyle[i].map);
 }
@@ -1598,7 +1639,7 @@ void VM_loadfont(prvm_prog_t *prog)
                if (i >= 0 && i < dp_fonts.maxsize)
                {
                        f = &dp_fonts.f[i];
-                       strlcpy(f->title, fontname, sizeof(f->title)); // replace name
+                       dp_strlcpy(f->title, fontname, sizeof(f->title)); // replace name
                }
        }
        if (!f)
@@ -1622,8 +1663,8 @@ void VM_loadfont(prvm_prog_t *prog)
                f->req_face = 0;
                c = cm;
        }
-       if(!c || (c - filelist) > MAX_QPATH)
-               strlcpy(mainfont, filelist, sizeof(mainfont));
+       if(!c || (c - filelist) >= MAX_QPATH)
+               dp_strlcpy(mainfont, filelist, sizeof(mainfont));
        else
        {
                memcpy(mainfont, filelist, c - filelist);
@@ -1648,9 +1689,9 @@ void VM_loadfont(prvm_prog_t *prog)
                        f->fallback_faces[i] = 0; // f->req_face; could make it stick to the default-font's face index
                        c = cm;
                }
-               if(!c || (c-filelist) > MAX_QPATH)
+               if(!c || (c-filelist) >= MAX_QPATH)
                {
-                       strlcpy(f->fallbacks[i], filelist, sizeof(mainfont));
+                       dp_strlcpy(f->fallbacks[i], filelist, sizeof(mainfont));
                }
                else
                {
@@ -2022,6 +2063,7 @@ static void VM_CL_getstats (prvm_prog_t *prog)
 {
        int i;
        char t[17];
+       size_t t_len;
        VM_SAFEPARMCOUNT(1, VM_CL_getstats);
        i = (int)PRVM_G_FLOAT(OFS_PARM0);
        if(i < 0 || i > MAX_CL_STATS-4)
@@ -2030,8 +2072,8 @@ static void VM_CL_getstats (prvm_prog_t *prog)
                VM_Warning(prog, "VM_CL_getstats: index>MAX_CL_STATS-4 or index<0\n");
                return;
        }
-       strlcpy(t, (char*)&cl.stats[i], sizeof(t));
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, t);
+       t_len = dp_strlcpy(t, (char*)&cl.stats[i], sizeof(t));
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, t, t_len);
 }
 
 //#333 void(entity e, float mdlindex) setmodelindex (EXT_CSQC)
@@ -2333,9 +2375,10 @@ static void VM_CL_runplayerphysics (prvm_prog_t *prog)
 //#348 string(float playernum, string keyname) getplayerkeyvalue (EXT_CSQC)
 static void VM_CL_getplayerkey (prvm_prog_t *prog)
 {
-       int                     i;
-       char            t[128];
-       const char      *c;
+       int i;
+       char t[128];
+       size_t t_len;
+       const char *c;
 
        VM_SAFEPARMCOUNT(2, VM_CL_getplayerkey);
 
@@ -2350,39 +2393,40 @@ static void VM_CL_getplayerkey (prvm_prog_t *prog)
                return;
 
        t[0] = 0;
+       t_len = 0;
 
        if(!strcasecmp(c, "name"))
-               strlcpy(t, cl.scores[i].name, sizeof(t));
+               t_len = dp_strlcpy(t, cl.scores[i].name, sizeof(t));
        else
                if(!strcasecmp(c, "frags"))
-                       dpsnprintf(t, sizeof(t), "%i", cl.scores[i].frags);
+                       t_len = dpsnprintf(t, sizeof(t), "%i", cl.scores[i].frags);
        else
                if(!strcasecmp(c, "ping"))
-                       dpsnprintf(t, sizeof(t), "%i", cl.scores[i].qw_ping);
+                       t_len = dpsnprintf(t, sizeof(t), "%i", cl.scores[i].qw_ping);
        else
                if(!strcasecmp(c, "pl"))
-                       dpsnprintf(t, sizeof(t), "%i", cl.scores[i].qw_packetloss);
+                       t_len = dpsnprintf(t, sizeof(t), "%i", cl.scores[i].qw_packetloss);
        else
                if(!strcasecmp(c, "movementloss"))
-                       dpsnprintf(t, sizeof(t), "%i", cl.scores[i].qw_movementloss);
+                       t_len = dpsnprintf(t, sizeof(t), "%i", cl.scores[i].qw_movementloss);
        else
                if(!strcasecmp(c, "entertime"))
-                       dpsnprintf(t, sizeof(t), "%f", cl.scores[i].qw_entertime);
+                       t_len = dpsnprintf(t, sizeof(t), "%f", cl.scores[i].qw_entertime);
        else
                if(!strcasecmp(c, "colors"))
-                       dpsnprintf(t, sizeof(t), "%i", cl.scores[i].colors);
+                       t_len = dpsnprintf(t, sizeof(t), "%i", cl.scores[i].colors);
        else
                if(!strcasecmp(c, "topcolor"))
-                       dpsnprintf(t, sizeof(t), "%i", cl.scores[i].colors & 0xf0);
+                       t_len = dpsnprintf(t, sizeof(t), "%i", cl.scores[i].colors & 0xf0);
        else
                if(!strcasecmp(c, "bottomcolor"))
-                       dpsnprintf(t, sizeof(t), "%i", (cl.scores[i].colors &15)<<4);
+                       t_len = dpsnprintf(t, sizeof(t), "%i", (cl.scores[i].colors &15)<<4);
        else
                if(!strcasecmp(c, "viewentity"))
-                       dpsnprintf(t, sizeof(t), "%i", i+1);
+                       t_len = dpsnprintf(t, sizeof(t), "%i", i+1);
        if(!t[0])
                return;
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, t);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, t, t_len);
 }
 
 //#351 void(vector origin, vector forward, vector right, vector up) SetListener (EXT_CSQC)
@@ -2402,71 +2446,74 @@ static void VM_CL_setlistener (prvm_prog_t *prog)
 static void VM_CL_registercmd (prvm_prog_t *prog)
 {
        VM_SAFEPARMCOUNT(1, VM_CL_registercmd);
-       if(!Cmd_Exists(cmd_local, PRVM_G_STRING(OFS_PARM0)))
-               Cmd_AddCommand(CF_CLIENT, PRVM_G_STRING(OFS_PARM0), NULL, "console command created by QuakeC");
+       Cmd_AddCommand(CF_CLIENT, PRVM_G_STRING(OFS_PARM0), NULL, "console command created by QuakeC");
 }
 
-//#360 float() readbyte (EXT_CSQC)
+//#360 float() ReadByte (EXT_CSQC)
 static void VM_CL_ReadByte (prvm_prog_t *prog)
 {
        VM_SAFEPARMCOUNT(0, VM_CL_ReadByte);
        PRVM_G_FLOAT(OFS_RETURN) = MSG_ReadByte(&cl_message);
 }
 
-//#361 float() readchar (EXT_CSQC)
+//#361 float() ReadChar (EXT_CSQC)
 static void VM_CL_ReadChar (prvm_prog_t *prog)
 {
        VM_SAFEPARMCOUNT(0, VM_CL_ReadChar);
        PRVM_G_FLOAT(OFS_RETURN) = MSG_ReadChar(&cl_message);
 }
 
-//#362 float() readshort (EXT_CSQC)
+//#362 float() ReadShort (EXT_CSQC)
 static void VM_CL_ReadShort (prvm_prog_t *prog)
 {
        VM_SAFEPARMCOUNT(0, VM_CL_ReadShort);
        PRVM_G_FLOAT(OFS_RETURN) = MSG_ReadShort(&cl_message);
 }
 
-//#363 float() readlong (EXT_CSQC)
+//#363 float() ReadLong (EXT_CSQC)
 static void VM_CL_ReadLong (prvm_prog_t *prog)
 {
        VM_SAFEPARMCOUNT(0, VM_CL_ReadLong);
        PRVM_G_FLOAT(OFS_RETURN) = MSG_ReadLong(&cl_message);
 }
 
-//#364 float() readcoord (EXT_CSQC)
+//#364 float() ReadCoord (EXT_CSQC)
 static void VM_CL_ReadCoord (prvm_prog_t *prog)
 {
        VM_SAFEPARMCOUNT(0, VM_CL_ReadCoord);
        PRVM_G_FLOAT(OFS_RETURN) = MSG_ReadCoord(&cl_message, cls.protocol);
 }
 
-//#365 float() readangle (EXT_CSQC)
+//#365 float() ReadAngle (EXT_CSQC)
 static void VM_CL_ReadAngle (prvm_prog_t *prog)
 {
        VM_SAFEPARMCOUNT(0, VM_CL_ReadAngle);
        PRVM_G_FLOAT(OFS_RETURN) = MSG_ReadAngle(&cl_message, cls.protocol);
 }
 
-//#366 string() readstring (EXT_CSQC)
+//#366 string() ReadString (EXT_CSQC)
 static void VM_CL_ReadString (prvm_prog_t *prog)
 {
+       size_t cl_readstring_len;
+
        VM_SAFEPARMCOUNT(0, VM_CL_ReadString);
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)));
+       cl_readstring_len = MSG_ReadString_len(&cl_message, cl_readstring, sizeof(cl_readstring));
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cl_readstring, cl_readstring_len);
 }
 
-//#367 float() readfloat (EXT_CSQC)
+//#367 float() ReadFloat (EXT_CSQC)
 static void VM_CL_ReadFloat (prvm_prog_t *prog)
 {
        VM_SAFEPARMCOUNT(0, VM_CL_ReadFloat);
        PRVM_G_FLOAT(OFS_RETURN) = MSG_ReadFloat(&cl_message);
 }
 
-//#501 string() readpicture (DP_CSQC_READWRITEPICTURE)
+//#501 string() ReadPicture (DP_CSQC_READWRITEPICTURE)
 extern cvar_t cl_readpicture_force;
 static void VM_CL_ReadPicture (prvm_prog_t *prog)
 {
        const char *name;
+       size_t name_len;
        unsigned char *data;
        unsigned char *buf;
        unsigned short size;
@@ -2475,7 +2522,8 @@ static void VM_CL_ReadPicture (prvm_prog_t *prog)
 
        VM_SAFEPARMCOUNT(0, VM_CL_ReadPicture);
 
-       name = MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring));
+       name_len = MSG_ReadString_len(&cl_message, cl_readstring, sizeof(cl_readstring));
+       name = cl_readstring;
        size = (unsigned short) MSG_ReadShort(&cl_message);
 
        // check if a texture of that name exists
@@ -2506,7 +2554,7 @@ static void VM_CL_ReadPicture (prvm_prog_t *prog)
                }
        }
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, name);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, name, name_len);
 }
 
 //////////////////////////////////////////////////////////
@@ -2637,8 +2685,6 @@ static void VM_CL_copyentity (prvm_prog_t *prog)
        }
        memcpy(out->fields.fp, in->fields.fp, prog->entityfields * sizeof(prvm_vec_t));
 
-       if (VectorCompare(PRVM_clientedictvector(out, absmin), PRVM_clientedictvector(out, absmax)))
-               return;
        CL_LinkEdict(out);
 }
 
@@ -3371,7 +3417,7 @@ static void VM_CL_gettaginfo (prvm_prog_t *prog)
        Matrix4x4_ToVectors(&tag_localmatrix, forward, left, up, origin);
 
        PRVM_clientglobalfloat(gettaginfo_parent) = parentindex;
-       PRVM_clientglobalstring(gettaginfo_name) = tagname ? PRVM_SetTempString(prog, tagname) : 0;
+       PRVM_clientglobalstring(gettaginfo_name) = tagname ? PRVM_SetTempString(prog, tagname, strlen(tagname)) : 0;
        VectorCopy(forward, PRVM_clientglobalvector(gettaginfo_forward));
        VectorScale(left, -1, PRVM_clientglobalvector(gettaginfo_right));
        VectorCopy(up, PRVM_clientglobalvector(gettaginfo_up));
@@ -4090,7 +4136,7 @@ static void VM_CL_R_PolygonBegin (prvm_prog_t *prog)
        prog->polygonbegin_model = mod;
        if (texname == NULL || texname[0] == 0)
                texname = "$whiteimage";
-       strlcpy(prog->polygonbegin_texname, texname, sizeof(prog->polygonbegin_texname));
+       dp_strlcpy(prog->polygonbegin_texname, texname, sizeof(prog->polygonbegin_texname));
        prog->polygonbegin_drawflags = drawflags;
        prog->polygonbegin_numvertices = 0;
 }
@@ -4455,10 +4501,10 @@ string(string key) serverkey
 */
 static void VM_CL_serverkey(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
        VM_SAFEPARMCOUNT(1, VM_CL_serverkey);
        InfoString_GetValue(cl.qw_serverinfo, PRVM_G_STRING(OFS_PARM0), string, sizeof(string));
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string, strlen(string));
 }
 
 /*
@@ -4619,7 +4665,7 @@ static void VM_CL_skel_get_bonename(prvm_prog_t *prog)
                return;
        if (bonenum < 0 || bonenum >= skeleton->model->num_bones)
                return;
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, skeleton->model->data_bones[bonenum].name);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, skeleton->model->data_bones[bonenum].name, strlen(skeleton->model->data_bones[bonenum].name));
 }
 
 // #267 float(float skel, float bonenum) skel_get_boneparent = #267; // (FTE_CSQC_SKELETONOBJECTS) returns parent num for supplied bonenum, 0 if bonenum has no parent or bone does not exist (returned value is always less than bonenum, you can loop on this)
@@ -4982,7 +5028,7 @@ NULL,                                                     // #42 (QUAKE)
 VM_fabs,                                               // #43 float(float f) fabs (QUAKE)
 NULL,                                                  // #44 vector(entity e, float speed) aim (QUAKE)
 VM_cvar,                                               // #45 float(string s) cvar (QUAKE)
-VM_localcmd_local,                             // #46 void(string s) localcmd (QUAKE)
+VM_localcmd,                                   // #46 void(string s) localcmd (QUAKE)
 VM_nextent,                                            // #47 entity(entity e) nextent (QUAKE)
 VM_CL_particle,                                        // #48 void(vector o, vector d, float color, float count) particle (QUAKE)
 VM_changeyaw,                                  // #49 void() ChangeYaw (QUAKE)
@@ -5052,7 +5098,7 @@ VM_fclose,                                                // #111 void(float fhandle) fclose (FRIK_FILE)
 VM_fgets,                                              // #112 string(float fhandle) fgets (FRIK_FILE)
 VM_fputs,                                              // #113 void(float fhandle, string s) fputs (FRIK_FILE)
 VM_strlen,                                             // #114 float(string s) strlen (FRIK_FILE)
-VM_strcat,                                             // #115 string(string s1, string s2, ...) strcat (FRIK_FILE)
+VM_strcat,                                             // #115 string(string s, string...) strcat (FRIK_FILE)
 VM_substring,                                  // #116 string(string s, float start, float length) substring (FRIK_FILE)
 VM_stov,                                               // #117 vector(string) stov (FRIK_FILE)
 VM_strzone,                                            // #118 string(string s) strzone (FRIK_FILE)
@@ -5299,14 +5345,14 @@ VM_findfont,                                    // #356 float(string fontname) loadfont (DP_GFX_FONTS)
 VM_loadfont,                                   // #357 float(string fontname, string fontmaps, string sizes, float slot) loadfont (DP_GFX_FONTS)
 VM_CL_loadcubemap,                             // #358 void(string cubemapname) loadcubemap (DP_GFX_)
 NULL,                                                  // #359
-VM_CL_ReadByte,                                        // #360 float() readbyte (EXT_CSQC)
-VM_CL_ReadChar,                                        // #361 float() readchar (EXT_CSQC)
-VM_CL_ReadShort,                               // #362 float() readshort (EXT_CSQC)
-VM_CL_ReadLong,                                        // #363 float() readlong (EXT_CSQC)
-VM_CL_ReadCoord,                               // #364 float() readcoord (EXT_CSQC)
-VM_CL_ReadAngle,                               // #365 float() readangle (EXT_CSQC)
-VM_CL_ReadString,                              // #366 string() readstring (EXT_CSQC)
-VM_CL_ReadFloat,                               // #367 float() readfloat (EXT_CSQC)
+VM_CL_ReadByte,                                        // #360 float() ReadByte (EXT_CSQC)
+VM_CL_ReadChar,                                        // #361 float() ReadChar (EXT_CSQC)
+VM_CL_ReadShort,                               // #362 float() ReadShort (EXT_CSQC)
+VM_CL_ReadLong,                                        // #363 float() ReadLong (EXT_CSQC)
+VM_CL_ReadCoord,                               // #364 float() ReadCoord (EXT_CSQC)
+VM_CL_ReadAngle,                               // #365 float() ReadAngle (EXT_CSQC)
+VM_CL_ReadString,                              // #366 string() ReadString (EXT_CSQC)
+VM_CL_ReadFloat,                               // #367 float() ReadFloat (EXT_CSQC)
 NULL,                                          // #368
 NULL,                                                  // #369
 NULL,                                                  // #370
@@ -5506,8 +5552,8 @@ NULL,                                                     // #562
 NULL,                                                  // #563
 NULL,                                                  // #564
 NULL,                                                  // #565
-NULL,                                                  // #566
-NULL,                                                  // #567
+VM_CL_findbox,                                 // #566 entity(vector mins, vector maxs) findbox = #566; (DP_QC_FINDBOX)
+VM_nudgeoutofsolid,                            // #567 float(entity ent) nudgeoutofsolid = #567; (DP_QC_NUDGEOUTOFSOLID)
 NULL,                                                  // #568
 NULL,                                                  // #569
 NULL,                                                  // #570
diff --git a/cmd.c b/cmd.c
index a12fae8ea0c4fa52839d66a46267e73b927936bf..3e35b336b9c3d3914385336289152e111895a95d 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -74,11 +74,13 @@ Cmd_Defer_f
 Cause a command to be executed after a delay.
 ============
 */
-static cmd_input_t *Cbuf_LinkGet(cmd_buf_t *cbuf, cmd_input_t *existing);
+static void Cbuf_ParseText(cmd_state_t *cmd, llist_t *head, cmd_input_t *existing, const char *text, qbool allowpending);
+static void Cbuf_LinkString(cmd_state_t *cmd, llist_t *head, cmd_input_t *existing, const char *text, qbool leavepending, unsigned int cmdsize);
 static void Cmd_Defer_f (cmd_state_t *cmd)
 {
        cmd_input_t *current;
        cmd_buf_t *cbuf = cmd->cbuf;
+       unsigned int cmdsize;
 
        if(Cmd_Argc(cmd) == 1)
        {
@@ -93,25 +95,19 @@ static void Cmd_Defer_f (cmd_state_t *cmd)
        else if(Cmd_Argc(cmd) == 2 && !strcasecmp("clear", Cmd_Argv(cmd, 1)))
        {
                while(!List_Is_Empty(&cbuf->deferred))
+               {
+                       cbuf->size -= List_Entry(cbuf->deferred.next, cmd_input_t, list)->length;
                        List_Move_Tail(cbuf->deferred.next, &cbuf->free);
+               }
        }
-       else if(Cmd_Argc(cmd) == 3)
+       else if(Cmd_Argc(cmd) == 3 && (cmdsize = strlen(Cmd_Argv(cmd, 2))) )
        {
-               const char *text = Cmd_Argv(cmd, 2);
-               current = Cbuf_LinkGet(cbuf, NULL);
-               current->length = strlen(text);
-               current->source = cmd;
-               current->delay = atof(Cmd_Argv(cmd, 1));
+               Cbuf_Lock(cbuf);
 
-               if(current->size < current->length)
-               {
-                       current->text = (char *)Mem_Realloc(cbuf_mempool, current->text, current->length + 1);
-                       current->size = current->length;
-               }
+               Cbuf_LinkString(cmd, &cbuf->deferred, NULL, Cmd_Argv(cmd, 2), false, cmdsize);
+               List_Entry(cbuf->deferred.prev, cmd_input_t, list)->delay = atof(Cmd_Argv(cmd, 1));
 
-               strlcpy(current->text, text, current->length + 1);
-
-               List_Move_Tail(&current->list, &cbuf->deferred);
+               Cbuf_Unlock(cbuf);
        }
        else
        {
@@ -121,230 +117,141 @@ static void Cmd_Defer_f (cmd_state_t *cmd)
        }
 }
 
-/*
-============
-Cmd_Centerprint_f
-
-Print something to the center of the screen using SCR_Centerprint
-============
-*/
-static void Cmd_Centerprint_f (cmd_state_t *cmd)
-{
-       char msg[MAX_INPUTLINE];
-       unsigned int i, c, p;
-       c = Cmd_Argc(cmd);
-       if(c >= 2)
-       {
-               strlcpy(msg, Cmd_Argv(cmd,1), sizeof(msg));
-               for(i = 2; i < c; ++i)
-               {
-                       strlcat(msg, " ", sizeof(msg));
-                       strlcat(msg, Cmd_Argv(cmd, i), sizeof(msg));
-               }
-               c = (unsigned int)strlen(msg);
-               for(p = 0, i = 0; i < c; ++i)
-               {
-                       if(msg[i] == '\\')
-                       {
-                               if(msg[i+1] == 'n')
-                                       msg[p++] = '\n';
-                               else if(msg[i+1] == '\\')
-                                       msg[p++] = '\\';
-                               else {
-                                       msg[p++] = '\\';
-                                       msg[p++] = msg[i+1];
-                               }
-                               ++i;
-                       } else {
-                               msg[p++] = msg[i];
-                       }
-               }
-               msg[p] = '\0';
-               SCR_CenterPrint(msg);
-       }
-}
-
 /*
 =============================================================================
 
                                                COMMAND BUFFER
 
+ * The Quake command-line is super basic. It can be entered in the console
+ * or in config files. A semicolon is used to terminate a command and chain
+ * them together. Otherwise, a newline delineates command input.
+ *
+ * In most engines, the Quake command-line is a simple linear text buffer that
+ * is parsed when it executes. In Darkplaces, we use a linked list of command
+ * input and parse the input on the spot.
+ *
+ * This was done because Darkplaces allows multiple command interpreters on the
+ * same thread. Previously, each interpreter maintained its own buffer and this
+ * caused problems related to execution order, and maintaining a single simple
+ * buffer for all interpreters makes it non-trivial to keep track of which
+ * command should execute on which interpreter.
+
 =============================================================================
 */
 
-static cmd_input_t *Cbuf_LinkGet(cmd_buf_t *cbuf, cmd_input_t *existing)
+/*
+============
+Cbuf_NodeGet
+
+Returns an existing buffer node for appending or reuse, or allocates a new one
+============
+*/
+static cmd_input_t *Cbuf_NodeGet(cmd_buf_t *cbuf, cmd_input_t *existing)
 {
-       cmd_input_t *ret = NULL;
+       cmd_input_t *node;
        if(existing && existing->pending)
-               ret = existing;
+               node = existing;
        else if(!List_Is_Empty(&cbuf->free))
        {
-               ret = List_Entry(cbuf->free.next, cmd_input_t, list);
-               ret->length = 0;
-               ret->pending = false;
+               node = List_Entry(cbuf->free.next, cmd_input_t, list);
+               node->length = node->pending = 0;
+       }
+       else
+       {
+               node = (cmd_input_t *)Mem_Alloc(cbuf_mempool, sizeof(cmd_input_t));
+               node->list.prev = node->list.next = &node->list;
+               node->size = node->length = node->pending = 0;
        }
-       return ret;
-}
-
-static cmd_input_t *Cmd_AllocInputNode(void)
-{
-       cmd_input_t *node = (cmd_input_t *)Mem_Alloc(cbuf_mempool, sizeof(cmd_input_t));
-       node->list.prev = node->list.next = &node->list;
-       node->size = node->length = node->pending = 0;
        return node;
 }
 
+/*
+============
+Cbuf_LinkString
 
-// Cloudwalk FIXME: The entire design of this thing is overly complicated.
-// We could very much safely have one input node per line whether or not
-// the command was terminated. We don't need to split up input nodes per command
-// executed.
-static size_t Cmd_ParseInput (cmd_input_t **output, char **input)
+Copies a command string into a buffer node.
+The input should not be null-terminated, the output will be.
+============
+*/
+static void Cbuf_LinkString(cmd_state_t *cmd, llist_t *head, cmd_input_t *existing, const char *text, qbool leavepending, unsigned int cmdsize)
 {
-       size_t pos, cmdsize = 0, start = 0;
-       qbool command = false, lookahead = false;
-       qbool quotes = false, comment = false;
-       qbool escaped = false;
-
-       /*
-        * The Quake command-line is super basic. It can be entered in the console
-        * or in config files. A semicolon is used to terminate a command and chain
-        * them together. Otherwise, a newline delineates command input.
-        * 
-        * In most engines, the Quake command-line is a simple linear text buffer that
-        * is parsed when it executes. In Darkplaces, we use a linked list of command
-        * input and parse the input on the spot.
-        * 
-        * This was done because Darkplaces allows multiple command interpreters on the
-        * same thread. Previously, each interpreter maintained its own buffer and this
-        * caused problems related to execution order, and maintaining a single simple
-        * buffer for all interpreters makes it non-trivial to keep track of which
-        * command should execute on which interpreter.
-        */
-
-       // Run until command and lookahead are both true, or until we run out of input.
-       for (pos = 0; (*input)[pos]; pos++)
-       {
-               // Look for newlines and semicolons. Ignore semicolons in quotes.
-               switch((*input)[pos])
-               {
-               case '\r':
-               case '\n':
-                       command = false;
-                       comment = false;
-                       break;
-               default: 
-                       if(!comment) // Not a newline so far. Still not a valid command yet.
-                       {
-                               if(!quotes && (*input)[pos] == ';') // Ignore semicolons in quotes.
-                                       command = false;
-                               else if (ISCOMMENT((*input), pos)) // Comments
-                               {
-                                       comment = true;
-                                       command = false;
-                               }
-                               else
-                               {
-                                       command = true;
-                                       if(!lookahead)
-                                       {
-                                               if(!cmdsize)
-                                                       start = pos;
-                                               cmdsize++;
-                                       }
-
-                                       switch((*input)[pos])
-                                       {
-                                       case '"':
-                                               if (!escaped)
-                                                       quotes = !quotes;
-                                               else
-                                                       escaped = false;
-                                               break;
-                                       case '\\':
-                                               if (!escaped && quotes)
-                                                       escaped = true;
-                                               else if (escaped)
-                                                       escaped = false;
-                                               break;
-                                       }
-                               }
-                       }
-               }
-               if(cmdsize && !command)
-                       lookahead = true;
+       cmd_buf_t *cbuf = cmd->cbuf;
+       cmd_input_t *node = Cbuf_NodeGet(cbuf, existing);
+       unsigned int offset = node->length; // > 0 if(pending)
 
-               if(command && lookahead)
-                       break;
+       // node will match existing if its text was pending continuation
+       if(node != existing)
+       {
+               node->source = cmd;
+               List_Move_Tail(&node->list, head);
        }
 
-       if(cmdsize)
+       node->length += cmdsize;
+       if(node->size < node->length)
        {
-               size_t offset = 0;
-
-               if(!*output)
-                       *output = Cmd_AllocInputNode();
-
-               // Append, since this input line hasn't closed yet.
-               if((*output)->pending)
-                       offset = (*output)->length;
-
-               (*output)->length += cmdsize;
-
-               if((*output)->size < (*output)->length)
-               {
-                       (*output)->text = (char *)Mem_Realloc(cbuf_mempool, (*output)->text, (*output)->length + 1);
-                       (*output)->size = (*output)->length;
-               }
-
-               strlcpy(&(*output)->text[offset], &(*input)[start], cmdsize + 1);
-               
-               /*
-                * If we were still looking ahead by the time we broke from the loop, the command input
-                * hasn't terminated yet and we're still expecting more, so keep this node open for appending later.
-                */
-               (*output)->pending = !lookahead;
+               node->text = (char *)Mem_Realloc(cbuf_mempool, node->text, node->length + 1);
+               node->size = node->length;
        }
+       cbuf->size += cmdsize;
 
-       // Set input to its new position. Can be NULL.
-       *input = &(*input)[pos];
-
-       return cmdsize;
+       dp_ustr2stp(&node->text[offset], node->length + 1, text, cmdsize);
+       //Con_Printf("^5Cbuf_LinkString(): %s `^7%s^5`\n", node->pending ? "append" : "new", &node->text[offset]);
+       node->pending = leavepending;
 }
 
-// Cloudwalk: Not happy with this, but it works.
-static void Cbuf_LinkCreate(cmd_state_t *cmd, llist_t *head, cmd_input_t *existing, const char *text)
+/*
+============
+Cbuf_ParseText
+
+Parses text to isolate command strings for linking into the buffer
+separators: \n \r or unquoted and uncommented ';'
+============
+*/
+static void Cbuf_ParseText(cmd_state_t *cmd, llist_t *head, cmd_input_t *existing, const char *text, qbool allowpending)
 {
-       char *in = (char *)&text[0];
-       cmd_buf_t *cbuf = cmd->cbuf;
-       size_t totalsize = 0, newsize = 0;
-       cmd_input_t *current = NULL;
+       unsigned int cmdsize = 0, start = 0, pos;
+       qbool quotes = false, comment = false;
 
-       // Slide the pointer down until we reach the end
-       while(*in)
+       for (pos = 0; text[pos]; ++pos)
        {
-               // Check if the current node is still accepting input (input line hasn't terminated)
-               current = Cbuf_LinkGet(cbuf, existing);
-               newsize = Cmd_ParseInput(&current, &in);
-
-               // Valid command
-               if(newsize)
+               switch(text[pos])
                {
-                       // current will match existing if the input line hasn't terminated yet
-                       if(current != existing)
-                       {
-                               current->source = cmd;
-                               List_Move_Tail(&current->list, head);
-                       }
+                       case ';':
+                               if (comment || quotes)
+                                       break;
+                       case '\r':
+                       case '\n':
+                               comment = false;
+                               quotes = false; // matches div0-stable
+                               if (cmdsize)
+                               {
+                                       Cbuf_LinkString(cmd, head, existing, &text[start], false, cmdsize);
+                                       cmdsize = 0;
+                               }
+                               else if (existing && existing->pending) // all I got was this lousy \n
+                                       existing->pending = false;
+                               continue; // don't increment cmdsize
+
+                       case '/':
+                               if (!quotes && text[pos + 1] == '/' && (pos == 0 || ISWHITESPACE(text[pos - 1])))
+                                       comment = true;
+                               break;
+                       case '"':
+                               if (!comment && (pos == 0 || text[pos - 1] != '\\'))
+                                       quotes = !quotes;
+                               break;
+               }
 
-                       totalsize += newsize;
+               if (!comment)
+               {
+                       if (!cmdsize)
+                               start = pos;
+                       ++cmdsize;
                }
-               else if (current == existing && !totalsize)
-                       current->pending = false;
-               current = NULL;
        }
 
-       cbuf->size += totalsize;
+       if (cmdsize) // the line didn't end yet but we do have a string
+               Cbuf_LinkString(cmd, head, existing, &text[start], allowpending, cmdsize);
 }
 
 /*
@@ -360,16 +267,18 @@ void Cbuf_AddText (cmd_state_t *cmd, const char *text)
        cmd_buf_t *cbuf = cmd->cbuf;
        llist_t llist = {&llist, &llist};
 
-       Cbuf_Lock(cbuf);
-
-       if (cbuf->maxsize - cbuf->size <= l)
-               Con_Print("Cbuf_AddText: overflow\n");
-       else
+       if (cbuf->size + l > cbuf->maxsize)
        {
-               Cbuf_LinkCreate(cmd, &llist, (List_Is_Empty(&cbuf->start) ? NULL : List_Entry(cbuf->start.prev, cmd_input_t, list)), text);
-               if(!List_Is_Empty(&llist))
-                       List_Splice_Tail(&llist, &cbuf->start);
+               Con_Printf(CON_WARN "Cbuf_AddText: input too large, %luKB ought to be enough for anybody.\n", (unsigned long)(cbuf->maxsize / 1024));
+               return;
        }
+
+       Cbuf_Lock(cbuf);
+
+       // If the string terminates but the (last) line doesn't, the node will be left in the pending state (to be continued).
+       Cbuf_ParseText(cmd, &llist, (List_Is_Empty(&cbuf->start) ? NULL : List_Entry(cbuf->start.prev, cmd_input_t, list)), text, true);
+       List_Splice_Tail(&llist, &cbuf->start);
+
        Cbuf_Unlock(cbuf);
 }
 
@@ -378,7 +287,6 @@ void Cbuf_AddText (cmd_state_t *cmd, const char *text)
 Cbuf_InsertText
 
 Adds command text immediately after the current command
-FIXME: actually change the command buffer to do less copying
 ============
 */
 void Cbuf_InsertText (cmd_state_t *cmd, const char *text)
@@ -387,18 +295,20 @@ void Cbuf_InsertText (cmd_state_t *cmd, const char *text)
        llist_t llist = {&llist, &llist};
        size_t l = strlen(text);
 
-       Cbuf_Lock(cbuf);
-
-       // we need to memmove the existing text and stuff this in before it...
-       if (cbuf->size + l >= cbuf->maxsize)
-               Con_Print("Cbuf_InsertText: overflow\n");
-       else
+       if (cbuf->size + l > cbuf->maxsize)
        {
-               Cbuf_LinkCreate(cmd, &llist, (List_Is_Empty(&cbuf->start) ? NULL : List_Entry(cbuf->start.next, cmd_input_t, list)), text);
-               if(!List_Is_Empty(&llist))
-                       List_Splice(&llist, &cbuf->start);
+               Con_Printf(CON_WARN "Cbuf_InsertText: input too large, %luKB ought to be enough for anybody.\n", (unsigned long)(cbuf->maxsize / 1024));
+               return;
        }
 
+       Cbuf_Lock(cbuf);
+
+       // bones_was_here assertion: when prepending to the buffer it never makes sense to leave node(s) in the `pending` state,
+       // it would have been impossible to append to such text later in the old raw text buffer,
+       // and allowing it causes bugs when .cfg files lack \n at EOF (see: https://gitlab.com/xonotic/darkplaces/-/issues/378).
+       Cbuf_ParseText(cmd, &llist, (List_Is_Empty(&cbuf->start) ? NULL : List_Entry(cbuf->start.next, cmd_input_t, list)), text, false);
+       List_Splice(&llist, &cbuf->start);
+
        Cbuf_Unlock(cbuf);
 }
 
@@ -409,25 +319,25 @@ Cbuf_Execute_Deferred --blub
 */
 static void Cbuf_Execute_Deferred (cmd_buf_t *cbuf)
 {
-       cmd_input_t *current;
-       double eat;
+       cmd_input_t *current, *n;
+       vec_t eat;
 
        if (host.realtime - cbuf->deferred_oldtime < 0 || host.realtime - cbuf->deferred_oldtime > 1800)
                cbuf->deferred_oldtime = host.realtime;
        eat = host.realtime - cbuf->deferred_oldtime;
-       if (eat < (1.0 / 120.0))
+       if (eat < 1.0/128.0)
                return;
        cbuf->deferred_oldtime = host.realtime;
 
-       List_For_Each_Entry(current, &cbuf->deferred, cmd_input_t, list)
+       List_For_Each_Entry_Safe(current, n, &cbuf->deferred, cmd_input_t, list)
        {
                current->delay -= eat;
                if(current->delay <= 0)
                {
-                       cbuf->size += current->length;
-                       List_Move(&current->list, &cbuf->start);
-                       // We must return and come back next frame or the engine will freeze. Fragile... like glass :3
-                       return;
+                       Cbuf_AddText(current->source, current->text); // parse deferred string and append its cmdstring(s)
+                       List_Entry(cbuf->start.prev, cmd_input_t, list)->pending = false; // faster than div0-stable's Cbuf_AddText(";\n");
+                       List_Move_Tail(&current->list, &cbuf->free); // make deferred string memory available for reuse
+                       cbuf->size -= current->length;
                }
        }
 }
@@ -437,12 +347,11 @@ static void Cbuf_Execute_Deferred (cmd_buf_t *cbuf)
 Cbuf_Execute
 ============
 */
-static qbool Cmd_PreprocessString(cmd_state_t *cmd, const char *intext, char *outtext, unsigned maxoutlen, cmd_alias_t *alias );
+extern qbool prvm_runawaycheck;
 void Cbuf_Execute (cmd_buf_t *cbuf)
 {
        cmd_input_t *current;
-       char preprocessed[MAX_INPUTLINE];
-       char *firstchar;
+       unsigned int i = 0;
 
        // LadyHavoc: making sure the tokenizebuffer doesn't get filled up by repeated crashes
        cbuf->tokenizebufferpos = 0;
@@ -455,10 +364,7 @@ void Cbuf_Execute (cmd_buf_t *cbuf)
                 * can insert data at the beginning of the text buffer
                 */
                current = List_Entry(cbuf->start.next, cmd_input_t, list);
-               
-               // Recycle memory so using WASD doesn't cause a malloc and free
-               List_Move_Tail(&current->list, &cbuf->free);
-               
+
                /*
                 * Assume we're rolling with the current command-line and
                 * always set this false because alias expansion or cbuf insertion
@@ -466,24 +372,10 @@ void Cbuf_Execute (cmd_buf_t *cbuf)
                 */
                current->pending = false;
 
+               Cmd_PreprocessAndExecuteString(current->source, current->text, current->length, src_local, false);
                cbuf->size -= current->length;
-
-               firstchar = current->text;
-               while(*firstchar && ISWHITESPACE(*firstchar))
-                       ++firstchar;
-               if((strncmp(firstchar, "alias", 5)   || !ISWHITESPACE(firstchar[5])) &&
-                  (strncmp(firstchar, "bind", 4)    || !ISWHITESPACE(firstchar[4])) &&
-                  (strncmp(firstchar, "in_bind", 7) || !ISWHITESPACE(firstchar[7])))
-               {
-                       if(Cmd_PreprocessString(current->source, current->text, preprocessed, sizeof(preprocessed), NULL ))
-                               Cmd_ExecuteString(current->source, preprocessed, src_local, false);
-               }
-               else
-               {
-                       Cmd_ExecuteString (current->source, current->text, src_local, false);
-               }
-
-               current = NULL;
+               // Recycle memory so using WASD doesn't cause a malloc and free
+               List_Move_Tail(&current->list, &cbuf->free);
 
                if (cbuf->wait)
                {
@@ -494,6 +386,12 @@ void Cbuf_Execute (cmd_buf_t *cbuf)
                        cbuf->wait = false;
                        break;
                }
+
+               if (++i == 1000000 && prvm_runawaycheck)
+               {
+                       Con_Printf(CON_WARN "Cbuf_Execute: runaway loop counter hit limit of %d commands, clearing command buffers!\n", i);
+                       Cbuf_Clear(cbuf);
+               }
        }
 }
 
@@ -508,8 +406,12 @@ static void Cbuf_Frame_Input(void)
 {
        char *line;
 
-       while ((line = Sys_ConsoleInput()))
-                       Cbuf_AddText(cmd_local, line);
+       if ((line = Sys_ConsoleInput()))
+       {
+               // bones_was_here: prepending allows a loop such as `alias foo "bar; wait; foo"; foo`
+               // to be broken with an alias or unalias command
+               Cbuf_InsertText(cmd_local, line);
+       }
 }
 
 void Cbuf_Frame(cmd_buf_t *cbuf)
@@ -531,6 +433,15 @@ void Cbuf_Frame(cmd_buf_t *cbuf)
 //     R_TimeReport("console");
 }
 
+void Cbuf_Clear(cmd_buf_t *cbuf)
+{
+       while (!List_Is_Empty(&cbuf->start))
+               List_Move_Tail(cbuf->start.next, &cbuf->free);
+       while (!List_Is_Empty(&cbuf->deferred))
+               List_Move_Tail(cbuf->deferred.next, &cbuf->free);
+       cbuf->size = 0;
+}
+
 /*
 ==============================================================================
 
@@ -620,7 +531,7 @@ static void Cmd_Exec(cmd_state_t *cmd, const char *filename)
        f = (char *)FS_LoadFile (filename, tempmempool, false, NULL);
        if (!f)
        {
-               Con_Printf("couldn't exec %s\n",filename);
+               Con_Printf(CON_WARN "couldn't exec %s\n",filename);
                return;
        }
        Con_Printf("execing %s\n",filename);
@@ -803,7 +714,8 @@ static void Cmd_Exec(cmd_state_t *cmd, const char *filename)
                        Cbuf_InsertText(cmd, "\n"
 "csqc_polygons_defaultmaterial_nocullface 1\n"
 "con_chatsound_team_mask 13\n"
-"sv_gameplayfix_customstats 1\n"
+"sv_qcstats 1\n"
+"mod_q1bsp_zero_hullsize_cutoff 8.03125\n"
                                );
                        break;
                // Steel Storm: Burning Retribution csqc misinterprets CSQC_InputEvent if type is a value other than 0 or 1
@@ -877,7 +789,7 @@ static void Cmd_Exec_f (cmd_state_t *cmd)
        s = FS_Search(Cmd_Argv(cmd, 1), true, true, NULL);
        if(!s || !s->numfilenames)
        {
-               Con_Printf("couldn't exec %s\n",Cmd_Argv(cmd, 1));
+               Con_Printf(CON_WARN "couldn't exec %s\n",Cmd_Argv(cmd, 1));
                return;
        }
 
@@ -979,7 +891,7 @@ static void Cmd_Toggle_f(cmd_state_t *cmd)
                }
                else
                { // Invalid CVar
-                       Con_Printf("ERROR : CVar '%s' not found\n", Cmd_Argv(cmd, 1) );
+                       Con_Printf(CON_WARN "ERROR : CVar '%s' not found\n", Cmd_Argv(cmd, 1) );
                }
        }
 }
@@ -1010,7 +922,7 @@ static void Cmd_Alias_f (cmd_state_t *cmd)
        s = Cmd_Argv(cmd, 1);
        if (strlen(s) >= MAX_ALIAS_NAME)
        {
-               Con_Print("Alias name is too long\n");
+               Con_Print(CON_WARN "Alias name is too long\n");
                return;
        }
 
@@ -1029,7 +941,7 @@ static void Cmd_Alias_f (cmd_state_t *cmd)
                cmd_alias_t *prev, *current;
 
                a = (cmd_alias_t *)Z_Malloc (sizeof(cmd_alias_t));
-               strlcpy (a->name, s, sizeof (a->name));
+               dp_strlcpy (a->name, s, sizeof (a->name));
                // insert it at the right alphanumeric position
                for( prev = NULL, current = cmd->userdefined->alias ; current && strcmp( current->name, a->name ) < 0 ; prev = current, current = current->next )
                        ;
@@ -1048,10 +960,10 @@ static void Cmd_Alias_f (cmd_state_t *cmd)
        for (i=2 ; i < c ; i++)
        {
                if (i != 2)
-                       strlcat (line, " ", sizeof (line));
-               strlcat (line, Cmd_Argv(cmd, i), sizeof (line));
+                       dp_strlcat (line, " ", sizeof (line));
+               dp_strlcat (line, Cmd_Argv(cmd, i), sizeof (line));
        }
-       strlcat (line, "\n", sizeof (line));
+       dp_strlcat (line, "\n", sizeof (line));
 
        alloclen = strlen (line) + 1;
        if(alloclen >= 2)
@@ -1348,12 +1260,14 @@ static const char *Cmd_GetCvarValue(cmd_state_t *cmd, const char *var, size_t va
        return varstr;
 }
 
-/*
+/**
 Cmd_PreprocessString
 
 Preprocesses strings and replaces $*, $param#, $cvar accordingly. Also strips comments.
+Returns the number of bytes written to *outtext excluding the \0 terminator.
 */
-static qbool Cmd_PreprocessString(cmd_state_t *cmd, const char *intext, char *outtext, unsigned maxoutlen, cmd_alias_t *alias ) {
+static size_t Cmd_PreprocessString(cmd_state_t *cmd, const char *intext, char *outtext, unsigned maxoutlen, cmd_alias_t *alias)
+{
        const char *in;
        size_t eat, varlen;
        unsigned outlen;
@@ -1361,7 +1275,7 @@ static qbool Cmd_PreprocessString(cmd_state_t *cmd, const char *intext, char *ou
 
        // don't crash if there's no room in the outtext buffer
        if( maxoutlen == 0 ) {
-               return false;
+               return 0;
        }
        maxoutlen--; // because of \0
 
@@ -1434,7 +1348,7 @@ static qbool Cmd_PreprocessString(cmd_state_t *cmd, const char *intext, char *ou
                                {
                                        val = Cmd_GetCvarValue(cmd, in + 1, varlen, alias);
                                        if(!val)
-                                               return false;
+                                               return 0;
                                        eat = varlen + 2;
                                }
                                else
@@ -1447,7 +1361,7 @@ static qbool Cmd_PreprocessString(cmd_state_t *cmd, const char *intext, char *ou
                                varlen = strspn(in, "#*0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-");
                                val = Cmd_GetCvarValue(cmd, in, varlen, alias);
                                if(!val)
-                                       return false;
+                                       return 0;
                                eat = varlen;
                        }
                        if(val)
@@ -1471,8 +1385,8 @@ static qbool Cmd_PreprocessString(cmd_state_t *cmd, const char *intext, char *ou
                else 
                        outtext[outlen++] = *in++;
        }
-       outtext[outlen] = 0;
-       return true;
+       outtext[outlen] = '\0';
+       return outlen;
 }
 
 /*
@@ -1499,6 +1413,26 @@ static void Cmd_ExecuteAlias (cmd_state_t *cmd, cmd_alias_t *alias)
        Cbuf_InsertText(cmd, buffer2);
 }
 
+void Cmd_PreprocessAndExecuteString(cmd_state_t *cmd, const char *text, size_t textlen, cmd_source_t src, qbool lockmutex)
+{
+       char preprocessed[MAX_INPUTLINE];
+       size_t preprocessed_len;
+       const char *firstchar;
+
+       firstchar = text;
+       while(*firstchar && ISWHITESPACE(*firstchar))
+               ++firstchar;
+       if((strncmp(firstchar, "alias", 5)   || !ISWHITESPACE(firstchar[5]))
+       && (strncmp(firstchar, "bind", 4)    || !ISWHITESPACE(firstchar[4]))
+       && (strncmp(firstchar, "in_bind", 7) || !ISWHITESPACE(firstchar[7])))
+       {
+               if((preprocessed_len = Cmd_PreprocessString(cmd, text, preprocessed, sizeof(preprocessed), NULL)))
+                       Cmd_ExecuteString(cmd, preprocessed, preprocessed_len, src, lockmutex);
+       }
+       else
+               Cmd_ExecuteString(cmd, text, textlen, src, lockmutex);
+}
+
 /*
 ========
 Cmd_List
@@ -1626,7 +1560,7 @@ static void Cmd_Apropos_f(cmd_state_t *cmd)
        Con_Printf("%i result%s\n\n", count, (count > 1) ? "s" : "");
 }
 
-static cmd_state_t *Cmd_AddInterpreter(cmd_buf_t *cbuf, cvar_state_t *cvars, int cvars_flagsmask, int cmds_flagsmask, cmd_userdefined_t *userdefined)
+static cmd_state_t *Cmd_AddInterpreter(cmd_buf_t *cbuf, cvar_state_t *cvars, unsigned cvars_flagsmask, unsigned cmds_flagsmask, cmd_userdefined_t *userdefined)
 {
        cmd_state_t *cmd = (cmd_state_t *)Mem_Alloc(tempmempool, sizeof(cmd_state_t));
        
@@ -1637,7 +1571,7 @@ static cmd_state_t *Cmd_AddInterpreter(cmd_buf_t *cbuf, cvar_state_t *cvars, int
 
        cmd->cvars = cvars;
        cmd->cvars_flagsmask = cvars_flagsmask;
-       cmd->cmd_flags = cmds_flagsmask;
+       cmd->cmd_flagsmask = cmds_flagsmask;
        cmd->userdefined = userdefined;
 
        return cmd;
@@ -1651,9 +1585,11 @@ Cmd_Init
 void Cmd_Init(void)
 {
        cmd_buf_t *cbuf;
+       unsigned cvars_flagsmask, cmds_flagsmask;
+
        cbuf_mempool = Mem_AllocPool("Command buffer", 0, NULL);
        cbuf = (cmd_buf_t *)Mem_Alloc(cbuf_mempool, sizeof(cmd_buf_t));
-       cbuf->maxsize = 655360;
+       cbuf->maxsize = CMDBUFSIZE;
        cbuf->lock = Thread_CreateMutex();
        cbuf->wait = false;
        host.cbuf = cbuf;
@@ -1666,14 +1602,22 @@ void Cmd_Init(void)
        cmd_iter_all = (cmd_iter_t *)Mem_Alloc(tempmempool, sizeof(cmd_iter_t) * 3);
 
        // local console
-       cmd_iter_all[0].cmd = cmd_local = Cmd_AddInterpreter(cbuf, &cvars_all, CF_CLIENT | CF_SERVER, CF_CLIENT | CF_CLIENT_FROM_SERVER | CF_SERVER_FROM_CLIENT, &cmd_userdefined_all);
+       if (cls.state == ca_dedicated)
+       {
+               cvars_flagsmask = CF_SERVER;
+               cmds_flagsmask = CF_SERVER | CF_SERVER_FROM_CLIENT;
+       }
+       else
+       {
+               cvars_flagsmask = CF_CLIENT | CF_SERVER;
+               cmds_flagsmask = CF_CLIENT | CF_SERVER | CF_CLIENT_FROM_SERVER | CF_SERVER_FROM_CLIENT;
+       }
+       cmd_iter_all[0].cmd = cmd_local = Cmd_AddInterpreter(cbuf, &cvars_all, cvars_flagsmask, cmds_flagsmask, &cmd_userdefined_all);
        cmd_local->Handle = Cmd_CL_Callback;
-       cmd_local->NotFound = NULL;
 
        // server commands received from clients have no reason to access cvars, cvar expansion seems perilous.
        cmd_iter_all[1].cmd = cmd_serverfromclient = Cmd_AddInterpreter(cbuf, &cvars_null, 0, CF_SERVER_FROM_CLIENT | CF_USERINFO, &cmd_userdefined_null);
        cmd_serverfromclient->Handle = Cmd_SV_Callback;
-       cmd_serverfromclient->NotFound = Cmd_SV_NotFound;
 
        cmd_iter_all[2].cmd = NULL;
 //
@@ -1681,7 +1625,6 @@ void Cmd_Init(void)
 //
        // client-only commands
        Cmd_AddCommand(CF_SHARED, "wait", Cmd_Wait_f, "make script execution wait for next rendered frame");
-       Cmd_AddCommand(CF_CLIENT, "cprint", Cmd_Centerprint_f, "print something at the screen center");
 
        // maintenance commands used for upkeep of cvars and saved configs
        Cmd_AddCommand(CF_SHARED, "stuffcmds", Cmd_StuffCmds_f, "execute commandline parameters (must be present in quake.rc script)");
@@ -1739,46 +1682,15 @@ void Cmd_Shutdown(void)
        }
 }
 
-/*
-============
-Cmd_Argc
-============
-*/
-int            Cmd_Argc (cmd_state_t *cmd)
-{
-       return cmd->argc;
-}
-
-/*
-============
-Cmd_Argv
-============
-*/
-const char *Cmd_Argv(cmd_state_t *cmd, int arg)
-{
-       if (arg >= cmd->argc )
-               return cmd->null_string;
-       return cmd->argv[arg];
-}
-
-/*
-============
-Cmd_Args
-============
-*/
-const char *Cmd_Args (cmd_state_t *cmd)
-{
-       return cmd->args;
-}
-
 /*
 ============
 Cmd_TokenizeString
 
 Parses the given string into command line tokens.
+Takes a null terminated string.  Does not need to be /n terminated.
 ============
 */
-// AK: This function should only be called from ExcuteString because the current design is a bit of an hack
+// AK: This function should only be called from ExecuteString because the current design is a bit of an hack
 static void Cmd_TokenizeString (cmd_state_t *cmd, const char *text)
 {
        int l;
@@ -1822,7 +1734,7 @@ static void Cmd_TokenizeString (cmd_state_t *cmd, const char *text)
                        l = (int)strlen(com_token) + 1;
                        if (cmd->cbuf->tokenizebufferpos + l > CMD_TOKENIZELENGTH)
                        {
-                               Con_Printf("Cmd_TokenizeString: ran out of %i character buffer space for command arguments\n", CMD_TOKENIZELENGTH);
+                               Con_Printf(CON_WARN "Cmd_TokenizeString: ran out of %i character buffer space for command arguments\n", CMD_TOKENIZELENGTH);
                                break;
                        }
                        memcpy (cmd->cbuf->tokenizebuffer + cmd->cbuf->tokenizebufferpos, com_token, l);
@@ -1839,7 +1751,7 @@ static void Cmd_TokenizeString (cmd_state_t *cmd, const char *text)
 Cmd_AddCommand
 ============
 */
-void Cmd_AddCommand(int flags, const char *cmd_name, xcommand_t function, const char *description)
+void Cmd_AddCommand(unsigned flags, const char *cmd_name, xcommand_t function, const char *description)
 {
        cmd_function_t *func;
        cmd_function_t *prev, *current;
@@ -1849,12 +1761,12 @@ void Cmd_AddCommand(int flags, const char *cmd_name, xcommand_t function, const
        for (i = 0; i < 2; i++)
        {
                cmd = cmd_iter_all[i].cmd;
-               if (flags & cmd->cmd_flags)
+               if (flags & cmd->cmd_flagsmask)
                {
                        // fail if the command is a variable name
                        if (Cvar_FindVar(cmd->cvars, cmd_name, ~0))
                        {
-                               Con_Printf("Cmd_AddCommand: %s already defined as a var\n", cmd_name);
+                               Con_Printf(CON_WARN "Cmd_AddCommand: %s already defined as a var\n", cmd_name);
                                return;
                        }
 
@@ -1865,7 +1777,7 @@ void Cmd_AddCommand(int flags, const char *cmd_name, xcommand_t function, const
                                {
                                        if (!strcmp(cmd_name, func->name))
                                        {
-                                               Con_Printf("Cmd_AddCommand: %s already defined\n", cmd_name);
+                                               Con_Printf(CON_WARN "Cmd_AddCommand: %s already defined\n", cmd_name);
                                                continue;
                                        }
                                }
@@ -1900,7 +1812,6 @@ void Cmd_AddCommand(int flags, const char *cmd_name, xcommand_t function, const
                                        }
                                }
 
-
                                func = (cmd_function_t *)Mem_Alloc(cmd->mempool, sizeof(cmd_function_t));
                                func->flags = flags;
                                func->name = cmd_name;
@@ -1909,6 +1820,18 @@ void Cmd_AddCommand(int flags, const char *cmd_name, xcommand_t function, const
                                func->qcfunc = true; //[515]: csqc
                                func->next = cmd->userdefined->qc_functions;
 
+                               // bones_was_here: if this QC command overrides an engine command, store its pointer
+                               // to avoid doing this search at invocation if QC declines to handle this command.
+                               for (cmd_function_t *f = cmd->engine_functions; f; f = f->next)
+                               {
+                                       if (!strcmp(cmd_name, f->name))
+                                       {
+                                               Con_DPrintf("Adding QC override of engine command %s\n", cmd_name);
+                                               func->overridden = f;
+                                               break;
+                                       }
+                               }
+
                                // insert it at the right alphanumeric position
                                for (prev = NULL, current = cmd->userdefined->qc_functions; current && strcmp(current->name, func->name) < 0; prev = current, current = current->next)
                                        ;
@@ -2175,23 +2098,26 @@ extern cvar_t sv_cheats;
  * implement that behavior that doesn't involve an #ifdef, or
  * making a mess of hooks.
  */
-qbool Cmd_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text, cmd_source_t src)
+qbool Cmd_Callback(cmd_state_t *cmd, cmd_function_t *func)
 {
        if (func->function)
                func->function(cmd);
        else
-               Con_Printf("Command \"%s\" can not be executed\n", Cmd_Argv(cmd, 0));
+               Con_Printf(CON_WARN "Command \"%s\" can not be executed\n", Cmd_Argv(cmd, 0));
        return true;
 }
 
-qbool Cmd_CL_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text, cmd_source_t src)
+qbool Cmd_CL_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text, size_t textlen, cmd_source_t src)
 {
        // TODO: Assign these functions to QC commands directly?
        if(func->qcfunc)
        {
-               if(((func->flags & CF_CLIENT) && CL_VM_ConsoleCommand(text)) ||
-                  ((func->flags & CF_SERVER) && SV_VM_ConsoleCommand(text)))
+               if(((func->flags & CF_CLIENT) && CL_VM_ConsoleCommand(text, textlen)) ||
+                  ((func->flags & CF_SERVER) && SV_VM_ConsoleCommand(text, textlen)))
                        return true;
+
+               if (func->overridden) // If this QC command overrides an engine command,
+                       func = func->overridden; // fall back to that command.
        }
        if (func->flags & CF_SERVER_FROM_CLIENT)
        {
@@ -2202,21 +2128,21 @@ qbool Cmd_CL_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text,
                }
                else if(!(func->flags & CF_SERVER))
                {
-                       Con_Printf("Cannot execute client commands from a dedicated server console.\n");
+                       Con_Printf(CON_WARN "Cannot execute client commands from a dedicated server console.\n");
                        return true;
                }
        }
-       return Cmd_Callback(cmd, func, text, src);
+       return Cmd_Callback(cmd, func);
 }
 
-qbool Cmd_SV_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text, cmd_source_t src)
+qbool Cmd_SV_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text, size_t textlen, cmd_source_t src)
 {
        if(func->qcfunc && (func->flags & CF_SERVER))
-               return SV_VM_ConsoleCommand(text);
+               return SV_VM_ConsoleCommand(text, textlen);
        else if (src == src_client)
        {
                if((func->flags & CF_CHEAT) && !sv_cheats.integer)
-                       SV_ClientPrintf("No cheats allowed. The server must have sv_cheats set to 1\n");
+                       SV_ClientPrintf(CON_WARN "No cheats allowed. The server must have sv_cheats set to 1\n");
                else
                        func->function(cmd);
                return true;
@@ -2224,15 +2150,6 @@ qbool Cmd_SV_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text,
        return false;
 }
 
-qbool Cmd_SV_NotFound(cmd_state_t *cmd, cmd_function_t *func, const char *text, cmd_source_t src)
-{
-       if (cmd->source == src_client)
-       {
-               Con_Printf("Client \"%s\" tried to execute \"%s\"\n", host_client->name, text);
-               return true;
-       }
-       return false;
-}
 /*
 ============
 Cmd_ExecuteString
@@ -2241,11 +2158,12 @@ A complete command line has been parsed, so try to execute it
 FIXME: lookupnoadd the token to speed search?
 ============
 */
-void Cmd_ExecuteString (cmd_state_t *cmd, const char *text, cmd_source_t src, qbool lockmutex)
+void Cmd_ExecuteString(cmd_state_t *cmd, const char *text, size_t textlen, cmd_source_t src, qbool lockmutex)
 {
        int oldpos;
        cmd_function_t *func;
        cmd_alias_t *a;
+
        if (lockmutex)
                Cbuf_Lock(cmd->cbuf);
        oldpos = cmd->cbuf->tokenizebufferpos;
@@ -2259,31 +2177,27 @@ void Cmd_ExecuteString (cmd_state_t *cmd, const char *text, cmd_source_t src, qb
 
 // check functions
        for (func = cmd->userdefined->qc_functions; func; func = func->next)
-       {
                if (!strcasecmp(cmd->argv[0], func->name))
-               {
-                       if(cmd->Handle(cmd, func, text, src))
-                               goto done;
-               }
-       }
+                       if(cmd->Handle(cmd, func, text, textlen, src))
+                               goto functions_done;
 
        for (func = cmd->engine_functions; func; func=func->next)
-       {
                if (!strcasecmp (cmd->argv[0], func->name))
-               {
-                       if(cmd->Handle(cmd, func, text, src))
-                               goto done;
-               }
-       }
+                       if(cmd->Handle(cmd, func, text, textlen, src))
+                               goto functions_done;
 
-       // if it's a client command and no command was found, say so.
-       if(cmd->NotFound)
+functions_done:
+       // If it's a client command and wasn't found and handled, say so.
+       // Also don't let clients call server aliases.
+       if (cmd->source == src_client)
        {
-               if(cmd->NotFound(cmd, func, text, src))
-                       goto done;
+               if (!func)
+                       Con_Printf("Client \"%s\" tried to execute \"%s\"\n", host_client->name, text);
+               goto done;
        }
 
 // check alias
+       // Execute any alias with the same name as a command after the command.
        for (a=cmd->userdefined->alias ; a ; a=a->next)
        {
                if (!strcasecmp (cmd->argv[0], a->name))
@@ -2293,9 +2207,14 @@ void Cmd_ExecuteString (cmd_state_t *cmd, const char *text, cmd_source_t src, qb
                }
        }
 
+       // If the command was found and handled don't try to handle it as a cvar.
+       if (func)
+               goto done;
+
 // check cvars
-       if (!Cvar_Command(cmd) && host.framecount > 0)
-               Con_Printf("Unknown command \"%s\"\n", Cmd_Argv(cmd, 0));
+       // Xonotic is still maintained so we don't want to hide problems from getting fixed
+       if (!Cvar_Command(cmd) && (host.framecount > 0 || gamemode == GAME_XONOTIC))
+               Con_Printf(CON_WARN "Unknown command \"%s\"\n", Cmd_Argv(cmd, 0));
 done:
        cmd->cbuf->tokenizebufferpos = oldpos;
        if (lockmutex)
@@ -2317,7 +2236,7 @@ int Cmd_CheckParm (cmd_state_t *cmd, const char *parm)
 
        if (!parm)
        {
-               Con_Printf ("Cmd_CheckParm: NULL");
+               Con_Printf(CON_WARN "Cmd_CheckParm: NULL");
                return 0;
        }
 
diff --git a/cmd.h b/cmd.h
index c80fdf9078307f31f2f0afe5f9715af6fad25170..a94ddb16665d9fe91623af7fea8a5f5b91e79bbc 100644 (file)
--- a/cmd.h
+++ b/cmd.h
@@ -44,33 +44,35 @@ The game starts with a Cbuf_AddText ("exec quake.rc\n"); Cbuf_Execute ();
 struct cmd_state_s;
 
 // Command flags
-#define CF_NONE 0
-#define CF_CLIENT               (1<<0)  // cvar/command that only the client can change/execute
-#define CF_SERVER               (1<<1)  // cvar/command that only the server can change/execute
-#define CF_CLIENT_FROM_SERVER   (1<<2)  // command that the server is allowed to execute on the client
-#define CF_SERVER_FROM_CLIENT   (1<<3)  // command the client is allowed to execute on the server as a stringcmd
-#define CF_CHEAT                (1<<4)  // command or cvar that gives an unfair advantage over other players and is blocked unless sv_cheats is 1
-#define CF_ARCHIVE              (1<<5)  // cvar should have its set value saved to config.cfg and persist across sessions
-#define CF_READONLY             (1<<6)  // cvar cannot be changed from the console or the command buffer
-#define CF_NOTIFY               (1<<7)  // cvar should trigger a chat notification to all connected clients when changed
-#define CF_SERVERINFO           (1<<8)  // command or cvar relevant to serverinfo string handling
-#define CF_USERINFO             (1<<9)  // command or cvar used to communicate userinfo to the server
-#define CF_PERSISTENT           (1<<10) // cvar must not be reset on gametype switch (such as scr_screenshot_name, which otherwise isn't set to the mod name properly)
-#define CF_PRIVATE              (1<<11) // cvar should not be $ expanded or sent to the server under any circumstances (rcon_password, etc)
-#define CF_MAXFLAGSVAL          ((1<<12) - 1)    // used to determine if flags is valid
+#define CF_NONE 0u
+#define CF_CLIENT               (1u<<0)  ///< cvar/command that only the client can change/execute
+#define CF_SERVER               (1u<<1)  ///< cvar/command that only the server can change/execute
+#define CF_CLIENT_FROM_SERVER   (1u<<2)  ///< command that the server is allowed to execute on the client
+#define CF_SERVER_FROM_CLIENT   (1u<<3)  ///< command the client is allowed to execute on the server as a stringcmd
+#define CF_CHEAT                (1u<<4)  ///< command or cvar that gives an unfair advantage over other players and is blocked unless sv_cheats is 1
+#define CF_ARCHIVE              (1u<<5)  ///< cvar should have its set value saved to config.cfg and persist across sessions
+#define CF_READONLY             (1u<<6)  ///< cvar cannot be changed from the console or the command buffer, and is considered CF_PERSISTENT
+#define CF_NOTIFY               (1u<<7)  ///< cvar should trigger a chat notification to all connected clients when changed
+#define CF_SERVERINFO           (1u<<8)  ///< command or cvar relevant to serverinfo string handling
+#define CF_USERINFO             (1u<<9)  ///< command or cvar used to communicate userinfo to the server
+#define CF_PERSISTENT           (1u<<10) ///< cvar must not be reset on gametype switch (such as scr_screenshot_name, which otherwise isn't set to the mod name properly)
+#define CF_PRIVATE              (1u<<11) ///< cvar should not be $ expanded or sent to the server under any circumstances (rcon_password, etc)
+#define CF_MAXFLAGSVAL          ((1u<<12) - 1) ///< used to determine if flags is valid
 // for internal use only!
-#define CF_DEFAULTSET (1<<30)
-#define CF_ALLOCATED (1<<31)
+#define CF_REGISTERED           (1u<<29) ///< created by Cvar_RegisterVariable()
+#define CF_DEFAULTSET           (1u<<30)
+#define CF_ALLOCATED            (1u<<31) ///< created by Cvar_Get() (console or QC)
+// UBSan: unsigned literals because left shifting by 31 causes signed overflow, although it works as expected on x86.
 
-#define CF_SHARED 3
+#define CF_SHARED (CF_CLIENT | CF_SERVER)
 
 typedef void(*xcommand_t) (struct cmd_state_s *cmd);
 
 typedef enum cmd_source_s
 {
-       src_client,             ///< came in over a net connection as a clc_stringcmd
-                                       ///< host_client will be valid during this state.
-       src_local               ///< from the command buffer
+       src_client,  ///< came in over a net connection as a clc_stringcmd
+                    ///< host_client will be valid during this state.
+       src_local    ///< from the command buffer
 } cmd_source_t;
 
 typedef struct cmd_alias_s
@@ -78,20 +80,21 @@ typedef struct cmd_alias_s
        struct cmd_alias_s *next;
        char name[MAX_ALIAS_NAME];
        char *value;
-       qbool initstate; // indicates this command existed at init
-       char *initialvalue; // backup copy of value at init
+       qbool initstate;           ///< indicates this command existed at init
+       char *initialvalue;        ///< backup copy of value at init
 } cmd_alias_t;
 
 typedef struct cmd_function_s
 {
-       int flags;
+       unsigned flags;
        struct cmd_function_s *next;
        const char *name;
        const char *description;
        xcommand_t function;
        qbool qcfunc;
+       struct cmd_function_s *overridden; ///< the engine cmd overriden by this QC cmd, if applicable
        qbool autofunc;
-       qbool initstate; // indicates this command existed at init
+       qbool initstate;                   ///< indicates this command existed at init
 } cmd_function_t;
 
 /// container for user-defined QC functions and aliases, shared between different command interpreters
@@ -133,44 +136,41 @@ typedef struct cmd_state_s
 
        cmd_buf_t *cbuf;
 
-       cmd_userdefined_t *userdefined; // possible csqc functions and aliases to execute
+       cmd_userdefined_t *userdefined;   ///< possible csqc functions and aliases to execute
 
        cmd_function_t *engine_functions;
 
-       struct cvar_state_s *cvars; // which cvar system is this cmd state able to access? (&cvars_all or &cvars_null)
-       int cvars_flagsmask; // which CVAR_* flags should be visible to this interpreter? (CF_CLIENT | CF_SERVER, or just CF_SERVER)
+       struct cvar_state_s *cvars;       ///< which cvar system is this cmd state able to access? (&cvars_all or &cvars_null)
+       unsigned cvars_flagsmask;         ///< which CVAR_* flags should be visible to this interpreter? (CF_CLIENT | CF_SERVER, or just CF_SERVER)
+       unsigned cmd_flagsmask;           ///< cmd flags that identify this interpreter
 
-       int cmd_flags; // cmd flags that identify this interpreter
-
-       qbool (*Handle)(struct cmd_state_s *, struct cmd_function_s *, const char *, enum cmd_source_s);
-       qbool (*NotFound)(struct cmd_state_s *, struct cmd_function_s *, const char *, enum cmd_source_s);
+       qbool (*Handle)(struct cmd_state_s *, struct cmd_function_s *, const char *, size_t, enum cmd_source_s);
 }
 cmd_state_t;
 
-qbool Cmd_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text, cmd_source_t src);
-qbool Cmd_CL_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text, cmd_source_t src);
-qbool Cmd_SV_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text, cmd_source_t src);
-qbool Cmd_SV_NotFound(cmd_state_t *cmd, cmd_function_t *func, const char *text, cmd_source_t src);
+qbool Cmd_Callback(cmd_state_t *cmd, cmd_function_t *func);
+qbool Cmd_CL_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text, size_t textlen, cmd_source_t src);
+qbool Cmd_SV_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text, size_t textlen, cmd_source_t src);
 
 typedef struct cmd_input_s
 {
        llist_t list;
        cmd_state_t *source;
-       double delay;
-       size_t size;
-       size_t length;
+       vec_t delay;
+       size_t size;   ///< excludes \0 terminator
+       size_t length; ///< excludes \0 terminator
        char *text;
        qbool pending;
 } cmd_input_t;
 
-extern cmd_userdefined_t cmd_userdefined_all; // aliases and csqc functions
-extern cmd_userdefined_t cmd_userdefined_null; // intentionally empty
+extern cmd_userdefined_t cmd_userdefined_all;  ///< aliases and csqc functions
+extern cmd_userdefined_t cmd_userdefined_null; ///< intentionally empty
 
-// command interpreter for local commands injected by SVQC, CSQC, MQC, server or client engine code
-// uses cmddefs_all
+/// command interpreter for local commands injected by SVQC, CSQC, MQC, server or client engine code
+/// uses cmddefs_all
 extern cmd_state_t *cmd_local;
-// command interpreter for server commands received over network from clients
-// uses cmddefs_null
+/// command interpreter for server commands received over network from clients
+/// uses cmddefs_null
 extern cmd_state_t *cmd_serverfromclient;
 
 extern qbool host_stuffcmdsrun;
@@ -197,10 +197,12 @@ void Cbuf_InsertText (cmd_state_t *cmd, const char *text);
 void Cbuf_Execute (cmd_buf_t *cbuf);
 /*! Performs deferred commands and runs Cbuf_Execute, called by Host_Frame */
 void Cbuf_Frame (cmd_buf_t *cbuf);
+/// Clears all command buffers
+void Cbuf_Clear(cmd_buf_t *cbuf);
 
 //===========================================================================
 
-/*
+/**
 
 Command execution takes a null terminated string, breaks it into tokens,
 then searches for a command or variable that matches the first token.
@@ -214,15 +216,15 @@ not apropriate.
 void Cmd_Init(void);
 void Cmd_Shutdown(void);
 
-// called by Host_Init, this marks cvars, commands and aliases with their init values
+/// called by Host_Init, this marks cvars, commands and aliases with their init values
 void Cmd_SaveInitState(void);
-// called by FS_GameDir_f, this restores cvars, commands and aliases to init values
+/// called by FS_GameDir_f, this restores cvars, commands and aliases to init values
 void Cmd_RestoreInitState(void);
 
-void Cmd_AddCommand(int flags, const char *cmd_name, xcommand_t function, const char *description);
-// called by the init functions of other parts of the program to
-// register commands and functions to call for them.
-// The cmd_name is referenced later, so it should not be in temp memory
+/// called by the init functions of other parts of the program to
+/// register commands and functions to call for them.
+/// The cmd_name is referenced later, so it should not be in temp memory
+void Cmd_AddCommand(unsigned flags, const char *cmd_name, xcommand_t function, const char *description);
 
 /// used by the cvar code to check for cvar / command name overlap
 qbool Cmd_Exists (cmd_state_t *cmd, const char *cmd_name);
@@ -232,41 +234,42 @@ qbool Cmd_Exists (cmd_state_t *cmd, const char *cmd_name);
 const char *Cmd_CompleteCommand (cmd_state_t *cmd, const char *partial);
 
 int Cmd_CompleteAliasCountPossible (cmd_state_t *cmd, const char *partial);
-
 const char **Cmd_CompleteAliasBuildList (cmd_state_t *cmd, const char *partial);
-
 int Cmd_CompleteCountPossible (cmd_state_t *cmd, const char *partial);
-
 const char **Cmd_CompleteBuildList (cmd_state_t *cmd, const char *partial);
-
 void Cmd_CompleteCommandPrint (cmd_state_t *cmd, const char *partial);
-
 const char *Cmd_CompleteAlias (cmd_state_t *cmd, const char *partial);
-
 void Cmd_CompleteAliasPrint (cmd_state_t *cmd, const char *partial);
 
 // Enhanced console completion by Fett erich@heintz.com
-
 // Added by EvilTypeGuy eviltypeguy@qeradiant.com
 
-int Cmd_Argc (cmd_state_t *cmd);
-const char *Cmd_Argv (cmd_state_t *cmd, int arg);
-const char *Cmd_Args (cmd_state_t *cmd);
-// The functions that execute commands get their parameters with these
-// functions. Cmd_Argv(cmd, ) will return an empty string, not a NULL
-// if arg > argc, so string operations are always safe.
+// The functions that execute commands get their parameters with these functions.
+static inline int Cmd_Argc (cmd_state_t *cmd)
+{
+       return cmd->argc;
+}
+/// Cmd_Argv(cmd, ) will return an empty string (not a NULL) if arg > argc, so string operations are always safe.
+static inline const char *Cmd_Argv(cmd_state_t *cmd, int arg)
+{
+       if (arg >= cmd->argc )
+               return cmd->null_string;
+       return cmd->argv[arg];
+}
+static inline const char *Cmd_Args (cmd_state_t *cmd)
+{
+       return cmd->args;
+}
 
 /// Returns the position (1 to argc-1) in the command's argument list
 /// where the given parameter apears, or 0 if not present
 int Cmd_CheckParm (cmd_state_t *cmd, const char *parm);
 
-//void Cmd_TokenizeString (char *text);
-// Takes a null terminated string.  Does not need to be /n terminated.
-// breaks the string up into arg tokens.
-
 /// Parses a single line of text into arguments and tries to execute it.
 /// The text can come from the command buffer, a remote client, or stdin.
-void Cmd_ExecuteString (cmd_state_t *cmd, const char *text, cmd_source_t src, qbool lockmutex);
+void Cmd_ExecuteString(cmd_state_t *cmd, const char *text, size_t textlen, cmd_source_t src, qbool lockmutex);
+/// Like Cmd_ExecuteString, but with variable expansion.
+void Cmd_PreprocessAndExecuteString(cmd_state_t *cmd, const char *text, size_t textlen, cmd_source_t src, qbool lockmutex);
 
 /// quotes a string so that it can be used as a command argument again;
 /// quoteset is a string that contains one or more of ", \, $ and specifies
index f62356b02ca85eb6e1ae4381fd043bfa422e116e..71bc57f0caa81e8c99611804fbb2a7f5c5786ae1 100644 (file)
@@ -21,19 +21,19 @@ struct texture_s;
 typedef struct trace_s
 {
        // if true, the entire trace was in solid (see hitsupercontentsmask)
-       int allsolid;
+       qbool allsolid;
        // if true, the initial point was in solid (see hitsupercontentsmask)
-       int startsolid;
+       qbool startsolid;
        // this is set to true in world.c if startsolid was set in a trace against world
-       int worldstartsolid;
+       qbool worldstartsolid;
        // this is set to true in world.c if startsolid was set in a trace against a SOLID_BSP entity, in other words this is true if the entity is stuck in a door or wall, but not if stuck in another normal entity
-       int bmodelstartsolid;
+       qbool bmodelstartsolid;
        // if true, the trace passed through empty somewhere
        // (set only by Q1BSP tracing)
-       int inopen;
+       qbool inopen;
        // if true, the trace passed through water/slime/lava somewhere
        // (set only by Q1BSP tracing)
-       int inwater;
+       qbool inwater;
        // fraction of the total distance that was traveled before impact
        // in case of impact this is actually nudged a bit off the surface
        // (1.0 = did not hit anything)
@@ -62,7 +62,7 @@ typedef struct trace_s
        const struct texture_s *hittexture;
        // initially false, set when the start leaf is found
        // (set only by Q1BSP tracing and entity box tracing)
-       int startfound;
+       qbool startfound;
        // if startsolid, contains the minimum penetration depth found in the
        // trace, and the normal needed to push it out of that solid
        double startdepth;
index 1406989ba6e4a9c6fccc840a6f650bbf15cb77c5..0dcde1ea082ec5a55cadd84310df9d0e8d1a95ef 100644 (file)
@@ -118,11 +118,12 @@ void COM_InitGameType (void)
 
 void COM_ChangeGameTypeForGameDirs(void)
 {
-       int i;
+       unsigned i, gamemode_count = sizeof(gamemode_info) / sizeof(gamemode_info[0]);
        int index = -1;
        // this will not not change the gamegroup
+
        // first check if a base game (single gamedir) matches
-       for (i = 0;i < (int)(sizeof (gamemode_info) / sizeof (gamemode_info[0]));i++)
+       for (i = 0; i < gamemode_count; i++)
        {
                if (gamemode_info[i].group == com_startupgamegroup && !(gamemode_info[i].gamedirname2 && gamemode_info[i].gamedirname2[0]))
                {
@@ -130,10 +131,21 @@ void COM_ChangeGameTypeForGameDirs(void)
                        break;
                }
        }
-       // now that we have a base game, see if there is a matching derivative game (two gamedirs)
+       // now that we have a base game, see if there is a derivative game matching the startup one (two gamedirs)
+       // bones_was_here: this prevents a Quake expansion (eg Rogue) getting switched to Quake,
+       // and its gamedirname2 (eg "rogue") being lost from the search path, when adding a miscellaneous gamedir.
+       for (i = 0; i < gamemode_count; i++)
+       {
+               if (gamemode_info[i].group == com_startupgamegroup && (gamemode_info[i].gamedirname2 && gamemode_info[i].gamedirname2[0]) && gamemode_info[i].mode == com_startupgamemode)
+               {
+                       index = i;
+                       break;
+               }
+       }
+       // also see if the first gamedir (from -game parm or gamedir command) matches a derivative game (two/three gamedirs)
        if (fs_numgamedirs)
        {
-               for (i = 0;i < (int)(sizeof (gamemode_info) / sizeof (gamemode_info[0]));i++)
+               for (i = 0; i < gamemode_count; i++)
                {
                        if (gamemode_info[i].group == com_startupgamegroup && (gamemode_info[i].gamedirname2 && gamemode_info[i].gamedirname2[0]) && !strcasecmp(fs_gamedirs[0], gamemode_info[i].gamedirname2))
                        {
@@ -195,7 +207,7 @@ static void COM_SetGameType(int index)
                // if there are spaces in the game's network filter name it would
                // cause parse errors in getservers in dpmaster, so we need to replace
                // them with _ characters
-               strlcpy(gamenetworkfilternamebuffer, gamenetworkfiltername, sizeof(gamenetworkfilternamebuffer));
+               dp_strlcpy(gamenetworkfilternamebuffer, gamenetworkfiltername, sizeof(gamenetworkfilternamebuffer));
                while ((s = strchr(gamenetworkfilternamebuffer, ' ')) != NULL)
                        *s = '_';
                gamenetworkfiltername = gamenetworkfilternamebuffer;
index 8412e489edf370737fefacee261a5e8d3d663be7..9af6e357edac8c92c273b9e30b329f2e4fa13719 100644 (file)
@@ -20,33 +20,34 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "darkplaces.h"
 
-char *InfoString_GetValue(const char *buffer, const char *key, char *value, size_t valuelength)
+size_t InfoString_GetValue(const char *buffer, const char *key, char *value, size_t valuesize)
 {
-       int pos = 0, j;
+       unsigned pos = 0, j;
        size_t keylength;
+
        if (!key)
                key = "";
        keylength = strlen(key);
-       if (valuelength < 1 || !value)
+       if (valuesize < 1 || !value)
        {
                Con_Printf("InfoString_GetValue: no room in value\n");
-               return NULL;
+               return 0;
        }
-       value[0] = 0;
+       value[0] = '\0';
        if (strchr(key, '\\'))
        {
                Con_Printf("InfoString_GetValue: key name \"%s\" contains \\ which is not possible in an infostring\n", key);
-               return NULL;
+               return 0;
        }
        if (strchr(key, '\"'))
        {
                Con_Printf("InfoString_SetValue: key name \"%s\" contains \" which is not allowed in an infostring\n", key);
-               return NULL;
+               return 0;
        }
        if (!key[0])
        {
                Con_Printf("InfoString_GetValue: can not look up a key with no name\n");
-               return NULL;
+               return 0;
        }
        while (buffer[pos] == '\\')
        {
@@ -54,12 +55,12 @@ char *InfoString_GetValue(const char *buffer, const char *key, char *value, size
                                (buffer[pos+1 + keylength] == 0 ||
                                 buffer[pos+1 + keylength] == '\\'))
                {
-                       pos += 1 + (int)keylength;           // Skip \key
+                       pos += 1 + keylength;           // Skip \key
                        if (buffer[pos] == '\\') pos++; // Skip \ before value.
-                       for (j = 0;buffer[pos+j] && buffer[pos+j] != '\\' && j < (int)valuelength - 1;j++)
+                       for (j = 0;buffer[pos+j] && buffer[pos+j] != '\\' && j < valuesize - 1;j++)
                                value[j] = buffer[pos+j];
-                       value[j] = 0;
-                       return value;
+                       value[j] = '\0';
+                       return j;
                }
                if (buffer[pos] == '\\') pos++; // Skip \ before value.
                for (pos++;buffer[pos] && buffer[pos] != '\\';pos++);
@@ -67,7 +68,7 @@ char *InfoString_GetValue(const char *buffer, const char *key, char *value, size
                for (pos++;buffer[pos] && buffer[pos] != '\\';pos++);
        }
        // if we reach this point the key was not found
-       return NULL;
+       return 0;
 }
 
 void InfoString_SetValue(char *buffer, size_t bufferlength, const char *key, const char *value)
@@ -122,13 +123,13 @@ void InfoString_SetValue(char *buffer, size_t bufferlength, const char *key, con
        {
                // set the key/value and append the remaining text
                char tempbuffer[MAX_INPUTLINE];
-               strlcpy(tempbuffer, buffer + pos2, sizeof(tempbuffer));
+               dp_strlcpy(tempbuffer, buffer + pos2, sizeof(tempbuffer));
                dpsnprintf(buffer + pos, bufferlength - pos, "\\%s\\%s%s", key, value, tempbuffer);
        }
        else
        {
                // just remove the key from the text
-               strlcpy(buffer + pos, buffer + pos2, bufferlength - pos);
+               dp_strlcpy(buffer + pos, buffer + pos2, bufferlength - pos);
        }
 }
 
index 538c1ba2543cb2db890a6f4d4fb04693fd3d8d86..ae274bb7f3c4f31ef467dd2da35bb3c8cefd836a 100644 (file)
@@ -24,7 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "qtypes.h"
 #include <stdlib.h>
 
-char *InfoString_GetValue(const char *buffer, const char *key, char *value, size_t valuelength);
+/// Returns the number of bytes written to *value excluding the \0 terminator.
+size_t InfoString_GetValue(const char *buffer, const char *key, char *value, size_t valuesize);
 void InfoString_SetValue(char *buffer, size_t bufferlength, const char *key, const char *value);
 void InfoString_Print(char *buffer);
 
index f2110d17f05fefcafb6a9d5901c86d7e9d23fe3f..aaded00d3fc84d2699eeadb51d6d282e125509f4 100644 (file)
--- a/com_msg.c
+++ b/com_msg.c
@@ -30,6 +30,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 ============================================================================
 */
 
+/* Casting to unsigned when shifting by 24 bits here is necessary to prevent UB
+ * caused by shifting outside the range of int on platforms where int is 32 bits.
+ */
 
 float BuffBigFloat (const unsigned char *buffer)
 {
@@ -39,13 +42,13 @@ float BuffBigFloat (const unsigned char *buffer)
                unsigned int i;
        }
        u;
-       u.i = (buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3];
+       u.i = ((unsigned)buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3];
        return u.f;
 }
 
 int BuffBigLong (const unsigned char *buffer)
 {
-       return (buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3];
+       return ((unsigned)buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3];
 }
 
 short BuffBigShort (const unsigned char *buffer)
@@ -61,13 +64,13 @@ float BuffLittleFloat (const unsigned char *buffer)
                unsigned int i;
        }
        u;
-       u.i = (buffer[3] << 24) | (buffer[2] << 16) | (buffer[1] << 8) | buffer[0];
+       u.i = ((unsigned)buffer[3] << 24) | (buffer[2] << 16) | (buffer[1] << 8) | buffer[0];
        return u.f;
 }
 
 int BuffLittleLong (const unsigned char *buffer)
 {
-       return (buffer[3] << 24) | (buffer[2] << 16) | (buffer[1] << 8) | buffer[0];
+       return ((unsigned)buffer[3] << 24) | (buffer[2] << 16) | (buffer[1] << 8) | buffer[0];
 }
 
 short BuffLittleShort (const unsigned char *buffer)
@@ -287,7 +290,7 @@ int MSG_ReadLittleLong (sizebuf_t *sb)
                return -1;
        }
        sb->readcount += 4;
-       return sb->data[sb->readcount-4] | (sb->data[sb->readcount-3]<<8) | (sb->data[sb->readcount-2]<<16) | (sb->data[sb->readcount-1]<<24);
+       return sb->data[sb->readcount-4] | (sb->data[sb->readcount-3]<<8) | (sb->data[sb->readcount-2]<<16) | ((unsigned)sb->data[sb->readcount-1]<<24);
 }
 
 int MSG_ReadBigLong (sizebuf_t *sb)
@@ -298,7 +301,7 @@ int MSG_ReadBigLong (sizebuf_t *sb)
                return -1;
        }
        sb->readcount += 4;
-       return (sb->data[sb->readcount-4]<<24) + (sb->data[sb->readcount-3]<<16) + (sb->data[sb->readcount-2]<<8) + sb->data[sb->readcount-1];
+       return ((unsigned)sb->data[sb->readcount-4]<<24) + (sb->data[sb->readcount-3]<<16) + (sb->data[sb->readcount-2]<<8) + sb->data[sb->readcount-1];
 }
 
 float MSG_ReadLittleFloat (sizebuf_t *sb)
@@ -314,7 +317,7 @@ float MSG_ReadLittleFloat (sizebuf_t *sb)
                return -1;
        }
        sb->readcount += 4;
-       dat.l = sb->data[sb->readcount-4] | (sb->data[sb->readcount-3]<<8) | (sb->data[sb->readcount-2]<<16) | (sb->data[sb->readcount-1]<<24);
+       dat.l = sb->data[sb->readcount-4] | (sb->data[sb->readcount-3]<<8) | (sb->data[sb->readcount-2]<<16) | ((unsigned)sb->data[sb->readcount-1]<<24);
        return dat.f;
 }
 
@@ -331,27 +334,40 @@ float MSG_ReadBigFloat (sizebuf_t *sb)
                return -1;
        }
        sb->readcount += 4;
-       dat.l = (sb->data[sb->readcount-4]<<24) | (sb->data[sb->readcount-3]<<16) | (sb->data[sb->readcount-2]<<8) | sb->data[sb->readcount-1];
+       dat.l = ((unsigned)sb->data[sb->readcount-4]<<24) | (sb->data[sb->readcount-3]<<16) | (sb->data[sb->readcount-2]<<8) | sb->data[sb->readcount-1];
        return dat.f;
 }
 
 char *MSG_ReadString (sizebuf_t *sb, char *string, size_t maxstring)
 {
-       int c;
        size_t l = 0;
+
        // read string into sbfer, but only store as many characters as will fit
-       while ((c = MSG_ReadByte(sb)) > 0)
-               if (l < maxstring - 1)
-                       string[l++] = c;
-       string[l] = 0;
+       // if dest buffer is full sb->readcount will still be advanced to end of message string
+       while ((string[l] = MSG_ReadByte_opt(sb)) != '\0')
+               if (l < maxstring)
+                       ++l;
        return string;
 }
+size_t MSG_ReadString_len (sizebuf_t *sb, char *string, size_t maxstring)
+{
+       size_t l = 0;
 
-int MSG_ReadBytes (sizebuf_t *sb, int numbytes, unsigned char *out)
+       // read string into sbfer, but only store as many characters as will fit
+       // if dest buffer is full sb->readcount will still be advanced to end of message string
+       while ((string[l] = MSG_ReadByte_opt(sb)) != '\0')
+               if (l < maxstring)
+                       ++l;
+       return l;
+}
+
+size_t MSG_ReadBytes (sizebuf_t *sb, size_t numbytes, unsigned char *out)
 {
-       int l, c;
-       for (l = 0;l < numbytes && (c = MSG_ReadByte(sb)) != -1;l++)
-               out[l] = c;
+       size_t l = 0;
+
+       // when numbytes have been read sb->readcount won't be advanced any further
+       while (l < numbytes && !sb->badread)
+               out[l++] = MSG_ReadByte_opt(sb);
        return l;
 }
 
index 8db1f27025ab61c545583f0f2cba1821ab41ff6d..f4e459af3e104d8a883a3a1447f86f19f044fa2a 100644 (file)
--- a/common.c
+++ b/common.c
@@ -37,6 +37,7 @@ cvar_t cl_playermodel = {CF_CLIENT | CF_SERVER | CF_USERINFO | CF_ARCHIVE, "play
 cvar_t cl_playerskin = {CF_CLIENT | CF_SERVER | CF_USERINFO | CF_ARCHIVE, "playerskin", "", "current player skin in Nexuiz/Xonotic"};
 
 char com_token[MAX_INPUTLINE];
+unsigned com_token_len;
 
 //===========================================================================
 
@@ -456,16 +457,17 @@ int COM_Wordwrap(const char *string, size_t length, float continuationWidth, flo
 COM_ParseToken_Simple
 
 Parse a token out of a string
+Writes the token and its strlen to the com_token and com_token_len globals.
 ==============
 */
-int COM_ParseToken_Simple(const char **datapointer, qbool returnnewline, qbool parsebackslash, qbool parsecomments)
+qbool COM_ParseToken_Simple(const char **datapointer, qbool returnnewline, qbool parsebackslash, qbool parsecomments)
 {
        int len;
        int c;
        const char *data = *datapointer;
 
-       len = 0;
-       com_token[0] = 0;
+       com_token_len = len = 0;
+       com_token[0] = '\0';
 
        if (!data)
        {
@@ -530,7 +532,8 @@ skipwhite:
                        if (len < (int)sizeof(com_token) - 1)
                                com_token[len++] = c;
                }
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                if (*data == '\"')
                        data++;
                *datapointer = data;
@@ -540,7 +543,8 @@ skipwhite:
        {
                // translate Mac line ending to UNIX
                com_token[len++] = '\n';data++;
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                *datapointer = data;
                return true;
        }
@@ -548,7 +552,8 @@ skipwhite:
        {
                // single character
                com_token[len++] = *data++;
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                *datapointer = data;
                return true;
        }
@@ -558,7 +563,8 @@ skipwhite:
                for (;!ISWHITESPACE(*data);data++)
                        if (len < (int)sizeof(com_token) - 1)
                                com_token[len++] = *data;
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                *datapointer = data;
                return true;
        }
@@ -569,16 +575,17 @@ skipwhite:
 COM_ParseToken_QuakeC
 
 Parse a token out of a string
+Writes the token and its strlen to the com_token and com_token_len globals.
 ==============
 */
-int COM_ParseToken_QuakeC(const char **datapointer, qbool returnnewline)
+qbool COM_ParseToken_QuakeC(const char **datapointer, qbool returnnewline)
 {
        int len;
        int c;
        const char *data = *datapointer;
 
-       len = 0;
-       com_token[0] = 0;
+       com_token_len = len = 0;
+       com_token[0] = '\0';
 
        if (!data)
        {
@@ -644,7 +651,8 @@ skipwhite:
                        if (len < (int)sizeof(com_token) - 1)
                                com_token[len++] = c;
                }
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                if (*data == quote)
                        data++;
                *datapointer = data;
@@ -654,7 +662,8 @@ skipwhite:
        {
                // translate Mac line ending to UNIX
                com_token[len++] = '\n';data++;
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                *datapointer = data;
                return true;
        }
@@ -662,7 +671,8 @@ skipwhite:
        {
                // single character
                com_token[len++] = *data++;
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                *datapointer = data;
                return true;
        }
@@ -672,7 +682,8 @@ skipwhite:
                for (;!ISWHITESPACE(*data) && *data != '{' && *data != '}' && *data != ')' && *data != '(' && *data != ']' && *data != '[' && *data != ':' && *data != ',' && *data != ';';data++)
                        if (len < (int)sizeof(com_token) - 1)
                                com_token[len++] = *data;
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                *datapointer = data;
                return true;
        }
@@ -683,16 +694,17 @@ skipwhite:
 COM_ParseToken_VM_Tokenize
 
 Parse a token out of a string
+Writes the token and its strlen to the com_token and com_token_len globals.
 ==============
 */
-int COM_ParseToken_VM_Tokenize(const char **datapointer, qbool returnnewline)
+qbool COM_ParseToken_VM_Tokenize(const char **datapointer, qbool returnnewline)
 {
        int len;
        int c;
        const char *data = *datapointer;
 
-       len = 0;
-       com_token[0] = 0;
+       com_token_len = len = 0;
+       com_token[0] = '\0';
 
        if (!data)
        {
@@ -758,7 +770,8 @@ skipwhite:
                        if (len < (int)sizeof(com_token) - 1)
                                com_token[len++] = c;
                }
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                if (*data == quote)
                        data++;
                *datapointer = data;
@@ -768,7 +781,8 @@ skipwhite:
        {
                // translate Mac line ending to UNIX
                com_token[len++] = '\n';data++;
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                *datapointer = data;
                return true;
        }
@@ -776,7 +790,8 @@ skipwhite:
        {
                // single character
                com_token[len++] = *data++;
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                *datapointer = data;
                return true;
        }
@@ -786,7 +801,8 @@ skipwhite:
                for (;!ISWHITESPACE(*data) && *data != '{' && *data != '}' && *data != ')' && *data != '(' && *data != ']' && *data != '[' && *data != ':' && *data != ',' && *data != ';';data++)
                        if (len < (int)sizeof(com_token) - 1)
                                com_token[len++] = *data;
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                *datapointer = data;
                return true;
        }
@@ -797,15 +813,16 @@ skipwhite:
 COM_ParseToken_Console
 
 Parse a token out of a string, behaving like the qwcl console
+Writes the token and its strlen to the com_token and com_token_len globals.
 ==============
 */
-int COM_ParseToken_Console(const char **datapointer)
+qbool COM_ParseToken_Console(const char **datapointer)
 {
        int len;
        const char *data = *datapointer;
 
-       len = 0;
-       com_token[0] = 0;
+       com_token_len = len = 0;
+       com_token[0] = '\0';
 
        if (!data)
        {
@@ -843,7 +860,8 @@ skipwhite:
                        if (len < (int)sizeof(com_token) - 1)
                                com_token[len++] = *data;
                }
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                if (*data == '\"')
                        data++;
                *datapointer = data;
@@ -854,7 +872,8 @@ skipwhite:
                for (;!ISWHITESPACE(*data);data++)
                        if (len < (int)sizeof(com_token) - 1)
                                com_token[len++] = *data;
-               com_token[len] = 0;
+               com_token[len] = '\0';
+               com_token_len = len;
                *datapointer = data;
        }
 
@@ -1000,6 +1019,11 @@ int dpvsnprintf (char *buffer, size_t buffersize, const char *format, va_list ar
        if (result < 0 || (size_t)result >= buffersize)
        {
                buffer[buffersize - 1] = '\0';
+               // we could be inside Con_Printf
+               if (result < 0)
+                       Sys_Printf("dpvsnprintf: output error, buffer size %lu\n", (unsigned long)buffersize);
+               else
+                       Sys_Printf("dpvsnprintf: truncated to %lu bytes: \"%s\"\n", (unsigned long)buffersize - 1, buffer);
                return -1;
        }
 
@@ -1009,10 +1033,12 @@ int dpvsnprintf (char *buffer, size_t buffersize, const char *format, va_list ar
 
 //======================================
 
-void COM_ToLowerString (const char *in, char *out, size_t size_out)
+size_t COM_ToLowerString(const char *in, char *out, size_t size_out)
 {
+       const char *out_start = out;
+
        if (size_out == 0)
-               return;
+               return 0;
 
        if(utf8_enable.integer)
        {
@@ -1023,12 +1049,12 @@ void COM_ToLowerString (const char *in, char *out, size_t size_out)
                        Uchar ch = u8_getchar_utf8_enabled(in, &in);
                        ch = u8_tolower(ch);
                        n = u8_fromchar(ch, out, size_out);
+                       out += n; // before the break so the return is correct
                        if(n <= 0)
                                break;
-                       out += n;
                        size_out -= n;
                }
-               return;
+               return out - out_start;
        }
 
        while (*in && size_out > 1)
@@ -1040,12 +1066,15 @@ void COM_ToLowerString (const char *in, char *out, size_t size_out)
                size_out--;
        }
        *out = '\0';
+       return out - out_start;
 }
 
-void COM_ToUpperString (const char *in, char *out, size_t size_out)
+size_t COM_ToUpperString(const char *in, char *out, size_t size_out)
 {
+       const char *out_start = out;
+
        if (size_out == 0)
-               return;
+               return 0;
 
        if(utf8_enable.integer)
        {
@@ -1056,12 +1085,12 @@ void COM_ToUpperString (const char *in, char *out, size_t size_out)
                        Uchar ch = u8_getchar_utf8_enabled(in, &in);
                        ch = u8_toupper(ch);
                        n = u8_fromchar(ch, out, size_out);
+                       out += n; // before the break so the return is correct
                        if(n <= 0)
                                break;
-                       out += n;
                        size_out -= n;
                }
-               return;
+               return out - out_start;
        }
 
        while (*in && size_out > 1)
@@ -1073,6 +1102,7 @@ void COM_ToUpperString (const char *in, char *out, size_t size_out)
                size_out--;
        }
        *out = '\0';
+       return out - out_start;
 }
 
 int COM_StringBeginsWith(const char *s, const char *match)
@@ -1226,9 +1256,10 @@ removes color codes from a string.
 If escape_carets is true, the resulting string will be safe for printing. If
 escape_carets is false, the function will just strip color codes (for logging
 for example).
+Returns the number of bytes written to the *out buffer excluding the \0 terminator.
 
-If the output buffer size did not suffice for converting, the function returns
-FALSE. Generally, if escape_carets is false, the output buffer needs
+If the output buffer size did not suffice for converting, the function returns 0.
+Generally, if escape_carets is false, the output buffer needs
 strlen(str)+1 bytes, and if escape_carets is true, it can need strlen(str)*1.5+2
 bytes. In any case, the function makes sure that the resulting string is
 zero terminated.
@@ -1237,20 +1268,22 @@ For size_in, specify the maximum number of characters from in to use, or 0 to us
 all characters until the zero terminator.
 ============
 */
-qbool
-COM_StringDecolorize(const char *in, size_t size_in, char *out, size_t size_out, qbool escape_carets)
+size_t COM_StringDecolorize(const char *in, size_t size_in, char *out, size_t size_out, qbool escape_carets)
 {
-#define APPEND(ch) do { if(--size_out) { *out++ = (ch); } else { *out++ = 0; return false; } } while(0)
+#define APPEND(ch) do { if(--size_out) { *out++ = (ch); } else { *out++ = 0; return 0; } } while(0)
+
+       const char *out_start = out;
        const char *end = size_in ? (in + size_in) : NULL;
+
        if(size_out < 1)
-               return false;
+               return 0;
        for(;;)
        {
                switch((in == end) ? 0 : *in)
                {
                        case 0:
-                               *out++ = 0;
-                               return true;
+                               *out = '\0';
+                               return out - out_start;
                        case STRING_COLOR_TAG:
                                ++in;
                                switch((in == end) ? 0 : *in)
@@ -1273,8 +1306,8 @@ COM_StringDecolorize(const char *in, size_t size_in, char *out, size_t size_out,
                                                // finish the code by appending another caret when escaping
                                                if(escape_carets)
                                                        APPEND(STRING_COLOR_TAG);
-                                               *out++ = 0;
-                                               return true;
+                                               *out = '\0';
+                                               return out - out_start;
                                        case STRING_COLOR_TAG: // escaped ^
                                                APPEND(STRING_COLOR_TAG);
                                                // append a ^ twice when escaping
@@ -1300,87 +1333,90 @@ COM_StringDecolorize(const char *in, size_t size_in, char *out, size_t size_out,
 #undef APPEND
 }
 
-//========================================================
-// strlcat and strlcpy, from OpenBSD
 
 /*
- * Copyright (c) 1998, 2015 Todd C. Miller <millert@openbsd.org>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*     $OpenBSD: strlcat.c,v 1.19 2019/01/25 00:19:25 millert Exp $    */
-/*     $OpenBSD: strlcpy.c,v 1.16 2019/01/25 00:19:25 millert Exp $    */
+============
+String Copying
 
+The glibc implementation of memccpy is several times faster than old functions that
+copy one byte at a time (even at -O3) and its advantage increases with string length.
+============
+*/
+#ifdef WIN32
+       // memccpy() is standard in POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD, C23.
+       // Microsoft supports it, but apparently complains if we use it.
+       #undef memccpy
+       #define memccpy _memccpy
+#endif
 
-#ifndef HAVE_STRLCAT
-size_t
-strlcat(char *dst, const char *src, size_t dsize)
+/** Chain-copies a string with truncation and efficiency (compared to strlcat()).
+ * The destination ends at an absolute pointer instead of a relative offset
+ * and a pointer to the \0 terminator is returned on success.
+ * Truncates, warns, and returns the end pointer on overflow or unterminated source.
+ * Guarantees \0 termination.    end = dst + sizeof(src[])
+ */
+char *dp_stpecpy(char *dst, char *end, const char *src)
 {
-       const char *odst = dst;
-       const char *osrc = src;
-       size_t n = dsize;
-       size_t dlen;
-
-       /* Find the end of dst and adjust bytes left but don't go past end. */
-       while (n-- != 0 && *dst != '\0')
-               dst++;
-       dlen = dst - odst;
-       n = dsize - dlen;
-
-       if (n-- == 0)
-               return(dlen + strlen(src));
-       while (*src != '\0') {
-               if (n != 0) {
-                       *dst++ = *src;
-                       n--;
-               }
-               src++;
-       }
-       *dst = '\0';
+       char *p = (char *)memccpy(dst, src, '\0', end - dst);
 
-       return(dlen + (src - osrc));    /* count does not include NUL */
+       if (p)
+               return p - 1;
+       end[-1] = '\0';
+       Con_Printf(CON_WARN "%s: src string unterminated or truncated to %lu bytes: \"%s\"\n", __func__, (unsigned long)(dst == end ? 0 : (end - dst) - 1), dst);
+       return end;
 }
-#endif  // #ifndef HAVE_STRLCAT
 
+/** Copies a measured byte sequence (unterminated string) to a null-terminated string.
+ * Returns a pointer to the \0 terminator. Guarantees \0 termination.
+ * Compared to ustr2stp(): truncates and warns on overflow.
+ */
+char *dp_ustr2stp(char *dst, size_t dsize, const char *src, size_t slen)
+{
+       if (slen >= dsize)
+       {
+               slen = dsize - 1;
+               Con_Printf(CON_WARN "%s: src string truncated to %lu bytes: \"%.*s\"\n", __func__, (unsigned long)slen, (int)slen, src);
+       }
+       memcpy(dst, src, slen);
+       dst[slen] = '\0';
+       return &dst[slen];
+}
 
-#ifndef HAVE_STRLCPY
-size_t
-strlcpy(char *dst, const char *src, size_t dsize)
+/** Copies a string, like strlcpy() but with a better return: the number of bytes copied
+ * excluding the \0 terminator. Truncates and warns on overflow or unterminated source,
+ * whereas strlcpy() truncates silently and overreads (possibly segfaulting).
+ * Guarantees \0 termination.
+ * See also: dp_stpecpy() and dp_ustr2stp().
+ */
+size_t dp__strlcpy(char *dst, const char *src, size_t dsize, const char *func, unsigned line)
 {
-       const char *osrc = src;
-       size_t nleft = dsize;
+       char *p = (char *)memccpy(dst, src, '\0', dsize);
 
-       /* Copy as many bytes as will fit. */
-       if (nleft != 0) {
-               while (--nleft != 0) {
-                       if ((*dst++ = *src++) == '\0')
-                               break;
-               }
-       }
+       if (p)
+               return (p - 1) - dst;
+       dst[dsize - 1] = '\0';
+       Con_Printf(CON_WARN "%s:%u: src string unterminated or truncated to %lu bytes: \"%s\"\n", func, line, (unsigned long)dsize - 1, dst);
+       return dsize - 1;
+}
 
-       /* Not enough room in dst, add NUL and traverse rest of src. */
-       if (nleft == 0) {
-               if (dsize != 0)
-                       *dst = '\0';            /* NUL-terminate dst */
-               while (*src++)
-                       ;
-       }
+/** Catenates a string, like strlcat() but with a better return: the number of bytes copied
+ * excluding the \0 terminator. Truncates and warns on overflow or unterminated source,
+ * whereas strlcat() truncates silently and overreads (possibly segfaulting).
+ * Guarantees \0 termination.
+ * Inefficient like any strcat(), please use memcpy(), dp_stpecpy() or dp_strlcpy() instead.
+ */
+size_t dp__strlcat(char *dst, const char *src, size_t dsize, const char *func, unsigned line)
+{
+       size_t offset;
+       char *p = (char *)memchr(dst, '\0', dsize);
 
-       return(src - osrc - 1); /* count does not include NUL */
+       if (!p)
+               p = dst;
+       offset = p - dst;
+       return dp__strlcpy(p, src, dsize - offset, func, line) + offset;
 }
 
-#endif  // #ifndef HAVE_STRLCPY
+
 
 void FindFraction(double val, int *num, int *denom, int denomMax)
 {
@@ -1418,7 +1454,7 @@ char **XPM_DecodeString(const char *in)
        while(COM_ParseToken_QuakeC(&in, false))
        {
                tokens[line] = lines[line];
-               strlcpy(lines[line++], com_token, sizeof(lines[0]));
+               dp_strlcpy(lines[line++], com_token, sizeof(lines[0]));
                if(!COM_ParseToken_QuakeC(&in, false))
                        return NULL;
                if(!strcmp(com_token, "}"))
index 0fdf97ce59a3e0f982a7c247198c7a7671707c20..5b73aa6f6c4d9a5e0fd0bff5a21eac16c87ad24a 100644 (file)
--- a/common.h
+++ b/common.h
@@ -180,10 +180,14 @@ int MSG_ReadBigLong (sizebuf_t *sb);
 float MSG_ReadLittleFloat (sizebuf_t *sb);
 float MSG_ReadBigFloat (sizebuf_t *sb);
 char *MSG_ReadString (sizebuf_t *sb, char *string, size_t maxstring);
-int MSG_ReadBytes (sizebuf_t *sb, int numbytes, unsigned char *out);
+/// Same as MSG_ReadString except it returns the number of bytes written to *string excluding the \0 terminator.
+size_t MSG_ReadString_len (sizebuf_t *sb, char *string, size_t maxstring);
+size_t MSG_ReadBytes (sizebuf_t *sb, size_t numbytes, unsigned char *out);
 
 #define MSG_ReadChar(sb) ((sb)->readcount >= (sb)->cursize ? ((sb)->badread = true, -1) : (signed char)(sb)->data[(sb)->readcount++])
 #define MSG_ReadByte(sb) ((sb)->readcount >= (sb)->cursize ? ((sb)->badread = true, -1) : (unsigned char)(sb)->data[(sb)->readcount++])
+/// Same as MSG_ReadByte but with no need to copy twice (first to `int` to check for -1) so each byte can be copied directly to a string[]
+#define MSG_ReadByte_opt(sb) ((sb)->readcount >= (sb)->cursize ? ((sb)->badread = true, '\0') : (unsigned char)(sb)->data[(sb)->readcount++])
 #define MSG_ReadShort MSG_ReadLittleShort
 #define MSG_ReadLong MSG_ReadLittleLong
 #define MSG_ReadFloat MSG_ReadLittleFloat
@@ -205,11 +209,11 @@ typedef int (*COM_LineProcessorFunc) (void *passthrough, const char *line, size_
 int COM_Wordwrap(const char *string, size_t length, float continuationSize, float maxWidth, COM_WordWidthFunc_t wordWidth, void *passthroughCW, COM_LineProcessorFunc processLine, void *passthroughPL);
 
 extern char com_token[MAX_INPUTLINE];
-
-int COM_ParseToken_Simple(const char **datapointer, qbool returnnewline, qbool parsebackslash, qbool parsecomments);
-int COM_ParseToken_QuakeC(const char **datapointer, qbool returnnewline);
-int COM_ParseToken_VM_Tokenize(const char **datapointer, qbool returnnewline);
-int COM_ParseToken_Console(const char **datapointer);
+extern unsigned com_token_len;
+qbool COM_ParseToken_Simple(const char **datapointer, qbool returnnewline, qbool parsebackslash, qbool parsecomments);
+qbool COM_ParseToken_QuakeC(const char **datapointer, qbool returnnewline);
+qbool COM_ParseToken_VM_Tokenize(const char **datapointer, qbool returnnewline);
+qbool COM_ParseToken_Console(const char **datapointer);
 
 void COM_Init (void);
 void COM_Shutdown (void);
@@ -225,35 +229,45 @@ char *va(char *buf, size_t buflen, const char *format, ...) DP_FUNC_PRINTF(3);
 #endif
 
 // snprintf and vsnprintf are NOT portable. Use their DP counterparts instead
-#ifdef snprintf
-# undef snprintf
-#endif
+#undef snprintf
 #define snprintf DP_STATIC_ASSERT(0, "snprintf is forbidden for portability reasons. Use dpsnprintf instead.")
-#ifdef vsnprintf
-# undef vsnprintf
-#endif
+#undef vsnprintf
 #define vsnprintf DP_STATIC_ASSERT(0, "vsnprintf is forbidden for portability reasons. Use dpvsnprintf instead.")
 
-// dpsnprintf and dpvsnprintf
-// return the number of printed characters, excluding the final '\0'
-// or return -1 if the buffer isn't big enough to contain the entire string.
-// buffer is ALWAYS null-terminated
+// documentation duplicated deliberately for the benefit of IDEs that support https://www.doxygen.nl/manual/docblocks.html
+/// Returns the number of printed characters, excluding the final '\0'
+/// or returns -1 if the buffer isn't big enough to contain the entire string.
+/// Buffer is ALWAYS null-terminated.
 extern int dpsnprintf (char *buffer, size_t buffersize, const char *format, ...) DP_FUNC_PRINTF(3);
+/// Returns the number of printed characters, excluding the final '\0'
+/// or returns -1 if the buffer isn't big enough to contain the entire string.
+/// Buffer is ALWAYS null-terminated.
 extern int dpvsnprintf (char *buffer, size_t buffersize, const char *format, va_list args);
 
 // A bunch of functions are forbidden for security reasons (and also to please MSVS 2005, for some of them)
 // LadyHavoc: added #undef lines here to avoid warnings in Linux
 #undef strcat
-#define strcat DP_STATIC_ASSERT(0, "strcat is forbidden for security reasons. Use strlcat or memcpy instead.")
+#define strcat DP_STATIC_ASSERT(0, "strcat is forbidden for security reasons. Use dp_strlcat or memcpy instead.")
 #undef strncat
-#define strncat DP_STATIC_ASSERT(0, "strncat is forbidden for security reasons. Use strlcat or memcpy instead.")
+#define strncat DP_STATIC_ASSERT(0, "strncat is forbidden for security reasons. Use dp_strlcat or memcpy instead.")
 #undef strcpy
-#define strcpy DP_STATIC_ASSERT(0, "strcpy is forbidden for security reasons. Use strlcpy or memcpy instead.")
+#define strcpy DP_STATIC_ASSERT(0, "strcpy is forbidden for security reasons. Use dp_strlcpy or memcpy instead.")
 #undef strncpy
-#define strncpy DP_STATIC_ASSERT(0, "strncpy is forbidden for security reasons. Use strlcpy or memcpy instead.")
+#define strncpy DP_STATIC_ASSERT(0, "strncpy is forbidden for security reasons. Use dp_strlcpy or memcpy instead.")
+#undef stpcpy
+#define stpcpy DP_STATIC_ASSERT(0, "stpcpy is forbidden for security reasons. Use dp_stpecpy or memcpy instead.")
+#undef ustpcpy
+#define ustpcpy DP_STATIC_ASSERT(0, "ustpcpy is forbidden for security reasons. Use dp_ustr2stp or memcpy instead.")
+#undef ustr2stp
+#define ustr2stp DP_STATIC_ASSERT(0, "ustr2stp is forbidden for security reasons. Use dp_ustr2stp or memcpy instead.")
 #undef sprintf
 #define sprintf DP_STATIC_ASSERT(0, "sprintf is forbidden for security reasons. Use dpsnprintf instead.")
 
+#undef strlcpy
+#define strlcpy DP_STATIC_ASSERT(0, "strlcpy is forbidden for stability and correctness. See common.h and common.c comments.")
+#undef strlcat
+#define strlcat DP_STATIC_ASSERT(0, "strlcat is forbidden for stability and correctness. See common.h and common.c comments.")
+
 
 //============================================================================
 
@@ -270,44 +284,24 @@ typedef enum userdirmode_e
 }
 userdirmode_t;
 
-void COM_ToLowerString (const char *in, char *out, size_t size_out);
-void COM_ToUpperString (const char *in, char *out, size_t size_out);
+/// Returns the number of bytes written to *out excluding the \0 terminator.
+size_t COM_ToLowerString(const char *in, char *out, size_t size_out);
+/// Returns the number of bytes written to *out excluding the \0 terminator.
+size_t COM_ToUpperString(const char *in, char *out, size_t size_out);
 int COM_StringBeginsWith(const char *s, const char *match);
-
 int COM_ReadAndTokenizeLine(const char **text, char **argv, int maxargc, char *tokenbuf, int tokenbufsize, const char *commentprefix);
-
 size_t COM_StringLengthNoColors(const char *s, size_t size_s, qbool *valid);
-qbool COM_StringDecolorize(const char *in, size_t size_in, char *out, size_t size_out, qbool escape_carets);
-void COM_ToLowerString (const char *in, char *out, size_t size_out);
-void COM_ToUpperString (const char *in, char *out, size_t size_out);
-
-// strlcat and strlcpy, from OpenBSD
-// Most (all?) BSDs already have them
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(MACOSX)
-# define HAVE_STRLCAT 1
-# define HAVE_STRLCPY 1
-#endif
+size_t COM_StringDecolorize(const char *in, size_t size_in, char *out, size_t size_out, qbool escape_carets);
 
-#ifndef HAVE_STRLCAT
-/*!
- * Appends src to string dst of size dsize (unlike strncat, dsize is the
- * full size of dst, not space left).  At most dsize-1 characters
- * will be copied.  Always NUL terminates (unless dsize <= strlen(dst)).
- * Returns strlen(src) + MIN(dsize, strlen(initial dst)).
- * If retval >= dsize, truncation occurred.
- */
-size_t strlcat(char *dst, const char *src, size_t dsize);
-#endif  // #ifndef HAVE_STRLCAT
-
-#ifndef HAVE_STRLCPY
-/*!
- * Copy string src to buffer dst of size dsize.  At most dsize-1
- * chars will be copied.  Always NUL terminates (unless dsize == 0).
- * Returns strlen(src); if retval >= dsize, truncation occurred.
- */
-size_t strlcpy(char *dst, const char *src, size_t dsize);
 
-#endif  // #ifndef HAVE_STRLCPY
+
+#define dp_strlcpy(dst, src, dsize) dp__strlcpy(dst, src, dsize, __func__, __LINE__)
+#define dp_strlcat(dst, src, dsize) dp__strlcat(dst, src, dsize, __func__, __LINE__)
+size_t dp__strlcpy(char *dst, const char *src, size_t dsize, const char *func, unsigned line);
+size_t dp__strlcat(char *dst, const char *src, size_t dsize, const char *func, unsigned line);
+char *dp_stpecpy(char *dst, char *end, const char *src);
+char *dp_ustr2stp(char *dst, size_t dsize, const char *src, size_t slen);
+
 
 void FindFraction(double val, int *num, int *denom, int denomMax);
 
index ac9d38259c8044867910e0e831c33b56662b0d2a..21782f7f439e1edbb6db6a99fd9bf821cd492db0 100644 (file)
--- a/console.c
+++ b/console.c
@@ -333,7 +333,7 @@ ConBuffer_AddLine
 Appends a given string as a new line to the console.
 ================
 */
-void ConBuffer_AddLine(conbuffer_t *buf, const char *line, int len, int mask)
+void ConBuffer_AddLine(conbuffer_t *buf, const char *line, int len, unsigned mask)
 {
        char *putpos;
        con_lineinfo_t *p;
@@ -367,7 +367,7 @@ void ConBuffer_AddLine(conbuffer_t *buf, const char *line, int len, int mask)
        p->height = -1; // calculate when needed
 }
 
-int ConBuffer_FindPrevLine(conbuffer_t *buf, int mask_must, int mask_mustnot, int start)
+int ConBuffer_FindPrevLine(conbuffer_t *buf, unsigned mask_must, unsigned mask_mustnot, int start)
 {
        int i;
        if(start == -1)
@@ -391,8 +391,8 @@ const char *ConBuffer_GetLine(conbuffer_t *buf, int i)
 {
        static char copybuf[MAX_INPUTLINE]; // client only
        con_lineinfo_t *l = &CONBUFFER_LINES(buf, i);
-       size_t sz = l->len+1 > sizeof(copybuf) ? sizeof(copybuf) : l->len+1;
-       strlcpy(copybuf, l->start, sz);
+
+       dp_ustr2stp(copybuf, sizeof(copybuf), l->start, l->len);
        return copybuf;
 }
 
@@ -512,7 +512,7 @@ static void Log_Open (void)
        logfile = FS_OpenRealFile(log_file.string, "a", false);
        if (logfile != NULL)
        {
-               strlcpy (crt_log_file, log_file.string, sizeof (crt_log_file));
+               dp_strlcpy (crt_log_file, log_file.string, sizeof (crt_log_file));
                FS_Print (logfile, Log_Timestamp ("Log started"));
        }
 }
@@ -711,38 +711,42 @@ void Con_ClearNotify (void)
                        CON_LINES(i).mask |= CON_MASK_HIDENOTIFY;
 }
 
+static void Con_MsgCmdMode(cmd_state_t *cmd, signed char mode)
+{
+       if (cls.demoplayback && mode >= 0)
+               return;
+       key_dest = key_message;
+       chat_mode = mode;
+       if(Cmd_Argc(cmd) > 1)
+       {
+               chat_bufferpos = dpsnprintf(chat_buffer, sizeof(chat_buffer), "%s ", Cmd_Args(cmd));
+               if (chat_bufferpos < 0)
+                       chat_bufferpos = 0;
+       }
+}
 
 /*
 ================
 Con_MessageMode_f
+
+"say"
 ================
 */
 static void Con_MessageMode_f(cmd_state_t *cmd)
 {
-       key_dest = key_message;
-       chat_mode = 0; // "say"
-       if(Cmd_Argc(cmd) > 1)
-       {
-               dpsnprintf(chat_buffer, sizeof(chat_buffer), "%s ", Cmd_Args(cmd));
-               chat_bufferpos = (unsigned int)strlen(chat_buffer);
-       }
+       Con_MsgCmdMode(cmd, 0);
 }
 
-
 /*
 ================
 Con_MessageMode2_f
+
+"say_team"
 ================
 */
 static void Con_MessageMode2_f(cmd_state_t *cmd)
 {
-       key_dest = key_message;
-       chat_mode = 1; // "say_team"
-       if(Cmd_Argc(cmd) > 1)
-       {
-               dpsnprintf(chat_buffer, sizeof(chat_buffer), "%s ", Cmd_Args(cmd));
-               chat_bufferpos = (unsigned int)strlen(chat_buffer);
-       }
+       Con_MsgCmdMode(cmd, 1);
 }
 
 /*
@@ -752,13 +756,7 @@ Con_CommandMode_f
 */
 static void Con_CommandMode_f(cmd_state_t *cmd)
 {
-       key_dest = key_message;
-       if(Cmd_Argc(cmd) > 1)
-       {
-               dpsnprintf(chat_buffer, sizeof(chat_buffer), "%s ", Cmd_Args(cmd));
-               chat_bufferpos = (unsigned int)strlen(chat_buffer);
-       }
-       chat_mode = -1; // command
+       Con_MsgCmdMode(cmd, -1);
 }
 
 /*
@@ -933,8 +931,6 @@ void Con_Init (void)
        Cmd_AddCommand(CF_SHARED, "condump", Con_ConDump_f, "output console history to a file (see also log_file)");
 
        con_initialized = true;
-
-       Con_Print("Console initialized.\n");
 }
 
 void Con_Shutdown (void)
@@ -1155,11 +1151,10 @@ Con_MaskPrint
 */
 extern cvar_t timestamps;
 extern cvar_t timeformat;
-extern qbool sys_nostdout;
-void Con_MaskPrint(int additionalmask, const char *msg)
+void Con_MaskPrint(unsigned additionalmask, const char *msg)
 {
-       static int mask = 0;
-       static int index = 0;
+       static unsigned mask = 0;
+       static unsigned index = 0;
        static char line[MAX_INPUTLINE];
 
        if (con_mutex)
@@ -1224,7 +1219,7 @@ void Con_MaskPrint(int additionalmask, const char *msg)
                                Con_PrintToHistory(line, mask);
                        }
                        // send to terminal or dedicated server window
-                       if (!sys_nostdout)
+                       if (sys.outfd >= 0)
                        if (developer.integer || !(mask & CON_MASK_DEVELOPER))
                        {
                                if(sys_specialcharactertranslation.integer)
@@ -1361,12 +1356,12 @@ void Con_MaskPrint(int additionalmask, const char *msg)
                                                *out++ = '[';
                                                *out++ = 'm';
                                        }
-                                       *out++ = 0;
-                                       Sys_Print(printline);
+                                       *out = '\0';
+                                       Sys_Print(printline, out - printline);
                                }
                                else if(sys_colortranslation.integer == 2) // Quake
                                {
-                                       Sys_Print(line);
+                                       Sys_Print(line, index);
                                }
                                else // strip
                                {
@@ -1416,8 +1411,8 @@ void Con_MaskPrint(int additionalmask, const char *msg)
                                                                break;
                                                }
                                        }
-                                       *out++ = 0;
-                                       Sys_Print(printline);
+                                       *out = '\0';
+                                       Sys_Print(printline, out - printline);
                                }
                        }
                        // empty the line buffer
@@ -1435,7 +1430,7 @@ void Con_MaskPrint(int additionalmask, const char *msg)
 Con_MaskPrintf
 ================
 */
-void Con_MaskPrintf(int mask, const char *fmt, ...)
+void Con_MaskPrintf(unsigned mask, const char *fmt, ...)
 {
        va_list argptr;
        char msg[MAX_INPUTLINE];
@@ -1542,7 +1537,7 @@ static void Con_DrawInput(qbool is_console, float x, float v, float inputsize)
        {
                // empty prefix because ] is part of the console edit line
                prefix = "";
-               strlcpy(text, key_line, sizeof(text));
+               dp_strlcpy(text, key_line, sizeof(text));
                linepos = key_linepos;
                fnt = FONT_CONSOLE;
        }
@@ -1554,7 +1549,7 @@ static void Con_DrawInput(qbool is_console, float x, float v, float inputsize)
                        prefix = "say_team:";
                else
                        prefix = "say:";
-               strlcpy(text, chat_buffer, sizeof(text));
+               dp_strlcpy(text, chat_buffer, sizeof(text));
                linepos = chat_bufferpos;
                fnt = FONT_CHAT;
        }
@@ -1705,7 +1700,7 @@ static int Con_DisplayLineFunc(void *passthrough, const char *line, size_t lengt
        return 1;
 }
 
-static int Con_DrawNotifyRect(int mask_must, int mask_mustnot, float maxage, float x, float y, float width, float height, float fontsize, float alignment_x, float alignment_y, const char *continuationString)
+static int Con_DrawNotifyRect(unsigned mask_must, unsigned mask_mustnot, float maxage, float x, float y, float width, float height, float fontsize, float alignment_x, float alignment_y, const char *continuationString)
 {
        int i;
        int lines = 0;
@@ -1906,7 +1901,7 @@ If alpha is 0, the line is not drawn, but still wrapped and its height
 returned.
 ================
 */
-static int Con_DrawConsoleLine(int mask_must, int mask_mustnot, float y, int lineno, float ymin, float ymax)
+static int Con_DrawConsoleLine(unsigned mask_must, unsigned mask_mustnot, float y, int lineno, float ymin, float ymax)
 {
        float width = vid_conwidth.value;
        con_text_info_t ti;
@@ -1938,7 +1933,7 @@ Calculates the last visible line index and how much to show of it based on
 con_backscroll.
 ================
 */
-static void Con_LastVisibleLine(int mask_must, int mask_mustnot, int *last, int *limitlast)
+static void Con_LastVisibleLine(unsigned mask_must, unsigned mask_mustnot, int *last, int *limitlast)
 {
        int lines_seen = 0;
        int i;
@@ -2155,18 +2150,18 @@ qbool GetMapList (const char *s, char *completedname, int completednamebufferlen
                char entfilename[MAX_QPATH];
                char desc[64];
                desc[0] = 0;
-               strlcpy(message, "^1ERROR: open failed^7", sizeof(message));
+               dp_strlcpy(message, "^1ERROR: open failed^7", sizeof(message));
                p = 0;
                f = FS_OpenVirtualFile(t->filenames[i], true);
                if(f)
                {
-                       strlcpy(message, "^1ERROR: not a known map format^7", sizeof(message));
+                       dp_strlcpy(message, "^1ERROR: not a known map format^7", sizeof(message));
                        memset(buf, 0, 1024);
                        FS_Read(f, buf, 1024);
                        if (!memcmp(buf, "IBSP", 4))
                        {
                                p = LittleLong(((int *)buf)[1]);
-                               if (p == Q3BSPVERSION)
+                               if (p == Q3BSPVERSION || p == Q3BSPVERSION_LIVE || p == Q3BSPVERSION_IG)
                                {
                                        q3dheader_t *header = (q3dheader_t *)buf;
                                        lumpofs = LittleLong(header->lumps[Q3LUMP_ENTITIES].fileofs);
@@ -2216,7 +2211,7 @@ qbool GetMapList (const char *s, char *completedname, int completednamebufferlen
                        }
                        else
                                dpsnprintf(desc, sizeof(desc), "unknown%i", BuffLittleLong(buf));
-                       strlcpy(entfilename, t->filenames[i], sizeof(entfilename));
+                       dp_strlcpy(entfilename, t->filenames[i], sizeof(entfilename));
                        memcpy(entfilename + strlen(entfilename) - 4, ".ent", 5);
                        entities = (char *)FS_LoadFile(entfilename, tempmempool, true, NULL);
                        if (!entities && lumplen >= 10)
@@ -2252,7 +2247,7 @@ qbool GetMapList (const char *s, char *completedname, int completednamebufferlen
                                        if (!strcmp(keyname, "message"))
                                        {
                                                // get the message contents
-                                               strlcpy(message, com_token, sizeof(message));
+                                               dp_strlcpy(message, com_token, sizeof(message));
                                                break;
                                        }
                                }
@@ -2461,10 +2456,10 @@ static int Nicks_CompleteCountPossible(char *line, int pos, char *s, qbool isCon
                if(match < 0)
                        continue;
                //Con_Printf("Possible match: %s|%s\n", cl.scores[p].name, name);
-               strlcpy(Nicks_list[count], cl.scores[p].name, sizeof(Nicks_list[count]));
+               dp_strlcpy(Nicks_list[count], cl.scores[p].name, sizeof(Nicks_list[count]));
 
                // the sanitized list
-               strlcpy(Nicks_sanlist[count], name, sizeof(Nicks_sanlist[count]));
+               dp_strlcpy(Nicks_sanlist[count], name, sizeof(Nicks_sanlist[count]));
                if(!count)
                {
                        Nicks_matchpos = match;
@@ -2578,7 +2573,7 @@ static void Nicks_CutMatchesAlphaNumeric(int count)
        if(Nicks_strcleanlen(Nicks_sanlist[0]) < strlen(tempstr))
        {
                // if the clean sanitized one is longer than the current one, use it, it has crap chars which definitely are in there
-               strlcpy(Nicks_sanlist[0], tempstr, sizeof(Nicks_sanlist[0]));
+               dp_strlcpy(Nicks_sanlist[0], tempstr, sizeof(Nicks_sanlist[0]));
        }
 }
 
@@ -2634,7 +2629,7 @@ static void Nicks_CutMatchesNoSpaces(int count)
        if(Nicks_strcleanlen(Nicks_sanlist[0]) < strlen(tempstr))
        {
                // if the clean sanitized one is longer than the current one, use it, it has crap chars which definitely are in there
-               strlcpy(Nicks_sanlist[0], tempstr, sizeof(Nicks_sanlist[0]));
+               dp_strlcpy(Nicks_sanlist[0], tempstr, sizeof(Nicks_sanlist[0]));
        }
 }
 
@@ -2781,7 +2776,7 @@ int Con_CompleteCommandLine(cmd_state_t *cmd, qbool is_console)
        pos++;
 
        s = line + pos;
-       strlcpy(s2, line + linepos, sizeof(s2)); //save chars after cursor
+       dp_strlcpy(s2, line + linepos, sizeof(s2)); //save chars after cursor
        line[linepos] = 0; //hide them
 
        c = v = a = n = cmd_len = 0;
@@ -2791,7 +2786,8 @@ int Con_CompleteCommandLine(cmd_state_t *cmd, qbool is_console)
        space = strchr(line + 1, ' ');
        if(space && pos == (space - line) + 1)
        {
-               strlcpy(command, line + 1, min(sizeof(command), (unsigned int)(space - line)));
+               // adding 1 to line drops the leading ]
+               dp_ustr2stp(command, sizeof(command), line + 1, space - (line + 1));
 
                patterns = Cvar_VariableString(cmd->cvars, va(vabuf, sizeof(vabuf), "con_completion_%s", command), CF_CLIENT | CF_SERVER); // TODO maybe use a better place for this?
                if(patterns && !*patterns)
@@ -2808,8 +2804,8 @@ int Con_CompleteCommandLine(cmd_state_t *cmd, qbool is_console)
 
                                // and now do the actual work
                                *s = 0;
-                               strlcat(line, t, MAX_INPUTLINE);
-                               strlcat(line, s2, MAX_INPUTLINE); //add back chars after cursor
+                               dp_strlcat(line, t, MAX_INPUTLINE);
+                               dp_strlcat(line, s2, MAX_INPUTLINE); //add back chars after cursor
 
                                // and fix the cursor
                                if(linepos > (int) strlen(line))
@@ -2857,8 +2853,8 @@ int Con_CompleteCommandLine(cmd_state_t *cmd, qbool is_console)
                                                const char *slash = strrchr(s, '/');
                                                if(slash)
                                                {
-                                                       strlcpy(t, s, min(sizeof(t), (unsigned int)(slash - s + 2))); // + 2, because I want to include the slash
-                                                       strlcat(t, com_token, sizeof(t));
+                                                       dp_strlcpy(t, s, min(sizeof(t), (unsigned int)(slash - s + 2))); // + 2, because I want to include the slash
+                                                       dp_strlcat(t, com_token, sizeof(t));
                                                        search = FS_Search(t, true, true, NULL);
                                                }
                                                else
@@ -2880,8 +2876,8 @@ int Con_CompleteCommandLine(cmd_state_t *cmd, qbool is_console)
                                        const char *slash = strrchr(s, '/');
                                        if(slash)
                                        {
-                                               strlcpy(t, s, min(sizeof(t), (unsigned int)(slash - s + 2))); // + 2, because I want to include the slash
-                                               strlcat(t, "*", sizeof(t));
+                                               dp_strlcpy(t, s, min(sizeof(t), (unsigned int)(slash - s + 2))); // + 2, because I want to include the slash
+                                               dp_strlcat(t, "*", sizeof(t));
                                                search = FS_Search(t, true, true, NULL);
                                        }
                                        else
@@ -2940,7 +2936,7 @@ int Con_CompleteCommandLine(cmd_state_t *cmd, qbool is_console)
                                                // of resultbuf.strings[0]. We want to append the characters
                                                // from resultbuf.strings[0] to (not including) p as these are
                                                // the unique prefix
-                                               strlcpy(t, (resultbuf.numstrings > 0 ? resultbuf : dirbuf).strings[0], min(matchchars + 1, sizeof(t)));
+                                               dp_strlcpy(t, (resultbuf.numstrings > 0 ? resultbuf : dirbuf).strings[0], min(matchchars + 1, sizeof(t)));
                                        }
 
                                        // first move the cursor
@@ -2948,8 +2944,8 @@ int Con_CompleteCommandLine(cmd_state_t *cmd, qbool is_console)
 
                                        // and now do the actual work
                                        *s = 0;
-                                       strlcat(line, t, MAX_INPUTLINE);
-                                       strlcat(line, s2, MAX_INPUTLINE); //add back chars after cursor
+                                       dp_strlcat(line, t, MAX_INPUTLINE);
+                                       dp_strlcat(line, s2, MAX_INPUTLINE); //add back chars after cursor
 
                                        // and fix the cursor
                                        if(linepos > (int) strlen(line))
@@ -2994,7 +2990,7 @@ nicks:
        if (!(c + v + a + n))   // No possible matches
        {
                if(s2[0])
-                       strlcpy(&line[linepos], s2, linesize - linepos);
+                       dp_strlcpy(&line[linepos], s2, linesize - linepos);
                return linepos;
        }
 
@@ -3057,7 +3053,7 @@ done:
 
        // use strlcat to avoid a buffer overrun
        line[linepos] = 0;
-       strlcat(line, s2, linesize);
+       dp_strlcat(line, s2, linesize);
 
        if (!is_console)
                return linepos;
index 8ce079351f2b15d354fde1fb035001b8714e9285..10da88f0866f236122abef253d6c4b36a499ed12 100644 (file)
--- a/console.h
+++ b/console.h
@@ -46,10 +46,10 @@ void Con_Shutdown (void);
 void Con_DrawConsole (int lines);
 
 /// Prints to a chosen console target
-void Con_MaskPrint(int mask, const char *msg);
+void Con_MaskPrint(unsigned additionalmask, const char *msg);
 
 // Prints to a chosen console target
-void Con_MaskPrintf(int mask, const char *fmt, ...) DP_FUNC_PRINTF(2);
+void Con_MaskPrintf(unsigned mask, const char *fmt, ...) DP_FUNC_PRINTF(2);
 
 /// Prints to all appropriate console targets, and adds timestamps
 void Con_Print(const char *txt);
@@ -108,7 +108,7 @@ typedef struct con_lineinfo_s
 {
        char *start;
        size_t len;
-       int mask;
+       unsigned mask;
 
        /// used only by console.c
        double addtime;
@@ -149,9 +149,9 @@ void ConBuffer_DeleteLine(conbuffer_t *buf);
 void ConBuffer_DeleteLastLine(conbuffer_t *buf);
 
 /// Appends a given string as a new line to the console.
-void ConBuffer_AddLine(conbuffer_t *buf, const char *line, int len, int mask);
-int ConBuffer_FindPrevLine(conbuffer_t *buf, int mask_must, int mask_mustnot, int start);
-int ConBuffer_FindNextLine(conbuffer_t *buf, int mask_must, int mask_mustnot, int start);
+void ConBuffer_AddLine(conbuffer_t *buf, const char *line, int len, unsigned mask);
+int ConBuffer_FindPrevLine(conbuffer_t *buf, unsigned mask_must, unsigned mask_mustnot, int start);
+int ConBuffer_FindNextLine(conbuffer_t *buf, unsigned mask_must, unsigned mask_mustnot, int start);
 const char *ConBuffer_GetLine(conbuffer_t *buf, int i);
 
 #endif
index 21b70954fc9045e163faf138591ece7bc0828051..501bef0be7d15400b602c17f86308db4ec1e41c9 100644 (file)
--- a/crypto.c
+++ b/crypto.c
@@ -750,9 +750,9 @@ qbool Crypto_RetrieveHostKey(lhnetaddress_t *peeraddress, int *keyid, char *keyf
        if(keyid)
                *keyid = hk->keyid;
        if(keyfp)
-               strlcpy(keyfp, pubkeys_fp64[hk->keyid], keyfplen);
+               dp_strlcpy(keyfp, pubkeys_fp64[hk->keyid], keyfplen);
        if(idfp)
-               strlcpy(idfp, hk->idfp, idfplen);
+               dp_strlcpy(idfp, hk->idfp, idfplen);
        if(aeslevel)
                *aeslevel = hk->aeslevel;
        if(issigned)
@@ -771,10 +771,10 @@ int Crypto_RetrieveLocalKey(int keyid, char *keyfp, size_t keyfplen, char *idfp,
        if(!pubkeys[keyid])
                return -1;
        if(keyfp)
-               strlcpy(keyfp, pubkeys_fp64[keyid], keyfplen);
+               dp_strlcpy(keyfp, pubkeys_fp64[keyid], keyfplen);
        if(idfp)
                if(pubkeys_havepriv[keyid])
-                       strlcpy(idfp, pubkeys_priv_fp64[keyid], idfplen);
+                       dp_strlcpy(idfp, pubkeys_priv_fp64[keyid], idfplen);
        if(issigned)
                *issigned = pubkeys_havesig[keyid];
        return 1;
@@ -848,7 +848,7 @@ static void Crypto_BuildIdString(void)
        dpsnprintf(crypto_idstring_buf, sizeof(crypto_idstring_buf), "%d", d0_rijndael_dll ? crypto_aeslevel.integer : 0);
        for (i = 0; i < MAX_PUBKEYS; ++i)
                if (pubkeys[i])
-                       strlcat(crypto_idstring_buf, va(vabuf, sizeof(vabuf), " %s@%s%s", pubkeys_priv_fp64[i], pubkeys_havesig[i] ? "" : "~", pubkeys_fp64[i]), sizeof(crypto_idstring_buf));
+                       dp_strlcat(crypto_idstring_buf, va(vabuf, sizeof(vabuf), " %s@%s%s", pubkeys_priv_fp64[i], pubkeys_havesig[i] ? "" : "~", pubkeys_fp64[i]), sizeof(crypto_idstring_buf));
        crypto_idstring = crypto_idstring_buf;
 }
 
@@ -1141,11 +1141,11 @@ static void Crypto_KeyGen_Finished(int code, size_t length_received, unsigned ch
        {
                if(length_received >= 5 && Crypto_LittleLong((const char *) buffer) == FOURCC_D0ER)
                {
-                       Con_Printf("Error response from keygen server: %.*s\n", (int)(length_received - 5), buffer + 5);
+                       Con_Printf(CON_ERROR "Error response from keygen server: %.*s\n", (int)(length_received - 5), buffer + 5);
                }
                else
                {
-                       Con_Printf("Invalid response from keygen server:\n");
+                       Con_Printf(CON_ERROR "Invalid response from keygen server:\n");
                        Com_HexDumpToConsole(buffer, (int)length_received);
                }
                keygen_i = -1;
@@ -1292,7 +1292,7 @@ static void Crypto_KeyGen_f(cmd_state_t *cmd)
                {
                        Con_Printf("Generated private ID key_%d.d0pk (public key fingerprint: %s)\n", keygen_i, pubkeys_priv_fp64[keygen_i]);
                        pubkeys_havepriv[keygen_i] = true;
-                       strlcat(crypto_idstring_buf, va(vabuf, sizeof(vabuf), " %s@%s", pubkeys_priv_fp64[keygen_i], pubkeys_fp64[keygen_i]), sizeof(crypto_idstring_buf));
+                       dp_strlcat(crypto_idstring_buf, va(vabuf, sizeof(vabuf), " %s@%s", pubkeys_priv_fp64[keygen_i], pubkeys_fp64[keygen_i]), sizeof(crypto_idstring_buf));
                        crypto_idstring = crypto_idstring_buf;
                        Crypto_BuildChallengeAppend();
                }
@@ -1741,16 +1741,15 @@ static int Crypto_ServerParsePacket_Internal(const char *data_in, size_t len_in,
 
        if (len_in > 8 && !memcmp(string, "connect\\", 8) && d0_rijndael_dll && crypto_aeslevel.integer >= 3)
        {
-               const char *s;
                int i;
                // sorry, we have to verify the challenge here to not reflect network spam
 
-               if (!(s = InfoString_GetValue(string + 4, "challenge", infostringvalue, sizeof(infostringvalue))))
+               if (!InfoString_GetValue(string + 4, "challenge", infostringvalue, sizeof(infostringvalue)))
                        return CRYPTO_NOMATCH; // will be later accepted if encryption was set up
                // validate the challenge
                for (i = 0;i < MAX_CHALLENGES;i++)
                        if(challenges[i].time > 0)
-                               if (!LHNETADDRESS_Compare(peeraddress, &challenges[i].address) && !strcmp(challenges[i].string, s))
+                               if (!LHNETADDRESS_Compare(peeraddress, &challenges[i].address) && !strcmp(challenges[i].string, infostringvalue))
                                        break;
                // if the challenge is not recognized, drop the packet
                if (i == MAX_CHALLENGES) // challenge mismatch is silent
@@ -1762,12 +1761,11 @@ static int Crypto_ServerParsePacket_Internal(const char *data_in, size_t len_in,
        }
        else if(len_in > 5 && !memcmp(string, "d0pk\\", 5) && ((LHNETADDRESS_GetAddressType(peeraddress) == LHNETADDRESSTYPE_LOOP) || sv_public.integer > -3))
        {
-               const char *cnt, *s, *p;
+               const char *cnt, *p;
                int id;
                int clientid = -1, serverid = -1;
-               cnt = InfoString_GetValue(string + 4, "id", infostringvalue, sizeof(infostringvalue));
-               id = (cnt ? atoi(cnt) : -1);
-               cnt = InfoString_GetValue(string + 4, "cnt", infostringvalue, sizeof(infostringvalue));
+               id = (InfoString_GetValue(string + 4, "id", infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : -1);
+               cnt = (InfoString_GetValue(string + 4, "cnt", infostringvalue, sizeof(infostringvalue)) ? infostringvalue : NULL);
                if(!cnt)
                        return Crypto_SoftServerError(data_out, len_out, "missing cnt in d0pk");
                GetUntilNul(&data_in, &len_in);
@@ -1776,21 +1774,21 @@ static int Crypto_ServerParsePacket_Internal(const char *data_in, size_t len_in,
                if(!strcmp(cnt, "0"))
                {
                        int i;
-                       if (!(s = InfoString_GetValue(string + 4, "challenge", infostringvalue, sizeof(infostringvalue))))
+                       if (!InfoString_GetValue(string + 4, "challenge", infostringvalue, sizeof(infostringvalue)))
                                return Crypto_SoftServerError(data_out, len_out, "missing challenge in d0pk\\0");
                        // validate the challenge
                        for (i = 0;i < MAX_CHALLENGES;i++)
                                if(challenges[i].time > 0)
-                                       if (!LHNETADDRESS_Compare(peeraddress, &challenges[i].address) && !strcmp(challenges[i].string, s))
+                                       if (!LHNETADDRESS_Compare(peeraddress, &challenges[i].address) && !strcmp(challenges[i].string, infostringvalue))
                                                break;
                        // if the challenge is not recognized, drop the packet
                        if (i == MAX_CHALLENGES)
                                return Crypto_SoftServerError(data_out, len_out, "invalid challenge in d0pk\\0");
 
-                       if (!(s = InfoString_GetValue(string + 4, "aeslevel", infostringvalue, sizeof(infostringvalue))))
+                       if (!InfoString_GetValue(string + 4, "aeslevel", infostringvalue, sizeof(infostringvalue)))
                                aeslevel = 0; // not supported
                        else
-                               aeslevel = bound(0, atoi(s), 3);
+                               aeslevel = bound(0, atoi(infostringvalue), 3);
                        switch(bound(0, d0_rijndael_dll ? crypto_aeslevel.integer : 0, 3))
                        {
                                default: // dummy, never happens, but to make gcc happy...
@@ -1858,8 +1856,8 @@ static int Crypto_ServerParsePacket_Internal(const char *data_in, size_t len_in,
                        if(CDATA->s >= 0)
                        {
                                // I am the server, and my key is ok... so let's set server_keyfp and server_idfp
-                               strlcpy(crypto->server_keyfp, pubkeys_fp64[CDATA->s], sizeof(crypto->server_keyfp));
-                               strlcpy(crypto->server_idfp, pubkeys_priv_fp64[CDATA->s], sizeof(crypto->server_idfp));
+                               dp_strlcpy(crypto->server_keyfp, pubkeys_fp64[CDATA->s], sizeof(crypto->server_keyfp));
+                               dp_strlcpy(crypto->server_idfp, pubkeys_priv_fp64[CDATA->s], sizeof(crypto->server_idfp));
                                crypto->server_issigned = pubkeys_havesig[CDATA->s];
 
                                if(!CDATA->id)
@@ -2001,7 +1999,7 @@ static int Crypto_ServerParsePacket_Internal(const char *data_in, size_t len_in,
                                CLEAR_CDATA;
                                return Crypto_ServerError(data_out, len_out, "d0_blind_id_authenticate_with_private_id_verify failed (authentication error)", "Authentication error");
                        }
-                       strlcpy(crypto->client_keyfp, pubkeys_fp64[CDATA->c], sizeof(crypto->client_keyfp));
+                       dp_strlcpy(crypto->client_keyfp, pubkeys_fp64[CDATA->c], sizeof(crypto->client_keyfp));
                        crypto->client_issigned = status;
 
                        memset(crypto->client_idfp, 0, sizeof(crypto->client_idfp));
@@ -2048,7 +2046,7 @@ int Crypto_ServerParsePacket(const char *data_in, size_t len_in, char *data_out,
                if(len_in > 5 && !memcmp(data_in, "d0pk\\", 5))
                {
                        do_time = true;
-                       cnt = InfoString_GetValue(data_in + 4, "cnt", infostringvalue, sizeof(infostringvalue));
+                       cnt = (InfoString_GetValue(data_in + 4, "cnt", infostringvalue, sizeof(infostringvalue)) ? infostringvalue : NULL);
                        if(cnt)
                                if(!strcmp(cnt, "0"))
                                        do_reject = true;
@@ -2106,11 +2104,10 @@ static int Crypto_SoftClientError(char *data_out, size_t *len_out, const char *m
        return CRYPTO_DISCARD;
 }
 
-int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out, size_t *len_out, lhnetaddress_t *peeraddress)
+int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out, size_t *len_out, lhnetaddress_t *peeraddress, const char *peeraddressstring)
 {
        crypto_t *crypto = &cls.crypto;
        const char *string = data_in;
-       const char *s;
        D0_BOOL aes;
        char *data_out_p = data_out;
        D0_BOOL status;
@@ -2173,9 +2170,8 @@ int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out,
        }
        else if (len_in >= 13 && !memcmp(string, "infoResponse\x0A", 13))
        {
-               s = InfoString_GetValue(string + 13, "d0_blind_id", infostringvalue, sizeof(infostringvalue));
-               if(s)
-                       Crypto_StoreHostKey(peeraddress, s, true);
+               if(InfoString_GetValue(string + 13, "d0_blind_id", infostringvalue, sizeof(infostringvalue)))
+                       Crypto_StoreHostKey(peeraddress, infostringvalue, true);
                return CRYPTO_NOMATCH;
        }
        else if (len_in >= 15 && !memcmp(string, "statusResponse\x0A", 15))
@@ -2188,9 +2184,8 @@ int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out,
                        save = *p;
                        * (char *) p = 0; // cut off the string there
                }
-               s = InfoString_GetValue(string + 15, "d0_blind_id", infostringvalue, sizeof(infostringvalue));
-               if(s)
-                       Crypto_StoreHostKey(peeraddress, s, true);
+               if(InfoString_GetValue(string + 15, "d0_blind_id", infostringvalue, sizeof(infostringvalue)))
+                       Crypto_StoreHostKey(peeraddress, infostringvalue, true);
                if(p)
                {
                        * (char *) p = save;
@@ -2214,7 +2209,12 @@ int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out,
 
                // Must check the source IP here, if we want to prevent other servers' replies from falsely advancing the crypto state, preventing successful connect to the real server.
                if (net_sourceaddresscheck.integer && LHNETADDRESS_Compare(peeraddress, &cls.connect_address))
-                       return Crypto_SoftClientError(data_out, len_out, "challenge message from wrong server");
+               {
+                       char warn_msg[128];
+
+                       dpsnprintf(warn_msg, sizeof(warn_msg), "ignoring challenge message from wrong server %s", peeraddressstring);
+                       return Crypto_SoftClientError(data_out, len_out, warn_msg);
+               }
 
                // if we have a stored host key for the server, assume serverid to already be selected!
                // (the loop will refuse to overwrite this one then)
@@ -2319,7 +2319,7 @@ int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out,
                        CDATA->s = serverid;
                        CDATA->c = clientid;
                        memset(crypto->dhkey, 0, sizeof(crypto->dhkey));
-                       strlcpy(CDATA->challenge, challenge, sizeof(CDATA->challenge));
+                       dp_strlcpy(CDATA->challenge, challenge, sizeof(CDATA->challenge));
                        crypto->client_keyfp[0] = 0;
                        crypto->client_idfp[0] = 0;
                        crypto->server_keyfp[0] = 0;
@@ -2358,8 +2358,8 @@ int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out,
                        if(clientid >= 0)
                        {
                                // I am the client, and my key is ok... so let's set client_keyfp and client_idfp
-                               strlcpy(crypto->client_keyfp, pubkeys_fp64[CDATA->c], sizeof(crypto->client_keyfp));
-                               strlcpy(crypto->client_idfp, pubkeys_priv_fp64[CDATA->c], sizeof(crypto->client_idfp));
+                               dp_strlcpy(crypto->client_keyfp, pubkeys_fp64[CDATA->c], sizeof(crypto->client_keyfp));
+                               dp_strlcpy(crypto->client_idfp, pubkeys_priv_fp64[CDATA->c], sizeof(crypto->client_idfp));
                                crypto->client_issigned = pubkeys_havesig[CDATA->c];
                        }
 
@@ -2422,11 +2422,15 @@ int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out,
 
                // Must check the source IP here, if we want to prevent other servers' replies from falsely advancing the crypto state, preventing successful connect to the real server.
                if (net_sourceaddresscheck.integer && LHNETADDRESS_Compare(peeraddress, &cls.connect_address))
-                       return Crypto_SoftClientError(data_out, len_out, "d0pk\\ message from wrong server");
+               {
+                       char warn_msg[128];
+
+                       dpsnprintf(warn_msg, sizeof(warn_msg), "ignoring d0pk\\ message from wrong server %s", peeraddressstring);
+                       return Crypto_SoftClientError(data_out, len_out, warn_msg);
+               }
 
-               cnt = InfoString_GetValue(string + 4, "id", infostringvalue, sizeof(infostringvalue));
-               id = (cnt ? atoi(cnt) : -1);
-               cnt = InfoString_GetValue(string + 4, "cnt", infostringvalue, sizeof(infostringvalue));
+               id = (InfoString_GetValue(string + 4, "id", infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : -1);
+               cnt = (InfoString_GetValue(string + 4, "cnt", infostringvalue, sizeof(infostringvalue)) ? infostringvalue : NULL);
                if(!cnt)
                        return Crypto_ClientError(data_out, len_out, "d0pk\\ message without cnt");
                GetUntilNul(&data_in, &len_in);
@@ -2443,8 +2447,8 @@ int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out,
 
                        cls.connect_nextsendtime = max(cls.connect_nextsendtime, host.realtime + 1); // prevent "hammering"
 
-                       if((s = InfoString_GetValue(string + 4, "aes", infostringvalue, sizeof(infostringvalue))))
-                               aes = atoi(s);
+                       if(InfoString_GetValue(string + 4, "aes", infostringvalue, sizeof(infostringvalue)))
+                               aes = atoi(infostringvalue);
                        else
                                aes = false;
                        // we CANNOT toggle the AES status any more!
@@ -2498,7 +2502,7 @@ int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out,
                                return Crypto_ClientError(data_out, len_out, "d0_blind_id_authenticate_with_private_id_verify failed (server authentication error)");
                        }
 
-                       strlcpy(crypto->server_keyfp, pubkeys_fp64[CDATA->s], sizeof(crypto->server_keyfp));
+                       dp_strlcpy(crypto->server_keyfp, pubkeys_fp64[CDATA->s], sizeof(crypto->server_keyfp));
                        if (!status && CDATA->wantserver_issigned)
                        {
                                CLEAR_CDATA;
@@ -2576,8 +2580,8 @@ int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out,
 
                        if(CDATA->s < 0) // only if server didn't auth
                        {
-                               if((s = InfoString_GetValue(string + 4, "aes", infostringvalue, sizeof(infostringvalue))))
-                                       aes = atoi(s);
+                               if(InfoString_GetValue(string + 4, "aes", infostringvalue, sizeof(infostringvalue)))
+                                       aes = atoi(infostringvalue);
                                else
                                        aes = false;
                                if(CDATA->wantserver_idfp[0]) // if we know a host key, honor its encryption setting
index 306134de96eeb2bb1c743e9cdd50dac05b72b0ea..bbb4ea1fa4526513eca80f838c18070df625b35b 100644 (file)
--- a/crypto.h
+++ b/crypto.h
@@ -65,8 +65,8 @@ const void *Crypto_DecryptPacket(crypto_t *crypto, const void *data_src, size_t
 #define CRYPTO_MATCH 1          // process as usual (packet was used)
 #define CRYPTO_DISCARD 2        // discard this packet
 #define CRYPTO_REPLACE 3        // make the buffer the current packet
-int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out, size_t *len_out, struct lhnetaddress_s *peeraddress);
-int Crypto_ServerParsePacket(const char *data_in, size_t len_in, char *data_out, size_t *len_out, struct lhnetaddress_s *peeraddress);
+int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out, size_t *len_out, lhnetaddress_t *peeraddress, const char *peeraddressstring);
+int Crypto_ServerParsePacket(const char *data_in, size_t len_in, char *data_out, size_t *len_out, lhnetaddress_t *peeraddress);
 
 // if len_out is nonzero, the packet is to be sent to the client
 
index 4bacb5632e8a595d00d98ed5962766a128b7a67a..d9d8630ac3a08cb69d160179646be9aac9a2fa06 100644 (file)
--- a/csprogs.c
+++ b/csprogs.c
@@ -32,30 +32,34 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 //[515]: omg !!! optimize it ! a lot of hacks here and there also :P
 
 #define CSQC_RETURNVAL prog->globals.fp[OFS_RETURN]
-#define CSQC_BEGIN
-#define CSQC_END
 
 void CL_VM_PreventInformationLeaks(void)
 {
        prvm_prog_t *prog = CLVM_prog;
-       if(!cl.csqc_loaded)
+
+       if(!prog->loaded)
                return;
-CSQC_BEGIN
+
        VM_ClearTraceGlobals(prog);
        PRVM_clientglobalfloat(trace_networkentity) = 0;
-CSQC_END
 }
 
-//[515]: these are required funcs
-static const char *cl_required_func[] =
-{
-       "CSQC_Init",
-       "CSQC_InputEvent",
-       "CSQC_UpdateView",
-       "CSQC_ConsoleCommand",
-};
 
-static int cl_numrequiredfunc = sizeof(cl_required_func) / sizeof(char*);
+/** Previous DP versions declined to load csprogs if it lacked any of:
+ * CSQC_Init, CSQC_InputEvent, CSQC_UpdateView, CSQC_ConsoleCommand
+ * whereas in FTE and QSS-based engines the minimum is either CSQC_UpdateView
+ * or CSQC_DrawHud (only called in CSQC_SIMPLE aka hud-only mode)
+ * and the other funcs are optional, so we now behave the same here.
+ */
+static void CL_CheckRequiredFuncs(prvm_prog_t *prog, const char *filename)
+{
+       if (PRVM_ED_FindFunction(prog, "CSQC_UpdateView"))
+               return;
+       else if (PRVM_ED_FindFunction(prog, "CSQC_DrawHud"))
+               prog->flag |= PRVM_CSQC_SIMPLE;
+       else
+               prog->error_cmd("%s: no CSQC_UpdateView (EXT_CSQC) or CSQC_DrawHud (CSQC_SIMPLE) function found in %s", prog->name, filename);
+}
 
 #define CL_REQFIELDS (sizeof(cl_reqfields) / sizeof(prvm_required_field_t))
 
@@ -218,26 +222,25 @@ prvm_required_field_t cl_reqglobals[] =
 void CL_VM_UpdateDmgGlobals (int dmg_take, int dmg_save, vec3_t dmg_origin)
 {
        prvm_prog_t *prog = CLVM_prog;
-       if(cl.csqc_loaded)
+
+       if(prog->loaded)
        {
-               CSQC_BEGIN
                PRVM_clientglobalfloat(dmg_take) = dmg_take;
                PRVM_clientglobalfloat(dmg_save) = dmg_save;
                VectorCopy(dmg_origin, PRVM_clientglobalvector(dmg_origin));
-               CSQC_END
        }
 }
 
 void CSQC_UpdateNetworkTimes(double newtime, double oldtime)
 {
        prvm_prog_t *prog = CLVM_prog;
-       if(!cl.csqc_loaded)
+
+       if(!prog->loaded)
                return;
-       CSQC_BEGIN
+
        PRVM_clientglobalfloat(servertime) = newtime;
        PRVM_clientglobalfloat(serverprevtime) = oldtime;
        PRVM_clientglobalfloat(serverdeltatime) = newtime - oldtime;
-       CSQC_END
 }
 
 //[515]: set globals before calling R_UpdateView, WEIRD CRAP
@@ -245,37 +248,36 @@ static void CSQC_SetGlobals (double frametime)
 {
        vec3_t pmove_org;
        prvm_prog_t *prog = CLVM_prog;
-       CSQC_BEGIN
-               PRVM_clientglobalfloat(time) = cl.time;
-               PRVM_clientglobalfloat(cltime) = host.realtime; // Spike named it that way.
-               PRVM_clientglobalfloat(frametime) = frametime;
-               PRVM_clientglobalfloat(servercommandframe) = cls.servermovesequence;
-               PRVM_clientglobalfloat(clientcommandframe) = cl.movecmd[0].sequence;
-               VectorCopy(cl.viewangles, PRVM_clientglobalvector(input_angles));
-               // // FIXME: this actually belongs into getinputstate().. [12/17/2007 Black]
-               PRVM_clientglobalfloat(input_buttons) = cl.movecmd[0].buttons;
-               VectorSet(PRVM_clientglobalvector(input_movevalues), cl.movecmd[0].forwardmove, cl.movecmd[0].sidemove, cl.movecmd[0].upmove);
-               VectorCopy(cl.csqc_vieworiginfromengine, cl.csqc_vieworigin);
-               VectorCopy(cl.csqc_viewanglesfromengine, cl.csqc_viewangles);
-
-               // LadyHavoc: Spike says not to do this, but without pmove_org the
-               // CSQC is useless as it can't alter the view origin without
-               // completely replacing it
-               Matrix4x4_OriginFromMatrix(&cl.entities[cl.viewentity].render.matrix, pmove_org);
-               VectorCopy(pmove_org, PRVM_clientglobalvector(pmove_org));
-               VectorCopy(cl.movement_velocity, PRVM_clientglobalvector(pmove_vel));
-               PRVM_clientglobalfloat(pmove_onground) = cl.onground;
-               PRVM_clientglobalfloat(pmove_inwater) = cl.inwater;
-
-               VectorCopy(cl.viewangles, PRVM_clientglobalvector(view_angles));
-               VectorCopy(cl.punchangle, PRVM_clientglobalvector(view_punchangle));
-               VectorCopy(cl.punchvector, PRVM_clientglobalvector(view_punchvector));
-               PRVM_clientglobalfloat(maxclients) = cl.maxclients;
-
-               PRVM_clientglobalfloat(player_localentnum) = cl.viewentity;
-
-               CSQC_R_RecalcView();
-       CSQC_END
+
+       PRVM_clientglobalfloat(time) = cl.time;
+       PRVM_clientglobalfloat(cltime) = host.realtime; // Spike named it that way.
+       PRVM_clientglobalfloat(frametime) = frametime;
+       PRVM_clientglobalfloat(servercommandframe) = cls.servermovesequence;
+       PRVM_clientglobalfloat(clientcommandframe) = cl.movecmd[0].sequence;
+       VectorCopy(cl.viewangles, PRVM_clientglobalvector(input_angles));
+       // // FIXME: this actually belongs into getinputstate().. [12/17/2007 Black]
+       PRVM_clientglobalfloat(input_buttons) = cl.movecmd[0].buttons;
+       VectorSet(PRVM_clientglobalvector(input_movevalues), cl.movecmd[0].forwardmove, cl.movecmd[0].sidemove, cl.movecmd[0].upmove);
+       VectorCopy(cl.csqc_vieworiginfromengine, cl.csqc_vieworigin);
+       VectorCopy(cl.csqc_viewanglesfromengine, cl.csqc_viewangles);
+
+       // LadyHavoc: Spike says not to do this, but without pmove_org the
+       // CSQC is useless as it can't alter the view origin without
+       // completely replacing it
+       Matrix4x4_OriginFromMatrix(&cl.entities[cl.viewentity].render.matrix, pmove_org);
+       VectorCopy(pmove_org, PRVM_clientglobalvector(pmove_org));
+       VectorCopy(cl.movement_velocity, PRVM_clientglobalvector(pmove_vel));
+       PRVM_clientglobalfloat(pmove_onground) = cl.onground;
+       PRVM_clientglobalfloat(pmove_inwater) = cl.inwater;
+
+       VectorCopy(cl.viewangles, PRVM_clientglobalvector(view_angles));
+       VectorCopy(cl.punchangle, PRVM_clientglobalvector(view_punchangle));
+       VectorCopy(cl.punchvector, PRVM_clientglobalvector(view_punchvector));
+       PRVM_clientglobalfloat(maxclients) = cl.maxclients;
+
+       PRVM_clientglobalfloat(player_localentnum) = cl.viewentity;
+
+       CSQC_R_RecalcView();
 }
 
 void CSQC_Predraw (prvm_edict_t *ed)
@@ -459,10 +461,9 @@ qbool CL_VM_InputEvent (int eventtype, float x, float y)
        prvm_prog_t *prog = CLVM_prog;
        qbool r;
 
-       if(!cl.csqc_loaded)
+       if(!prog->loaded)
                return false;
 
-CSQC_BEGIN
        if (!PRVM_clientfunction(CSQC_InputEvent))
                r = false;
        else
@@ -475,7 +476,6 @@ CSQC_BEGIN
                prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_InputEvent), "QC function CSQC_InputEvent is missing");
                r = CSQC_RETURNVAL != 0;
        }
-CSQC_END
        return r;
 }
 
@@ -489,60 +489,94 @@ qbool CL_VM_UpdateView (double frametime)
        emptyvector[1] = 0;
        emptyvector[2] = 0;
 //     vec3_t oldangles;
-       if(!cl.csqc_loaded)
+
+       if(!prog->loaded)
                return false;
+
        R_TimeReport("pre-UpdateView");
-       CSQC_BEGIN
-               csqc_original_r_refdef_view = r_refdef.view;
-               csqc_main_r_refdef_view = r_refdef.view;
-               //VectorCopy(cl.viewangles, oldangles);
-               PRVM_clientglobalfloat(time) = cl.time;
-               PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[cl.playerentity];
-               CSQC_SetGlobals(frametime);
-               // clear renderable entity and light lists to prevent crashes if the
-               // CSQC_UpdateView function does not call R_ClearScene as it should
-               r_refdef.scene.numentities = 0;
-               r_refdef.scene.numlights = 0;
-               // polygonbegin without draw2d arg has to guess
-               prog->polygonbegin_guess2d = false;
-               // free memory for resources that are no longer referenced
-               PRVM_GarbageCollection(prog);
-               // pass in width and height and menu/focus state as parameters (EXT_CSQC_1)
-               PRVM_G_FLOAT(OFS_PARM0) = vid.width;
-               PRVM_G_FLOAT(OFS_PARM1) = vid.height;
-               /*
-                * This should be fine for now but FTEQW uses flags for keydest
-                * and checks that an array called "eyeoffset" is 0
-                * 
-                * Just a note in case there's compatibility problems later
-                */
-               PRVM_G_FLOAT(OFS_PARM2) = key_dest == key_game;
-               prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_UpdateView), "QC function CSQC_UpdateView is missing");
-               //VectorCopy(oldangles, cl.viewangles);
-               // Dresk : Reset Dmg Globals Here
-               CL_VM_UpdateDmgGlobals(0, 0, emptyvector);
-               r_refdef.view = csqc_main_r_refdef_view;
-               R_RenderView_UpdateViewVectors(); // we have to do this, as we undid the scene render doing this for us
-       CSQC_END
+
+       csqc_original_r_refdef_view = r_refdef.view;
+       csqc_main_r_refdef_view = r_refdef.view;
+       //VectorCopy(cl.viewangles, oldangles);
+       PRVM_clientglobalfloat(time) = cl.time;
+       PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[cl.playerentity];
+       CSQC_SetGlobals(frametime);
+       // clear renderable entity and light lists to prevent crashes if the
+       // CSQC_UpdateView function does not call R_ClearScene as it should
+       r_refdef.scene.numentities = 0;
+       r_refdef.scene.numlights = 0;
+       // polygonbegin without draw2d arg has to guess
+       prog->polygonbegin_guess2d = false;
+       // free memory for resources that are no longer referenced
+       PRVM_GarbageCollection(prog);
+       // pass in width and height and menu/focus state as parameters (EXT_CSQC_1)
+       PRVM_G_FLOAT(OFS_PARM0) = vid.width;
+       PRVM_G_FLOAT(OFS_PARM1) = vid.height;
+       /*
+        * This should be fine for now but FTEQW uses flags for keydest
+        * and checks that an array called "eyeoffset" is 0
+        *
+        * Just a note in case there's compatibility problems later
+        */
+       PRVM_G_FLOAT(OFS_PARM2) = key_dest == key_game;
+       prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_UpdateView), "QC function CSQC_UpdateView is missing");
+       //VectorCopy(oldangles, cl.viewangles);
+       // Dresk : Reset Dmg Globals Here
+       CL_VM_UpdateDmgGlobals(0, 0, emptyvector);
+       r_refdef.view = csqc_main_r_refdef_view;
+       R_RenderView_UpdateViewVectors(); // we have to do this, as we undid the scene render doing this for us
 
        R_TimeReport("UpdateView");
        return true;
 }
 
-qbool CL_VM_ConsoleCommand (const char *text)
+void CL_VM_DrawHud(double frametime)
 {
        prvm_prog_t *prog = CLVM_prog;
-       return PRVM_ConsoleCommand(prog, text, &prog->funcoffsets.CSQC_ConsoleCommand, false, cl.csqc_server2csqcentitynumber[cl.playerentity], cl.time, cl.csqc_loaded, "QC function CSQC_ConsoleCommand is missing");
+
+       R_TimeReport("pre-DrawHud");
+
+       PRVM_clientglobalfloat(time) = cl.time;
+       PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[cl.playerentity];
+       CSQC_SetGlobals(frametime);
+
+       PRVM_GarbageCollection(prog);
+
+       // width and height parameters are virtual in CSQC_SIMPLE engines
+       VectorSet(PRVM_G_VECTOR(OFS_PARM0), vid_conwidth.integer, vid_conheight.integer, 0);
+       PRVM_G_FLOAT(OFS_PARM1) = sb_showscores;
+       prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_DrawHud), "QC function CSQC_DrawHud is missing");
+
+       if (PRVM_clientfunction(CSQC_DrawScores))
+       {
+               VectorSet(PRVM_G_VECTOR(OFS_PARM0), vid_conwidth.integer, vid_conheight.integer, 0);
+               PRVM_G_FLOAT(OFS_PARM1) = sb_showscores;
+               if (key_dest != key_menu)
+                       prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_DrawScores), "QC function CSQC_DrawScores is missing");
+       }
+       else if (sb_showscores || (cl.stats[STAT_HEALTH] <= 0 && cl_deathscoreboard.integer))
+               if (!cl.islocalgame) // LadyHavoc: changed to draw the deathmatch overlays in any multiplayer mode
+                       Sbar_DeathmatchOverlay ();
+
+       R_TimeReport("DrawHud");
+}
+
+
+qbool CL_VM_ConsoleCommand(const char *text, size_t textlen)
+{
+       prvm_prog_t *prog = CLVM_prog;
+       return PRVM_ConsoleCommand(prog, text, textlen, &prog->funcoffsets.CSQC_ConsoleCommand, false, cl.csqc_server2csqcentitynumber[cl.playerentity], cl.time, "QC function CSQC_ConsoleCommand is missing");
 }
 
 qbool CL_VM_Parse_TempEntity (void)
 {
        prvm_prog_t *prog = CLVM_prog;
-       int                     t;
-       qbool   r = false;
-       if(!cl.csqc_loaded)
+       int t;
+       qbool r = false;
+
+       if(!prog->loaded)
                return false;
-       CSQC_BEGIN
+
        if(PRVM_clientfunction(CSQC_Parse_TempEntity))
        {
                t = cl_message.readcount;
@@ -556,14 +590,14 @@ qbool CL_VM_Parse_TempEntity (void)
                        cl_message.badread = false;
                }
        }
-       CSQC_END
        return r;
 }
 
-void CL_VM_Parse_StuffCmd (const char *msg)
+void CL_VM_Parse_StuffCmd(const char *msg, size_t msg_len)
 {
        prvm_prog_t *prog = CLVM_prog;
        int restorevm_tempstringsbuf_cursize;
+
        if(msg[0] == 'c')
        if(msg[1] == 's')
        if(msg[2] == 'q')
@@ -575,164 +609,121 @@ void CL_VM_Parse_StuffCmd (const char *msg)
                int crcflags = csqc_progcrc.flags;
                csqc_progcrc.flags &= ~CF_READONLY;
                csqc_progsize.flags &= ~CF_READONLY;
-               Cmd_ExecuteString(cmd_local, msg, src_local, true);
+               Cmd_ExecuteString(cmd_local, msg, msg_len, src_local, true);
                csqc_progcrc.flags = csqc_progsize.flags = crcflags;
                return;
        }
 
-       if(cls.demoplayback)
-       if(!strncmp(msg, "curl --clear_autodownload\ncurl --pak --forthismap --as ", 55))
-       {
-               // special handling for map download commands
-               // run these commands IMMEDIATELY, instead of waiting for a client frame
-               // that way, there is no black screen when playing back demos
-               // I know this is a really ugly hack, but I can't think of any better way
-               // FIXME find the actual CAUSE of this, and make demo playback WAIT
-               // until all maps are loaded, then remove this hack
-
-               char buf[MAX_INPUTLINE];
-               const char *p, *q;
-               size_t l;
-
-               p = msg;
-
-               for(;;)
-               {
-                       q = strchr(p, '\n');
-                       if(q)
-                               l = q - p;
-                       else
-                               l = strlen(p);
-                       if(l > sizeof(buf) - 1)
-                               l = sizeof(buf) - 1;
-                       strlcpy(buf, p, l + 1); // strlcpy needs a + 1 as it includes the newline!
-
-                       Cmd_ExecuteString(cmd_local, buf, src_local, true);
-
-                       p += l;
-                       if(*p == '\n')
-                               ++p; // skip the newline and continue
-                       else
-                               break; // end of string or overflow
-               }
-               Cmd_ExecuteString(cmd_local, "curl --clear_autodownload", src_local, true); // don't inhibit CSQC loading
-               return;
-       }
-
-       if(!cl.csqc_loaded)
+       if(!prog->loaded)
        {
                Cbuf_AddText(cmd_local, msg);
                return;
        }
-       CSQC_BEGIN
+
        if(PRVM_clientfunction(CSQC_Parse_StuffCmd))
        {
                PRVM_clientglobalfloat(time) = cl.time;
                PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[cl.playerentity];
                restorevm_tempstringsbuf_cursize = prog->tempstringsbuf.cursize;
-               PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, msg);
+               PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, msg, msg_len);
                prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Parse_StuffCmd), "QC function CSQC_Parse_StuffCmd is missing");
                prog->tempstringsbuf.cursize = restorevm_tempstringsbuf_cursize;
        }
        else
                Cbuf_AddText(cmd_local, msg);
-       CSQC_END
 }
 
-static void CL_VM_Parse_Print (const char *msg)
+static void CL_VM_Parse_Print(const char *msg, size_t msg_len)
 {
        prvm_prog_t *prog = CLVM_prog;
        int restorevm_tempstringsbuf_cursize;
        PRVM_clientglobalfloat(time) = cl.time;
        PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[cl.playerentity];
        restorevm_tempstringsbuf_cursize = prog->tempstringsbuf.cursize;
-       PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, msg);
+       PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, msg, msg_len);
        prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Parse_Print), "QC function CSQC_Parse_Print is missing");
        prog->tempstringsbuf.cursize = restorevm_tempstringsbuf_cursize;
 }
 
-void CSQC_AddPrintText (const char *msg)
+void CSQC_AddPrintText(const char *msg, size_t msg_len)
 {
        prvm_prog_t *prog = CLVM_prog;
-       size_t i;
-       CSQC_BEGIN
-       if(cl.csqc_loaded && PRVM_clientfunction(CSQC_Parse_Print))
+       char *start = cl.csqc_printtextbuf + cl.csqc_printtextbuf_len;
+       size_t writebytes = min(msg_len + 1, MAX_INPUTLINE - cl.csqc_printtextbuf_len);
+
+       if(prog->loaded && PRVM_clientfunction(CSQC_Parse_Print))
        {
-               // FIXME: is this bugged?
-               i = strlen(msg)-1;
-               if(msg[i] != '\n' && msg[i] != '\r')
+               if(msg[msg_len - 1] != '\n' && msg[msg_len - 1] != '\r')
                {
-                       if(strlen(cl.csqc_printtextbuf)+i >= MAX_INPUTLINE)
+                       if(cl.csqc_printtextbuf_len + msg_len + 1 >= MAX_INPUTLINE)
                        {
-                               CL_VM_Parse_Print(cl.csqc_printtextbuf);
-                               cl.csqc_printtextbuf[0] = 0;
+                               CL_VM_Parse_Print(cl.csqc_printtextbuf, cl.csqc_printtextbuf_len);
+                               cl.csqc_printtextbuf[0] = '\0';
+                               cl.csqc_printtextbuf_len = 0;
                        }
                        else
-                               strlcat(cl.csqc_printtextbuf, msg, MAX_INPUTLINE);
+                       {
+                               memcpy(start, msg, writebytes);
+                               cl.csqc_printtextbuf_len += msg_len;
+                       }
                        return;
                }
-               strlcat(cl.csqc_printtextbuf, msg, MAX_INPUTLINE);
-               CL_VM_Parse_Print(cl.csqc_printtextbuf);
-               cl.csqc_printtextbuf[0] = 0;
+               memcpy(start, msg, writebytes);
+               cl.csqc_printtextbuf_len += msg_len;
+               CL_VM_Parse_Print(cl.csqc_printtextbuf, cl.csqc_printtextbuf_len);
+               cl.csqc_printtextbuf[0] = '\0';
+               cl.csqc_printtextbuf_len = 0;
        }
        else
                Con_Print(msg);
-       CSQC_END
 }
 
-void CL_VM_Parse_CenterPrint (const char *msg)
+void CL_VM_Parse_CenterPrint(const char *msg, size_t msg_len)
 {
        prvm_prog_t *prog = CLVM_prog;
        int restorevm_tempstringsbuf_cursize;
-       CSQC_BEGIN
-       if(cl.csqc_loaded && PRVM_clientfunction(CSQC_Parse_CenterPrint))
+
+       if(prog->loaded && PRVM_clientfunction(CSQC_Parse_CenterPrint))
        {
                PRVM_clientglobalfloat(time) = cl.time;
                PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[cl.playerentity];
                restorevm_tempstringsbuf_cursize = prog->tempstringsbuf.cursize;
-               PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, msg);
+               PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, msg, msg_len);
                prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Parse_CenterPrint), "QC function CSQC_Parse_CenterPrint is missing");
                prog->tempstringsbuf.cursize = restorevm_tempstringsbuf_cursize;
        }
        else
                SCR_CenterPrint(msg);
-       CSQC_END
 }
 
 void CL_VM_UpdateIntermissionState (int intermission)
 {
        prvm_prog_t *prog = CLVM_prog;
-       if(cl.csqc_loaded)
-       {
-               CSQC_BEGIN
+
+       if(prog->loaded)
                PRVM_clientglobalfloat(intermission) = intermission;
-               CSQC_END
-       }
 }
 void CL_VM_UpdateShowingScoresState (int showingscores)
 {
        prvm_prog_t *prog = CLVM_prog;
-       if(cl.csqc_loaded)
-       {
-               CSQC_BEGIN
+
+       if(prog->loaded)
                PRVM_clientglobalfloat(sb_showscores) = showingscores;
-               CSQC_END
-       }
 }
 qbool CL_VM_Event_Sound(int sound_num, float fvolume, int channel, float attenuation, int ent, vec3_t pos, int flags, float speed)
 {
        prvm_prog_t *prog = CLVM_prog;
        qbool r = false;
-       if(cl.csqc_loaded)
+
+       if(prog->loaded)
        {
-               CSQC_BEGIN
                if(PRVM_clientfunction(CSQC_Event_Sound))
                {
                        PRVM_clientglobalfloat(time) = cl.time;
                        PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[cl.playerentity];
                        PRVM_G_FLOAT(OFS_PARM0) = ent;
                        PRVM_G_FLOAT(OFS_PARM1) = CHAN_ENGINE2USER(channel);
-                       PRVM_G_INT(OFS_PARM2) = PRVM_SetTempString(prog, cl.sound_name[sound_num] );
+                       PRVM_G_INT(OFS_PARM2) = PRVM_SetTempString(prog, cl.sound_name[sound_num], strlen(cl.sound_name[sound_num]));
                        PRVM_G_FLOAT(OFS_PARM3) = fvolume;
                        PRVM_G_FLOAT(OFS_PARM4) = attenuation;
                        VectorCopy(pos, PRVM_G_VECTOR(OFS_PARM5) );
@@ -741,7 +732,6 @@ qbool CL_VM_Event_Sound(int sound_num, float fvolume, int channel, float attenua
                        prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Event_Sound), "QC function CSQC_Event_Sound is missing");
                        r = CSQC_RETURNVAL != 0;
                }
-               CSQC_END
        }
 
        return r;
@@ -753,15 +743,14 @@ static void CL_VM_UpdateCoopDeathmatchGlobals (int gametype)
        int localcoop;
        int localdeathmatch;
 
-       if(cl.csqc_loaded)
+       if(prog->loaded)
        {
                if(gametype == GAME_COOP)
                {
                        localcoop = 1;
                        localdeathmatch = 0;
                }
-               else
-               if(gametype == GAME_DEATHMATCH)
+               else if(gametype == GAME_DEATHMATCH)
                {
                        localcoop = 0;
                        localdeathmatch = 1;
@@ -773,10 +762,8 @@ static void CL_VM_UpdateCoopDeathmatchGlobals (int gametype)
                        localcoop = 0;
                        localdeathmatch = 0;
                }
-               CSQC_BEGIN
                PRVM_clientglobalfloat(coop) = localcoop;
                PRVM_clientglobalfloat(deathmatch) = localdeathmatch;
-               CSQC_END
        }
 }
 #if 0
@@ -784,9 +771,10 @@ static float CL_VM_Event (float event)             //[515]: needed ? I'd say "YES", but don
 {
        prvm_prog_t *prog = CLVM_prog;
        float r = 0;
-       if(!cl.csqc_loaded)
+
+       if(!prog->loaded)
                return 0;
-       CSQC_BEGIN
+
        if(PRVM_clientfunction(CSQC_Event))
        {
                PRVM_clientglobalfloat(time) = cl.time;
@@ -795,7 +783,6 @@ static float CL_VM_Event (float event)              //[515]: needed ? I'd say "YES", but don
                prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Event), "QC function CSQC_Event is missing");
                r = CSQC_RETURNVAL;
        }
-       CSQC_END
        return r;
 }
 #endif
@@ -804,70 +791,69 @@ void CSQC_ReadEntities (void)
 {
        prvm_prog_t *prog = CLVM_prog;
        unsigned short entnum, oldself, realentnum;
-       if(!cl.csqc_loaded)
+
+       if(!prog->loaded)
        {
                Host_Error ("CSQC_ReadEntities: CSQC is not loaded");
                return;
        }
 
-       CSQC_BEGIN
-               PRVM_clientglobalfloat(time) = cl.time;
-               oldself = PRVM_clientglobaledict(self);
-               while(1)
+       PRVM_clientglobalfloat(time) = cl.time;
+       oldself = PRVM_clientglobaledict(self);
+       while(1)
+       {
+               entnum = MSG_ReadShort(&cl_message);
+               if(!entnum || cl_message.badread)
+                       break;
+               realentnum = entnum & 0x7FFF;
+               PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[realentnum];
+               if(entnum & 0x8000)
                {
-                       entnum = MSG_ReadShort(&cl_message);
-                       if(!entnum || cl_message.badread)
-                               break;
-                       realentnum = entnum & 0x7FFF;
-                       PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[realentnum];
-                       if(entnum & 0x8000)
+                       if(PRVM_clientglobaledict(self))
                        {
-                               if(PRVM_clientglobaledict(self))
-                               {
-                                       prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Ent_Remove), "QC function CSQC_Ent_Remove is missing");
-                                       cl.csqc_server2csqcentitynumber[realentnum] = 0;
-                               }
-                               else
-                               {
-                                       // LadyHavoc: removing an entity that is already gone on
-                                       // the csqc side is possible for legitimate reasons (such
-                                       // as a repeat of the remove message), so no warning is
-                                       // needed
-                                       //Con_Printf("Bad csqc_server2csqcentitynumber map\n"); //[515]: never happens ?
-                               }
+                               prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Ent_Remove), "QC function CSQC_Ent_Remove is missing");
+                               cl.csqc_server2csqcentitynumber[realentnum] = 0;
                        }
                        else
                        {
-                               if(!PRVM_clientglobaledict(self))
+                               // LadyHavoc: removing an entity that is already gone on
+                               // the csqc side is possible for legitimate reasons (such
+                               // as a repeat of the remove message), so no warning is
+                               // needed
+                               //Con_Printf("Bad csqc_server2csqcentitynumber map\n"); //[515]: never happens ?
+                       }
+               }
+               else
+               {
+                       if(!PRVM_clientglobaledict(self))
+                       {
+                               if(!PRVM_clientfunction(CSQC_Ent_Spawn))
                                {
-                                       if(!PRVM_clientfunction(CSQC_Ent_Spawn))
-                                       {
-                                               prvm_edict_t    *ed;
-                                               ed = PRVM_ED_Alloc(prog);
-                                               PRVM_clientedictfloat(ed, entnum) = realentnum;
-                                               PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[realentnum] = PRVM_EDICT_TO_PROG(ed);
-                                       }
-                                       else
-                                       {
-                                               // entity( float entnum ) CSQC_Ent_Spawn;
-                                               // the qc function should set entnum, too (this way it also can return world [2/1/2008 Andreas]
-                                               PRVM_G_FLOAT(OFS_PARM0) = (float) realentnum;
-                                               // make sure no one gets wrong ideas
-                                               PRVM_clientglobaledict(self) = 0;
-                                               prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Ent_Spawn), "QC function CSQC_Ent_Spawn is missing");
-                                               PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[realentnum] = PRVM_EDICT( PRVM_G_INT( OFS_RETURN ) );
-                                       }
-                                       PRVM_G_FLOAT(OFS_PARM0) = 1;
-                                       prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Ent_Update), "QC function CSQC_Ent_Update is missing");
+                                       prvm_edict_t    *ed;
+                                       ed = PRVM_ED_Alloc(prog);
+                                       PRVM_clientedictfloat(ed, entnum) = realentnum;
+                                       PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[realentnum] = PRVM_EDICT_TO_PROG(ed);
                                }
-                               else {
-                                       PRVM_G_FLOAT(OFS_PARM0) = 0;
-                                       prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Ent_Update), "QC function CSQC_Ent_Update is missing");
+                               else
+                               {
+                                       // entity( float entnum ) CSQC_Ent_Spawn;
+                                       // the qc function should set entnum, too (this way it also can return world [2/1/2008 Andreas]
+                                       PRVM_G_FLOAT(OFS_PARM0) = (float) realentnum;
+                                       // make sure no one gets wrong ideas
+                                       PRVM_clientglobaledict(self) = 0;
+                                       prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Ent_Spawn), "QC function CSQC_Ent_Spawn is missing");
+                                       PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[realentnum] = PRVM_EDICT( PRVM_G_INT( OFS_RETURN ) );
                                }
+                               PRVM_G_FLOAT(OFS_PARM0) = 1;
+                               prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Ent_Update), "QC function CSQC_Ent_Update is missing");
+                       }
+                       else {
+                               PRVM_G_FLOAT(OFS_PARM0) = 0;
+                               prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Ent_Update), "QC function CSQC_Ent_Update is missing");
                        }
                }
-               PRVM_clientglobaledict(self) = oldself;
-       CSQC_END
+       }
+       PRVM_clientglobaledict(self) = oldself;
 }
 
 static void CLVM_begin_increase_edicts(prvm_prog_t *prog)
@@ -883,7 +869,7 @@ static void CLVM_end_increase_edicts(prvm_prog_t *prog)
 
        // link every entity except world
        for (i = 1, ent = prog->edicts;i < prog->num_edicts;i++, ent++)
-               if (!ent->free && !VectorCompare(PRVM_clientedictvector(ent, absmin), PRVM_clientedictvector(ent, absmax)))
+               if (!ent->free)
                        CL_LinkEdict(ent);
 }
 
@@ -1083,7 +1069,7 @@ void CL_VM_Init (void)
        prog->error_cmd             = Host_Error;
        prog->ExecuteProgram        = CLVM_ExecuteProgram;
 
-       PRVM_Prog_Load(prog, csprogsfn, csprogsdata, csprogsdatasize, cl_numrequiredfunc, cl_required_func, CL_REQFIELDS, cl_reqfields, CL_REQGLOBALS, cl_reqglobals);
+       PRVM_Prog_Load(prog, csprogsfn, csprogsdata, csprogsdatasize, CL_CheckRequiredFuncs, CL_REQFIELDS, cl_reqfields, CL_REQGLOBALS, cl_reqglobals);
 
        if (!prog->loaded)
        {
@@ -1123,7 +1109,7 @@ void CL_VM_Init (void)
        PRVM_clientglobalfloat(time) = cl.time;
        PRVM_clientglobaledict(self) = 0;
 
-       PRVM_clientglobalstring(mapname) = PRVM_SetEngineString(prog, cl.worldname);
+       PRVM_clientglobalstring(mapname) = PRVM_SetEngineString(prog, cl.worldbasename);
        PRVM_clientglobalfloat(player_localnum) = cl.realplayerentity - 1;
        PRVM_clientglobalfloat(player_localentnum) = cl.viewentity;
 
@@ -1133,15 +1119,22 @@ void CL_VM_Init (void)
        VectorCopy(cl.world.maxs, PRVM_clientedictvector(prog->edicts, maxs));
        VectorCopy(cl.world.mins, PRVM_clientedictvector(prog->edicts, absmin));
        VectorCopy(cl.world.maxs, PRVM_clientedictvector(prog->edicts, absmax));
+       PRVM_clientedictfloat(prog->edicts, solid) = SOLID_BSP;
+       PRVM_clientedictfloat(prog->edicts, modelindex) = 1;
+       PRVM_clientedictstring(prog->edicts, model) = PRVM_SetEngineString(prog, cl.worldmodel->name);
 
-       // call the prog init
-       prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Init), "QC function CSQC_Init is missing");
+       // call the prog init if it exists
+       if (PRVM_clientfunction(CSQC_Init))
+       {
+               PRVM_G_FLOAT(OFS_PARM0) = 1.0f; // CSQC_SIMPLE engines always pass 0, FTE always passes 1
+               PRVM_G_INT(OFS_PARM1) = PRVM_SetEngineString(prog, gamename);
+               PRVM_G_FLOAT(OFS_PARM2) = 1.0f; // TODO DP versions...
+               prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Init), "QC function CSQC_Init is missing");
+       }
 
        // Once CSQC_Init was called, we consider csqc code fully initialized.
        prog->inittime = host.realtime;
 
-       cl.csqc_loaded = true;
-
        cl.csqc_vidvars.drawcrosshair = false;
        cl.csqc_vidvars.drawenginesbar = false;
 
@@ -1153,11 +1146,9 @@ void CL_VM_ShutDown (void)
 {
        prvm_prog_t *prog = CLVM_prog;
        Cmd_ClearCSQCCommands(cmd_local);
+
        //Cvar_SetValueQuick(&csqc_progcrc, -1);
        //Cvar_SetValueQuick(&csqc_progsize, -1);
-       if(!cl.csqc_loaded)
-               return;
-CSQC_BEGIN
        if (prog->loaded)
        {
                PRVM_clientglobalfloat(time) = cl.time;
@@ -1166,9 +1157,7 @@ CSQC_BEGIN
                        prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Shutdown), "QC function CSQC_Shutdown is missing");
        }
        PRVM_Prog_Reset(prog);
-CSQC_END
        Con_DPrint("CSQC ^1unloaded\n");
-       cl.csqc_loaded = false;
 }
 
 qbool CL_VM_GetEntitySoundOrigin(int entnum, vec3_t out)
@@ -1179,8 +1168,6 @@ qbool CL_VM_GetEntitySoundOrigin(int entnum, vec3_t out)
        matrix4x4_t matrix;
        qbool r = 0;
 
-       CSQC_BEGIN;
-
        ed = PRVM_EDICT_NUM(entnum - MAX_EDICTS);
 
        if(!ed->free)
@@ -1194,8 +1181,6 @@ qbool CL_VM_GetEntitySoundOrigin(int entnum, vec3_t out)
                r = 1;
        }
 
-       CSQC_END;
-
        return r;
 }
 
@@ -1207,38 +1192,36 @@ qbool CL_VM_TransformView(int entnum, matrix4x4_t *viewmatrix, mplane_t *clippla
        vec3_t forward, left, up, origin, ang;
        matrix4x4_t mat, matq;
 
-       CSQC_BEGIN
-               ed = PRVM_EDICT_NUM(entnum);
-               // camera:
-               //   camera_transform
-               if(PRVM_clientedictfunction(ed, camera_transform))
+       ed = PRVM_EDICT_NUM(entnum);
+       // camera:
+       //   camera_transform
+       if(PRVM_clientedictfunction(ed, camera_transform))
+       {
+               ret = true;
+               if(viewmatrix && clipplane && visorigin)
                {
-                       ret = true;
-                       if(viewmatrix && clipplane && visorigin)
-                       {
-                               Matrix4x4_ToVectors(viewmatrix, forward, left, up, origin);
-                               AnglesFromVectors(ang, forward, up, false);
-                               PRVM_clientglobalfloat(time) = cl.time;
-                               PRVM_clientglobaledict(self) = entnum;
-                               VectorCopy(origin, PRVM_G_VECTOR(OFS_PARM0));
-                               VectorCopy(ang, PRVM_G_VECTOR(OFS_PARM1));
-                               VectorCopy(forward, PRVM_clientglobalvector(v_forward));
-                               VectorScale(left, -1, PRVM_clientglobalvector(v_right));
-                               VectorCopy(up, PRVM_clientglobalvector(v_up));
-                               VectorCopy(origin, PRVM_clientglobalvector(trace_endpos));
-                               prog->ExecuteProgram(prog, PRVM_clientedictfunction(ed, camera_transform), "QC function e.camera_transform is missing");
-                               VectorCopy(PRVM_G_VECTOR(OFS_RETURN), origin);
-                               VectorCopy(PRVM_clientglobalvector(v_forward), forward);
-                               VectorScale(PRVM_clientglobalvector(v_right), -1, left);
-                               VectorCopy(PRVM_clientglobalvector(v_up), up);
-                               VectorCopy(PRVM_clientglobalvector(trace_endpos), visorigin);
-                               Matrix4x4_Invert_Full(&mat, viewmatrix);
-                               Matrix4x4_FromVectors(viewmatrix, forward, left, up, origin);
-                               Matrix4x4_Concat(&matq, viewmatrix, &mat);
-                               Matrix4x4_TransformPositivePlane(&matq, clipplane->normal[0], clipplane->normal[1], clipplane->normal[2], clipplane->dist, clipplane->normal_and_dist);
-                       }
+                       Matrix4x4_ToVectors(viewmatrix, forward, left, up, origin);
+                       AnglesFromVectors(ang, forward, up, false);
+                       PRVM_clientglobalfloat(time) = cl.time;
+                       PRVM_clientglobaledict(self) = entnum;
+                       VectorCopy(origin, PRVM_G_VECTOR(OFS_PARM0));
+                       VectorCopy(ang, PRVM_G_VECTOR(OFS_PARM1));
+                       VectorCopy(forward, PRVM_clientglobalvector(v_forward));
+                       VectorScale(left, -1, PRVM_clientglobalvector(v_right));
+                       VectorCopy(up, PRVM_clientglobalvector(v_up));
+                       VectorCopy(origin, PRVM_clientglobalvector(trace_endpos));
+                       prog->ExecuteProgram(prog, PRVM_clientedictfunction(ed, camera_transform), "QC function e.camera_transform is missing");
+                       VectorCopy(PRVM_G_VECTOR(OFS_RETURN), origin);
+                       VectorCopy(PRVM_clientglobalvector(v_forward), forward);
+                       VectorScale(PRVM_clientglobalvector(v_right), -1, left);
+                       VectorCopy(PRVM_clientglobalvector(v_up), up);
+                       VectorCopy(PRVM_clientglobalvector(trace_endpos), visorigin);
+                       Matrix4x4_Invert_Full(&mat, viewmatrix);
+                       Matrix4x4_FromVectors(viewmatrix, forward, left, up, origin);
+                       Matrix4x4_Concat(&matq, viewmatrix, &mat);
+                       Matrix4x4_TransformPositivePlane(&matq, clipplane->normal[0], clipplane->normal[1], clipplane->normal[2], clipplane->dist, clipplane->normal_and_dist);
                }
-       CSQC_END
+       }
 
        return ret;
 }
index 4760a7f3c68b5caae93f5840e2268cb4a81eb3c6..1900f91c3711c82805bf65fcabab4cc8cef4c5bc 100644 (file)
--- a/csprogs.h
+++ b/csprogs.h
@@ -111,20 +111,20 @@ void CL_VM_ShutDown(void);
 void CL_VM_UpdateIntermissionState(int intermission);
 void CL_VM_UpdateShowingScoresState(int showingscores);
 qbool CL_VM_InputEvent(int eventtype, float x, float y);
-qbool CL_VM_ConsoleCommand(const char *text);
+qbool CL_VM_ConsoleCommand(const char *text, size_t textlen);
 void CL_VM_UpdateDmgGlobals(int dmg_take, int dmg_save, vec3_t dmg_origin);
 void CL_VM_UpdateIntermissionState(int intermission);
 qbool CL_VM_Event_Sound(int sound_num, float volume, int channel, float attenuation, int ent, vec3_t pos, int flags, float speed);
 qbool CL_VM_Parse_TempEntity(void);
-void CL_VM_Parse_StuffCmd(const char *msg);
-void CL_VM_Parse_CenterPrint(const char *msg);
+void CL_VM_Parse_StuffCmd(const char *msg, size_t msg_len);
+void CL_VM_Parse_CenterPrint(const char *msg, size_t msg_len);
 int CL_GetPitchSign(prvm_prog_t *prog, prvm_edict_t *ent);
 int CL_GetTagMatrix(prvm_prog_t *prog, matrix4x4_t *out, prvm_edict_t *ent, int tagindex, prvm_vec_t *shadingorigin);
 void CL_GetEntityMatrix(prvm_prog_t *prog, prvm_edict_t *ent, matrix4x4_t *out, qbool viewmatrix);
 void QW_CL_StartUpload(unsigned char *data, int size);
 
 void CSQC_UpdateNetworkTimes(double newtime, double oldtime);
-void CSQC_AddPrintText(const char *msg);
+void CSQC_AddPrintText(const char *msg, size_t msg_len);
 void CSQC_ReadEntities(void);
 void CSQC_RelinkAllEntities(int drawmask);
 void CSQC_RelinkCSQCEntities(void);
diff --git a/cvar.c b/cvar.c
index 7936c92356be359c13748eca7afbec3250df8ac2..1c347193787b09119f06f782ce3d880b53c78d3d 100644 (file)
--- a/cvar.c
+++ b/cvar.c
@@ -33,9 +33,9 @@ cvar_state_t cvars_null;
 Cvar_FindVar
 ============
 */
-cvar_t *Cvar_FindVar(cvar_state_t *cvars, const char *var_name, int neededflags)
+cvar_t *Cvar_FindVar(cvar_state_t *cvars, const char *var_name, unsigned neededflags)
 {
-       int hashindex;
+       unsigned hashindex;
        cvar_hash_t *hash;
 
        // use hash lookup to minimize search time
@@ -50,7 +50,7 @@ cvar_t *Cvar_FindVar(cvar_state_t *cvars, const char *var_name, int neededflags)
        return NULL;
 }
 
-cvar_t *Cvar_FindVarAfter(cvar_state_t *cvars, const char *prev_var_name, int neededflags)
+cvar_t *Cvar_FindVarAfter(cvar_state_t *cvars, const char *prev_var_name, unsigned neededflags)
 {
        cvar_t *var;
 
@@ -74,37 +74,41 @@ cvar_t *Cvar_FindVarAfter(cvar_state_t *cvars, const char *prev_var_name, int ne
        return var;
 }
 
-static cvar_t *Cvar_FindVarLink(cvar_state_t *cvars, const char *var_name, cvar_t **parent, cvar_t ***link, cvar_t **prev_alpha, int neededflags)
+/**
+ * Returns a pointer to the pointer stored in hashtable[] (or the one it links to)
+ * because we'll need to update that when deleting a cvar as other cvar(s) may share its hashindex.
+ */
+static cvar_hash_t **Cvar_FindVarLink(cvar_state_t *cvars, const char *var_name, cvar_t **prev_alpha, unsigned neededflags)
 {
-       int hashindex;
-       cvar_hash_t *hash;
+       unsigned hashindex;
+       cvar_t *cvar;
+       cvar_hash_t **hashlinkptr;
 
        // use hash lookup to minimize search time
        hashindex = CRC_Block((const unsigned char *)var_name, strlen(var_name)) % CVAR_HASHSIZE;
-       if(parent) *parent = NULL;
        if(prev_alpha) *prev_alpha = NULL;
-       if(link) *link = &cvars->hashtable[hashindex]->cvar;
-       for (hash = cvars->hashtable[hashindex];hash;hash = hash->next)
+       hashlinkptr = &cvars->hashtable[hashindex];
+       for (hashlinkptr = &cvars->hashtable[hashindex]; *hashlinkptr; hashlinkptr = &(*hashlinkptr)->next)
        {
-               if (!strcmp (var_name, hash->cvar->name) && (hash->cvar->flags & neededflags))
+               cvar = (*hashlinkptr)->cvar;
+               if (!strcmp (var_name, cvar->name) && (cvar->flags & neededflags))
                        goto match;
                else
-                       for (char **alias = hash->cvar->aliases; alias && *alias; alias++)
-                               if (!strcmp (var_name, *alias) && (hash->cvar->flags & neededflags))
+                       for (char **alias = cvar->aliases; alias && *alias; alias++)
+                               if (!strcmp (var_name, *alias) && (cvar->flags & neededflags))
                                        goto match;
-               if(parent) *parent = hash->cvar;
        }
        return NULL;
-match:
-       if(!prev_alpha || hash->cvar == cvars->vars)
-               return hash->cvar;
 
+match:
+       if(!prev_alpha || cvar == cvars->vars)
+               return hashlinkptr;
        *prev_alpha = cvars->vars;
        // if prev_alpha happens to become NULL then there has been some inconsistency elsewhere
        // already - should I still insert '*prev_alpha &&' in the loop?
-       while((*prev_alpha)->next != hash->cvar)
+       while((*prev_alpha)->next != cvar)
                *prev_alpha = (*prev_alpha)->next;
-       return hash->cvar;
+       return hashlinkptr;
 }
 
 /*
@@ -112,7 +116,7 @@ match:
 Cvar_VariableValue
 ============
 */
-float Cvar_VariableValueOr(cvar_state_t *cvars, const char *var_name, float def, int neededflags)
+float Cvar_VariableValueOr(cvar_state_t *cvars, const char *var_name, float def, unsigned neededflags)
 {
        cvar_t *var;
 
@@ -122,7 +126,7 @@ float Cvar_VariableValueOr(cvar_state_t *cvars, const char *var_name, float def,
        return atof (var->string);
 }
 
-float Cvar_VariableValue(cvar_state_t *cvars, const char *var_name, int neededflags)
+float Cvar_VariableValue(cvar_state_t *cvars, const char *var_name, unsigned neededflags)
 {
        return Cvar_VariableValueOr(cvars, var_name, 0, neededflags);
 }
@@ -132,7 +136,7 @@ float Cvar_VariableValue(cvar_state_t *cvars, const char *var_name, int neededfl
 Cvar_VariableString
 ============
 */
-const char *Cvar_VariableStringOr(cvar_state_t *cvars, const char *var_name, const char *def, int neededflags)
+const char *Cvar_VariableStringOr(cvar_state_t *cvars, const char *var_name, const char *def, unsigned neededflags)
 {
        cvar_t *var;
 
@@ -142,7 +146,7 @@ const char *Cvar_VariableStringOr(cvar_state_t *cvars, const char *var_name, con
        return var->string;
 }
 
-const char *Cvar_VariableString(cvar_state_t *cvars, const char *var_name, int neededflags)
+const char *Cvar_VariableString(cvar_state_t *cvars, const char *var_name, unsigned neededflags)
 {
        return Cvar_VariableStringOr(cvars, var_name, cvar_null_string, neededflags);
 }
@@ -152,7 +156,7 @@ const char *Cvar_VariableString(cvar_state_t *cvars, const char *var_name, int n
 Cvar_VariableDefString
 ============
 */
-const char *Cvar_VariableDefString(cvar_state_t *cvars, const char *var_name, int neededflags)
+const char *Cvar_VariableDefString(cvar_state_t *cvars, const char *var_name, unsigned neededflags)
 {
        cvar_t *var;
 
@@ -167,7 +171,7 @@ const char *Cvar_VariableDefString(cvar_state_t *cvars, const char *var_name, in
 Cvar_VariableDescription
 ============
 */
-const char *Cvar_VariableDescription(cvar_state_t *cvars, const char *var_name, int neededflags)
+const char *Cvar_VariableDescription(cvar_state_t *cvars, const char *var_name, unsigned neededflags)
 {
        cvar_t *var;
 
@@ -183,7 +187,7 @@ const char *Cvar_VariableDescription(cvar_state_t *cvars, const char *var_name,
 Cvar_CompleteVariable
 ============
 */
-const char *Cvar_CompleteVariable(cvar_state_t *cvars, const char *partial, int neededflags)
+const char *Cvar_CompleteVariable(cvar_state_t *cvars, const char *partial, unsigned neededflags)
 {
        cvar_t          *cvar;
        size_t          len;
@@ -210,7 +214,7 @@ const char *Cvar_CompleteVariable(cvar_state_t *cvars, const char *partial, int
        Thanks to Fett erich@heintz.com
 
 */
-int Cvar_CompleteCountPossible(cvar_state_t *cvars, const char *partial, int neededflags)
+int Cvar_CompleteCountPossible(cvar_state_t *cvars, const char *partial, unsigned neededflags)
 {
        cvar_t  *cvar;
        size_t  len;
@@ -243,7 +247,7 @@ int Cvar_CompleteCountPossible(cvar_state_t *cvars, const char *partial, int nee
        Thanks to taniwha
 
 */
-const char **Cvar_CompleteBuildList(cvar_state_t *cvars, const char *partial, int neededflags)
+const char **Cvar_CompleteBuildList(cvar_state_t *cvars, const char *partial, unsigned neededflags)
 {
        const cvar_t *cvar;
        size_t len = 0;
@@ -271,19 +275,17 @@ void Cvar_PrintHelp(cvar_t *cvar, const char *name, qbool full)
 {
        // Aliases are purple, cvars are yellow
        if (strcmp(cvar->name, name))
-               Con_Printf("^6");
+               Con_Printf("^6%s^7 (alias of ^3%s^7)", name, cvar->name);
        else
-               Con_Printf("^3");
-       Con_Printf("%s^7 is \"%s\" [\"%s\"]", name, ((cvar->flags & CF_PRIVATE) ? "********"/*hunter2*/ : cvar->string), cvar->defstring);
-       if (strcmp(cvar->name, name))
-               Con_Printf(" (also ^3%s^7)", cvar->name);
+               Con_Printf("^3%s^7", name);
+       Con_Printf(" is \"%s^7\" [\"%s^7\"]", ((cvar->flags & CF_PRIVATE) ? "********"/*hunter2*/ : cvar->string), cvar->defstring);
        if (full)
                Con_Printf(" %s", cvar->description);
-       Con_Printf("\n");
+       Con_Print("\n");
 }
 
 // written by LadyHavoc
-void Cvar_CompleteCvarPrint(cvar_state_t *cvars, const char *partial, int neededflags)
+void Cvar_CompleteCvarPrint(cvar_state_t *cvars, const char *partial, unsigned neededflags)
 {
        cvar_t *cvar;
        size_t len = strlen(partial);
@@ -299,8 +301,9 @@ void Cvar_CompleteCvarPrint(cvar_state_t *cvars, const char *partial, int needed
                
 }
 
-// check if a cvar is held by some progs
-static qbool Cvar_IsAutoCvar(cvar_t *var)
+/// Check if a cvar is held by some progs
+/// in which case its name is returned, otherwise NULL.
+static const char *Cvar_IsAutoCvar(cvar_t *var)
 {
        int i;
        prvm_prog_t *prog;
@@ -308,12 +311,12 @@ static qbool Cvar_IsAutoCvar(cvar_t *var)
        {
                prog = &prvm_prog_list[i];
                if (prog->loaded && var->globaldefindex[i] >= 0)
-                       return true;
+                       return prog->name;
        }
-       return false;
+       return NULL;
 }
 
-// we assume that prog is already set to the target progs
+/// we assume that prog is already set to the target progs
 static void Cvar_UpdateAutoCvar(cvar_t *var)
 {
        int i;
@@ -326,7 +329,7 @@ static void Cvar_UpdateAutoCvar(cvar_t *var)
                prog = &prvm_prog_list[i];
                if (prog->loaded && var->globaldefindex[i] >= 0)
                {
-                       // MUST BE SYNCED WITH prvm_edict.c PRVM_LoadProgs
+                       // MUST BE SYNCED WITH prvm_edict.c PRVM_Prog_Load
                        switch(prog->globaldefs[var->globaldefindex[i]].type & ~DEF_SAVEGLOBAL)
                        {
                        case ev_float:
@@ -358,7 +361,7 @@ static void Cvar_UpdateAutoCvar(cvar_t *var)
        }
 }
 
-// called after loading a savegame
+/// called after loading a savegame
 void Cvar_UpdateAllAutoCvars(cvar_state_t *cvars)
 {
        cvar_t *var;
@@ -370,7 +373,7 @@ void Cvar_Callback(cvar_t *var)
 {
        if (var == NULL)
        {
-               Con_Print("Cvar_Callback: var == NULL\n");
+               Con_Print(CON_WARN "Cvar_Callback: var == NULL\n");
                return;
        }
 
@@ -392,7 +395,7 @@ static void Cvar_SetQuick_Internal (cvar_t *var, const char *value)
        changed = strcmp(var->string, value) != 0;
        // LadyHavoc: don't reallocate when there is no change
        if (!changed)
-               return;
+               goto cvar_callback;
 
        // LadyHavoc: don't reallocate when the buffer is the same size
        valuelen = strlen(value);
@@ -425,6 +428,7 @@ static void Cvar_SetQuick_Internal (cvar_t *var, const char *value)
 
        Cvar_UpdateAutoCvar(var);
 
+cvar_callback:
        // Call the function stored in the cvar for bounds checking, cleanup, etc
        Cvar_Callback(var);
 }
@@ -433,10 +437,16 @@ void Cvar_SetQuick (cvar_t *var, const char *value)
 {
        if (var == NULL)
        {
-               Con_Print("Cvar_SetQuick: var == NULL\n");
+               Con_Print(CON_WARN "Cvar_SetQuick: var == NULL\n");
                return;
        }
 
+       if (!(var->flags & CF_REGISTERED) && !(var->flags & CF_ALLOCATED))
+       {
+               Con_Printf(CON_WARN "Warning: Cvar_SetQuick() cannot set unregistered cvar \"%s\"\n", var->name);
+               return; // setting an unregistered engine cvar crashes
+       }
+
        if (developer_extra.integer)
                Con_DPrintf("Cvar_SetQuick({\"%s\", \"%s\", %i, \"%s\"}, \"%s\");\n", var->name, var->string, var->flags, var->defstring, value);
 
@@ -449,7 +459,7 @@ void Cvar_Set(cvar_state_t *cvars, const char *var_name, const char *value)
        var = Cvar_FindVar(cvars, var_name, ~0);
        if (var == NULL)
        {
-               Con_Printf("Cvar_Set: variable %s not found\n", var_name);
+               Con_Printf(CON_WARN "Cvar_Set: variable %s not found\n", var_name);
                return;
        }
        Cvar_SetQuick(var, value);
@@ -486,9 +496,17 @@ void Cvar_RegisterCallback(cvar_t *variable, void (*callback)(cvar_t *))
 {
        if (variable == NULL)
        {
-               Con_Print("Cvar_RegisterCallback: var == NULL\n");
+               Con_Print(CON_WARN "Cvar_RegisterCallback: var == NULL\n");
                return;
        }
+
+       if (!(variable->flags & cmd_local->cvars_flagsmask))
+       {
+               if (developer_extra.integer)
+                       Con_DPrintf("^6Cvar_RegisterCallback: rejecting cvar \"%s\"\n", variable->name);
+               return;
+       }
+
        variable->callback = callback;
 }
 
@@ -496,24 +514,31 @@ void Cvar_RegisterVirtual(cvar_t *variable, const char *name )
 {
        cvar_state_t *cvars = &cvars_all;
        cvar_hash_t *hash;
-       int hashindex;
+       unsigned hashindex;
+
+       if (!(variable->flags & cmd_local->cvars_flagsmask))
+       {
+               if (developer_extra.integer)
+                       Con_DPrintf("^6Cvar_RegisterVirtual: rejecting cvar \"%s\" alias \"%s\"\n", variable->name, name);
+               return;
+       }
 
        if(!*name)
        {
-               Con_Printf("Cvar_RegisterVirtual: invalid virtual cvar name\n");
+               Con_Printf(CON_WARN "Cvar_RegisterVirtual: invalid virtual cvar name\n");
                return;
        }
 
        // check for overlap with a command
        if (Cmd_Exists(cmd_local, name))
        {
-               Con_Printf("Cvar_RegisterVirtual: %s is a command\n", name);
+               Con_Printf(CON_WARN "Cvar_RegisterVirtual: %s is a command\n", name);
                return;
        }
 
        if(Cvar_FindVar(&cvars_all, name, 0))
        {
-               Con_Printf("Cvar_RegisterVirtual: %s is a cvar\n", name);
+               Con_Printf(CON_WARN "Cvar_RegisterVirtual: %s is a cvar\n", name);
                return;
        }
 
@@ -522,7 +547,7 @@ void Cvar_RegisterVirtual(cvar_t *variable, const char *name )
        // Also if aliases is NULL this allocates fresh for the correct size, so it's fine to just do this.
        variable->aliases = (char **)Z_Realloc(variable->aliases, sizeof(char *) * (variable->aliases_size + 2));
        // Add the new alias, and increment the number of aliases in the list
-       variable->aliases[variable->aliases_size++] = (char *)Z_strdup(name);
+       variable->aliases[variable->aliases_size++] = Z_strdup(name);
 
        // link to head of list in this hash table index
        hash = (cvar_hash_t *)Z_Malloc(sizeof(cvar_hash_t));
@@ -543,7 +568,7 @@ static void Cvar_Link(cvar_t *variable, cvar_state_t *cvars)
 {
        cvar_t *current, *next;
        cvar_hash_t *hash;
-       int hashindex;
+       unsigned hashindex;
        /*
         * Link the variable in
         * alphanumerical order
@@ -573,23 +598,15 @@ Adds a freestanding variable to the variable list.
 */
 void Cvar_RegisterVariable (cvar_t *variable)
 {
-       cvar_state_t *cvars = NULL;
+       cvar_state_t *cvars = &cvars_all;
        cvar_t *current, *cvar;
        int i;
 
-       switch (variable->flags & (CF_CLIENT | CF_SERVER))
+       if (!(variable->flags & cmd_local->cvars_flagsmask))
        {
-       case CF_CLIENT:
-       case CF_SERVER:
-       case CF_CLIENT | CF_SERVER:
-               cvars = &cvars_all;
-               break;
-       case 0:
-               Sys_Error("Cvar_RegisterVariable({\"%s\", \"%s\", %i}) with no CF_CLIENT | CF_SERVER flags\n", variable->name, variable->string, variable->flags);
-               break;
-       default:
-               Sys_Error("Cvar_RegisterVariable({\"%s\", \"%s\", %i}) with weird CF_CLIENT | CF_SERVER flags\n", variable->name, variable->string, variable->flags);
-               break;
+               if (developer_extra.integer)
+                       Con_DPrintf("^2Cvar_RegisterVariable: rejecting cvar \"%s\"\n", variable->name);
+               return;
        }
 
        if (developer_extra.integer)
@@ -607,7 +624,7 @@ void Cvar_RegisterVariable (cvar_t *variable)
                        // (because the engine directly accesses fixed variables)
                        // NOTE: this isn't actually used currently
                        // (all cvars are registered before config parsing)
-                       variable->flags |= (cvar->flags & ~CF_ALLOCATED);
+                       variable->flags &= ~CF_ALLOCATED;
                        // cvar->string is now owned by variable instead
                        variable->string = cvar->string;
                        variable->defstring = cvar->defstring;
@@ -644,24 +661,27 @@ void Cvar_RegisterVariable (cvar_t *variable)
        // check for overlap with a command
        if (Cmd_Exists(cmd_local, variable->name))
        {
-               Con_Printf("Cvar_RegisterVariable: %s is a command\n", variable->name);
+               Con_Printf(CON_WARN "Cvar_RegisterVariable: %s is a command\n", variable->name);
                return;
        }
 
        // copy the value off, because future sets will Z_Free it
-       variable->name = (char *)Mem_strdup(zonemempool, variable->name);
-       variable->string = (char *)Mem_strdup(zonemempool, variable->string);
-       variable->defstring = (char *)Mem_strdup(zonemempool, variable->string);
+       variable->name = Z_strdup(variable->name);
+       variable->string = Z_strdup(variable->string);
+       variable->defstring = Z_strdup(variable->string);
        variable->value = atof (variable->string);
        variable->integer = (int) variable->value;
        variable->aliases = NULL;
        variable->aliases_size = 0;
-       variable->initstate = NULL;
+       variable->initstring = NULL;
 
        // Mark it as not an autocvar.
        for (i = 0;i < PRVM_PROG_MAX;i++)
                variable->globaldefindex[i] = -1;
 
+       // Safe for Cvar_SetQuick()
+       variable->flags |= CF_REGISTERED;
+
        Cvar_Link(variable, cvars);
 }
 
@@ -672,7 +692,7 @@ Cvar_Get
 Adds a newly allocated variable to the variable list or sets its value.
 ============
 */
-cvar_t *Cvar_Get(cvar_state_t *cvars, const char *name, const char *value, int flags, const char *newdescription)
+cvar_t *Cvar_Get(cvar_state_t *cvars, const char *name, const char *value, unsigned flags, const char *newdescription)
 {
        cvar_t *cvar;
        int i;
@@ -692,7 +712,7 @@ cvar_t *Cvar_Get(cvar_state_t *cvars, const char *name, const char *value, int f
                                Z_Free((char *)cvar->description);
 
                        if(*newdescription)
-                               cvar->description = (char *)Mem_strdup(zonemempool, newdescription);
+                               cvar->description = Z_strdup(newdescription);
                        else
                                cvar->description = cvar_dummy_description;
                }
@@ -702,14 +722,14 @@ cvar_t *Cvar_Get(cvar_state_t *cvars, const char *name, const char *value, int f
        // check for pure evil
        if (!*name)
        {
-               Con_Printf("Cvar_Get: invalid variable name\n");
+               Con_Printf(CON_WARN "Cvar_Get: invalid variable name\n");
                return NULL;
        }
 
        // check for overlap with a command
        if (Cmd_Exists(cmd_local, name))
        {
-               Con_Printf("Cvar_Get: %s is a command\n", name);
+               Con_Printf(CON_WARN "Cvar_Get: %s is a command\n", name);
                return NULL;
        }
 
@@ -718,17 +738,17 @@ cvar_t *Cvar_Get(cvar_state_t *cvars, const char *name, const char *value, int f
        // FIXME: these never get Z_Free'd
        cvar = (cvar_t *)Z_Malloc(sizeof(cvar_t));
        cvar->flags = flags | CF_ALLOCATED;
-       cvar->name = (char *)Mem_strdup(zonemempool, name);
-       cvar->string = (char *)Mem_strdup(zonemempool, value);
-       cvar->defstring = (char *)Mem_strdup(zonemempool, value);
+       cvar->name = Z_strdup(name);
+       cvar->string = Z_strdup(value);
+       cvar->defstring = Z_strdup(value);
        cvar->value = atof (cvar->string);
        cvar->integer = (int) cvar->value;
        cvar->aliases = NULL;
        cvar->aliases_size = 0;
-       cvar->initstate = NULL;
+       cvar->initstring = NULL;
 
        if(newdescription && *newdescription)
-               cvar->description = (char *)Mem_strdup(zonemempool, newdescription);
+               cvar->description = Z_strdup(newdescription);
        else
                cvar->description = cvar_dummy_description; // actually checked by VM_cvar_type
 
@@ -741,14 +761,63 @@ cvar_t *Cvar_Get(cvar_state_t *cvars, const char *name, const char *value, int f
        return cvar;
 }
 
+/// For "quiet" mode pass NULL as the callername.
+/// Returns true if the cvar was deleted.
+static qbool Cvar_Delete(cvar_state_t *cvars, const char *name, const char *callername)
+{
+       cvar_t *cvar, *prev;
+       cvar_hash_t **hashlinkptr, *oldhashlink;
+       const char *progname;
+
+       hashlinkptr = Cvar_FindVarLink(cvars, name, &prev, ~0);
+       if(!hashlinkptr)
+       {
+               if (callername)
+                       Con_Printf("%s: cvar \"%s\" is not defined.\n", callername, name);
+               return false;
+       }
+       cvar = (*hashlinkptr)->cvar;
+
+       if(!(cvar->flags & CF_ALLOCATED))
+       {
+               if (callername)
+                       Con_Printf(CON_WARN "%s: engine cvar \"%s\" cannot be deleted!\n", callername, cvar->name);
+               return false;
+       }
+       if ((progname = Cvar_IsAutoCvar(cvar)))
+       {
+               if (callername)
+                       Con_Printf(CON_WARN "%s: unable to delete cvar \"%s\", it is an autocvar used by running %s progs!\n", callername, cvar->name, progname);
+               return false;
+       }
+
+       if(cvar == cvars->vars)
+               cvars->vars = cvar->next;
+       else
+               prev->next = cvar->next;
+
+       if(cvar->description != cvar_dummy_description)
+               Z_Free((char *)cvar->description);
+       Z_Free((char *)cvar->name);
+       Z_Free((char *)cvar->string);
+       Z_Free((char *)cvar->defstring);
+       Z_Free(cvar);
+
+       oldhashlink = *hashlinkptr;
+       *hashlinkptr = (*hashlinkptr)->next;
+       Z_Free(oldhashlink);
+
+       return true;
+}
+
 qbool Cvar_Readonly (cvar_t *var, const char *cmd_name)
 {
        if (var->flags & CF_READONLY)
        {
+               Con_Print(CON_WARN);
                if(cmd_name)
                        Con_Printf("%s: ",cmd_name);
-               Con_Printf("%s", var->name);
-               Con_Printf(" is read-only\n");
+               Con_Printf("%s is read-only\n", var->name);
                return true;
        }
        return false;
@@ -823,86 +892,47 @@ void Cvar_LockDefaults_f(cmd_state_t *cmd)
 void Cvar_SaveInitState(cvar_state_t *cvars)
 {
        cvar_t *c;
+
        for (c = cvars->vars;c;c = c->next)
-       {
-               c->initstate = (cvar_t *)Z_Malloc(sizeof(cvar_t));
-               memcpy(c->initstate, c, sizeof(cvar_t));
-       }
+               if ((c->flags & (CF_PERSISTENT | CF_READONLY)) == 0)
+                       c->initstring = Z_strdup(c->string);
 }
 
 void Cvar_RestoreInitState(cvar_state_t *cvars)
 {
-       int hashindex;
-       cvar_t *c, **cp;
-       cvar_t *c2, **cp2;
-       for (cp = &cvars->vars;(c = *cp);)
+       cvar_t *c, *cp;
+
+       for (cp = cvars->vars; (c = cp);)
        {
-               if (c->initstate)
+               cp = c->next; // get next cvar now in case we delete this cvar
+
+               if (c->initstring)
                {
                        // restore this cvar, it existed at init
-                       if (((c->flags ^ c->initstate->flags) & CF_MAXFLAGSVAL)
-                        || strcmp(c->defstring ? c->defstring : "", c->initstate->defstring ? c->initstate->defstring : "")
-                        || strcmp(c->string ? c->string : "", c->initstate->string ? c->initstate->string : ""))
-                       {
-                               Con_DPrintf("Cvar_RestoreInitState: Restoring cvar \"%s\"\n", c->name);
-                               if (c->defstring)
-                                       Z_Free((char *)c->defstring);
-                               c->defstring = Mem_strdup(zonemempool, c->initstate->defstring);
-                               if (c->string)
-                                       Z_Free((char *)c->string);
-                               c->string = Mem_strdup(zonemempool, c->initstate->string);
-                       }
-                       c->flags = c->initstate->flags;
-                       c->value = c->initstate->value;
-                       c->integer = c->initstate->integer;
-                       VectorCopy(c->initstate->vector, c->vector);
-                       cp = &c->next;
+                       Con_DPrintf("Cvar_RestoreInitState: Restoring cvar \"%s\"\n", c->name);
+
+                       /* bones_was_here: intentionally NOT restoring defstring in this function.
+                        * The only callsite, Host_LoadConfig_f, will re-exec quake.rc, default.cfg, etc.
+                        * Defaults are unlocked here, so Cvar_LockDefaults_f will reset the defstring.
+                        * This is more correct than restoring the defstring here
+                        * because a gamedir change could load configs that should change defaults.
+                        */
+
+                       Cvar_SetQuick(c, c->initstring);
+                       c->flags &= ~CF_DEFAULTSET;
                }
-               else
+               else if (!(c->flags & (CF_PERSISTENT | CF_READONLY))) // cvars with those flags have no initstring AND may not be deleted or reset
                {
-                       if (!(c->flags & CF_ALLOCATED))
-                       {
-                               Con_DPrintf("Cvar_RestoreInitState: Unable to destroy cvar \"%s\", it was registered after init!\n", c->name);
-                               // In this case, at least reset it to the default.
-                               if((c->flags & CF_PERSISTENT) == 0)
-                                       Cvar_SetQuick(c, c->defstring);
-                               cp = &c->next;
-                               continue;
-                       }
-                       if (Cvar_IsAutoCvar(c))
-                       {
-                               Con_DPrintf("Cvar_RestoreInitState: Unable to destroy cvar \"%s\", it is an autocvar used by running progs!\n", c->name);
-                               // In this case, at least reset it to the default.
-                               if((c->flags & CF_PERSISTENT) == 0)
-                                       Cvar_SetQuick(c, c->defstring);
-                               cp = &c->next;
-                               continue;
-                       }
                        // remove this cvar, it did not exist at init
-                       Con_DPrintf("Cvar_RestoreInitState: Destroying cvar \"%s\"\n", c->name);
-                       // unlink struct from hash
-                       hashindex = CRC_Block((const unsigned char *)c->name, strlen(c->name)) % CVAR_HASHSIZE;
-                       for (cp2 = &cvars->hashtable[hashindex]->cvar;(c2 = *cp2);)
+                       Con_DPrintf("Cvar_RestoreInitState: cvar \"%s\"", c->name);
+                       if (Cvar_Delete(cvars, c->name, NULL))
+                               Con_DPrint("deleted.\n");
+                       else
                        {
-                               if (c2 == c)
-                               {
-                                       *cp2 = cvars->hashtable[hashindex]->next->cvar;
-                                       break;
-                               }
-                               else
-                                       cp2 = &cvars->hashtable[hashindex]->next->cvar;
+                               // In this case, at least reset it to the default.
+                               Con_DPrint("reset.\n");
+                               Cvar_SetQuick(c, c->defstring);
                        }
-                       // unlink struct from main list
-                       *cp = c->next;
-                       // free strings
-                       if (c->defstring)
-                               Z_Free((char *)c->defstring);
-                       if (c->string)
-                               Z_Free((char *)c->string);
-                       if (c->description && c->description != cvar_dummy_description)
-                               Z_Free((char *)c->description);
-                       // free struct
-                       Z_Free(c);
                }
        }
 }
@@ -914,7 +944,7 @@ void Cvar_ResetToDefaults_All_f(cmd_state_t *cmd)
        // restore the default values of all cvars
        for (var = cvars->vars ; var ; var = var->next)
        {
-               if((var->flags & CF_PERSISTENT) == 0)
+               if((var->flags & (CF_PERSISTENT | CF_READONLY)) == 0)
                        Cvar_SetQuick(var, var->defstring);
        }
 }
@@ -926,7 +956,7 @@ void Cvar_ResetToDefaults_NoSaveOnly_f(cmd_state_t *cmd)
        // restore the default values of all cvars
        for (var = cvars->vars ; var ; var = var->next)
        {
-               if ((var->flags & (CF_PERSISTENT | CF_ARCHIVE)) == 0)
+               if ((var->flags & (CF_PERSISTENT | CF_READONLY | CF_ARCHIVE)) == 0)
                        Cvar_SetQuick(var, var->defstring);
        }
 }
@@ -939,7 +969,7 @@ void Cvar_ResetToDefaults_SaveOnly_f(cmd_state_t *cmd)
        // restore the default values of all cvars
        for (var = cvars->vars ; var ; var = var->next)
        {
-               if ((var->flags & (CF_PERSISTENT | CF_ARCHIVE)) == CF_ARCHIVE)
+               if ((var->flags & (CF_PERSISTENT | CF_READONLY | CF_ARCHIVE)) == CF_ARCHIVE)
                        Cvar_SetQuick(var, var->defstring);
        }
 }
@@ -1080,10 +1110,7 @@ void Cvar_SetA_f(cmd_state_t *cmd)
 void Cvar_Del_f(cmd_state_t *cmd)
 {
        cvar_state_t *cvars = cmd->cvars;
-       int neededflags = ~0;
        int i;
-       cvar_t *parent, **link;
-       cvar_t *cvar, *prev;
 
        if(Cmd_Argc(cmd) < 2)
        {
@@ -1091,44 +1118,7 @@ void Cvar_Del_f(cmd_state_t *cmd)
                return;
        }
        for(i = 1; i < Cmd_Argc(cmd); ++i)
-       {
-               cvar = Cvar_FindVarLink(cvars, Cmd_Argv(cmd, i), &parent, &link, &prev, neededflags);
-
-               if(!cvar)
-               {
-                       Con_Printf("%s: %s is not defined\n", Cmd_Argv(cmd, 0), Cmd_Argv(cmd, i));
-                       continue;
-               }
-               if(Cvar_Readonly(cvar, Cmd_Argv(cmd, 0)))
-                       continue;
-               if(!(cvar->flags & CF_ALLOCATED))
-               {
-                       Con_Printf("%s: %s is static and cannot be deleted\n", Cmd_Argv(cmd, 0), cvar->name);
-                       continue;
-               }
-               if(cvar == cvars->vars)
-               {
-                       cvars->vars = cvar->next;
-               }
-               else
-               {
-                       // in this case, prev must be set, otherwise there has been some inconsistensy
-                       // elsewhere already... should I still check for prev != NULL?
-                       prev->next = cvar->next;
-               }
-
-               if(parent)
-                       parent->next = cvar->next;
-               else if(link)
-                       *link = cvar->next;
-               if(cvar->description != cvar_dummy_description)
-                       Z_Free((char *)cvar->description);
-
-               Z_Free((char *)cvar->name);
-               Z_Free((char *)cvar->string);
-               Z_Free((char *)cvar->defstring);
-               Z_Free(cvar);
-       }
+               Cvar_Delete(cvars, Cmd_Argv(cmd, i), Cmd_Argv(cmd, 0));
 }
 
 #ifdef FILLALLCVARSWITHRUBBISH
diff --git a/cvar.h b/cvar.h
index 92ea81cdc54ee26ce172ce63e5ee429cb8d235b9..a0a8716776db1933b1b5b86cc6771b92bbbc19d3 100644 (file)
--- a/cvar.h
+++ b/cvar.h
@@ -64,7 +64,7 @@ struct qfile_s;
 
 typedef struct cvar_s
 {
-       int flags;
+       unsigned flags;
 
        const char *name;
 
@@ -81,7 +81,8 @@ typedef struct cvar_s
        char **aliases;
        int aliases_size;
 
-       struct cvar_s *initstate; // snapshot of cvar during init
+       // this is sufficient for Cvar_RestoreInitState()
+       const char *initstring;
 
        int globaldefindex[3];
        int globaldefindex_stringno[3];
@@ -126,31 +127,31 @@ void Cvar_SetValue (cvar_state_t *cvars, const char *var_name, float value);
 void Cvar_SetQuick (cvar_t *var, const char *value);
 void Cvar_SetValueQuick (cvar_t *var, float value);
 
-float Cvar_VariableValueOr (cvar_state_t *cvars, const char *var_name, float def, int neededflags);
+float Cvar_VariableValueOr (cvar_state_t *cvars, const char *var_name, float def, unsigned neededflags);
 // returns def if not defined
 
-float Cvar_VariableValue (cvar_state_t *cvars, const char *var_name, int neededflags);
+float Cvar_VariableValue (cvar_state_t *cvars, const char *var_name, unsigned neededflags);
 // returns 0 if not defined or non numeric
 
-const char *Cvar_VariableStringOr (cvar_state_t *cvars, const char *var_name, const char *def, int neededflags);
+const char *Cvar_VariableStringOr (cvar_state_t *cvars, const char *var_name, const char *def, unsigned neededflags);
 // returns def if not defined
 
-const char *Cvar_VariableString (cvar_state_t *cvars, const char *var_name, int neededflags);
+const char *Cvar_VariableString (cvar_state_t *cvars, const char *var_name, unsigned neededflags);
 // returns an empty string if not defined
 
-const char *Cvar_VariableDefString (cvar_state_t *cvars, const char *var_name, int neededflags);
+const char *Cvar_VariableDefString (cvar_state_t *cvars, const char *var_name, unsigned neededflags);
 // returns an empty string if not defined
 
-const char *Cvar_VariableDescription (cvar_state_t *cvars, const char *var_name, int neededflags);
+const char *Cvar_VariableDescription (cvar_state_t *cvars, const char *var_name, unsigned neededflags);
 // returns an empty string if not defined
 
-const char *Cvar_CompleteVariable (cvar_state_t *cvars, const char *partial, int neededflags);
+const char *Cvar_CompleteVariable (cvar_state_t *cvars, const char *partial, unsigned neededflags);
 // attempts to match a partial variable name for command line completion
 // returns NULL if nothing fits
 
 void Cvar_PrintHelp(cvar_t *cvar, const char *name, qbool full);
 
-void Cvar_CompleteCvarPrint (cvar_state_t *cvars, const char *partial, int neededflags);
+void Cvar_CompleteCvarPrint (cvar_state_t *cvars, const char *partial, unsigned neededflags);
 
 qbool Cvar_Command (struct cmd_state_s *cmd);
 // called by Cmd_ExecuteString when Cmd_Argv(cmd, 0) doesn't match a known
@@ -170,11 +171,11 @@ void Cvar_WriteVariables (cvar_state_t *cvars, struct qfile_s *f);
 // Writes lines containing "set variable value" for all variables
 // with the archive flag set to true.
 
-cvar_t *Cvar_FindVar(cvar_state_t *cvars, const char *var_name, int neededflags);
-cvar_t *Cvar_FindVarAfter(cvar_state_t *cvars, const char *prev_var_name, int neededflags);
+cvar_t *Cvar_FindVar(cvar_state_t *cvars, const char *var_name, unsigned neededflags);
+cvar_t *Cvar_FindVarAfter(cvar_state_t *cvars, const char *prev_var_name, unsigned neededflags);
 
-int Cvar_CompleteCountPossible(cvar_state_t *cvars, const char *partial, int neededflags);
-const char **Cvar_CompleteBuildList(cvar_state_t *cvars, const char *partial, int neededflags);
+int Cvar_CompleteCountPossible(cvar_state_t *cvars, const char *partial, unsigned neededflags);
+const char **Cvar_CompleteBuildList(cvar_state_t *cvars, const char *partial, unsigned neededflags);
 // Added by EvilTypeGuy - functions for tab completion system
 // Thanks to Fett erich@heintz.com
 // Thanks to taniwha
@@ -193,7 +194,7 @@ void Cvar_Del_f(struct cmd_state_s *cmd);
 
 /// allocates a cvar by name and returns its address,
 /// or merely sets its value if it already exists.
-cvar_t *Cvar_Get(cvar_state_t *cvars, const char *name, const char *value, int flags, const char *newdescription);
+cvar_t *Cvar_Get(cvar_state_t *cvars, const char *name, const char *value, unsigned flags, const char *newdescription);
 
 extern const char *cvar_dummy_description; // ALWAYS the same pointer
 
diff --git a/darkplaces-sdl2-vs2017.vcxproj b/darkplaces-sdl2-vs2017.vcxproj
deleted file mode 100644 (file)
index de80fba..0000000
+++ /dev/null
@@ -1,439 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="Debug|Win32">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Debug|x64">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|Win32">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|x64">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-  </ItemGroup>\r
-  <PropertyGroup Label="Globals">\r
-    <ProjectGuid>{72D93E63-FDBB-4AA3-B42B-FAADA6D7F5B2}</ProjectGuid>\r
-    <RootNamespace>darkplacessdl2</RootNamespace>\r
-    <Keyword>Win32Proj</Keyword>\r
-    <ProjectName>darkplaces-sdl2-vs2017</ProjectName>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <PlatformToolset>v141</PlatformToolset>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-    <WholeProgramOptimization>true</WholeProgramOptimization>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <PlatformToolset>v141</PlatformToolset>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <PlatformToolset>v141</PlatformToolset>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-    <WholeProgramOptimization>true</WholeProgramOptimization>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <PlatformToolset>v141</PlatformToolset>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
-  <ImportGroup Label="ExtensionSettings">\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-    <Import Project="vs2012_sdl2_win32.props" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-    <Import Project="vs2012_sdl2_win32.props" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-    <Import Project="vs2012_sdl2_win64.props" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-    <Import Project="vs2012_sdl2_win64.props" />\r
-  </ImportGroup>\r
-  <PropertyGroup Label="UserMacros" />\r
-  <PropertyGroup>\r
-    <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <OutDir>$(SolutionDir)\</OutDir>\r
-    <IntDir>$(Configuration)-$(ProjectName)-$(Platform)\</IntDir>\r
-    <LinkIncremental>true</LinkIncremental>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
-    <OutDir>$(SolutionDir)\</OutDir>\r
-    <IntDir>$(Configuration)-$(ProjectName)-$(Platform)\</IntDir>\r
-    <LinkIncremental>true</LinkIncremental>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <OutDir>$(SolutionDir)\</OutDir>\r
-    <IntDir>$(Configuration)-$(ProjectName)-$(Platform)\</IntDir>\r
-    <LinkIncremental>false</LinkIncremental>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
-    <OutDir>$(SolutionDir)\</OutDir>\r
-    <IntDir>$(Configuration)-$(ProjectName)-$(Platform)\</IntDir>\r
-    <LinkIncremental>false</LinkIncremental>\r
-  </PropertyGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>CONFIG_MENU;CONFIG_VIDEO_CAPTURE;WIN32;_DEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <PrecompiledHeader />\r
-      <WarningLevel>Level4</WarningLevel>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
-      <DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
-      <AdditionalOptions>/wd"4201" %(AdditionalOptions)</AdditionalOptions>\r
-    </ClCompile>\r
-    <Link>\r
-      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
-      <IgnoreSpecificDefaultLibraries>msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <LargeAddressAware>true</LargeAddressAware>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>CONFIG_MENU;CONFIG_VIDEO_CAPTURE;WIN32;WIN64;_DEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <PrecompiledHeader />\r
-      <WarningLevel>Level4</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
-      <AdditionalOptions>/wd"4201" %(AdditionalOptions)</AdditionalOptions>\r
-    </ClCompile>\r
-    <Link>\r
-      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
-      <IgnoreSpecificDefaultLibraries>msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <ClCompile>\r
-      <Optimization>MaxSpeed</Optimization>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <PreprocessorDefinitions>CONFIG_MENU;CONFIG_VIDEO_CAPTURE;WIN32;NDEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-      <PrecompiledHeader />\r
-      <WarningLevel>Level4</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
-      <AdditionalOptions>/wd"4201" %(AdditionalOptions)</AdditionalOptions>\r
-    </ClCompile>\r
-    <Link>\r
-      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <LargeAddressAware>true</LargeAddressAware>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>MaxSpeed</Optimization>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <PreprocessorDefinitions>CONFIG_MENU;CONFIG_VIDEO_CAPTURE;WIN32;WIN64;NDEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-      <PrecompiledHeader />\r
-      <WarningLevel>Level4</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
-      <AdditionalOptions>/wd"4201" %(AdditionalOptions)</AdditionalOptions>\r
-    </ClCompile>\r
-    <Link>\r
-      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemGroup>\r
-    <ClCompile Include="bih.c" />\r
-    <ClCompile Include="builddate.c" />\r
-    <ClCompile Include="cap_avi.c" />\r
-    <ClCompile Include="cap_ogg.c" />\r
-    <ClCompile Include="cd_shared.c" />\r
-    <ClCompile Include="cl_cmd.c" />\r
-    <ClCompile Include="cl_collision.c" />\r
-    <ClCompile Include="cl_demo.c" />\r
-    <ClCompile Include="cl_ents.c" />\r
-    <ClCompile Include="cl_ents4.c" />\r
-    <ClCompile Include="cl_ents5.c" />\r
-    <ClCompile Include="cl_ents_nq.c" />\r
-    <ClCompile Include="cl_ents_qw.c" />\r
-    <ClCompile Include="cl_input.c" />\r
-    <ClCompile Include="cl_main.c" />\r
-    <ClCompile Include="cl_parse.c" />\r
-    <ClCompile Include="cl_particles.c" />\r
-    <ClCompile Include="cl_screen.c" />\r
-    <ClCompile Include="cl_video.c" />\r
-    <ClCompile Include="cl_video_libavw.c" />\r
-    <ClCompile Include="clvm_cmds.c" />\r
-    <ClCompile Include="cmd.c" />\r
-    <ClCompile Include="collision.c" />\r
-    <ClCompile Include="com_crc16.c" />\r
-    <ClCompile Include="com_ents.c" />\r
-    <ClCompile Include="com_ents4.c" />\r
-    <ClCompile Include="com_game.c" />\r
-    <ClCompile Include="com_infostring.c" />\r
-    <ClCompile Include="com_msg.c" />\r
-    <ClCompile Include="common.c" />\r
-    <ClCompile Include="console.c" />\r
-    <ClCompile Include="crypto.c">\r
-      <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/wd"4800" %(AdditionalOptions)</AdditionalOptions>\r
-      <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/wd"4800" %(AdditionalOptions)</AdditionalOptions>\r
-      <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/wd"4800" %(AdditionalOptions)</AdditionalOptions>\r
-      <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/wd"4800" %(AdditionalOptions)</AdditionalOptions>\r
-    </ClCompile>\r
-    <ClCompile Include="csprogs.c" />\r
-    <ClCompile Include="curves.c" />\r
-    <ClCompile Include="cvar.c" />\r
-    <ClCompile Include="dpvsimpledecode.c" />\r
-    <ClCompile Include="filematch.c" />\r
-    <ClCompile Include="fractalnoise.c" />\r
-    <ClCompile Include="fs.c" />\r
-    <ClCompile Include="ft2.c" />\r
-    <ClCompile Include="gl_backend.c" />\r
-    <ClCompile Include="gl_draw.c" />\r
-    <ClCompile Include="gl_rmain.c" />\r
-    <ClCompile Include="gl_rsurf.c" />\r
-    <ClCompile Include="gl_textures.c" />\r
-    <ClCompile Include="hmac.c" />\r
-    <ClCompile Include="host.c" />\r
-    <ClCompile Include="image.c" />\r
-    <ClCompile Include="image_png.c" />\r
-    <ClCompile Include="jpeg.c" />\r
-    <ClCompile Include="keys.c" />\r
-    <ClCompile Include="lhnet.c" />\r
-    <ClCompile Include="libcurl.c" />\r
-    <ClCompile Include="mathlib.c" />\r
-    <ClCompile Include="matrixlib.c" />\r
-    <ClCompile Include="mdfour.c" />\r
-    <ClCompile Include="menu.c" />\r
-    <ClCompile Include="meshqueue.c" />\r
-    <ClCompile Include="mod_skeletal_animatevertices_generic.c" />\r
-    <ClCompile Include="mod_skeletal_animatevertices_sse.c" />\r
-    <ClCompile Include="model_alias.c" />\r
-    <ClCompile Include="model_brush.c" />\r
-    <ClCompile Include="model_shared.c" />\r
-    <ClCompile Include="model_sprite.c" />\r
-    <ClCompile Include="mvm_cmds.c" />\r
-    <ClCompile Include="netconn.c" />\r
-    <ClCompile Include="palette.c" />\r
-    <ClCompile Include="polygon.c" />\r
-    <ClCompile Include="portals.c" />\r
-    <ClCompile Include="protocol.c" />\r
-    <ClCompile Include="prvm_cmds.c" />\r
-    <ClCompile Include="prvm_edict.c" />\r
-    <ClCompile Include="prvm_exec.c" />\r
-    <ClCompile Include="r_explosion.c" />\r
-    <ClCompile Include="r_lightning.c" />\r
-    <ClCompile Include="r_modules.c" />\r
-    <ClCompile Include="r_shadow.c" />\r
-    <ClInclude Include="r_stats.c" />\r
-    <ClCompile Include="r_sky.c" />\r
-    <ClCompile Include="r_sprites.c" />\r
-    <ClCompile Include="sbar.c" />\r
-    <ClCompile Include="snd_main.c" />\r
-    <ClCompile Include="snd_mem.c" />\r
-    <ClCompile Include="snd_mix.c" />\r
-    <ClCompile Include="snd_ogg.c" />\r
-    <ClCompile Include="snd_sdl.c" />\r
-    <ClCompile Include="snd_wav.c" />\r
-    <ClInclude Include="snd_xmp.c" />\r
-    <ClCompile Include="sv_ccmds.c" />\r
-    <ClCompile Include="sv_demo.c" />\r
-    <ClCompile Include="sv_ents.c" />\r
-    <ClCompile Include="sv_ents4.c" />\r
-    <ClCompile Include="sv_ents5.c" />\r
-    <ClCompile Include="sv_ents_nq.c" />\r
-    <ClCompile Include="sv_ents_csqc.c" />\r
-    <ClCompile Include="sv_main.c" />\r
-    <ClCompile Include="sv_move.c" />\r
-    <ClCompile Include="sv_phys.c" />\r
-    <ClCompile Include="sv_save.c" />\r
-    <ClCompile Include="sv_send.c" />\r
-    <ClCompile Include="sv_user.c" />\r
-    <ClCompile Include="svbsp.c" />\r
-    <ClCompile Include="svvm_cmds.c" />\r
-    <ClCompile Include="sys_sdl.c" />\r
-    <ClCompile Include="sys_shared.c" />\r
-    <ClCompile Include="taskqueue.c" />\r
-    <ClCompile Include="thread_sdl.c" />\r
-    <ClCompile Include="utf8lib.c" />\r
-    <ClCompile Include="vid_sdl.c" />\r
-    <ClCompile Include="vid_shared.c" />\r
-    <ClCompile Include="view.c" />\r
-    <ClCompile Include="wad.c" />\r
-    <ClCompile Include="world.c" />\r
-    <ClCompile Include="zone.c" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClInclude Include="bih.h" />\r
-    <ClInclude Include="bspfile.h" />\r
-    <ClInclude Include="cap.h" />\r
-    <ClInclude Include="cap_avi.h" />\r
-    <ClInclude Include="cap_ogg.h" />\r
-    <ClInclude Include="cdaudio.h" />\r
-    <ClInclude Include="cl_collision.h" />\r
-    <ClInclude Include="cl_gecko.h" />\r
-    <ClInclude Include="cl_parse.h" />\r
-    <ClInclude Include="cl_particles.h" />\r
-    <ClInclude Include="cl_screen.h" />\r
-    <ClInclude Include="cl_video.h" />\r
-    <ClInclude Include="cl_video_libavw.h" />\r
-    <ClInclude Include="client.h" />\r
-    <ClInclude Include="clprogdefs.h" />\r
-    <ClInclude Include="clvm_cmds.h" />\r
-    <ClInclude Include="cmd.h" />\r
-    <ClInclude Include="collision.h" />\r
-    <ClInclude Include="com_game.h" />\r
-    <ClInclude Include="com_infostring.h" />\r
-    <ClInclude Include="com_list.h" />\r
-    <ClInclude Include="common.h" />\r
-    <ClInclude Include="console.h" />\r
-    <ClInclude Include="crypto.h" />\r
-    <ClInclude Include="csprogs.h" />\r
-    <ClInclude Include="curves.h" />\r
-    <ClInclude Include="cvar.h" />\r
-    <ClInclude Include="darkplaces.h" />\r
-    <ClInclude Include="dpvsimpledecode.h" />\r
-    <ClInclude Include="draw.h" />\r
-    <ClInclude Include="filematch.h" />\r
-    <ClInclude Include="fs.h" />\r
-    <ClInclude Include="ft2.h" />\r
-    <ClInclude Include="ft2_defs.h" />\r
-    <ClInclude Include="ft2_fontdefs.h" />\r
-    <ClInclude Include="gl_backend.h" />\r
-    <ClInclude Include="glquake.h" />\r
-    <ClInclude Include="hmac.h" />\r
-    <ClInclude Include="host.h" />\r
-    <ClInclude Include="image.h" />\r
-    <ClInclude Include="image_png.h" />\r
-    <ClInclude Include="input.h" />\r
-    <ClInclude Include="jpeg.h" />\r
-    <ClInclude Include="keys.h" />\r
-    <ClInclude Include="lhfont.h" />\r
-    <ClInclude Include="lhnet.h" />\r
-    <ClInclude Include="libcurl.h" />\r
-    <ClInclude Include="mathlib.h" />\r
-    <ClInclude Include="matrixlib.h" />\r
-    <ClInclude Include="mdfour.h" />\r
-    <ClInclude Include="menu.h" />\r
-    <ClInclude Include="meshqueue.h" />\r
-    <ClInclude Include="mod_skeletal_animatevertices_generic.h" />\r
-    <ClInclude Include="mod_skeletal_animatevertices_sse.h" />\r
-    <ClInclude Include="model_alias.h" />\r
-    <ClInclude Include="model_brush.h" />\r
-    <ClInclude Include="model_dpmodel.h" />\r
-    <ClInclude Include="model_iqm.h" />\r
-    <ClInclude Include="model_psk.h" />\r
-    <ClInclude Include="model_q1bsp.h" />\r
-    <ClInclude Include="model_q2bsp.h" />\r
-    <ClInclude Include="model_q3bsp.h" />\r
-    <ClInclude Include="model_vbsp.h" />\r
-    <ClInclude Include="model_shared.h" />\r
-    <ClInclude Include="model_sprite.h" />\r
-    <ClInclude Include="model_zymotic.h" />\r
-    <ClInclude Include="modelgen.h" />\r
-    <ClInclude Include="mprogdefs.h" />\r
-    <ClInclude Include="netconn.h" />\r
-    <ClInclude Include="palette.h" />\r
-    <ClInclude Include="polygon.h" />\r
-    <ClInclude Include="portals.h" />\r
-    <ClInclude Include="prvm_offsets.h" />\r
-    <ClInclude Include="pr_comp.h" />\r
-    <ClInclude Include="progdefs.h" />\r
-    <ClInclude Include="progs.h" />\r
-    <ClInclude Include="progsvm.h" />\r
-    <ClInclude Include="protocol.h" />\r
-    <ClInclude Include="prvm_cmds.h" />\r
-    <ClInclude Include="prvm_execprogram.h" />\r
-    <ClInclude Include="qdefs.h" />\r
-    <ClInclude Include="qstats.h" />\r
-    <ClInclude Include="qtypes.h" />\r
-    <ClInclude Include="quakedef.h" />\r
-    <ClInclude Include="r_lerpanim.h" />\r
-    <ClInclude Include="r_modules.h" />\r
-    <ClInclude Include="r_qshader.h" />\r
-    <ClInclude Include="r_shadow.h" />\r
-    <ClInclude Include="r_stats.h" />\r
-    <ClInclude Include="r_textures.h" />\r
-    <ClInclude Include="render.h" />\r
-    <ClInclude Include="resource.h" />\r
-    <ClInclude Include="sbar.h" />\r
-    <ClInclude Include="screen.h" />\r
-    <ClInclude Include="SDLMain.h" />\r
-    <ClInclude Include="server.h" />\r
-    <ClInclude Include="shader_glsl.h" />\r
-    <ClInclude Include="snd_main.h" />\r
-    <ClInclude Include="snd_ogg.h" />\r
-    <ClInclude Include="snd_wav.h" />\r
-    <ClInclude Include="snd_xmp.h" />\r
-    <ClInclude Include="sound.h" />\r
-    <ClInclude Include="spritegn.h" />\r
-    <ClInclude Include="sv_demo.h" />\r
-    <ClInclude Include="svbsp.h" />\r
-    <ClInclude Include="sys.h" />\r
-    <ClInclude Include="taskqueue.h" />\r
-    <ClInclude Include="thread.h" />\r
-    <ClInclude Include="timing.h" />\r
-    <ClInclude Include="utf8lib.h" />\r
-    <ClInclude Include="vid.h" />\r
-    <ClInclude Include="view.h" />\r
-    <ClInclude Include="wad.h" />\r
-    <ClInclude Include="world.h" />\r
-    <ClInclude Include="zone.h" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ResourceCompile Include="darkplaces.rc" />\r
-  </ItemGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
-  <ImportGroup Label="ExtensionTargets">\r
-  </ImportGroup>\r
-</Project>
\ No newline at end of file
index 2f2a6f40877c75e23fb265acf8d09cae4c0dab75..f94592a577ef7ab37488a675c4ae16e78139d116 100644 (file)
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
-    <PlatformToolset>v142</PlatformToolset>\r
     <CharacterSet>MultiByte</CharacterSet>\r
     <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <PlatformToolset>v142</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
-    <PlatformToolset>v142</PlatformToolset>\r
     <CharacterSet>MultiByte</CharacterSet>\r
+    <PlatformToolset>v142</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
-    <PlatformToolset>v142</PlatformToolset>\r
     <CharacterSet>MultiByte</CharacterSet>\r
     <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <PlatformToolset>v142</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
-    <PlatformToolset>v142</PlatformToolset>\r
     <CharacterSet>MultiByte</CharacterSet>\r
+    <PlatformToolset>v142</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-    <Import Project="vs2012_sdl2_win32.props" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-    <Import Project="vs2012_sdl2_win32.props" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-    <Import Project="vs2012_sdl2_win64.props" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-    <Import Project="vs2012_sdl2_win64.props" />\r
-  </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>\r
       <DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
       <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
       <AdditionalOptions>/wd"4201" %(AdditionalOptions)</AdditionalOptions>\r
+      <LanguageStandard>stdcpp17</LanguageStandard>\r
+      <LanguageStandard_C>stdc17</LanguageStandard_C>\r
     </ClCompile>\r
     <Link>\r
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
       <PreprocessorDefinitions>CONFIG_MENU;CONFIG_VIDEO_CAPTURE;WIN32;WIN64;_DEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader />\r
       <DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
       <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
       <AdditionalOptions>/wd"4201" %(AdditionalOptions)</AdditionalOptions>\r
+      <LanguageStandard>stdcpp17</LanguageStandard>\r
+      <LanguageStandard_C>stdc17</LanguageStandard_C>\r
     </ClCompile>\r
     <Link>\r
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
       <DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
       <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
       <AdditionalOptions>/wd"4201" %(AdditionalOptions)</AdditionalOptions>\r
+      <LanguageStandard>stdcpp17</LanguageStandard>\r
+      <LanguageStandard_C>stdc17</LanguageStandard_C>\r
     </ClCompile>\r
     <Link>\r
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
       <DisableSpecificWarnings>4706;4127;4100;4055;4054;4244;4305;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
       <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
       <AdditionalOptions>/wd"4201" %(AdditionalOptions)</AdditionalOptions>\r
+      <LanguageStandard_C>stdc17</LanguageStandard_C>\r
+      <LanguageStandard>stdcpp17</LanguageStandard>\r
     </ClCompile>\r
     <Link>\r
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
     <ClCompile Include="model_sprite.c" />\r
     <ClCompile Include="mvm_cmds.c" />\r
     <ClCompile Include="netconn.c" />\r
+    <ClCompile Include="phys.c" />\r
     <ClCompile Include="palette.c" />\r
     <ClCompile Include="polygon.c" />\r
     <ClCompile Include="portals.c" />\r
     <ClInclude Include="modelgen.h" />\r
     <ClInclude Include="mprogdefs.h" />\r
     <ClInclude Include="netconn.h" />\r
+    <ClInclude Include="phys.h" />\r
     <ClInclude Include="palette.h" />\r
     <ClInclude Include="pmove.h" />\r
     <ClInclude Include="polygon.h" />\r
     <ClInclude Include="resource.h" />\r
     <ClInclude Include="sbar.h" />\r
     <ClInclude Include="screen.h" />\r
-    <ClInclude Include="SDLMain.h" />\r
+    <ClInclude Include="SDL.h" />\r
     <ClInclude Include="server.h" />\r
     <ClInclude Include="shader_glsl.h" />\r
     <ClInclude Include="snd_main.h" />\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
-    <Import Project="packages\sdl2.nuget.redist.2.0.22\build\native\sdl2.nuget.redist.targets" Condition="Exists('packages\sdl2.nuget.redist.2.0.22\build\native\sdl2.nuget.redist.targets')" />\r
-    <Import Project="packages\sdl2.nuget.2.0.22\build\native\sdl2.nuget.targets" Condition="Exists('packages\sdl2.nuget.2.0.22\build\native\sdl2.nuget.targets')" />\r
+    <Import Project="packages\sdl2.nuget.redist.2.30.2\build\native\sdl2.nuget.redist.targets" Condition="Exists('packages\sdl2.nuget.redist.2.30.2\build\native\sdl2.nuget.redist.targets')" />\r
+    <Import Project="packages\sdl2.nuget.2.30.2\build\native\sdl2.nuget.targets" Condition="Exists('packages\sdl2.nuget.2.30.2\build\native\sdl2.nuget.targets')" />\r
   </ImportGroup>\r
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">\r
     <PropertyGroup>\r
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>\r
     </PropertyGroup>\r
-    <Error Condition="!Exists('packages\sdl2.nuget.redist.2.0.22\build\native\sdl2.nuget.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\sdl2.nuget.redist.2.0.22\build\native\sdl2.nuget.redist.targets'))" />\r
-    <Error Condition="!Exists('packages\sdl2.nuget.2.0.22\build\native\sdl2.nuget.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\sdl2.nuget.2.0.22\build\native\sdl2.nuget.targets'))" />\r
+    <Error Condition="!Exists('packages\sdl2.nuget.redist.2.30.2\build\native\sdl2.nuget.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\sdl2.nuget.redist.2.30.2\build\native\sdl2.nuget.redist.targets'))" />\r
+    <Error Condition="!Exists('packages\sdl2.nuget.2.30.2\build\native\sdl2.nuget.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\sdl2.nuget.2.30.2\build\native\sdl2.nuget.targets'))" />\r
   </Target>\r
 </Project>
\ No newline at end of file
diff --git a/darkplaces-vs2017.sln b/darkplaces-vs2017.sln
deleted file mode 100644 (file)
index a3e2748..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-\r
-Microsoft Visual Studio Solution File, Format Version 12.00\r
-# Visual Studio 14\r
-VisualStudioVersion = 14.0.25420.1\r
-MinimumVisualStudioVersion = 10.0.40219.1\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "darkplaces-sdl2-vs2017", "darkplaces-sdl2-vs2017.vcxproj", "{72D93E63-FDBB-4AA3-B42B-FAADA6D7F5B2}"\r
-EndProject\r
-Global\r
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
-               Debug|Win32 = Debug|Win32\r
-               Debug|x64 = Debug|x64\r
-               Release|Win32 = Release|Win32\r
-               Release|x64 = Release|x64\r
-       EndGlobalSection\r
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|Win32.Build.0 = Debug|Win32\r
-               {6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|x64.ActiveCfg = Debug|x64\r
-               {6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Debug|x64.Build.0 = Debug|x64\r
-               {6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|Win32.ActiveCfg = Release|Win32\r
-               {6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|Win32.Build.0 = Release|Win32\r
-               {6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|x64.ActiveCfg = Release|x64\r
-               {6E3D4311-BB84-4EB7-8C6C-10AA3D249C28}.Release|x64.Build.0 = Release|x64\r
-               {389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|Win32.Build.0 = Debug|Win32\r
-               {389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|x64.ActiveCfg = Debug|x64\r
-               {389AE334-D907-4069-90B3-F0551B3EFDE9}.Debug|x64.Build.0 = Debug|x64\r
-               {389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|Win32.ActiveCfg = Release|Win32\r
-               {389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|Win32.Build.0 = Release|Win32\r
-               {389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|x64.ActiveCfg = Release|x64\r
-               {389AE334-D907-4069-90B3-F0551B3EFDE9}.Release|x64.Build.0 = Release|x64\r
-               {72D93E63-FDBB-4AA3-B42B-FAADA6D7F5B2}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {72D93E63-FDBB-4AA3-B42B-FAADA6D7F5B2}.Debug|Win32.Build.0 = Debug|Win32\r
-               {72D93E63-FDBB-4AA3-B42B-FAADA6D7F5B2}.Debug|x64.ActiveCfg = Debug|x64\r
-               {72D93E63-FDBB-4AA3-B42B-FAADA6D7F5B2}.Debug|x64.Build.0 = Debug|x64\r
-               {72D93E63-FDBB-4AA3-B42B-FAADA6D7F5B2}.Release|Win32.ActiveCfg = Release|Win32\r
-               {72D93E63-FDBB-4AA3-B42B-FAADA6D7F5B2}.Release|Win32.Build.0 = Release|Win32\r
-               {72D93E63-FDBB-4AA3-B42B-FAADA6D7F5B2}.Release|x64.ActiveCfg = Release|x64\r
-               {72D93E63-FDBB-4AA3-B42B-FAADA6D7F5B2}.Release|x64.Build.0 = Release|x64\r
-       EndGlobalSection\r
-       GlobalSection(SolutionProperties) = preSolution\r
-               HideSolutionNode = FALSE\r
-       EndGlobalSection\r
-EndGlobal\r
index 512de65f1198969020c34d9f2a1bdc9e05cdfc1c..0d04dd45eca661bb1e546de1850424f7ad96c749 100644 (file)
@@ -58,13 +58,4 @@ extern char engineversion[128];
 #include "mathlib.h"
 #include "matrixlib.h"
 
-extern cvar_t developer;
-extern cvar_t developer_entityparsing;
-extern cvar_t developer_extra;
-extern cvar_t developer_insane;
-extern cvar_t developer_loadfile;
-extern cvar_t developer_loading;
-extern cvar_t host_isclient;
-extern cvar_t sessionid;
-
 #endif
index f4aa574ca4bf3ea3287dabfe1842c394eefa9c64..b5c057462ca87037c2a069f79f849cad0d2d735a 100644 (file)
@@ -42,13 +42,17 @@ float               trace_inopen;
 float          trace_inwater;
 
 //
-// required prog functions
+// prog functions called by engine
 //
-void()         CSQC_Init;
-void()         CSQC_Shutdown;
-float(float f, float t, float n)       CSQC_InputEvent;
-void(float w, float h)         CSQC_UpdateView;
-float(string s)        CSQC_ConsoleCommand;
+void  CSQC_Init(float apilevel, string enginename, float engineversion);
+void  CSQC_Shutdown();
+float CSQC_InputEvent(float evtype, float scanx, float chary);
+void  CSQC_UpdateView(float vid_width, float vid_height, float notmenu); // required for EXT_CSQC (preferred)
+float CSQC_ConsoleCommand(string cmdstr);
+#ifdef CSQC_SIMPLE // hud-only CSQC
+       void CSQC_DrawHud(vector virtsize, float showscores); // required for CSQC_SIMPLE (fallback)
+       void CSQC_DrawScores(vector virtsize, float showscores);
+#endif
 
 //these fields are read and set by the default player physics
 vector         pmove_org;
@@ -336,7 +340,7 @@ void(entity e, string m) setmodel = #3;
 void(entity e, vector min, vector max) setsize = #4;
 
 void() break_to_debugger = #6;
-float() random = #7;
+float() random = #7; // Returns a random number > 0 and < 1
 void(entity e, float chan, string samp, float volume, float atten, ...) sound = #8;
 vector(vector v) normalize = #9;
 void(string e) error = #10;
@@ -430,7 +434,7 @@ void(float fhandle) fclose = #111;
 string(float fhandle) fgets = #112;
 void(float fhandle, string s) fputs = #113;
 float(string s) strlen = #114;
-string(...) strcat = #115;
+string(string s, string...) strcat = #115;
 string(string s, float start, float length) substring = #116;
 vector(string) stov = #117;
 string(string s) strzone = #118;
@@ -1183,6 +1187,16 @@ float CVAR_TYPEFLAG_READONLY = 32;
 //When caseinsensitive is set, the CRC is calculated of the lower cased string.
 float(float caseinsensitive, string s, ...) crc16 = #494;
 
+//DP_QC_WHICHPACK
+//idea: divVerent
+//darkplaces implementation: divVerent
+//builtin definitions:
+string(string filename) whichpack = #503;
+//description:
+//for files in a pak/pk3/whatever, returns the pack's file name in FRIK_FILE name space.
+//for physical files, returns "".
+//in case of error, returns string_null.
+
 //DP_QC_URI_ESCAPE
 //idea: divVerent
 //darkplaces implementation: divVerent
@@ -1433,12 +1447,23 @@ void(float fh, entity e) writetofile = #606;
 float(string s) isfunction = #607;
 void(entity e, string s) parseentitydata = #608;
 
+//DP_QC_FINDCHAIN_TOFIELD
+//see: dpextensions.qc
+entity(vector org, float rad, .entity tofield) findradius_tofield = #22;
+entity(.string fld, string match, .entity tofield) findchain_tofield = #402;
+entity(.float fld, float match, .entity tofield) findchainflags_tofield = #450;
+entity(.float fld, float match, .entity tofield) findchainfloat_tofield = #403;
+
 //DP_COVERAGE
 //idea: divVerent
 //darkplaces implementation: divVerent
 //function definitions:
 void coverage() = #642;  // Reports a coverage event. The engine counts for each of the calls to this builtin whether it has been called.
 
+//DP_RM_CLIPGROUP
+//see: dpextensions.qc
+.float clipgroup;
+
 //DP_QC_FS_SEARCH_PACKFILE
 //idea: Mario
 //darkplaces implementation: Mario
@@ -1448,6 +1473,15 @@ float(string pattern, float caseinsensitive, float quiet, string packfile) searc
 //extension to search_begin (DP_QC_FS_SEARCH), performs a filename search with the specified pattern (for example "maps/*.bsp") and stores the results in a search slot (minimum of 128 supported by any engine with this extension), the other functions take this returned search slot number, be sure to search_free when done (they are also freed on progs reload).
 //only searches for files within the specified packfile, which is expected to match the results of whichpack().
 
+//DP_QC_FINDBOX
+//see: dpextensions.qc
+entity(vector mins, vector maxs) findbox = #566;
+entity(vector mins, vector maxs, .entity tofield) findbox_tofield = #566;
+
+//DP_QC_NUDGEOUTOFSOLID
+//see: dpextensions.qc
+float(entity ent) nudgeoutofsolid = #567;
+
 // assorted builtins
 const float            STAT_MOVEVARS_TICRATE           = 240;
 const float            STAT_MOVEVARS_TIMESCALE         = 241;
index 48045a202faf22ed1b7bdcbf811db9d113d7752e..3978698cec36641fb0a302245da3e54cbf7fa60b 100644 (file)
@@ -35,7 +35,7 @@ float(string s) checkextension = #99;
 //field definitions:
 .float buttonchat;
 //description:
-//true if the player is currently chatting (in messagemode, menus or console)
+//true if the player is currently chatting (in messagemode, menus or console) or if their game window is not active.
 
 //DP_BUTTONUSE
 //idea: id Software
@@ -763,10 +763,10 @@ entity(.string fld, string match) findchain = #402;
 //idea: divVerent
 //darkplaces implementation: divVerent
 //builtin definitions:
-entity(.string fld, float match, .entity tofield) findradius_tofield = #22;
+entity(vector org, float rad, .entity tofield) findradius_tofield = #22;
 entity(.string fld, string match, .entity tofield) findchain_tofield = #402;
-entity(.string fld, float match, .entity tofield) findchainflags_tofield = #450;
-entity(.string fld, float match, .entity tofield) findchainfloat_tofield = #403;
+entity(.float fld, float match, .entity tofield) findchainflags_tofield = #450;
+entity(.float fld, float match, .entity tofield) findchainfloat_tofield = #403;
 //description:
 //similar to findchain() etc, but stores the chain into .tofield instead of .chain
 //actually, the .entity tofield is an optional field of the the existing findchain* functions
@@ -2140,7 +2140,7 @@ void(float fhandle) fclose = #111; // closes a file
 string(float fhandle) fgets = #112; // reads a line of text from the file and returns as a tempstring
 void(float fhandle, string s, ...) fputs = #113; // writes a line of text to the end of the file
 float(string s) strlen = #114; // returns how many characters are in a string
-string(string s1, string s2, ...) strcat = #115; // concatenates two or more strings (for example "abc", "def" would return "abcdef") and returns as a tempstring
+string(string s, string...) strcat = #115; // concatenates 1 to 8 strings (for example "abc", "def" would return "abcdef") and returns as a tempstring
 string(string s, float start, float length) substring = #116; // returns a section of a string as a tempstring - see FTE_STRINGS for enhanced version
 vector(string s) stov = #117; // returns vector value from a string
 string(string s, ...) strzone = #118; // makes a copy of a string into the string zone and returns it, this is often used to keep around a tempstring for longer periods of time (tempstrings are replaced often)
@@ -2633,12 +2633,36 @@ float(string pattern, float caseinsensitive, float quiet, string packfile) searc
 //extension to search_begin (DP_QC_FS_SEARCH), performs a filename search with the specified pattern (for example "maps/*.bsp") and stores the results in a search slot (minimum of 128 supported by any engine with this extension), the other functions take this returned search slot number, be sure to search_free when done (they are also freed on progs reload).
 //only searches for files within the specified packfile, which is expected to match the results of whichpack().
 
-//EXT_CSQC (registercommand for SSQC)
+//EXT_CSQC (registercommand for CSQC, now also available in SVQC)
 //idea: probably Spoike
 //darkplaces implementation: Cloudwalk
 //builtin definitions:
 void(string cmdname) registercommand = #352;
+//engine-called QC prototypes:
+//float CSQC_ConsoleCommand(string command);
+//float ConsoleCmd(string command);
+//description:
+//Adds a new console command which will take priority over a previous command of the same name (including engine commands) and in CSQC is removed when the VM shuts down. This will call CSQC_ConsoleCommand(string command) or ConsoleCmd(string command) in SVQC.  Return value should be true if QC handled the command, otherwise return false to have the engine handle it.
+
+//DP_QC_FINDBOX
+//idea: Mario
+//darkplaces implementation: bones_was_here
+//builtin definitions:
+entity(vector mins, vector maxs) findbox = #566;
+entity(vector mins, vector maxs, .entity tofield) findbox_tofield = #566;
 //description:
-//the registercommand builtin but the server can use it
+//Returns a chain of entities that are touching a box (a simpler findradius); supports DP_QC_FINDCHAIN_TOFIELD
+
+//DP_QC_NUDGEOUTOFSOLID
+//idea: LadyHavoc, bones_was_here
+//darkplaces implementation: LadyHavoc, bones_was_here
+//builtin definitions:
+float(entity ent) nudgeoutofsolid = #567;
+//cvar definitions:
+//sv_gameplayfix_nudgeoutofsolid_separation
+//description:
+//Attempts to move a stuck entity out of solid brushes, returning 1 if successful, 0 if it remains stuck, -1 if it wasn't stuck.
+//Note: makes only one tracebox call if the entity isn't stuck, so don't call tracebox just to see if you should call nudgeoutofsolid.
+
 
 float(float dividend, float divisor) mod = #245;
index 63d2c6388e8447e90e46445abbe65506e93e074b..93bdff12d6fbe9a0a455f214651c3d59403d3140 100644 (file)
@@ -179,9 +179,10 @@ float      vlen(vector v)                  = #9;
 float          vectoyaw(vector v)              = #10;
 vector         vectoangles(vector v)           = #11;
 
-float  random(void)  = #12;
+float  random(void)  = #12; // Returns a random number > 0 and < 1
 
 void   cmd(string command, ...) = #13;
+void localcmd(string command, ...) = #13;
 
 // cvar cmds
 
@@ -246,7 +247,7 @@ string      fgets(float fhandle)  = #50;
 void   fputs(float fhandle, string s)  = #51;
 
 float  strlen(string s)  = #52;
-string strcat(string s1,string s2,...)  = #53;
+string strcat(string s, string...)  = #53;
 string substring(string s, float start, float length)  = #54;
 
 vector stov(string s)  = #55;
@@ -477,6 +478,16 @@ string(string digest, string data, ...) digest_hex = #639;
 //if the given digest is not supported, string_null is returned
 //the digest string is matched case sensitively, use "MD4", not "md4"!
 
+//DP_QC_WHICHPACK
+//idea: divVerent
+//darkplaces implementation: divVerent
+//builtin definitions:
+string(string filename) whichpack = #503;
+//description:
+//for files in a pak/pk3/whatever, returns the pack's file name in FRIK_FILE name space.
+//for physical files, returns "".
+//in case of error, returns string_null.
+
 //DP_QC_URI_ESCAPE
 //idea: div0
 //darkplaces implementation: div0
index 68f161ce289f47e4dc805e01c84a9d04820b9d52..937f0a72c14523c875735cafc6d1aab259458493 100644 (file)
@@ -236,7 +236,7 @@ float       FL_INWATER                              = 16;   // for enter / leave water splash
 float  FL_MONSTER                              = 32;
 float  FL_GODMODE                              = 64;   // player cheat
 float  FL_NOTARGET                             = 128;  // player cheat
-float  FL_ITEM                                 = 256;  // extra wide size for bonus items
+float  FL_ITEM                                 = 256;  // extra wide size for bonus items IF sv_legacy_bbox_expand is 1
 float  FL_ONGROUND                             = 512;  // standing on something
 float  FL_PARTIALGROUND                = 1024; // not all corners are valid
 float  FL_WATERJUMP                    = 2048; // player jumping out of water
@@ -403,7 +403,7 @@ void(entity e, string m) setmodel   = #3;           // set movetype and solid first
 void(entity e, vector min, vector max) setsize = #4;
 // #5 was removed
 void() break_to_debugger                                               = #6;
-float() random                                         = #7;           // returns 0 - 1
+float() random                                         = #7;   // Returns a random number > 0 and < 1
 void(entity e, float chan, string samp, float volume, ...) sound = #8;
 vector(vector v) normalize                     = #9;
 void(string e, ...) error                              = #10;
index 011c95bf4d32260c3078aaebec28fa304779b10f..244387ab6dc55f5edebc912d82dc782ae8e91413 100644 (file)
@@ -397,7 +397,7 @@ void *dpvsimpledecode_open(clvideo_t *video, char *filename, const char **errors
                                                                        sfx_t* sfx;
 
                                                                        FS_StripExtension(filename, wavename, namelen);
-                                                                       strlcat(wavename, ".wav", namelen);
+                                                                       dp_strlcat(wavename, ".wav", namelen);
                                                                        sfx = S_PrecacheSound (wavename, false, false);
                                                                        if (sfx != NULL)
                                                                                s->sndchan = S_StartSound (-1, 0, sfx, vec3_origin, 1.0f, 0);
diff --git a/draw.h b/draw.h
index 562b8d1ba21fe9494678d691c76e59d07dde50ec..8496bb73a1cf1e1dd67a15e0972419c55cf7d7f3 100644 (file)
--- a/draw.h
+++ b/draw.h
@@ -93,10 +93,12 @@ typedef struct ft2_settings_s
 
 #define MAX_FONT_SIZES 16
 #define MAX_FONT_FALLBACKS 3
+#define MAX_FONT_CMDLINE MAX_QPATH * (MAX_FONT_FALLBACKS + 1)
 typedef struct dp_font_s
 {
        cachepic_t *pic;
        float width_of[256]; // width_of[0] == max width of any char; 1.0f is base width (1/16 of texture width); therefore, all widths have to be <= 1 (does not include scale)
+       float width_of_ft2[MAX_FONT_SIZES][256];
        float maxwidth; // precalculated max width of the font (includes scale)
        char texpath[MAX_QPATH];
        char title[MAX_QPATH];
@@ -108,6 +110,8 @@ typedef struct dp_font_s
        struct ft2_font_s *ft2;
 
        ft2_settings_t settings;
+
+       char cmdline[MAX_FONT_CMDLINE];
 }
 dp_font_t;
 
index e06439614c2174927168128adf5b1fcbe8fa268d..38ee0372e940211702ecb710b3504852bd5c26b3 100644 (file)
@@ -7,6 +7,10 @@
 
 #include "darkplaces.h"
 
+#ifdef WIN32
+#include "utf8lib.h"
+#endif
+
 // LadyHavoc: some portable directory listing code I wrote for lmp2pcx, now used in darkplaces to load id1/*.pak and such...
 
 int matchpattern(const char *in, const char *pattern, int caseinsensitive)
@@ -164,20 +168,31 @@ static void adddirentry(stringlist_t *list, const char *path, const char *name)
 #ifdef WIN32
 void listdirectory(stringlist_t *list, const char *basepath, const char *path)
 {
-       char pattern[4096];
-       WIN32_FIND_DATA n_file;
+       #define BUFSIZE 4096
+       char pattern[BUFSIZE] = {0};
+       wchar patternw[BUFSIZE] = {0};
+       char filename[BUFSIZE] = {0};
+       wchar *filenamew;
+       int lenw = 0;
+       WIN32_FIND_DATAW n_file;
        HANDLE hFile;
-       strlcpy (pattern, basepath, sizeof(pattern));
-       strlcat (pattern, path, sizeof (pattern));
-       strlcat (pattern, "*", sizeof (pattern));
+       dp_strlcpy(pattern, basepath, sizeof(pattern));
+       dp_strlcat(pattern, path, sizeof (pattern));
+       dp_strlcat(pattern, "*", sizeof (pattern));
+       fromwtf8(pattern, strlen(pattern), patternw, BUFSIZE);
        // ask for the directory listing handle
-       hFile = FindFirstFile(pattern, &n_file);
+       hFile = FindFirstFileW(patternw, &n_file);
        if(hFile == INVALID_HANDLE_VALUE)
                return;
        do {
-               adddirentry(list, path, n_file.cFileName);
-       } while (FindNextFile(hFile, &n_file) != 0);
+               filenamew = n_file.cFileName;
+               lenw = 0;
+               while(filenamew[lenw] != 0) ++lenw;
+               towtf8(filenamew, lenw, filename, BUFSIZE);
+               adddirentry(list, path, filename);
+       } while (FindNextFileW(hFile, &n_file) != 0);
        FindClose(hFile);
+       #undef BUFSIZE
 }
 #else
 void listdirectory(stringlist_t *list, const char *basepath, const char *path)
diff --git a/fs.c b/fs.c
index f8266c71a2a7e7e10b4ee3c21f1d533f6e657010..8e95b43c40b8538b76babfe8611efdafacf61208 100644 (file)
--- a/fs.c
+++ b/fs.c
 #include "fs.h"
 #include "wad.h"
 
+#ifdef WIN32
+#include "utf8lib.h"
+#endif
+
 // Win32 requires us to add O_BINARY, but the other OSes don't have it
 #ifndef O_BINARY
 # define O_BINARY 0
@@ -105,9 +109,69 @@ static filedesc_t FILEDESC_DUP(const char *filename, filedesc_t fd) {
 }
 #endif
 
+
+/* This code seems to have originally been written with the assumption that
+ * read(..., n) returns n on success. This is not the case (refer to
+ * <https://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>).
+ * Ditto for write.
+ */
+
+/*
+====================
+ReadAll
+
+Read exactly length bytes from fd into buf. If end of file is reached,
+the number of bytes read is returned. If an error occurred, that error
+is returned. Note that if an error is returned, any previously read
+data is lost.
+====================
+*/
+static fs_offset_t ReadAll(const filedesc_t fd, void *const buf, const size_t length)
+{
+       char *const p = (char *)buf;
+       size_t cursor = 0;
+       do
+       {
+               const fs_offset_t result = FILEDESC_READ(fd, p + cursor, length - cursor);
+               if (result < 0) // Error
+                       return result;
+               if (result == 0) // EOF
+                       break;
+               cursor += result;
+       } while (cursor < length);
+       return cursor;
+}
+
+/*
+====================
+WriteAll
+
+Write exactly length bytes to fd from buf.
+If an error occurred, that error is returned.
+====================
+*/
+static fs_offset_t WriteAll(const filedesc_t fd, const void *const buf, const size_t length)
+{
+       const char *const p = (const char *)buf;
+       size_t cursor = 0;
+       do
+       {
+               const fs_offset_t result = FILEDESC_WRITE(fd, p + cursor, length - cursor);
+               if (result < 0) // Error
+                       return result;
+               cursor += result;
+       } while (cursor < length);
+       return cursor;
+}
+
+#undef FILEDESC_READ
+#define FILEDESC_READ ReadAll
+#undef FILEDESC_WRITE
+#define FILEDESC_WRITE WriteAll
+
 /** \page fs File System
 
-All of Quake's data access is through a hierchal file system, but the contents
+All of Quake's data access is through a hierarchical file system, the contents
 of the file system can be transparently merged from several sources.
 
 The "base directory" is the path to the directory holding the quake.exe and
@@ -119,9 +183,8 @@ directory is only used during filesystem initialization.
 The "game directory" is the first tree on the search path and directory that
 all generated files (savegames, screenshots, demos, config files) will be
 saved to.  This can be overridden with the "-game" command line parameter.
-The game directory can never be changed while quake is executing.  This is a
-precaution against having a malicious server instruct clients to write files
-over areas they shouldn't.
+If multiple "-game <gamedir>" args are passed the last one is the "primary"
+and files will be saved there, the rest are read-only.
 
 */
 
@@ -318,9 +381,10 @@ typedef struct pack_s
        char filename [MAX_OSPATH];
        char shortname [MAX_QPATH];
        filedesc_t handle;
-       int ignorecase;  ///< PK3 ignores case
+       qbool ignorecase;  ///< PK3 ignores case
        int numfiles;
        qbool vpack;
+       qbool dlcache;
        packfile_t *files;
 } pack_t;
 //@}
@@ -347,7 +411,7 @@ void FS_Dir_f(cmd_state_t *cmd);
 void FS_Ls_f(cmd_state_t *cmd);
 void FS_Which_f(cmd_state_t *cmd);
 
-static searchpath_t *FS_FindFile (const char *name, int* index, qbool quiet);
+static searchpath_t *FS_FindFile (const char *name, int *index, const char **canonicalname, qbool quiet);
 static packfile_t* FS_AddFileToPack (const char* name, pack_t* pack,
                                                                        fs_offset_t offset, fs_offset_t packsize,
                                                                        fs_offset_t realsize, int flags);
@@ -384,6 +448,7 @@ int fs_all_gamedirs_count = 0;
 
 cvar_t scr_screenshot_name = {CF_CLIENT | CF_PERSISTENT, "scr_screenshot_name","dp", "prefix name for saved screenshots (changes based on -game commandline, as well as which game mode is running; the date is encoded using strftime escapes)"};
 cvar_t fs_empty_files_in_pack_mark_deletions = {CF_CLIENT | CF_SERVER, "fs_empty_files_in_pack_mark_deletions", "0", "if enabled, empty files in a pak/pk3 count as not existing but cancel the search in further packs, effectively allowing patch pak/pk3 files to 'delete' files"};
+cvar_t fs_unload_dlcache = {CF_CLIENT, "fs_unload_dlcache", "1", "if enabled, unload dlcache's loaded pak/pk3 files when changing server and/or map WARNING: disabling unloading can cause servers to override assets of other servers, \"memory leaking\" by dlcache assets never unloading and many more issues"};
 cvar_t cvar_fs_gamedir = {CF_CLIENT | CF_SERVER | CF_READONLY | CF_PERSISTENT, "fs_gamedir", "", "the list of currently selected gamedirs (use the 'gamedir' command to change this)"};
 
 
@@ -437,10 +502,10 @@ static dllhandle_t zlib_dll = NULL;
 #endif
 
 #ifdef WIN32
-static HRESULT (WINAPI *qSHGetFolderPath) (HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath);
+static HRESULT (WINAPI *qSHGetFolderPath) (HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath);
 static dllfunction_t shfolderfuncs[] =
 {
-       {"SHGetFolderPathA", (void **) &qSHGetFolderPath},
+       {"SHGetFolderPathW", (void **) &qSHGetFolderPath},
        {NULL, NULL}
 };
 static const char* shfolderdllnames [] =
@@ -450,7 +515,7 @@ static const char* shfolderdllnames [] =
 };
 static dllhandle_t shfolder_dll = NULL;
 
-const GUID qFOLDERID_SavedGames = {0x4C5C32FF, 0xBB9D, 0x43b0, {0xB5, 0xB4, 0x2D, 0x72, 0xE5, 0x4E, 0xAA, 0xA4}}; 
+const GUID qFOLDERID_SavedGames = {0x4C5C32FF, 0xBB9D, 0x43b0, {0xB5, 0xB4, 0x2D, 0x72, 0xE5, 0x4E, 0xAA, 0xA4}};
 #define qREFKNOWNFOLDERID const GUID *
 #define qKF_FLAG_CREATE 0x8000
 #define qKF_FLAG_NO_ALIAS 0x1000
@@ -682,7 +747,7 @@ static int PK3_BuildFileList (pack_t *pack, const pk3_endOfCentralDir_t *eocd)
                        return -1;
                }
 
-               namesize = BuffLittleShort (&ptr[28]);  // filename length
+               namesize = (unsigned short)BuffLittleShort (&ptr[28]);  // filename length
 
                // Check encryption, compression, and attributes
                // 1st uint8  : general purpose bit flag
@@ -699,7 +764,7 @@ static int PK3_BuildFileList (pack_t *pack, const pk3_endOfCentralDir_t *eocd)
                if ((ptr[8] & 0x21) == 0 && (ptr[38] & 0x18) == 0)
                {
                        // Still enough bytes for the name?
-                       if (namesize < 0 || remaining < namesize || namesize >= (int)sizeof (*pack->files))
+                       if (remaining < namesize || namesize >= (int)sizeof (*pack->files))
                        {
                                Mem_Free (central_dir);
                                return -1;
@@ -743,7 +808,7 @@ static int PK3_BuildFileList (pack_t *pack, const pk3_endOfCentralDir_t *eocd)
                // Skip the name, additionnal field, and comment
                // 1er uint16 : extra field length
                // 2eme uint16 : file comment length
-               count = namesize + BuffLittleShort (&ptr[30]) + BuffLittleShort (&ptr[32]);
+               count = namesize + (unsigned short)BuffLittleShort (&ptr[30]) + (unsigned short)BuffLittleShort (&ptr[32]);
                ptr += ZIP_CDIR_CHUNK_BASE_SIZE + count;
                remaining -= count;
        }
@@ -798,7 +863,7 @@ static pack_t *FS_LoadPackPK3FromFD (const char *packfile, filedesc_t packhandle
        // Create a package structure in memory
        pack = (pack_t *)Mem_Alloc(fs_mempool, sizeof (pack_t));
        pack->ignorecase = true; // PK3 ignores case
-       strlcpy (pack->filename, packfile, sizeof (pack->filename));
+       dp_strlcpy (pack->filename, packfile, sizeof (pack->filename));
        pack->handle = packhandle;
        pack->numfiles = eocd.nbentries;
        pack->files = (packfile_t *)Mem_Alloc(fs_mempool, eocd.nbentries * sizeof(packfile_t));
@@ -916,7 +981,7 @@ static packfile_t* FS_AddFileToPack (const char* name, pack_t* pack,
        memmove (pfile + 1, pfile, (pack->numfiles - left) * sizeof (*pfile));
        pack->numfiles++;
 
-       strlcpy (pfile->name, name, sizeof (pfile->name));
+       dp_strlcpy (pfile->name, name, sizeof (pfile->name));
        pfile->offset = offset;
        pfile->packsize = packsize;
        pfile->realsize = realsize;
@@ -925,14 +990,30 @@ static packfile_t* FS_AddFileToPack (const char* name, pack_t* pack,
        return pfile;
 }
 
+#if WIN32
+#define WSTRBUF 4096
+static inline int wstrlen(wchar *wstr)
+{
+       int len = 0;
+       while (wstr[len] != 0 && len < WSTRBUF)
+               ++len;
+       return len;
+}
+#define widen(str, wstr) fromwtf8(str, strlen(str), wstr, WSTRBUF)
+#define narrow(wstr, str) towtf8(wstr, wstrlen(wstr), str, WSTRBUF)
+#endif
 
 static void FS_mkdir (const char *path)
 {
+#if WIN32
+       wchar pathw[WSTRBUF] = {0};
+#endif
        if(Sys_CheckParm("-readonly"))
                return;
 
 #if WIN32
-       if (_mkdir (path) == -1)
+       widen(path, pathw);
+       if (_wmkdir (pathw) == -1)
 #else
        if (mkdir (path, 0777) == -1)
 #endif
@@ -944,7 +1025,6 @@ static void FS_mkdir (const char *path)
        }
 }
 
-
 /*
 ============
 FS_CreatePath
@@ -1059,7 +1139,7 @@ static pack_t *FS_LoadPackPAK (const char *packfile)
 
        pack = (pack_t *)Mem_Alloc(fs_mempool, sizeof (pack_t));
        pack->ignorecase = true; // PAK is sensitive in Quake1 but insensitive in Quake2
-       strlcpy (pack->filename, packfile, sizeof (pack->filename));
+       dp_strlcpy (pack->filename, packfile, sizeof (pack->filename));
        pack->handle = packhandle;
        pack->numfiles = 0;
        pack->files = (packfile_t *)Mem_Alloc(fs_mempool, numpackfiles * sizeof(packfile_t));
@@ -1095,7 +1175,7 @@ static pack_t *FS_LoadPackVirtual (const char *dirname)
        pack = (pack_t *)Mem_Alloc(fs_mempool, sizeof (pack_t));
        pack->vpack = true;
        pack->ignorecase = false;
-       strlcpy (pack->filename, dirname, sizeof(pack->filename));
+       dp_strlcpy (pack->filename, dirname, sizeof(pack->filename));
        pack->handle = FILEDESC_INVALID;
        pack->numfiles = -1;
        pack->files = NULL;
@@ -1118,7 +1198,7 @@ FS_AddPack_Fullpath
  * plain directories.
  *
  */
-static qbool FS_AddPack_Fullpath(const char *pakfile, const char *shortname, qbool *already_loaded, qbool keep_plain_dirs)
+static qbool FS_AddPack_Fullpath(const char *pakfile, const char *shortname, qbool *already_loaded, qbool keep_plain_dirs, qbool dlcache)
 {
        searchpath_t *search;
        pack_t *pak = NULL;
@@ -1151,7 +1231,7 @@ static qbool FS_AddPack_Fullpath(const char *pakfile, const char *shortname, qbo
 
        if(pak)
        {
-               strlcpy(pak->shortname, shortname, sizeof(pak->shortname));
+               dp_strlcpy(pak->shortname, shortname, sizeof(pak->shortname));
 
                //Con_DPrintf("  Registered pack with short name %s\n", shortname);
                if(keep_plain_dirs)
@@ -1194,6 +1274,7 @@ static qbool FS_AddPack_Fullpath(const char *pakfile, const char *shortname, qbo
                        fs_searchpaths = search;
                }
                search->pack = pak;
+               search->pack->dlcache = dlcache;
                if(pak->vpack)
                {
                        dpsnprintf(search->filename, sizeof(search->filename), "%s/", pakfile);
@@ -1232,7 +1313,7 @@ FS_AddPack
  * If keep_plain_dirs is set, the pack will be added AFTER the first sequence of
  * plain directories.
  */
-qbool FS_AddPack(const char *pakfile, qbool *already_loaded, qbool keep_plain_dirs)
+qbool FS_AddPack(const char *pakfile, qbool *already_loaded, qbool keep_plain_dirs, qbool dlcache)
 {
        char fullpath[MAX_OSPATH];
        int index;
@@ -1242,7 +1323,7 @@ qbool FS_AddPack(const char *pakfile, qbool *already_loaded, qbool keep_plain_di
                *already_loaded = false;
 
        // then find the real name...
-       search = FS_FindFile(pakfile, &index, true);
+       search = FS_FindFile(pakfile, &index, NULL, true);
        if(!search || search->pack)
        {
                Con_Printf("could not find pak \"%s\"\n", pakfile);
@@ -1251,7 +1332,7 @@ qbool FS_AddPack(const char *pakfile, qbool *already_loaded, qbool keep_plain_di
 
        dpsnprintf(fullpath, sizeof(fullpath), "%s%s", search->filename, pakfile);
 
-       return FS_AddPack_Fullpath(fullpath, pakfile, already_loaded, keep_plain_dirs);
+       return FS_AddPack_Fullpath(fullpath, pakfile, already_loaded, keep_plain_dirs, dlcache);
 }
 
 
@@ -1269,7 +1350,7 @@ static void FS_AddGameDirectory (const char *dir)
        stringlist_t list;
        searchpath_t *search;
 
-       strlcpy (fs_gamedir, dir, sizeof (fs_gamedir));
+       dp_strlcpy (fs_gamedir, dir, sizeof (fs_gamedir));
 
        stringlistinit(&list);
        listdirectory(&list, "", dir);
@@ -1280,7 +1361,7 @@ static void FS_AddGameDirectory (const char *dir)
        {
                if (!strcasecmp(FS_FileExtension(list.strings[i]), "pak"))
                {
-                       FS_AddPack_Fullpath(list.strings[i], list.strings[i] + strlen(dir), NULL, false);
+                       FS_AddPack_Fullpath(list.strings[i], list.strings[i] + strlen(dir), NULL, false, false);
                }
        }
 
@@ -1290,7 +1371,7 @@ static void FS_AddGameDirectory (const char *dir)
                if (!strcasecmp(FS_FileExtension(list.strings[i]), "pk3") || !strcasecmp(FS_FileExtension(list.strings[i]), "obb") || !strcasecmp(FS_FileExtension(list.strings[i]), "pk3dir")
                        || !strcasecmp(FS_FileExtension(list.strings[i]), "dpk") || !strcasecmp(FS_FileExtension(list.strings[i]), "dpkdir"))
                {
-                       FS_AddPack_Fullpath(list.strings[i], list.strings[i] + strlen(dir), NULL, false);
+                       FS_AddPack_Fullpath(list.strings[i], list.strings[i] + strlen(dir), NULL, false, false);
                }
        }
 
@@ -1299,7 +1380,7 @@ static void FS_AddGameDirectory (const char *dir)
        // Add the directory to the search path
        // (unpacked files have the priority over packed files)
        search = (searchpath_t *)Mem_Alloc(fs_mempool, sizeof(searchpath_t));
-       strlcpy (search->filename, dir, sizeof (search->filename));
+       dp_strlcpy (search->filename, dir, sizeof (search->filename));
        search->next = fs_searchpaths;
        fs_searchpaths = search;
 }
@@ -1399,6 +1480,49 @@ static void FS_ClearSearchPath (void)
        }
 }
 
+/*
+================
+FS_UnloadPacks_dlcache
+
+Like FS_ClearSearchPath() but unloads only the packs loaded from dlcache
+so we don't need to use a full FS_Rescan() to prevent
+content from the previous server and/or map from interfering with the next
+================
+*/
+void FS_UnloadPacks_dlcache(void)
+{
+       searchpath_t *search = fs_searchpaths, *searchprev = fs_searchpaths, *searchnext;
+
+       if (!fs_unload_dlcache.integer)
+               return;
+
+       while (search)
+       {
+               searchnext = search->next;
+               if (search->pack && search->pack->dlcache)
+               {
+                       Con_DPrintf("Unloading pack: %s\n", search->pack->shortname);
+
+                       // remove it from the search path list
+                       if (search == fs_searchpaths)
+                               fs_searchpaths = search->next;
+                       else
+                               searchprev->next = search->next;
+
+                       // close the file
+                       FILEDESC_CLOSE(search->pack->handle);
+                       // free any memory associated with it
+                       if (search->pack->files)
+                               Mem_Free(search->pack->files);
+                       Mem_Free(search->pack);
+                       Mem_Free(search);
+               }
+               else
+                       searchprev = search;
+               search = searchnext;
+       }
+}
+
 static void FS_AddSelfPack(void)
 {
        if(fs_selfpack)
@@ -1438,9 +1562,9 @@ void FS_Rescan (void)
        FS_AddGameHierarchy (gamedirname1);
        // update the com_modname (used for server info)
        if (gamedirname2 && gamedirname2[0])
-               strlcpy(com_modname, gamedirname2, sizeof(com_modname));
+               dp_strlcpy(com_modname, gamedirname2, sizeof(com_modname));
        else
-               strlcpy(com_modname, gamedirname1, sizeof(com_modname));
+               dp_strlcpy(com_modname, gamedirname1, sizeof(com_modname));
 
        // add the game-specific path, if any
        // (only used for mission packs and the like, which should set fs_modified)
@@ -1460,26 +1584,29 @@ void FS_Rescan (void)
                fs_modified = true;
                FS_AddGameHierarchy (fs_gamedirs[i]);
                // update the com_modname (used server info)
-               strlcpy (com_modname, fs_gamedirs[i], sizeof (com_modname));
+               dp_strlcpy (com_modname, fs_gamedirs[i], sizeof (com_modname));
                if(i)
-                       strlcat(gamedirbuf, va(vabuf, sizeof(vabuf), " %s", fs_gamedirs[i]), sizeof(gamedirbuf));
+                       dp_strlcat(gamedirbuf, va(vabuf, sizeof(vabuf), " %s", fs_gamedirs[i]), sizeof(gamedirbuf));
                else
-                       strlcpy(gamedirbuf, fs_gamedirs[i], sizeof(gamedirbuf));
+                       dp_strlcpy(gamedirbuf, fs_gamedirs[i], sizeof(gamedirbuf));
        }
        Cvar_SetQuick(&cvar_fs_gamedir, gamedirbuf); // so QC or console code can query it
 
        // add back the selfpack as new first item
        FS_AddSelfPack();
 
-       // set the default screenshot name to either the mod name or the
-       // gamemode screenshot name
-       if (strcmp(com_modname, gamedirname1))
-               Cvar_SetQuick (&scr_screenshot_name, com_modname);
-       else
-               Cvar_SetQuick (&scr_screenshot_name, gamescreenshotname);
-       
+       if (cls.state != ca_dedicated)
+       {
+               // set the default screenshot name to either the mod name or the
+               // gamemode screenshot name
+               if (strcmp(com_modname, gamedirname1))
+                       Cvar_SetQuick (&scr_screenshot_name, com_modname);
+               else
+                       Cvar_SetQuick (&scr_screenshot_name, gamescreenshotname);
+       }
+
        if((i = Sys_CheckParm("-modname")) && i < sys.argc - 1)
-               strlcpy(com_modname, sys.argv[i+1], sizeof(com_modname));
+               dp_strlcpy(com_modname, sys.argv[i+1], sizeof(com_modname));
 
        // If "-condebug" is in the command line, remove the previous log file
        if (Sys_CheckParm ("-condebug") != 0)
@@ -1571,7 +1698,7 @@ qbool FS_ChangeGameDirs(int numgamedirs, char gamedirs[][MAX_QPATH], qbool compl
 
        fs_numgamedirs = numgamedirs;
        for (i = 0;i < fs_numgamedirs;i++)
-               strlcpy(fs_gamedirs[i], gamedirs[i], sizeof(fs_gamedirs[i]));
+               dp_strlcpy(fs_gamedirs[i], gamedirs[i], sizeof(fs_gamedirs[i]));
 
        // reinitialize filesystem to detect the new paks
        FS_Rescan();
@@ -1585,8 +1712,8 @@ qbool FS_ChangeGameDirs(int numgamedirs, char gamedirs[][MAX_QPATH], qbool compl
        // unload all sounds so they will be reloaded from the new files as needed
        S_UnloadAllSounds_f(cmd_local);
 
-       // restart the video subsystem after the config is executed
-       Cbuf_InsertText(cmd_local, "\nloadconfig\nvid_restart\n\n");
+       // reset everything that can be and reload configs
+       Cbuf_InsertText(cmd_local, "\nloadconfig\n");
 
        return true;
 }
@@ -1619,7 +1746,7 @@ static void FS_GameDir_f(cmd_state_t *cmd)
        }
 
        for (i = 0;i < numgamedirs;i++)
-               strlcpy(gamedirs[i], Cmd_Argv(cmd, i+1), sizeof(gamedirs[i]));
+               dp_strlcpy(gamedirs[i], Cmd_Argv(cmd, i+1), sizeof(gamedirs[i]));
 
        if ((cls.state == ca_connected && !cls.demoplayback) || sv.active)
        {
@@ -1698,7 +1825,7 @@ const char *FS_CheckGameDir(const char *gamedir)
        ret = FS_SysCheckGameDir(va(vabuf, sizeof(vabuf), "%s%s/", fs_basedir, gamedir), buf, sizeof(buf));
        if(ret)
                return ret;
-       
+
        return fs_checkgamedir_missing;
 }
 
@@ -1731,7 +1858,7 @@ static void FS_ListGameDirs(void)
                        continue;
                if(!*info)
                        continue;
-               stringlistappend(&list2, list.strings[i]); 
+               stringlistappend(&list2, list.strings[i]);
        }
        stringlistfreecontents(&list);
 
@@ -1746,8 +1873,8 @@ static void FS_ListGameDirs(void)
                        continue;
                if(!*info)
                        continue;
-               strlcpy(fs_all_gamedirs[fs_all_gamedirs_count].name, list2.strings[i], sizeof(fs_all_gamedirs[fs_all_gamedirs_count].name));
-               strlcpy(fs_all_gamedirs[fs_all_gamedirs_count].description, info, sizeof(fs_all_gamedirs[fs_all_gamedirs_count].description));
+               dp_strlcpy(fs_all_gamedirs[fs_all_gamedirs_count].name, list2.strings[i], sizeof(fs_all_gamedirs[fs_all_gamedirs_count].name));
+               dp_strlcpy(fs_all_gamedirs[fs_all_gamedirs_count].description, info, sizeof(fs_all_gamedirs[fs_all_gamedirs_count].description));
                ++fs_all_gamedirs_count;
        }
 }
@@ -1778,7 +1905,7 @@ static void COM_InsertFlags(const char *buf) {
                if(i > args_left)
                        break;
                q = (char *)Mem_Alloc(fs_mempool, sz);
-               strlcpy(q, com_token, sz);
+               dp_strlcpy(q, com_token, sz);
                new_argv[i] = q;
                ++i;
        }
@@ -1801,19 +1928,21 @@ static int FS_ChooseUserDir(userdirmode_t userdirmode, char *userdir, size_t use
        {
                // fs_basedir is "" by default, to utilize this you can simply add your gamedir to the Resources in xcode
                // fs_userdir stores configurations to the Documents folder of the app
-               strlcpy(userdir, "../Documents/", MAX_OSPATH);
+               dp_strlcpy(userdir, "../Documents/", MAX_OSPATH);
                return 1;
        }
        return -1;
 
 #elif defined(WIN32)
-       char *homedir;
+       char homedir[WSTRBUF];
+       wchar *homedirw;
 #if _MSC_VER >= 1400
-       size_t homedirlen;
+       size_t homedirwlen;
 #endif
-       TCHAR mydocsdir[MAX_PATH + 1];
+       wchar_t mydocsdirw[WSTRBUF];
+       char mydocsdir[WSTRBUF];
        wchar_t *savedgamesdirw;
-       char savedgamesdir[MAX_OSPATH];
+       char savedgamesdir[WSTRBUF] = {0};
        int fd;
        char vabuf[1024];
 
@@ -1823,28 +1952,31 @@ static int FS_ChooseUserDir(userdirmode_t userdirmode, char *userdir, size_t use
        default:
                return -1;
        case USERDIRMODE_NOHOME:
-               strlcpy(userdir, fs_basedir, userdirsize);
+               dp_strlcpy(userdir, fs_basedir, userdirsize);
                break;
        case USERDIRMODE_MYGAMES:
                if (!shfolder_dll)
                        Sys_LoadDependency(shfolderdllnames, &shfolder_dll, shfolderfuncs);
                mydocsdir[0] = 0;
-               if (qSHGetFolderPath && qSHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, 0, mydocsdir) == S_OK)
+               if (qSHGetFolderPath && qSHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, 0, mydocsdirw) == S_OK)
                {
+                       narrow(mydocsdirw, mydocsdir);
                        dpsnprintf(userdir, userdirsize, "%s/My Games/%s/", mydocsdir, gameuserdirname);
                        break;
                }
 #if _MSC_VER >= 1400
-               _dupenv_s(&homedir, &homedirlen, "USERPROFILE");
-               if(homedir)
+               _wdupenv_s(&homedirw, &homedirwlen, L"USERPROFILE");
+               narrow(homedirw, homedir);
+               if(homedir[0])
                {
                        dpsnprintf(userdir, userdirsize, "%s/.%s/", homedir, gameuserdirname);
-                       free(homedir);
+                       free(homedirw);
                        break;
                }
 #else
-               homedir = getenv("USERPROFILE");
-               if(homedir)
+               homedirw = _wgetenv(L"USERPROFILE");
+               narrow(homedirw, homedir);
+               if(homedir[0])
                {
                        dpsnprintf(userdir, userdirsize, "%s/.%s/", homedir, gameuserdirname);
                        break;
@@ -1869,12 +2001,7 @@ static int FS_ChooseUserDir(userdirmode_t userdirmode, char *userdir, size_t use
 */
                        if (qSHGetKnownFolderPath(&qFOLDERID_SavedGames, qKF_FLAG_CREATE | qKF_FLAG_NO_ALIAS, NULL, &savedgamesdirw) == S_OK)
                        {
-                               memset(savedgamesdir, 0, sizeof(savedgamesdir));
-#if _MSC_VER >= 1400
-                               wcstombs_s(NULL, savedgamesdir, sizeof(savedgamesdir), savedgamesdirw, sizeof(savedgamesdir)-1);
-#else
-                               wcstombs(savedgamesdir, savedgamesdirw, sizeof(savedgamesdir)-1);
-#endif
+                               narrow(savedgamesdirw, savedgamesdir);
                                qCoTaskMemFree(savedgamesdirw);
                        }
                        qCoUninitialize();
@@ -1896,7 +2023,7 @@ static int FS_ChooseUserDir(userdirmode_t userdirmode, char *userdir, size_t use
        default:
                return -1;
        case USERDIRMODE_NOHOME:
-               strlcpy(userdir, fs_basedir, userdirsize);
+               dp_strlcpy(userdir, fs_basedir, userdirsize);
                break;
        case USERDIRMODE_HOME:
                homedir = getenv("HOME");
@@ -1969,9 +2096,10 @@ void FS_Init_Commands(void)
 {
        Cvar_RegisterVariable (&scr_screenshot_name);
        Cvar_RegisterVariable (&fs_empty_files_in_pack_mark_deletions);
+       Cvar_RegisterVariable (&fs_unload_dlcache);
        Cvar_RegisterVariable (&cvar_fs_gamedir);
 
-       Cmd_AddCommand(CF_SHARED, "gamedir", FS_GameDir_f, "changes active gamedir list (can take multiple arguments), not including base directory (example usage: gamedir ctf)");
+       Cmd_AddCommand(CF_SHARED, "gamedir", FS_GameDir_f, "changes active gamedir list, can take multiple arguments which shouldn't include the base directory, the last gamedir is the \"primary\" and files will be saved there (example usage: gamedir ctf id1)");
        Cmd_AddCommand(CF_SHARED, "fs_rescan", FS_Rescan_f, "rescans filesystem for new pack archives and any other changes");
        Cmd_AddCommand(CF_SHARED, "path", FS_Path_f, "print searchpath (game directories and archives)");
        Cmd_AddCommand(CF_SHARED, "dir", FS_Dir_f, "list files in searchpath matching an * filename pattern, one per line");
@@ -1994,7 +2122,7 @@ static void FS_Init_Dir (void)
        i = Sys_CheckParm ("-basedir");
        if (i && i < sys.argc-1)
        {
-               strlcpy (fs_basedir, sys.argv[i+1], sizeof (fs_basedir));
+               dp_strlcpy (fs_basedir, sys.argv[i+1], sizeof (fs_basedir));
                i = (int)strlen (fs_basedir);
                if (i > 0 && (fs_basedir[i-1] == '\\' || fs_basedir[i-1] == '/'))
                        fs_basedir[i-1] = 0;
@@ -2003,7 +2131,7 @@ static void FS_Init_Dir (void)
        {
 // If the base directory is explicitly defined by the compilation process
 #ifdef DP_FS_BASEDIR
-               strlcpy(fs_basedir, DP_FS_BASEDIR, sizeof(fs_basedir));
+               dp_strlcpy(fs_basedir, DP_FS_BASEDIR, sizeof(fs_basedir));
 #elif defined(__ANDROID__)
                dpsnprintf(fs_basedir, sizeof(fs_basedir), "/sdcard/%s/", gameuserdirname);
 #elif defined(MACOSX)
@@ -2011,7 +2139,7 @@ static void FS_Init_Dir (void)
                if (strstr(sys.argv[0], ".app/"))
                {
                        char *split;
-                       strlcpy(fs_basedir, sys.argv[0], sizeof(fs_basedir));
+                       dp_strlcpy(fs_basedir, sys.argv[0], sizeof(fs_basedir));
                        split = strstr(fs_basedir, ".app/");
                        if (split)
                        {
@@ -2023,7 +2151,7 @@ static void FS_Init_Dir (void)
                                if (stat(va(vabuf, sizeof(vabuf), "%s/Contents/Resources/%s", fs_basedir, gamedirname1), &statresult) == 0)
                                {
                                        // found gamedir inside Resources, use it
-                                       strlcat(fs_basedir, "Contents/Resources/", sizeof(fs_basedir));
+                                       dp_strlcat(fs_basedir, "Contents/Resources/", sizeof(fs_basedir));
                                }
                                else
                                {
@@ -2042,7 +2170,7 @@ static void FS_Init_Dir (void)
        memset(fs_basedir + sizeof(fs_basedir) - 2, 0, 2);
        // add a path separator to the end of the basedir if it lacks one
        if (fs_basedir[0] && fs_basedir[strlen(fs_basedir) - 1] != '/' && fs_basedir[strlen(fs_basedir) - 1] != '\\')
-               strlcat(fs_basedir, "/", sizeof(fs_basedir));
+               dp_strlcat(fs_basedir, "/", sizeof(fs_basedir));
 
        // Add the personal game directory
        if((i = Sys_CheckParm("-userdir")) && i < sys.argc - 1)
@@ -2052,7 +2180,7 @@ static void FS_Init_Dir (void)
        else
        {
 #ifdef DP_FS_USERDIR
-               strlcpy(fs_userdir, DP_FS_USERDIR, sizeof(fs_userdir));
+               dp_strlcpy(fs_userdir, DP_FS_USERDIR, sizeof(fs_userdir));
 #else
                int dirmode;
                int highestuserdirmode = USERDIRMODE_COUNT - 1;
@@ -2130,7 +2258,7 @@ static void FS_Init_Dir (void)
                        if(p == fs_checkgamedir_missing)
                                Con_Printf(CON_WARN "WARNING: -game %s%s/ not found!\n", fs_basedir, sys.argv[i]);
                        // add the gamedir to the list of active gamedirs
-                       strlcpy (fs_gamedirs[fs_numgamedirs], sys.argv[i], sizeof(fs_gamedirs[fs_numgamedirs]));
+                       dp_strlcpy (fs_gamedirs[fs_numgamedirs], sys.argv[i], sizeof(fs_gamedirs[fs_numgamedirs]));
                        fs_numgamedirs++;
                }
        }
@@ -2237,6 +2365,9 @@ static filedesc_t FS_SysOpenFiledesc(const char *filepath, const char *mode, qbo
        int mod, opt;
        unsigned int ind;
        qbool dolock = false;
+       #ifdef WIN32
+       wchar filepathw[WSTRBUF] = {0};
+       #endif
 
        // Parse the mode string
        switch (mode[0])
@@ -2288,10 +2419,11 @@ static filedesc_t FS_SysOpenFiledesc(const char *filepath, const char *mode, qbo
        handle = SDL_RWFromFile(filepath, mode);
 #else
 # ifdef WIN32
+       widen(filepath, filepathw);
 #  if _MSC_VER >= 1400
-       _sopen_s(&handle, filepath, mod | opt, (dolock ? ((mod == O_RDONLY) ? _SH_DENYRD : _SH_DENYRW) : _SH_DENYNO), _S_IREAD | _S_IWRITE);
+       _wsopen_s(&handle, filepathw, mod | opt, (dolock ? ((mod == O_RDONLY) ? _SH_DENYRD : _SH_DENYRW) : _SH_DENYNO), _S_IREAD | _S_IWRITE);
 #  else
-       handle = _sopen (filepath, mod | opt, (dolock ? ((mod == O_RDONLY) ? _SH_DENYRD : _SH_DENYRW) : _SH_DENYNO), _S_IREAD | _S_IWRITE);
+       handle = _wsopen (filepathw, mod | opt, (dolock ? ((mod == O_RDONLY) ? _SH_DENYRD : _SH_DENYRW) : _SH_DENYNO), _S_IREAD | _S_IWRITE);
 #  endif
 # else
        handle = open (filepath, mod | opt, 0666);
@@ -2515,7 +2647,7 @@ int FS_CheckNastyPath (const char *path, qbool isgamedir)
 ====================
 FS_SanitizePath
 
-Sanitize path (replace non-portable characters 
+Sanitize path (replace non-portable characters
 with portable ones in-place, etc)
 ====================
 */
@@ -2536,7 +2668,7 @@ Return the searchpath where the file was found (or NULL)
 and the file index in the package if relevant
 ====================
 */
-static searchpath_t *FS_FindFile (const char *name, int* index, qbool quiet)
+static searchpath_t *FS_FindFile (const char *name, int *index, const char **canonicalname, qbool quiet)
 {
        searchpath_t *search;
        pack_t *pak;
@@ -2574,15 +2706,18 @@ static searchpath_t *FS_FindFile (const char *name, int* index, qbool quiet)
 
                                                if (index != NULL)
                                                        *index = -1;
+                                               if (canonicalname)
+                                                       *canonicalname = NULL;
                                                return NULL;
                                        }
 
                                        if (!quiet && developer_extra.integer)
-                                               Con_DPrintf("FS_FindFile: %s in %s\n",
-                                                                       pak->files[middle].name, pak->filename);
+                                               Con_DPrintf("FS_FindFile: %s in %s\n", pak->files[middle].name, pak->filename);
 
                                        if (index != NULL)
                                                *index = middle;
+                                       if (canonicalname)
+                                               *canonicalname = pak->files[middle].name;
                                        return search;
                                }
 
@@ -2604,6 +2739,8 @@ static searchpath_t *FS_FindFile (const char *name, int* index, qbool quiet)
 
                                if (index != NULL)
                                        *index = -1;
+                               if (canonicalname)
+                                       *canonicalname = name;
                                return search;
                        }
                }
@@ -2614,6 +2751,8 @@ static searchpath_t *FS_FindFile (const char *name, int* index, qbool quiet)
 
        if (index != NULL)
                *index = -1;
+       if (canonicalname)
+               *canonicalname = NULL;
        return NULL;
 }
 
@@ -2630,7 +2769,7 @@ static qfile_t *FS_OpenReadFile (const char *filename, qbool quiet, qbool nonblo
        searchpath_t *search;
        int pack_ind;
 
-       search = FS_FindFile (filename, &pack_ind, quiet);
+       search = FS_FindFile (filename, &pack_ind, NULL, quiet);
 
        // Not found?
        if (search == NULL)
@@ -2672,7 +2811,7 @@ static qfile_t *FS_OpenReadFile (const char *filename, qbool quiet, qbool nonblo
                        if(count < 0)
                                return NULL;
                        linkbuf[count] = 0;
-                       
+
                        // Now combine the paths...
                        mergeslash = strrchr(filename, '/');
                        mergestart = linkbuf;
@@ -3495,7 +3634,7 @@ void FS_DefaultExtension (char *path, const char *extension, size_t size_path)
                src--;
        }
 
-       strlcat (path, extension, size_path);
+       dp_strlcat (path, extension, size_path);
 }
 
 
@@ -3511,7 +3650,7 @@ int FS_FileType (const char *filename)
        searchpath_t *search;
        char fullpath[MAX_OSPATH];
 
-       search = FS_FindFile (filename, NULL, true);
+       search = FS_FindFile (filename, NULL, NULL, true);
        if(!search)
                return FS_FILETYPE_NONE;
 
@@ -3528,11 +3667,15 @@ int FS_FileType (const char *filename)
 FS_FileExists
 
 Look for a file in the packages and in the filesystem
+Returns its canonical name (VFS path with correct capitalisation) if found, else NULL.
+If the file is found outside a pak, this will be the same pointer as passed in.
 ==================
 */
-qbool FS_FileExists (const char *filename)
+const char *FS_FileExists (const char *filename)
 {
-       return (FS_FindFile (filename, NULL, true) != NULL);
+       const char *canonicalname;
+
+       return FS_FindFile(filename, NULL, &canonicalname, true) ? canonicalname : NULL;
 }
 
 
@@ -3550,8 +3693,10 @@ int FS_SysFileType (const char *path)
 # ifndef INVALID_FILE_ATTRIBUTES
 #  define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
 # endif
-
-       DWORD result = GetFileAttributes(path);
+       wchar pathw[WSTRBUF] = {0};
+       DWORD result;
+       widen(path, pathw);
+       result = GetFileAttributesW(pathw);
 
        if(result == INVALID_FILE_ATTRIBUTES)
                return FS_FILETYPE_NONE;
@@ -3639,7 +3784,7 @@ fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet, const
                        for (i = 0;i < pak->numfiles;i++)
                        {
                                char temp[MAX_OSPATH];
-                               strlcpy(temp, pak->files[i].name, sizeof(temp));
+                               dp_strlcpy(temp, pak->files[i].name, sizeof(temp));
                                while (temp[0])
                                {
                                        if (matchpattern(temp, (char *)pattern, true))
@@ -3711,7 +3856,7 @@ fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet, const
 
                                // prevseparator points past the '/' right before the wildcard and nextseparator at the one following it (or at the end of the string)
                                // copy everything up except nextseperator
-                               strlcpy(subpattern, pattern, min(sizeof(subpattern), (size_t) (nextseparator - pattern + 1)));
+                               dp_ustr2stp(subpattern, sizeof(subpattern), pattern, nextseparator - pattern);
                                // find the last '/' before the wildcard
                                prevseparator = strrchr( subpattern, '/' );
                                if (!prevseparator)
@@ -3720,13 +3865,13 @@ fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet, const
                                        prevseparator++;
                                // copy everything from start to the previous including the '/' (before the wildcard)
                                // everything up to start is already included in the path of matchedSet's entries
-                               strlcpy(subpath, start, min(sizeof(subpath), (size_t) ((prevseparator - subpattern) - (start - pattern) + 1)));
+                               dp_ustr2stp(subpath, sizeof(subpath), start, (prevseparator - subpattern) - (start - pattern));
 
                                // for each entry in matchedSet try to open the subdirectories specified in subpath
                                for( dirlistindex = 0 ; dirlistindex < matchedSet.numstrings ; dirlistindex++ ) {
                                        char temp[MAX_OSPATH];
-                                       strlcpy( temp, matchedSet.strings[ dirlistindex ], sizeof(temp) );
-                                       strlcat( temp, subpath, sizeof(temp) );
+                                       dp_strlcpy( temp, matchedSet.strings[ dirlistindex ], sizeof(temp) );
+                                       dp_strlcat( temp, subpath, sizeof(temp) );
                                        listdirectory( &foundSet, searchpath->filename, temp );
                                }
                                if( dirlistindex == 0 ) {
@@ -3904,9 +4049,9 @@ void FS_Which_f(cmd_state_t *cmd)
        {
                Con_Printf("usage:\n%s <file>\n", Cmd_Argv(cmd, 0));
                return;
-       }  
+       }
        filename = Cmd_Argv(cmd, 1);
-       sp = FS_FindFile(filename, &index, true);
+       sp = FS_FindFile(filename, &index, NULL, true);
        if (!sp) {
                Con_Printf("%s isn't anywhere\n", filename);
                return;
@@ -3926,7 +4071,7 @@ void FS_Which_f(cmd_state_t *cmd)
 const char *FS_WhichPack(const char *filename)
 {
        int index;
-       searchpath_t *sp = FS_FindFile(filename, &index, true);
+       searchpath_t *sp = FS_FindFile(filename, &index, NULL, true);
        if(sp && sp->pack)
                return sp->pack->shortname;
        else if(sp)
@@ -4057,7 +4202,7 @@ unsigned char *FS_Deflate(const unsigned char *data, size_t size, size_t *deflat
                Mem_Free(tmp);
                return NULL;
        }
-       
+
        if(qz_deflateEnd(&strm) != Z_OK)
        {
                Con_Printf("FS_Deflate: deflateEnd failed\n");
@@ -4084,7 +4229,7 @@ unsigned char *FS_Deflate(const unsigned char *data, size_t size, size_t *deflat
 
        memcpy(out, tmp, strm.total_out);
        Mem_Free(tmp);
-       
+
        return out;
 }
 
@@ -4151,7 +4296,7 @@ unsigned char *FS_Inflate(const unsigned char *data, size_t size, size_t *inflat
                        case Z_STREAM_END:
                        case Z_OK:
                                break;
-                               
+
                        case Z_STREAM_ERROR:
                                Con_Print("FS_Inflate: stream error!\n");
                                break;
@@ -4167,7 +4312,7 @@ unsigned char *FS_Inflate(const unsigned char *data, size_t size, size_t *inflat
                        default:
                                Con_Print("FS_Inflate: unknown error!\n");
                                break;
-                               
+
                }
                if(ret != Z_OK && ret != Z_STREAM_END)
                {
@@ -4195,6 +4340,6 @@ unsigned char *FS_Inflate(const unsigned char *data, size_t size, size_t *inflat
        Mem_Free(outbuf.data);
 
        *inflated_size = (size_t)outbuf.cursize;
-       
+
        return out;
 }
diff --git a/fs.h b/fs.h
index b8ada8b990b831b04c55441845e96958da262d59..d839833172cbadd9d58ea3e17abee5b458f0477c 100644 (file)
--- a/fs.h
+++ b/fs.h
@@ -61,7 +61,7 @@ typedef struct vfs_s
 // IMPORTANT: the file path is automatically prefixed by the current game directory for
 // each file created by FS_WriteFile, or opened in "write" or "append" mode by FS_OpenRealFile
 
-qbool FS_AddPack(const char *pakfile, qbool *already_loaded, qbool keep_plain_dirs); // already_loaded may be NULL if caller does not care
+qbool FS_AddPack(const char *pakfile, qbool *already_loaded, qbool keep_plain_dirs, qbool dlcache); // already_loaded may be NULL if caller does not care
 const char *FS_WhichPack(const char *filename);
 void FS_CreatePath (char *path);
 int FS_SysOpenFD(const char *filepath, const char *mode, qbool nonblocking); // uses absolute path
@@ -102,6 +102,7 @@ extern int fs_all_gamedirs_count;
 qbool FS_ChangeGameDirs(int numgamedirs, char gamedirs[][MAX_QPATH], qbool complain, qbool failmissing);
 qbool FS_IsRegisteredQuakePack(const char *name);
 int FS_CRCFile(const char *filename, size_t *filesizepointer);
+void FS_UnloadPacks_dlcache(void);
 void FS_Rescan(void);
 
 typedef struct fssearch_s
@@ -130,11 +131,17 @@ void FS_DefaultExtension (char *path, const char *extension, size_t size_path);
 #define FS_FILETYPE_NONE 0
 #define FS_FILETYPE_FILE 1
 #define FS_FILETYPE_DIRECTORY 2
-int FS_FileType (const char *filename);                // the file can be into a package
-int FS_SysFileType (const char *filename);             // only look for files outside of packages
-
-qbool FS_FileExists (const char *filename);            // the file can be into a package
-qbool FS_SysFileExists (const char *filename); // only look for files outside of packages
+/// Look for a file in the packages and in the filesystem
+int FS_FileType (const char *filename);
+/// Look for a file in the filesystem only
+int FS_SysFileType (const char *filename);
+
+/// Look for a file in the packages and in the filesystem
+/// Returns its canonical name (same case as used in the pack) if found, else NULL.
+/// If the file is found outside a pak, this will be the same pointer as passed in.
+const char *FS_FileExists (const char *filename);
+/// Look for a file in the filesystem only
+qbool FS_SysFileExists (const char *filename);
 
 unsigned char *FS_Deflate(const unsigned char *data, size_t size, size_t *deflated_size, int level, mempool_t *mempool);
 unsigned char *FS_Inflate(const unsigned char *data, size_t size, size_t *inflated_size, mempool_t *mempool);
diff --git a/ft2.c b/ft2.c
index b7421b218c3f79abe5ebd11039c51510ea868ade..64efe9a674c93a4834458e55fb7c96710b26673c 100644 (file)
--- a/ft2.c
+++ b/ft2.c
@@ -27,6 +27,25 @@ static int img_fontmap[256] = {
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
+/*
+ * Some big blocks of Unicode characters, according to
+ *     http://www.unicode.org/Public/UNIDATA/Blocks.txt
+ *
+ * Let's call these "bigblocks".
+ * These characters are "spreaded", and ordinary maps will 
+ *     waste huge amount of resources rendering/caching unused glyphs.
+ *
+ * So, a new design is introduced to solve the problem:
+ *     incremental maps, in which only used glyphs are stored.
+ */
+static const Uchar unicode_bigblocks[] = {
+       0x3400, 0x4DBF,         //   6592  CJK Unified Ideographs Extension A
+       0x4E00, 0x9FFF,         //  20992  CJK Unified Ideographs
+       0xAC00, 0xD7AF,         //  11184  Hangul Syllables
+       0xE000, 0xF8FF,         //   6400  Private Use Area
+       0x10000, 0x10FFFF   //         Everything above
+};
+
 /*
 ================================================================================
 CVars introduced with the freetype extension
@@ -34,14 +53,15 @@ CVars introduced with the freetype extension
 */
 
 cvar_t r_font_disable_freetype = {CF_CLIENT | CF_ARCHIVE, "r_font_disable_freetype", "0", "disable freetype support for fonts entirely"};
-cvar_t r_font_use_alpha_textures = {CF_CLIENT | CF_ARCHIVE, "r_font_use_alpha_textures", "0", "use alpha-textures for font rendering, this should safe memory"};
 cvar_t r_font_size_snapping = {CF_CLIENT | CF_ARCHIVE, "r_font_size_snapping", "1", "stick to good looking font sizes whenever possible - bad when the mod doesn't support it!"};
 cvar_t r_font_kerning = {CF_CLIENT | CF_ARCHIVE, "r_font_kerning", "1", "Use kerning if available"};
-cvar_t r_font_diskcache = {CF_CLIENT | CF_ARCHIVE, "r_font_diskcache", "0", "save font textures to disk for future loading rather than generating them every time"};
+cvar_t r_font_diskcache = {CF_CLIENT | CF_ARCHIVE, "r_font_diskcache", "0", "[deprecated, not effective] save font textures to disk for future loading rather than generating them every time"};
 cvar_t r_font_compress = {CF_CLIENT | CF_ARCHIVE, "r_font_compress", "0", "use texture compression on font textures to save video memory"};
 cvar_t r_font_nonpoweroftwo = {CF_CLIENT | CF_ARCHIVE, "r_font_nonpoweroftwo", "1", "use nonpoweroftwo textures for font (saves memory, potentially slower)"};
 cvar_t developer_font = {CF_CLIENT | CF_ARCHIVE, "developer_font", "0", "prints debug messages about fonts"};
 
+cvar_t r_font_disable_incmaps = {CF_CLIENT | CF_ARCHIVE, "r_font_disable_incmaps", "0", "always to load a full glyph map for individual unmapped character, even when it will mean extreme resources waste"};
+
 #ifndef DP_FREETYPE_STATIC
 
 /*
@@ -268,7 +288,7 @@ static const unsigned char *fontfilecache_LoadFile(const char *path, qbool quiet
                for(i = 0; i < MAX_FONTFILES; ++i)
                        if(fontfiles[i].refcount <= 0)
                        {
-                               strlcpy(fontfiles[i].path, path, sizeof(fontfiles[i].path));
+                               dp_strlcpy(fontfiles[i].path, path, sizeof(fontfiles[i].path));
                                fontfiles[i].len = *filesizepointer;
                                fontfiles[i].buf = buf;
                                fontfiles[i].refcount = 1;
@@ -424,13 +444,14 @@ void Font_Init(void)
 {
        Cvar_RegisterVariable(&r_font_nonpoweroftwo);
        Cvar_RegisterVariable(&r_font_disable_freetype);
-       Cvar_RegisterVariable(&r_font_use_alpha_textures);
        Cvar_RegisterVariable(&r_font_size_snapping);
        Cvar_RegisterVariable(&r_font_kerning);
        Cvar_RegisterVariable(&r_font_diskcache);
        Cvar_RegisterVariable(&r_font_compress);
        Cvar_RegisterVariable(&developer_font);
 
+       Cvar_RegisterVariable(&r_font_disable_incmaps);
+
        // let's open it at startup already
        Font_OpenLibrary();
 }
@@ -526,7 +547,7 @@ qbool Font_LoadFont(const char *name, dp_font_t *dpfnt)
                        Mem_Free(ft2);
                        return false;
                }
-               strlcpy(ft2->name, name, sizeof(ft2->name));
+               dp_strlcpy(ft2->name, name, sizeof(ft2->name));
                ft2->image_font = true;
                ft2->has_kerning = false;
        }
@@ -703,7 +724,7 @@ static qbool Font_LoadFile(const char *name, int _face, ft2_settings_t *settings
                        Con_Printf(CON_ERROR "Failed to add attachment %u to %s\n", (unsigned)i, font->name);
        }
 
-       strlcpy(font->name, name, sizeof(font->name));
+       dp_strlcpy(font->name, name, sizeof(font->name));
        font->image_font = false;
        font->has_kerning = !!(((FT_Face)(font->face))->face_flags & FT_FACE_FLAG_KERNING);
        return true;
@@ -886,7 +907,7 @@ static void Font_Postprocess(ft2_font_t *fnt, unsigned char *imagedata, int pitc
 }
 
 static float Font_SearchSize(ft2_font_t *font, FT_Face fontface, float size);
-static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch, ft2_font_map_t **outmap);
+static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch, ft2_font_map_t **outmap, int *outmapch, qbool incmap_ok);
 static qbool Font_LoadSize(ft2_font_t *font, float size, qbool check_only)
 {
        int map_index;
@@ -933,7 +954,7 @@ static qbool Font_LoadSize(ft2_font_t *font, float size, qbool check_only)
        temp.sfx = (1.0/64.0)/(double)size;
        temp.sfy = (1.0/64.0)/(double)size;
        temp.intSize = -1; // negative value: LoadMap must search now :)
-       if (!Font_LoadMap(font, &temp, 0, &fmap))
+       if (!Font_LoadMap(font, &temp, 0, &fmap, NULL, false))
        {
                Con_Printf(CON_ERROR "ERROR: can't load the first character map for %s\n"
                           "This is fatal\n",
@@ -951,6 +972,7 @@ static qbool Font_LoadSize(ft2_font_t *font, float size, qbool check_only)
        {
                Uchar l, r;
                FT_Vector kernvec;
+               fmap->kerning = (ft2_kerning_t *)Mem_Alloc(font_mempool, sizeof(ft2_kerning_t));
                for (l = 0; l < 256; ++l)
                {
                        for (r = 0; r < 256; ++r)
@@ -960,13 +982,13 @@ static qbool Font_LoadSize(ft2_font_t *font, float size, qbool check_only)
                                ur = qFT_Get_Char_Index((FT_Face)font->face, r);
                                if (qFT_Get_Kerning((FT_Face)font->face, ul, ur, FT_KERNING_DEFAULT, &kernvec))
                                {
-                                       fmap->kerning.kerning[l][r][0] = 0;
-                                       fmap->kerning.kerning[l][r][1] = 0;
+                                       fmap->kerning->kerning[l][r][0] = 0;
+                                       fmap->kerning->kerning[l][r][1] = 0;
                                }
                                else
                                {
-                                       fmap->kerning.kerning[l][r][0] = Font_SnapTo((kernvec.x / 64.0) / fmap->size, 1 / fmap->size);
-                                       fmap->kerning.kerning[l][r][1] = Font_SnapTo((kernvec.y / 64.0) / fmap->size, 1 / fmap->size);
+                                       fmap->kerning->kerning[l][r][0] = Font_SnapTo((kernvec.x / 64.0) / fmap->size, 1 / fmap->size);
+                                       fmap->kerning->kerning[l][r][1] = Font_SnapTo((kernvec.y / 64.0) / fmap->size, 1 / fmap->size);
                                }
                        }
                }
@@ -1074,8 +1096,8 @@ qbool Font_GetKerningForMap(ft2_font_t *font, int map_index, float w, float h, U
        {
                //Con_Printf("%g : %f, %f, %f :: %f\n", (w / (float)fmap->size), w, fmap->size, fmap->intSize, Font_VirtualToRealSize(w));
                // quick-kerning, be aware of the size: scale it
-               if (outx) *outx = fmap->kerning.kerning[left][right][0];// * (w / (float)fmap->size);
-               if (outy) *outy = fmap->kerning.kerning[left][right][1];// * (h / (float)fmap->size);
+               if (outx) *outx = fmap->kerning->kerning[left][right][0];// * (w / (float)fmap->size);
+               if (outy) *outy = fmap->kerning->kerning[left][right][1];// * (h / (float)fmap->size);
                return true;
        }
        else
@@ -1123,16 +1145,40 @@ qbool Font_GetKerningForSize(ft2_font_t *font, float w, float h, Uchar left, Uch
        return Font_GetKerningForMap(font, Font_IndexForSize(font, h, NULL, NULL), w, h, left, right, outx, outy);
 }
 
-static void UnloadMapRec(ft2_font_map_t *map)
+// this is used to gracefully unload a map chain; the passed map
+// needs not necessarily be a startmap, so maps ahead of it can be kept
+static void UnloadMapChain(ft2_font_map_t *map)
 {
-       if (map->pic)
+       int i;
+       ft2_font_map_t *nextmap;
+       // these may only be in a startmap
+       if (map->kerning != NULL)
+               Mem_Free(map->kerning);
+       if (map->incmap != NULL)
+       {
+               for (i = 0; i < FONT_CHARS_PER_LINE; ++i)
+                       if (map->incmap->data_tier1[i] != NULL)
+                               Mem_Free(map->incmap->data_tier1[i]);
+                       else
+                               break;
+               for (i = 0; i < FONT_CHAR_LINES; ++i)
+                       if (map->incmap->data_tier2[i] != NULL)
+                               Mem_Free(map->incmap->data_tier2[i]);
+                       else
+                               break;
+               Mem_Free(map->incmap);
+       }
+       while (map != NULL)
        {
-               //Draw_FreePic(map->pic); // FIXME: refcounting needed...
-               map->pic = NULL;
+               if (map->pic)
+               {
+                       //Draw_FreePic(map->pic); // FIXME: refcounting needed...
+                       map->pic = NULL;
+               }
+               nextmap = map->next;
+               Mem_Free(map);
+               map = nextmap;
        }
-       if (map->next)
-               UnloadMapRec(map->next);
-       Mem_Free(map);
 }
 
 void Font_UnloadFont(ft2_font_t *font)
@@ -1157,7 +1203,7 @@ void Font_UnloadFont(ft2_font_t *font)
        {
                if (font->font_maps[i])
                {
-                       UnloadMapRec(font->font_maps[i]);
+                       UnloadMapChain(font->font_maps[i]);
                        font->font_maps[i] = NULL;
                }
        }
@@ -1200,33 +1246,179 @@ static float Font_SearchSize(ft2_font_t *font, FT_Face fontface, float size)
        }
 }
 
-static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch, ft2_font_map_t **outmap)
+// helper inline functions for incmap_post_process:
+
+static inline void update_pic_for_fontmap(ft2_font_map_t *fontmap, const char *identifier,
+               int width, int height, unsigned char *data)
+{
+       fontmap->pic = Draw_NewPic(identifier, width, height, data, TEXTYPE_RGBA,
+               TEXF_ALPHA | TEXF_CLAMP | (r_font_compress.integer > 0 ? TEXF_COMPRESS : 0));
+}
+
+// glyphs' texture coords needs to be fixed when merging to bigger texture
+static inline void transform_glyph_coords(glyph_slot_t *glyph, float shiftx, float shifty, float scalex, float scaley)
 {
+       glyph->txmin = glyph->txmin * scalex + shiftx;
+       glyph->txmax = glyph->txmax * scalex + shiftx;
+       glyph->tymin = glyph->tymin * scaley + shifty;
+       glyph->tymax = glyph->tymax * scaley + shifty;
+}
+#define fix_glyph_coords_tier1(glyph, order) transform_glyph_coords(glyph, order / (float)FONT_CHARS_PER_LINE, 0.0f, 1.0f / (float)FONT_CHARS_PER_LINE, 1.0f)
+#define fix_glyph_coords_tier2(glyph, order) transform_glyph_coords(glyph, 0.0f, order / (float)FONT_CHARS_PER_LINE, 1.0f, 1.0f / (float)FONT_CHARS_PER_LINE)
+
+// pull glyph things from sourcemap to targetmap
+static inline void merge_single_map(ft2_font_map_t *targetmap, int targetindex, ft2_font_map_t *sourcemap, int sourceindex)
+{
+       targetmap->glyphs[targetindex] = sourcemap->glyphs[sourceindex];
+       targetmap->glyphchars[targetindex] = sourcemap->glyphchars[sourceindex];
+}
+
+#define calc_data_arguments(w, h)                      \
+               width = startmap->glyphSize * w;        \
+               height = startmap->glyphSize * h;       \
+               pitch = width * bytes_per_pixel;        \
+               datasize = height * pitch;
+
+// do incremental map process
+static inline void incmap_post_process(font_incmap_t *incmap, Uchar ch,
+               unsigned char *data, ft2_font_map_t **outmap, int *outmapch)
+{
+       #define bytes_per_pixel 4
+
+       int index, targetmap_at;
+       // where will the next `data` be placed
+       int tier1_data_index, tier2_data_index;
+       // metrics of data to manipulate
+       int width, height, pitch, datasize;
+       int i, j, x, y;
+       unsigned char *newdata, *chunk;
+       ft2_font_map_t *startmap, *targetmap, *currentmap;
+       #define M FONT_CHARS_PER_LINE
+       #define N FONT_CHAR_LINES
+
+       startmap = incmap->fontmap;
+       index = incmap->charcount;
+       tier1_data_index = index % M;
+       tier2_data_index = incmap->tier1_merged;
+
+       incmap->data_tier1[tier1_data_index] = data;
+
+       if (index % M == M - 1)
+       {
+               // tier 1 reduction, pieces to line
+               calc_data_arguments(1, 1);
+               targetmap_at = incmap->tier2_merged + incmap->tier1_merged;
+               targetmap = startmap;
+               for (i = 0; i < targetmap_at; ++i)
+                       targetmap = targetmap->next;
+               currentmap = targetmap;
+               newdata = (unsigned char *)Mem_Alloc(font_mempool, datasize * M);
+               for (i = 0; i < M; ++i)
+               {
+                       chunk = incmap->data_tier1[i];
+                       if (chunk == NULL)
+                               continue;
+                       for (y = 0; y < datasize; y += pitch)
+                               for (x = 0; x < pitch; ++x)
+                                       newdata[y * M + i * pitch + x] = chunk[y + x];
+                       Mem_Free(chunk);
+                       incmap->data_tier1[i] = NULL;
+                       merge_single_map(targetmap, i, currentmap, 0);
+                       fix_glyph_coords_tier1(&targetmap->glyphs[i], (float)i);
+                       currentmap = currentmap->next;
+               }
+               update_pic_for_fontmap(targetmap, Draw_GetPicName(targetmap->pic), width * M, height, newdata);
+               UnloadMapChain(targetmap->next);
+               targetmap->next = NULL;
+               incmap->data_tier2[tier2_data_index] = newdata;
+               ++incmap->tier1_merged;
+               incmap->tier1_merged %= M;
+               incmap->newmap_start = INCMAP_START + targetmap_at + 1;
+               // then give this merged map
+               *outmap = targetmap;
+               *outmapch = FONT_CHARS_PER_LINE - 1;
+       }
+       if (index % (M * N) == M * N - 1)
+       {
+               // tier 2 reduction, lines to full map
+               calc_data_arguments(M, 1);
+               targetmap_at = incmap->tier2_merged;
+               targetmap = startmap;
+               for (i = 0; i < targetmap_at; ++i)
+                       targetmap = targetmap->next;
+               currentmap = targetmap;
+               newdata = (unsigned char *)Mem_Alloc(font_mempool, datasize * N);
+               for (i = 0; i < N; ++i)
+               {
+                       chunk = incmap->data_tier2[i];
+                       if (chunk == NULL)
+                               continue;
+                       for (x = 0; x < datasize; ++x)
+                               newdata[i * datasize + x] = chunk[x];
+                       Mem_Free(chunk);
+                       incmap->data_tier2[i] = NULL;
+                       for (j = 0; j < M; ++j)
+                       {
+                               merge_single_map(targetmap, i * M + j, currentmap, j);
+                               fix_glyph_coords_tier2(&targetmap->glyphs[i * M + j], (float)i);
+                       }
+                       currentmap = currentmap->next;
+               }
+               update_pic_for_fontmap(targetmap, Draw_GetPicName(targetmap->pic), width, height * N, newdata);
+               UnloadMapChain(targetmap->next);
+               targetmap->next = NULL;
+               Mem_Free(newdata);
+               ++incmap->tier2_merged;
+               incmap->newmap_start = INCMAP_START + targetmap_at + 1;
+               // then give this merged map
+               *outmap = targetmap;
+               *outmapch = FONT_CHARS_PER_MAP - 1;
+       }
+
+       ++incmap->charcount;
+       ++incmap->newmap_start;
+
+       #undef M
+       #undef N
+}
+
+static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch,
+               ft2_font_map_t **outmap, int *outmapch, qbool use_incmap)
+{
+       #define bytes_per_pixel 4
+
        char map_identifier[MAX_QPATH];
-       unsigned long mapidx = _ch / FONT_CHARS_PER_MAP;
+       unsigned long map_startglyph = _ch / FONT_CHARS_PER_MAP * FONT_CHARS_PER_MAP;
        unsigned char *data = NULL;
-       FT_ULong ch, mapch;
+       FT_ULong ch = 0, mapch = 0;
        int status;
        int tp;
        FT_Int32 load_flags;
        int gpad_l, gpad_r, gpad_t, gpad_b;
-       char vabuf[1024];
 
        int pitch;
-       int gR, gC; // glyph position: row and column
+       int width, height, datasize;
+       int glyph_row, glyph_column;
+
+       int chars_per_line = FONT_CHARS_PER_LINE;
+       int char_lines = FONT_CHAR_LINES;
+       int chars_per_map = FONT_CHARS_PER_MAP;
 
-       ft2_font_map_t *map, *next;
        ft2_font_t *usefont;
+       ft2_font_map_t *map, *next;
+       font_incmap_t *incmap;
 
        FT_Face fontface;
 
-       int bytesPerPixel = 4; // change the conversion loop too if you change this!
-
-       if (outmap)
-               *outmap = NULL;
-
-       if (r_font_use_alpha_textures.integer)
-               bytesPerPixel = 1;
+       incmap = mapstart->incmap;
+       if (use_incmap)
+       {
+               // only render one character in this map;
+               // such small maps will be merged together later in `incmap_post_process`
+               chars_per_line = char_lines = chars_per_map = 1;
+               // and the index is incremental
+               map_startglyph = incmap ? incmap->newmap_start : INCMAP_START;
+       }
 
        if (font->image_font)
                fontface = (FT_Face)font->next->face;
@@ -1311,13 +1503,16 @@ static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch,
        map = (ft2_font_map_t *)Mem_Alloc(font_mempool, sizeof(ft2_font_map_t));
        if (!map)
        {
-               Con_Printf(CON_ERROR "ERROR: Out of memory when loading fontmap for %s\n", font->name);
+               Con_Printf(CON_ERROR "ERROR: Out of memory when allocating fontmap for %s\n", font->name);
                return false;
        }
 
-       // create a totally unique name for this map, then we will use it to make a unique cachepic_t to avoid redundant textures
+       map->start = map_startglyph;
+
+       // create a unique name for this map, then we will use it to make a unique cachepic_t to avoid redundant textures
+       /*
        dpsnprintf(map_identifier, sizeof(map_identifier),
-               "%s_cache_%g_%d_%g_%g_%g_%g_%g_%u",
+               "%s_cache_%g_%d_%g_%g_%g_%g_%g_%u_%lx",
                font->name,
                (double) mapstart->intSize,
                (int) load_flags,
@@ -1326,13 +1521,26 @@ static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch,
                (double) font->settings->shadowx,
                (double) font->settings->shadowy,
                (double) font->settings->shadowz,
-               (unsigned) mapidx);
+               (unsigned) map_startglyph,
+               // add pointer as a unique part to avoid earlier incmaps' state being trashed
+               use_incmap ? (unsigned long)mapstart : 0x0);
+       */
+       /*
+        * note 1: it appears that different font instances may have the same metrics, causing this pic being overwritten
+        *         will use startmap's pointer as a unique part to avoid earlier incmaps' dynamic pics being trashed
+        * note 2: if this identifier is made too long, significient performance drop will take place
+        * note 3: blur/outline/shadow are per-font settings, so a pointer to startmap & map size
+        *         already made these unique, hence they are omitted
+        * note 4: font_diskcache is removed, this name can be less meaningful
+        */
+       dpsnprintf(map_identifier, sizeof(map_identifier), "%s_%g_%p_%u",
+                       font->name, mapstart->intSize, mapstart, (unsigned) map_startglyph);
 
        // create a cachepic_t from the data now, or reuse an existing one
        if (developer_font.integer)
                Con_Printf("Generating font map %s (size: %.1f MB)\n", map_identifier, mapstart->glyphSize * (256 * 4 / 1048576.0) * mapstart->glyphSize);
 
-       Font_Postprocess(font, NULL, 0, bytesPerPixel, mapstart->size*2, mapstart->size*2, &gpad_l, &gpad_r, &gpad_t, &gpad_b);
+       Font_Postprocess(font, NULL, 0, bytes_per_pixel, mapstart->size*2, mapstart->size*2, &gpad_l, &gpad_r, &gpad_t, &gpad_b);
 
        // copy over the information
        map->size = mapstart->size;
@@ -1341,19 +1549,57 @@ static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch,
        map->sfx = mapstart->sfx;
        map->sfy = mapstart->sfy;
 
-       pitch = map->glyphSize * FONT_CHARS_PER_LINE * bytesPerPixel;
-       data = (unsigned char *)Mem_Alloc(font_mempool, (FONT_CHAR_LINES * map->glyphSize) * pitch);
+       width = map->glyphSize * chars_per_line;
+       height = map->glyphSize * char_lines;
+       pitch = width * bytes_per_pixel;
+       datasize = height * pitch;
+       data = (unsigned char *)Mem_Alloc(font_mempool, datasize);
        if (!data)
        {
                Con_Printf(CON_ERROR "ERROR: Failed to allocate memory for font %s size %g\n", font->name, map->size);
                Mem_Free(map);
                return false;
        }
+
+       if (use_incmap)
+       {
+               if (mapstart->incmap == NULL)
+               {
+                       // initial incmap
+                       incmap = mapstart->incmap = (font_incmap_t *)Mem_Alloc(font_mempool, sizeof(font_incmap_t));
+                       if (!incmap)
+                       {
+                               Con_Printf(CON_ERROR "ERROR: Out of memory when allocating incremental fontmap for %s\n", font->name);
+                               return false;
+                       }
+                       // this will be the startmap of incmap
+                       incmap->fontmap = map;
+                       incmap->newmap_start = INCMAP_START;
+               }
+               else
+               {
+                       // new maps for incmap shall always be the last one
+                       next = incmap->fontmap;
+                       while (next->next != NULL)
+                               next = next->next;
+                       next->next = map;
+               }
+       }
+       else
+       {
+               // insert this normal map
+               next = use_incmap ? incmap->fontmap : mapstart;
+               while(next->next && next->next->start < map->start)
+                       next = next->next;
+               map->next = next->next;
+               next->next = map;
+       }
+
        // initialize as white texture with zero alpha
        tp = 0;
-       while (tp < (FONT_CHAR_LINES * map->glyphSize) * pitch)
+       while (tp < datasize)
        {
-               if (bytesPerPixel == 4)
+               if (bytes_per_pixel == 4)
                {
                        data[tp++] = 0xFF;
                        data[tp++] = 0xFF;
@@ -1362,21 +1608,11 @@ static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch,
                data[tp++] = 0x00;
        }
 
-       memset(map->width_of, 0, sizeof(map->width_of));
-
-       // insert the map
-       map->start = mapidx * FONT_CHARS_PER_MAP;
-       next = mapstart;
-       while(next->next && next->next->start < map->start)
-               next = next->next;
-       map->next = next->next;
-       next->next = map;
-
-       gR = 0;
-       gC = -1;
-       for (ch = map->start;
-            ch < (FT_ULong)map->start + FONT_CHARS_PER_MAP;
-            ++ch)
+       glyph_row = 0;
+       glyph_column = 0;
+       ch = (FT_ULong)(use_incmap ? _ch : map->start);
+       mapch = 0;
+       while (true)
        {
                FT_ULong glyphIndex;
                int w, h, x, y;
@@ -1387,22 +1623,15 @@ static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch,
                FT_Face face;
                int pad_l, pad_r, pad_t, pad_b;
 
-               mapch = ch - map->start;
-
                if (developer_font.integer)
                        Con_DPrint("glyphinfo: ------------- GLYPH INFO -----------------\n");
 
-               ++gC;
-               if (gC >= FONT_CHARS_PER_LINE)
-               {
-                       gC -= FONT_CHARS_PER_LINE;
-                       ++gR;
-               }
+               map->glyphchars[mapch] = (Uchar)ch;
 
                if (data)
                {
-                       imagedata = data + gR * pitch * map->glyphSize + gC * map->glyphSize * bytesPerPixel;
-                       imagedata += gpad_t * pitch + gpad_l * bytesPerPixel;
+                       imagedata = data + glyph_row * pitch * map->glyphSize + glyph_column * map->glyphSize * bytes_per_pixel;
+                       imagedata += gpad_t * pitch + gpad_l * bytes_per_pixel;
                }
                //status = qFT_Load_Char(face, ch, FT_LOAD_RENDER);
                // we need the glyphIndex
@@ -1503,44 +1732,44 @@ static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch,
                                switch (bmp->pixel_mode)
                                {
                                case FT_PIXEL_MODE_MONO:
-                                       dst += bytesPerPixel - 1; // shift to alpha byte
+                                       dst += bytes_per_pixel - 1; // shift to alpha byte
                                        for (x = 0; x < bmp->width; x += 8)
                                        {
                                                unsigned char c = *src++;
-                                               *dst = 255 * !!((c & 0x80) >> 7); dst += bytesPerPixel;
-                                               *dst = 255 * !!((c & 0x40) >> 6); dst += bytesPerPixel;
-                                               *dst = 255 * !!((c & 0x20) >> 5); dst += bytesPerPixel;
-                                               *dst = 255 * !!((c & 0x10) >> 4); dst += bytesPerPixel;
-                                               *dst = 255 * !!((c & 0x08) >> 3); dst += bytesPerPixel;
-                                               *dst = 255 * !!((c & 0x04) >> 2); dst += bytesPerPixel;
-                                               *dst = 255 * !!((c & 0x02) >> 1); dst += bytesPerPixel;
-                                               *dst = 255 * !!((c & 0x01) >> 0); dst += bytesPerPixel;
+                                               *dst = 255 * !!((c & 0x80) >> 7); dst += bytes_per_pixel;
+                                               *dst = 255 * !!((c & 0x40) >> 6); dst += bytes_per_pixel;
+                                               *dst = 255 * !!((c & 0x20) >> 5); dst += bytes_per_pixel;
+                                               *dst = 255 * !!((c & 0x10) >> 4); dst += bytes_per_pixel;
+                                               *dst = 255 * !!((c & 0x08) >> 3); dst += bytes_per_pixel;
+                                               *dst = 255 * !!((c & 0x04) >> 2); dst += bytes_per_pixel;
+                                               *dst = 255 * !!((c & 0x02) >> 1); dst += bytes_per_pixel;
+                                               *dst = 255 * !!((c & 0x01) >> 0); dst += bytes_per_pixel;
                                        }
                                        break;
                                case FT_PIXEL_MODE_GRAY2:
-                                       dst += bytesPerPixel - 1; // shift to alpha byte
+                                       dst += bytes_per_pixel - 1; // shift to alpha byte
                                        for (x = 0; x < bmp->width; x += 4)
                                        {
                                                unsigned char c = *src++;
-                                               *dst = ( ((c & 0xA0) >> 6) * 0x55 ); c <<= 2; dst += bytesPerPixel;
-                                               *dst = ( ((c & 0xA0) >> 6) * 0x55 ); c <<= 2; dst += bytesPerPixel;
-                                               *dst = ( ((c & 0xA0) >> 6) * 0x55 ); c <<= 2; dst += bytesPerPixel;
-                                               *dst = ( ((c & 0xA0) >> 6) * 0x55 ); c <<= 2; dst += bytesPerPixel;
+                                               *dst = ( ((c & 0xA0) >> 6) * 0x55 ); c <<= 2; dst += bytes_per_pixel;
+                                               *dst = ( ((c & 0xA0) >> 6) * 0x55 ); c <<= 2; dst += bytes_per_pixel;
+                                               *dst = ( ((c & 0xA0) >> 6) * 0x55 ); c <<= 2; dst += bytes_per_pixel;
+                                               *dst = ( ((c & 0xA0) >> 6) * 0x55 ); c <<= 2; dst += bytes_per_pixel;
                                        }
                                        break;
                                case FT_PIXEL_MODE_GRAY4:
-                                       dst += bytesPerPixel - 1; // shift to alpha byte
+                                       dst += bytes_per_pixel - 1; // shift to alpha byte
                                        for (x = 0; x < bmp->width; x += 2)
                                        {
                                                unsigned char c = *src++;
-                                               *dst = ( ((c & 0xF0) >> 4) * 0x11); dst += bytesPerPixel;
-                                               *dst = ( ((c & 0x0F) ) * 0x11); dst += bytesPerPixel;
+                                               *dst = ( ((c & 0xF0) >> 4) * 0x11); dst += bytes_per_pixel;
+                                               *dst = ( ((c & 0x0F) ) * 0x11); dst += bytes_per_pixel;
                                        }
                                        break;
                                case FT_PIXEL_MODE_GRAY:
                                        // in this case pitch should equal width
                                        for (tp = 0; tp < bmp->pitch; ++tp)
-                                               dst[(bytesPerPixel - 1) + tp*bytesPerPixel] = src[tp]; // copy the grey value into the alpha bytes
+                                               dst[(bytes_per_pixel - 1) + tp*bytes_per_pixel] = src[tp]; // copy the grey value into the alpha bytes
 
                                        //memcpy((void*)dst, (void*)src, bmp->pitch);
                                        //dst += bmp->pitch;
@@ -1554,7 +1783,7 @@ static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch,
                        pad_r = gpad_r;
                        pad_t = gpad_t;
                        pad_b = gpad_b;
-                       Font_Postprocess(font, imagedata, pitch, bytesPerPixel, w, h, &pad_l, &pad_r, &pad_t, &pad_b);
+                       Font_Postprocess(font, imagedata, pitch, bytes_per_pixel, w, h, &pad_l, &pad_r, &pad_t, &pad_b);
                }
                else
                {
@@ -1562,7 +1791,7 @@ static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch,
                        pad_r = gpad_r;
                        pad_t = gpad_t;
                        pad_b = gpad_b;
-                       Font_Postprocess(font, NULL, pitch, bytesPerPixel, w, h, &pad_l, &pad_r, &pad_t, &pad_b);
+                       Font_Postprocess(font, NULL, pitch, bytes_per_pixel, w, h, &pad_l, &pad_r, &pad_t, &pad_b);
                }
 
 
@@ -1579,10 +1808,10 @@ static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch,
                        //double mWidth = (glyph->metrics.width >> 6) / map->size;
                        //double mHeight = (glyph->metrics.height >> 6) / map->size;
 
-                       mapglyph->txmin = ( (double)(gC * map->glyphSize) + (double)(gpad_l - pad_l) ) / ( (double)(map->glyphSize * FONT_CHARS_PER_LINE) );
-                       mapglyph->txmax = mapglyph->txmin + (double)(bmp->width + pad_l + pad_r) / ( (double)(map->glyphSize * FONT_CHARS_PER_LINE) );
-                       mapglyph->tymin = ( (double)(gR * map->glyphSize) + (double)(gpad_r - pad_r) ) / ( (double)(map->glyphSize * FONT_CHAR_LINES) );
-                       mapglyph->tymax = mapglyph->tymin + (double)(bmp->rows + pad_t + pad_b) / ( (double)(map->glyphSize * FONT_CHAR_LINES) );
+                       mapglyph->txmin = ( (double)(glyph_column * map->glyphSize) + (double)(gpad_l - pad_l) ) / ( (double)(map->glyphSize * chars_per_line) );
+                       mapglyph->txmax = mapglyph->txmin + (double)(bmp->width + pad_l + pad_r) / ( (double)(map->glyphSize * chars_per_line) );
+                       mapglyph->tymin = ( (double)(glyph_row * map->glyphSize) + (double)(gpad_r - pad_r) ) / ( (double)(map->glyphSize * char_lines) );
+                       mapglyph->tymax = mapglyph->tymin + (double)(bmp->rows + pad_t + pad_b) / ( (double)(map->glyphSize * char_lines) );
                        //mapglyph->vxmin = bearingX;
                        //mapglyph->vxmax = bearingX + mWidth;
                        mapglyph->vxmin = (glyph->bitmap_left - pad_l) / map->size;
@@ -1599,7 +1828,7 @@ static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch,
 
                        if (developer_font.integer)
                        {
-                               Con_DPrintf("glyphinfo:   Glyph: %lu   at (%i, %i)\n", (unsigned long)ch, gC, gR);
+                               Con_DPrintf("glyphinfo:   Glyph: %lu   at (%i, %i)\n", (unsigned long)ch, glyph_column, glyph_row);
                                Con_DPrintf("glyphinfo:   %f, %f, %lu\n", bearingX, map->sfx, (unsigned long)glyph->metrics.horiBearingX);
                                if (ch >= 32 && ch <= 128)
                                        Con_DPrintf("glyphinfo:   Character: %c\n", (int)ch);
@@ -1613,36 +1842,19 @@ static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch,
                        }
                }
                map->glyphs[mapch].image = false;
-       }
 
-       {
-               int w = map->glyphSize * FONT_CHARS_PER_LINE;
-               int h = map->glyphSize * FONT_CHAR_LINES;
-               // update the pic returned by Draw_CachePic_Flags earlier to contain our texture
-               map->pic = Draw_NewPic(map_identifier, w, h, data, r_font_use_alpha_textures.integer ? TEXTYPE_ALPHA : TEXTYPE_RGBA, TEXF_ALPHA | TEXF_CLAMP | (r_font_compress.integer > 0 ? TEXF_COMPRESS : 0));
-
-               if (r_font_diskcache.integer >= 1)
+               ++mapch; ++ch;
+               if ((int)mapch == chars_per_map)
+                       break;
+               if (++glyph_column % chars_per_line == 0)
                {
-                       // swap to BGRA for tga writing...
-                       int s = w * h;
-                       int x;
-                       int b;
-                       for (x = 0;x < s;x++)
-                       {
-                               b = data[x*4+0];
-                               data[x*4+0] = data[x*4+2];
-                               data[x*4+2] = b;
-                       }
-                       Image_WriteTGABGRA(va(vabuf, sizeof(vabuf), "%s.tga", map_identifier), w, h, data);
-#ifndef USE_GLES2
-                       if (r_font_compress.integer && Draw_IsPicLoaded(map->pic))
-                               R_SaveTextureDDSFile(Draw_GetPicTexture(map->pic), va(vabuf, sizeof(vabuf), "dds/%s.dds", map_identifier), r_texture_dds_save.integer < 2, true);
-#endif
+                       glyph_column = 0;
+                       ++glyph_row;
                }
        }
 
-       if(data)
-               Mem_Free(data);
+       // update the pic returned by Draw_CachePic_Flags earlier to contain our texture
+       update_pic_for_fontmap(map, map_identifier, width, height, data);
 
        if (!Draw_IsPicLoaded(map->pic))
        {
@@ -1651,29 +1863,150 @@ static qbool Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch,
                // this would be bad...
                // only `data' must be freed
                Con_Printf(CON_ERROR "ERROR: Failed to generate texture for font %s size %f map %lu\n",
-                          font->name, mapstart->size, mapidx);
+                          font->name, mapstart->size, map_startglyph);
                return false;
        }
-       if (outmap)
+
+       if (use_incmap)
+       {
                *outmap = map;
+               *outmapch = 0;
+               // data will be kept in incmap for being merged later, freed afterward
+               incmap_post_process(incmap, _ch, data, outmap, outmapch);
+       }
+       else if (data)
+       {
+               Mem_Free(data);
+               *outmap = map;
+               if (outmapch != NULL)
+                       *outmapch = _ch - map->start;
+       }
+
        return true;
 }
 
-qbool Font_LoadMapForIndex(ft2_font_t *font, int map_index, Uchar _ch, ft2_font_map_t **outmap)
+static qbool legacy_font_loading_api_alerted = false;
+static inline void alert_legacy_font_api(const char *name)
+{
+       if (!legacy_font_loading_api_alerted)
+       {
+               Con_DPrintf(CON_WARN "Warning: You are using an legacy API '%s', which have certain limitations; please use 'Font_GetMapForChar' instead\n", name);
+               legacy_font_loading_api_alerted = true;
+       }
+}
+
+// legacy font API, please use `Font_GetMapForChar` instead
+qbool Font_LoadMapForIndex(ft2_font_t *font, int map_index, Uchar ch, ft2_font_map_t **outmap)
 {
        if (map_index < 0 || map_index >= MAX_FONT_SIZES)
                return false;
        // the first map must have been loaded already
        if (!font->font_maps[map_index])
                return false;
-       return Font_LoadMap(font, font->font_maps[map_index], _ch, outmap);
+       alert_legacy_font_api("Font_LoadMapForIndex");
+       return Font_LoadMap(font, font->font_maps[map_index], ch, outmap, NULL, false);
 }
 
+// legacy font API. please use `Font_GetMapForChar` instead
 ft2_font_map_t *FontMap_FindForChar(ft2_font_map_t *start, Uchar ch)
 {
-       while (start && start->start + FONT_CHARS_PER_MAP <= ch)
-               start = start->next;
-       if (start && start->start > ch)
+       ft2_font_map_t *map = start;
+       while (map && map->start + FONT_CHARS_PER_MAP <= ch)
+               map = map->next;
+       if (map && map->start > ch)
                return NULL;
-       return start;
+       alert_legacy_font_api("FontMap_FindForChar");
+       return map;
+}
+
+static inline qbool should_use_incmap(Uchar ch)
+{
+       int i;
+       // optimize: a simple check logic for usual conditions
+       if (ch < unicode_bigblocks[0])
+               return false;
+       if (r_font_disable_incmaps.integer == 1)
+               return false;
+       for (i = 0; i < (int)(sizeof(unicode_bigblocks) / sizeof(Uchar)); i += 2)
+               if (unicode_bigblocks[i] <= ch && ch <= unicode_bigblocks[i + 1])
+                       return true;
+       return false;
+}
+
+static inline qbool get_char_from_incmap(ft2_font_map_t *map, Uchar ch, ft2_font_map_t **outmap, int *outmapch)
+{
+       int i;
+       font_incmap_t *incmap;
+
+       incmap = map->incmap;
+       *outmapch = 0;
+
+       if (incmap != NULL)
+       {
+               map = incmap->fontmap;
+               while (map != NULL)
+               {
+                       for (i = 0; i < FONT_CHARS_PER_MAP; ++i)
+                       {
+                               if (map->glyphchars[i] == ch)
+                               {
+                                       *outmap = map;
+                                       *outmapch = i;
+                                       return true;
+                               }
+                               else if (map->glyphchars[i] == 0)
+                                       // this tier0/tier1 map ends here
+                                       break;
+                       }
+                       map = map->next;
+               }
+       }
+       return false;
+}
+
+/**
+ * Query for or load a font map for a character, with the character's place on it.
+ * Supports the incremental map mechanism; returning if the operation is done successfully
+ */
+qbool Font_GetMapForChar(ft2_font_t *font, int map_index, Uchar ch, ft2_font_map_t **outmap, int *outmapch)
+{
+       qbool use_incmap;
+       ft2_font_map_t *map;
+
+       // startmap
+       map = Font_MapForIndex(font, map_index);
+
+       // optimize: the first map must have been loaded already
+       if (ch < FONT_CHARS_PER_MAP)
+       {
+               *outmapch = ch;
+               *outmap = map;
+               return true;
+       }
+
+       // search for the character
+
+       use_incmap = should_use_incmap(ch);
+
+       if (!use_incmap)
+       {
+               // normal way
+               *outmapch = ch % FONT_CHARS_PER_MAP;
+               while (map && map->start + FONT_CHARS_PER_MAP <= ch)
+                       map = map->next;
+               if (map && map->start <= ch)
+               {
+                       *outmap = map;
+                       return true;
+               }
+       }
+       else if (get_char_from_incmap(map, ch, outmap, outmapch))
+               // got it
+               return true;
+
+       // so no appropriate map was found, load one
+
+       if (map_index < 0 || map_index >= MAX_FONT_SIZES)
+               return false;
+       return Font_LoadMap(font, font->font_maps[map_index], ch, outmap, outmapch, use_incmap);
 }
diff --git a/ft2.h b/ft2.h
index 2104a8c4fd9f6620afeb7fb231d77fad5a075663..6495d3eb57b8f603c2c02995a950592272ac92d4 100644 (file)
--- a/ft2.h
+++ b/ft2.h
@@ -21,6 +21,8 @@
  */
 
 typedef struct ft2_font_map_s ft2_font_map_t;
+typedef struct font_incmap_s font_incmap_t;
+typedef struct incmap_lookup_cache_s incmap_lookup_cache_t;
 typedef struct ft2_attachment_s ft2_attachment_t;
 #ifdef WIN64
 #define ft2_oldstyle_map ((ft2_font_map_t*)-1LL)
@@ -36,38 +38,38 @@ typedef struct ft2_kerning_s
 
 typedef struct ft2_font_s
 {
-       char            name[64];
-       qbool        has_kerning;
+       char   name[64];
+       qbool  has_kerning;
        // last requested size loaded using Font_SetSize
-       float           currentw;
-       float           currenth;
-       float           ascend;
-       float           descend;
-       qbool        image_font; // only fallbacks are freetype fonts
+       float  currentw;
+       float  currenth;
+       float  ascend;
+       float  descend;
+       qbool  image_font; // only fallbacks are freetype fonts
 
        // TODO: clean this up and do not expose everything.
-       
+
        const unsigned char  *data; // FT2 needs it to stay
        //fs_offset_t     datasize;
-       void           *face;
+       void                 *face;
 
        // an unordered array of ordered linked lists of glyph maps for a specific size
-       ft2_font_map_t *font_maps[MAX_FONT_SIZES];
-       int             num_sizes;
+       ft2_font_map_t       *font_maps[MAX_FONT_SIZES];
+       int                   num_sizes;
 
        // attachments
-       size_t            attachmentcount;
-       ft2_attachment_t *attachments;
+       size_t                attachmentcount;
+       ft2_attachment_t     *attachments;
 
-       ft2_settings_t *settings;
+       ft2_settings_t       *settings;
 
        // fallback mechanism
-       struct ft2_font_s *next;
+       struct ft2_font_s    *next;
 } ft2_font_t;
 
 void            Font_CloseLibrary(void);
 void            Font_Init(void);
-qbool        Font_OpenLibrary(void);
+qbool           Font_OpenLibrary(void);
 ft2_font_t*     Font_Alloc(void);
 void            Font_UnloadFont(ft2_font_t *font);
 // IndexForSize suggests to change the width and height if a font size is in a reasonable range
@@ -75,11 +77,12 @@ void            Font_UnloadFont(ft2_font_t *font);
 // in such a case, *outw and *outh are set to 12, which is often a good alternative size
 int             Font_IndexForSize(ft2_font_t *font, float size, float *outw, float *outh);
 ft2_font_map_t *Font_MapForIndex(ft2_font_t *font, int index);
-qbool        Font_LoadFont(const char *name, dp_font_t *dpfnt);
-qbool        Font_GetKerningForSize(ft2_font_t *font, float w, float h, Uchar left, Uchar right, float *outx, float *outy);
-qbool        Font_GetKerningForMap(ft2_font_t *font, int map_index, float w, float h, Uchar left, Uchar right, float *outx, float *outy);
+qbool           Font_LoadFont(const char *name, dp_font_t *dpfnt);
+qbool           Font_GetKerningForSize(ft2_font_t *font, float w, float h, Uchar left, Uchar right, float *outx, float *outy);
+qbool           Font_GetKerningForMap(ft2_font_t *font, int map_index, float w, float h, Uchar left, Uchar right, float *outx, float *outy);
 float           Font_VirtualToRealSize(float sz);
 float           Font_SnapTo(float val, float snapwidth);
 // since this is used on a font_map_t, let's name it FontMap_*
 ft2_font_map_t *FontMap_FindForChar(ft2_font_map_t *start, Uchar ch);
+qbool           Font_GetMapForChar(ft2_font_t *font, int map_index, Uchar ch, ft2_font_map_t **outmap, int *outmapch);
 #endif // DP_FREETYPE2_H__
index 8cdc9e1d0ceb3ac6240e1a8ef9e16e51fa0a0e36..68956b9082d6682c42c7b8492bd2801155071502 100644 (file)
@@ -7,6 +7,9 @@
 #define FONT_CHAR_LINES 16
 #define FONT_CHARS_PER_MAP (FONT_CHARS_PER_LINE * FONT_CHAR_LINES)
 
+// map.start value for incremental maps to hold a place
+#define INCMAP_START 0x110000
+
 typedef struct glyph_slot_s
 {
        qbool image;
@@ -26,32 +29,52 @@ typedef struct glyph_slot_s
 
 struct ft2_font_map_s
 {
-       Uchar                  start;
-       struct ft2_font_map_s *next;
-       float                  size;
+       Uchar  start;
+       float  size;
+
        // the actual size used in the freetype code
        // by convention, the requested size is the height of the font's bounding box.
-       float                  intSize;
-       int                    glyphSize;
+       float  intSize;
+       int    glyphSize;
+
+       ft2_font_map_t *next;
+       cachepic_t     *pic;
+       qbool           static_tex;
+       glyph_slot_t    glyphs[FONT_CHARS_PER_MAP];
+       Uchar           glyphchars[FONT_CHARS_PER_MAP];
+
+       // saves us the trouble of calculating these over and over again
+       double          sfx, sfy;
 
-       cachepic_t            *pic;
-       qbool               static_tex;
-       glyph_slot_t           glyphs[FONT_CHARS_PER_MAP];
+       // note: float width_of[256] was moved to `struct dp_font_s` as width_of_ft2
 
+       // these may only present in a startmap
        // contains the kerning information for the first 256 characters
        // for the other characters, we will lookup the kerning information
-       ft2_kerning_t          kerning;
-       // safes us the trouble of calculating these over and over again
-       double                 sfx, sfy;
+       ft2_kerning_t  *kerning;
+       // for accessing incremental maps for bigblock glyphs
+       font_incmap_t  *incmap;
+};
+
+struct font_incmap_s
+{
+       // associated fontmap; startmap of incmaps
+       struct ft2_font_map_s *fontmap;
+       int charcount;
+       int newmap_start;
+
+       // two rounds of merge will take place, keep those data until then
+       unsigned char *data_tier1[FONT_CHARS_PER_LINE];
+       unsigned char *data_tier2[FONT_CHAR_LINES];
 
-       // the width_of for the image-font, pixel-snapped for this size
-       float           width_of[256];
+       // count of merged maps
+       int tier1_merged, tier2_merged;
 };
 
 struct ft2_attachment_s
 {
        const unsigned char *data;
-       fs_offset_t    size;
+       fs_offset_t          size;
 };
 
 //qbool Font_LoadMapForIndex(ft2_font_t *font, Uchar _ch, ft2_font_map_t **outmap);
index 32a6ee7d18051968669747a72c617e30c72126b7..b5336a226223f62d852b5760a5b8e534117c8546 100644 (file)
@@ -1773,7 +1773,7 @@ r_meshbuffer_t *R_Mesh_CreateMeshBuffer(const void *data, size_t size, const cha
        buffer->isuniformbuffer = isuniformbuffer;
        buffer->isdynamic = isdynamic;
        buffer->isindex16 = isindex16;
-       strlcpy(buffer->name, name, sizeof(buffer->name));
+       dp_strlcpy(buffer->name, name, sizeof(buffer->name));
        R_Mesh_UpdateMeshBuffer(buffer, data, size, false, 0);
        return buffer;
 }
index b4978abb1e4715a803a8eaae17b452c569705e4a..d6b6a4a72ea6ce4904a51775afcb5002eae92866 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -61,6 +61,7 @@ cvar_t r_font_postprocess_shadow_y = {CF_CLIENT | CF_ARCHIVE, "r_font_postproces
 cvar_t r_font_postprocess_shadow_z = {CF_CLIENT | CF_ARCHIVE, "r_font_postprocess_shadow_z", "0", "font shadow Z shift amount, applied during blurring"};
 cvar_t r_font_hinting = {CF_CLIENT | CF_ARCHIVE, "r_font_hinting", "3", "0 = no hinting, 1 = light autohinting, 2 = full autohinting, 3 = full hinting"};
 cvar_t r_font_antialias = {CF_CLIENT | CF_ARCHIVE, "r_font_antialias", "1", "0 = monochrome, 1 = grey" /* , 2 = rgb, 3 = bgr" */};
+cvar_t r_font_always_reload = {CF_CLIENT | CF_ARCHIVE, "r_font_always_reload", "0", "reload a font even given the same loadfont command. useful for trying out different versions of the same font file"};
 cvar_t r_nearest_2d = {CF_CLIENT | CF_ARCHIVE, "r_nearest_2d", "0", "use nearest filtering on all 2d textures (including conchars)"};
 cvar_t r_nearest_conchars = {CF_CLIENT | CF_ARCHIVE, "r_nearest_conchars", "0", "use nearest filtering on conchars texture"};
 
@@ -142,7 +143,7 @@ cachepic_t *Draw_CachePic_Flags(const char *path, unsigned int cachepicflags)
        Con_DPrintf("Draw_CachePic(\"%s\"): frame %i: loading pic%s\n", path, draw_frame, (cachepicflags & CACHEPICFLAG_NOTPERSISTENT) ? " notpersist" : "");
        pic = cachepics + (numcachepics++);
        memset(pic, 0, sizeof(*pic));
-       strlcpy (pic->name, path, sizeof(pic->name));
+       dp_strlcpy (pic->name, path, sizeof(pic->name));
        // link into list
        pic->chain = cachepichash[hashkey];
        cachepichash[hashkey] = pic;
@@ -285,7 +286,7 @@ cachepic_t *Draw_NewPic(const char *picname, int width, int height, unsigned cha
                Con_DPrintf("Draw_NewPic(\"%s\"): frame %i: creating new cachepic\n", picname, draw_frame);
                pic = cachepics + (numcachepics++);
                memset(pic, 0, sizeof(*pic));
-               strlcpy (pic->name, picname, sizeof(pic->name));
+               dp_strlcpy (pic->name, picname, sizeof(pic->name));
                // link into list
                pic->chain = cachepichash[hashkey];
                cachepichash[hashkey] = pic;
@@ -335,7 +336,7 @@ void LoadFont(qbool override, const char *name, dp_font_t *fnt, float scale, flo
 
        if(override || !fnt->texpath[0])
        {
-               strlcpy(fnt->texpath, name, sizeof(fnt->texpath));
+               dp_strlcpy(fnt->texpath, name, sizeof(fnt->texpath));
                // load the cvars when the font is FIRST loader
                fnt->settings.scale = scale;
                fnt->settings.voffset = voffset;
@@ -347,6 +348,7 @@ void LoadFont(qbool override, const char *name, dp_font_t *fnt, float scale, flo
                fnt->settings.shadowy = r_font_postprocess_shadow_y.value;
                fnt->settings.shadowz = r_font_postprocess_shadow_z.value;
        }
+
        // fix bad scale
        if (fnt->settings.scale <= 0)
                fnt->settings.scale = 1;
@@ -356,7 +358,7 @@ void LoadFont(qbool override, const char *name, dp_font_t *fnt, float scale, flo
 
        if(fnt->ft2)
        {
-               // clear freetype font
+               // we are going to reload. clear old ft2 data
                Font_UnloadFont(fnt->ft2);
                Mem_Free(fnt->ft2);
                fnt->ft2 = NULL;
@@ -382,7 +384,7 @@ void LoadFont(qbool override, const char *name, dp_font_t *fnt, float scale, flo
                if(!Draw_IsPicLoaded(fnt->pic))
                {
                        fnt->pic = Draw_CachePic_Flags("gfx/conchars", CACHEPICFLAG_NOCOMPRESSION | (r_nearest_conchars.integer ? CACHEPICFLAG_NEAREST : 0));
-                       strlcpy(widthfile, "gfx/conchars.width", sizeof(widthfile));
+                       dp_strlcpy(widthfile, "gfx/conchars.width", sizeof(widthfile));
                }
                else
                        dpsnprintf(widthfile, sizeof(widthfile), "%s.width", fnt->fallbacks[i]);
@@ -458,7 +460,7 @@ void LoadFont(qbool override, const char *name, dp_font_t *fnt, float scale, flo
                        if (!map)
                                break;
                        for(ch = 0; ch < 256; ++ch)
-                               map->width_of[ch] = Font_SnapTo(fnt->width_of[ch], 1/map->size);
+                               fnt->width_of_ft2[i][ch] = Font_SnapTo(fnt->width_of[ch], 1/map->size);
                }
        }
 
@@ -491,7 +493,7 @@ dp_font_t *FindFont(const char *title, qbool allocate_new)
                {
                        if(!strcmp(dp_fonts.f[i].title, ""))
                        {
-                               strlcpy(dp_fonts.f[i].title, title, sizeof(dp_fonts.f[i].title));
+                               dp_strlcpy(dp_fonts.f[i].title, title, sizeof(dp_fonts.f[i].title));
                                return &dp_fonts.f[i];
                        }
                }
@@ -506,7 +508,7 @@ dp_font_t *FindFont(const char *title, qbool allocate_new)
                        if (dp_fonts.f[i].ft2)
                                dp_fonts.f[i].ft2->settings = &dp_fonts.f[i].settings;
                // register a font in first expanded slot
-               strlcpy(dp_fonts.f[oldsize].title, title, sizeof(dp_fonts.f[oldsize].title));
+               dp_strlcpy(dp_fonts.f[oldsize].title, title, sizeof(dp_fonts.f[oldsize].title));
                return &dp_fonts.f[oldsize];
        }
        return NULL;
@@ -572,6 +574,16 @@ static void LoadFont_f(cmd_state_t *cmd)
                Con_Printf("font function not found\n");
                return;
        }
+       else
+       {
+               if (strcmp(cmd->cmdline, f->cmdline) != 0 || r_font_always_reload.integer)
+                       dp_strlcpy(f->cmdline, cmd->cmdline, MAX_FONT_CMDLINE);
+               else
+               {
+                       Con_DPrintf("LoadFont: font %s is unchanged\n", Cmd_Argv(cmd, 1));
+                       return;
+               }
+       }
 
        if(Cmd_Argc(cmd) < 3)
                filelist = "gfx/conchars";
@@ -592,8 +604,8 @@ static void LoadFont_f(cmd_state_t *cmd)
                c = cm;
        }
 
-       if(!c || (c - filelist) > MAX_QPATH)
-               strlcpy(mainfont, filelist, sizeof(mainfont));
+       if(!c || (c - filelist) >= MAX_QPATH)
+               dp_strlcpy(mainfont, filelist, sizeof(mainfont));
        else
        {
                memcpy(mainfont, filelist, c - filelist);
@@ -617,9 +629,9 @@ static void LoadFont_f(cmd_state_t *cmd)
                        f->fallback_faces[i] = 0; // f->req_face; could make it stick to the default-font's face index
                        c = cm;
                }
-               if(!c || (c-filelist) > MAX_QPATH)
+               if(!c || (c-filelist) >= MAX_QPATH)
                {
-                       strlcpy(f->fallbacks[i], filelist, sizeof(mainfont));
+                       dp_strlcpy(f->fallbacks[i], filelist, sizeof(mainfont));
                }
                else
                {
@@ -742,6 +754,7 @@ void GL_Draw_Init (void)
        Cvar_RegisterVariable(&r_font_postprocess_shadow_z);
        Cvar_RegisterVariable(&r_font_hinting);
        Cvar_RegisterVariable(&r_font_antialias);
+       Cvar_RegisterVariable(&r_font_always_reload);
        Cvar_RegisterVariable(&r_textshadow);
        Cvar_RegisterVariable(&r_textbrightness);
        Cvar_RegisterVariable(&r_textcontrast);
@@ -755,15 +768,15 @@ void GL_Draw_Init (void)
        memset(dp_fonts.f, 0, sizeof(dp_font_t) * dp_fonts.maxsize);
 
        // assign starting font names
-       strlcpy(FONT_DEFAULT->title, "default", sizeof(FONT_DEFAULT->title));
-       strlcpy(FONT_DEFAULT->texpath, "gfx/conchars", sizeof(FONT_DEFAULT->texpath));
-       strlcpy(FONT_CONSOLE->title, "console", sizeof(FONT_CONSOLE->title));
-       strlcpy(FONT_SBAR->title, "sbar", sizeof(FONT_SBAR->title));
-       strlcpy(FONT_NOTIFY->title, "notify", sizeof(FONT_NOTIFY->title));
-       strlcpy(FONT_CHAT->title, "chat", sizeof(FONT_CHAT->title));
-       strlcpy(FONT_CENTERPRINT->title, "centerprint", sizeof(FONT_CENTERPRINT->title));
-       strlcpy(FONT_INFOBAR->title, "infobar", sizeof(FONT_INFOBAR->title));
-       strlcpy(FONT_MENU->title, "menu", sizeof(FONT_MENU->title));
+       dp_strlcpy(FONT_DEFAULT->title, "default", sizeof(FONT_DEFAULT->title));
+       dp_strlcpy(FONT_DEFAULT->texpath, "gfx/conchars", sizeof(FONT_DEFAULT->texpath));
+       dp_strlcpy(FONT_CONSOLE->title, "console", sizeof(FONT_CONSOLE->title));
+       dp_strlcpy(FONT_SBAR->title, "sbar", sizeof(FONT_SBAR->title));
+       dp_strlcpy(FONT_NOTIFY->title, "notify", sizeof(FONT_NOTIFY->title));
+       dp_strlcpy(FONT_CHAT->title, "chat", sizeof(FONT_CHAT->title));
+       dp_strlcpy(FONT_CENTERPRINT->title, "centerprint", sizeof(FONT_CENTERPRINT->title));
+       dp_strlcpy(FONT_INFOBAR->title, "infobar", sizeof(FONT_INFOBAR->title));
+       dp_strlcpy(FONT_MENU->title, "menu", sizeof(FONT_MENU->title));
        for(i = 0, j = 0; i < MAX_USERFONTS; ++i)
                if(!FONT_USER(i)->title[0])
                        dpsnprintf(FONT_USER(i)->title, sizeof(FONT_USER(i)->title), "user%d", j++);
@@ -923,7 +936,6 @@ float DrawQ_TextWidth_UntilWidth_TrackColors_Scale(const char *text, size_t *max
        size_t bytes_left;
        ft2_font_map_t *fontmap = NULL;
        ft2_font_map_t *map = NULL;
-       //ft2_font_map_t *prevmap = NULL;
        ft2_font_t *ft2 = fnt->ft2;
        // float ftbase_x;
        qbool snap = true;
@@ -975,7 +987,7 @@ float DrawQ_TextWidth_UntilWidth_TrackColors_Scale(const char *text, size_t *max
        //      x = snap_to_pixel_x(x, 0.4); // haha, it's 0 anyway
 
        if (fontmap)
-               width_of = fontmap->width_of;
+               width_of = fnt->width_of_ft2[map_index];
        else
                width_of = fnt->width_of;
 
@@ -990,11 +1002,11 @@ float DrawQ_TextWidth_UntilWidth_TrackColors_Scale(const char *text, size_t *max
                if (ch == ' ' && !fontmap)
                {
                        if(!least_one || i0) // never skip the first character
-                       if(x + width_of[(int) ' '] * dw > maxwidth)
-                       {
-                               i = i0;
-                               break; // oops, can't draw this
-                       }
+                               if(x + width_of[(int) ' '] * dw > maxwidth)
+                               {
+                                       i = i0;
+                                       break; // oops, can't draw this
+                               }
                        x += width_of[(int) ' '] * dw;
                        continue;
                }
@@ -1039,29 +1051,22 @@ float DrawQ_TextWidth_UntilWidth_TrackColors_Scale(const char *text, size_t *max
                                map = ft2_oldstyle_map;
                        prevch = 0;
                        if(!least_one || i0) // never skip the first character
-                       if(x + width_of[ch] * dw > maxwidth)
-                       {
-                               i = i0;
-                               break; // oops, can't draw this
-                       }
+                               if(x + width_of[ch] * dw > maxwidth)
+                               {
+                                       i = i0;
+                                       break; // oops, can't draw this
+                               }
                        x += width_of[ch] * dw;
                } else {
-                       if (!map || map == ft2_oldstyle_map || ch < map->start || ch >= map->start + FONT_CHARS_PER_MAP)
+                       if (!map || map == ft2_oldstyle_map || ch != prevch)
                        {
-                               map = FontMap_FindForChar(fontmap, ch);
+                               Font_GetMapForChar(ft2, map_index, ch, &map, &mapch);
                                if (!map)
-                               {
-                                       if (!Font_LoadMapForIndex(ft2, map_index, ch, &map))
-                                               break;
-                                       if (!map)
-                                               break;
-                               }
+                                       break;
                        }
-                       mapch = ch - map->start;
                        if (prevch && Font_GetKerningForMap(ft2, map_index, w, h, prevch, ch, &kx, NULL))
                                x += kx * dw;
                        x += map->glyphs[mapch].advance_x * dw;
-                       //prevmap = map;
                        prevch = ch;
                }
        }
@@ -1083,7 +1088,6 @@ float DrawQ_String_Scale(float startx, float starty, const char *text, size_t ma
        Uchar ch, mapch, nextch;
        Uchar prevch = 0; // used for kerning
        int map_index = 0;
-       //ft2_font_map_t *prevmap = NULL; // the previous map
        ft2_font_map_t *map = NULL;     // the currently used map
        ft2_font_map_t *fontmap = NULL; // the font map for the size
        float ftbase_y;
@@ -1146,7 +1150,7 @@ float DrawQ_String_Scale(float startx, float starty, const char *text, size_t ma
        pix_y = vid.height / vid_conheight.value;
 
        if (fontmap)
-               width_of = fontmap->width_of;
+               width_of = fnt->width_of_ft2[map_index];
        else
                width_of = fnt->width_of;
 
@@ -1259,27 +1263,16 @@ float DrawQ_String_Scale(float startx, float starty, const char *text, size_t ma
                                Mod_Mesh_AddTriangle(mod, surf, e0, e2, e3);
                                x += width_of[ch] * dw;
                        } else {
-                               if (!map || map == ft2_oldstyle_map || ch < map->start || ch >= map->start + FONT_CHARS_PER_MAP)
+                               if (!map || map == ft2_oldstyle_map || ch != prevch)
                                {
-                                       // find the new map
-                                       map = FontMap_FindForChar(fontmap, ch);
+                                       Font_GetMapForChar(ft2, map_index, ch, &map, &mapch);
                                        if (!map)
                                        {
-                                               if (!Font_LoadMapForIndex(ft2, map_index, ch, &map))
-                                               {
-                                                       shadow = -1;
-                                                       break;
-                                               }
-                                               if (!map)
-                                               {
-                                                       // this shouldn't happen
-                                                       shadow = -1;
-                                                       break;
-                                               }
+                                               shadow = -1;
+                                               break;
                                        }
                                }
 
-                               mapch = ch - map->start;
                                thisw = map->glyphs[mapch].advance_x;
 
                                //x += ftbase_x;
index 4a51bd2bc93596f394538b7152115eb54f37b14f..a8a92dd1b6fa63ec91ad7491417689ea105b5df3 100644 (file)
@@ -82,7 +82,7 @@ cvar_t r_transparent_useplanardistance = {CF_CLIENT, "r_transparent_useplanardis
 cvar_t r_showoverdraw = {CF_CLIENT, "r_showoverdraw", "0", "shows overlapping geometry"};
 cvar_t r_showbboxes = {CF_CLIENT, "r_showbboxes", "0", "shows bounding boxes of server entities, value controls opacity scaling (1 = 10%,  10 = 100%)"};
 cvar_t r_showbboxes_client = {CF_CLIENT, "r_showbboxes_client", "0", "shows bounding boxes of clientside qc entities, value controls opacity scaling (1 = 10%,  10 = 100%)"};
-cvar_t r_showsurfaces = {CF_CLIENT, "r_showsurfaces", "0", "1 shows surfaces as different colors, or a value of 2 shows triangle draw order (for analyzing whether meshes are optimized for vertex cache)"};
+cvar_t r_showsurfaces = {CF_CLIENT, "r_showsurfaces", "0", "1 shows surfaces as different colors, or a value of 3 shows an approximation to vertex or object color (for a very approximate view of the game)"};
 cvar_t r_showtris = {CF_CLIENT, "r_showtris", "0", "shows triangle outlines, value controls brightness (can be above 1)"};
 cvar_t r_shownormals = {CF_CLIENT, "r_shownormals", "0", "shows per-vertex surface normals and tangent vectors for bumpmapped lighting"};
 cvar_t r_showlighting = {CF_CLIENT, "r_showlighting", "0", "shows areas lit by lights, useful for finding out why some areas of a map render slowly (bright orange = lots of passes = slow), a value of 2 disables depth testing which can be interesting but not very useful"};
@@ -156,12 +156,8 @@ cvar_t gl_skyclip = {CF_CLIENT, "gl_skyclip", "4608", "nehahra farclip distance
 cvar_t r_texture_dds_load = {CF_CLIENT | CF_ARCHIVE, "r_texture_dds_load", "0", "load compressed dds/filename.dds texture instead of filename.tga, if the file exists (requires driver support)"};
 cvar_t r_texture_dds_save = {CF_CLIENT | CF_ARCHIVE, "r_texture_dds_save", "0", "save compressed dds/filename.dds texture when filename.tga is loaded, so that it can be loaded instead next time"};
 
-cvar_t r_textureunits = {CF_CLIENT, "r_textureunits", "32", "number of texture units to use in GL 1.1 and GL 1.3 rendering paths"};
-static cvar_t gl_combine = {CF_CLIENT | CF_READONLY, "gl_combine", "1", "indicates whether the OpenGL 1.3 rendering path is active"};
-static cvar_t r_glsl = {CF_CLIENT | CF_READONLY, "r_glsl", "1", "indicates whether the OpenGL 2.0 rendering path is active"};
-
 cvar_t r_usedepthtextures = {CF_CLIENT | CF_ARCHIVE, "r_usedepthtextures", "1", "use depth texture instead of depth renderbuffer where possible, uses less video memory but may render slower (or faster) depending on hardware"};
-cvar_t r_viewfbo = {CF_CLIENT | CF_ARCHIVE, "r_viewfbo", "0", "enables use of an 8bit (1) or 16bit (2) or 32bit (3) per component float framebuffer render, which may be at a different resolution than the video mode"};
+cvar_t r_viewfbo = {CF_CLIENT | CF_ARCHIVE, "r_viewfbo", "0", "enables use of an 8bit (1) or 16bit (2) or 32bit (3) per component float framebuffer render, which may be at a different resolution than the video mode; the default setting of 0 uses a framebuffer render when required, and renders directly to the screen otherwise"};
 cvar_t r_rendertarget_debug = {CF_CLIENT, "r_rendertarget_debug", "-1", "replaces the view with the contents of the specified render target (by number - note that these can fluctuate depending on scene)"};
 cvar_t r_viewscale = {CF_CLIENT | CF_ARCHIVE, "r_viewscale", "1", "scaling factor for resolution of the fbo rendering method, must be > 0, can be above 1 for a costly antialiasing behavior, typical values are 0.5 for 1/4th as many pixels rendered, or 1 for normal rendering"};
 cvar_t r_viewscale_fpsscaling = {CF_CLIENT | CF_ARCHIVE, "r_viewscale_fpsscaling", "0", "change resolution based on framerate"};
@@ -191,6 +187,7 @@ cvar_t r_glsl_postprocess_uservec2_enable = {CF_CLIENT | CF_ARCHIVE, "r_glsl_pos
 cvar_t r_glsl_postprocess_uservec3_enable = {CF_CLIENT | CF_ARCHIVE, "r_glsl_postprocess_uservec3_enable", "1", "enables postprocessing uservec3 usage, creates USERVEC1 define (only useful if default.glsl has been customized)"};
 cvar_t r_glsl_postprocess_uservec4_enable = {CF_CLIENT | CF_ARCHIVE, "r_glsl_postprocess_uservec4_enable", "1", "enables postprocessing uservec4 usage, creates USERVEC1 define (only useful if default.glsl has been customized)"};
 cvar_t r_colorfringe = {CF_CLIENT | CF_ARCHIVE, "r_colorfringe", "0", "Chromatic aberration. Values higher than 0.025 will noticeably distort the image"};
+cvar_t r_fxaa = {CF_CLIENT | CF_ARCHIVE, "r_fxaa", "0", "fast approximate anti aliasing"};
 
 cvar_t r_water = {CF_CLIENT | CF_ARCHIVE, "r_water", "0", "whether to use reflections and refraction on water surfaces (note: r_wateralpha must be set below 1)"};
 cvar_t r_water_cameraentitiesonly = {CF_CLIENT | CF_ARCHIVE, "r_water_cameraentitiesonly", "0", "whether to only show QC-defined reflections/refractions (typically used for camera- or portal-like effects)"};
@@ -257,7 +254,7 @@ cvar_t r_buffermegs[R_BUFFERDATA_COUNT] =
        {CF_CLIENT | CF_ARCHIVE, "r_buffermegs_uniform", "0.25", "uniform buffer size for one frame"},
 };
 
-cvar_t r_q1bsp_lightmap_updates_enabled = {CF_CLIENT | CF_ARCHIVE, "r_q1bsp_lightmap_updates_enabled", "1", "allow lightmaps to be updated on Q1BSP maps (don't turn this off except for debugging)"};
+cvar_t r_q1bsp_lightmap_updates_enabled = {CF_CLIENT, "r_q1bsp_lightmap_updates_enabled", "1", "allow lightmaps to be updated on Q1BSP maps (don't turn this off except for debugging)"};
 cvar_t r_q1bsp_lightmap_updates_combine = {CF_CLIENT | CF_ARCHIVE, "r_q1bsp_lightmap_updates_combine", "2", "combine lightmap texture updates to make fewer glTexSubImage2D calls, modes: 0 = immediately upload lightmaps (may be thousands of small 3x3 updates), 1 = combine to one call, 2 = combine to one full texture update (glTexImage2D) which tells the driver it does not need to lock the resource (faster on most drivers)"};
 cvar_t r_q1bsp_lightmap_updates_hidden_surfaces = {CF_CLIENT | CF_ARCHIVE, "r_q1bsp_lightmap_updates_hidden_surfaces", "0", "update lightmaps on surfaces that are not visible, so that updates only occur on frames where lightstyles changed value (animation or light switches), only makes sense with combine = 2"};
 
@@ -536,7 +533,7 @@ static void R_BuildFogHeightTexture(void)
        float c[4];
        float f;
        inpixels = NULL;
-       strlcpy(r_refdef.fogheighttexturename, r_refdef.fog_height_texturename, sizeof(r_refdef.fogheighttexturename));
+       dp_strlcpy(r_refdef.fogheighttexturename, r_refdef.fog_height_texturename, sizeof(r_refdef.fogheighttexturename));
        if (r_refdef.fogheighttexturename[0])
                inpixels = loadimagepixelsbgra(r_refdef.fogheighttexturename, true, false, false, NULL);
        if (!inpixels)
@@ -1026,7 +1023,7 @@ static char *ShaderModeInfo_GetShaderText(shadermodeinfo_t *modeinfo, qbool prin
 
 static void R_GLSL_CompilePermutation(r_glsl_permutation_t *p, unsigned int mode, uint64_t permutation)
 {
-       int i;
+       unsigned i;
        int ubibind;
        int sampler;
        shadermodeinfo_t *modeinfo = &shadermodeinfo[SHADERLANGUAGE_GLSL][mode];
@@ -1047,7 +1044,7 @@ static void R_GLSL_CompilePermutation(r_glsl_permutation_t *p, unsigned int mode
        permutationname[0] = 0;
        sourcestring = ShaderModeInfo_GetShaderText(modeinfo, true, false);
 
-       strlcat(permutationname, modeinfo->filename, sizeof(permutationname));
+       dp_strlcat(permutationname, modeinfo->filename, sizeof(permutationname));
 
        // we need 140 for r_glsl_skeletal (GL_ARB_uniform_buffer_object)
        if(vid.support.glshaderversion >= 140)
@@ -1101,7 +1098,7 @@ static void R_GLSL_CompilePermutation(r_glsl_permutation_t *p, unsigned int mode
        vertstrings_list[vertstrings_count++] = modeinfo->pretext;
        geomstrings_list[geomstrings_count++] = modeinfo->pretext;
        fragstrings_list[fragstrings_count++] = modeinfo->pretext;
-       strlcat(permutationname, modeinfo->name, sizeof(permutationname));
+       dp_strlcat(permutationname, modeinfo->name, sizeof(permutationname));
 
        // now add all the permutation pretexts
        for (i = 0;i < SHADERPERMUTATION_COUNT;i++)
@@ -1111,7 +1108,7 @@ static void R_GLSL_CompilePermutation(r_glsl_permutation_t *p, unsigned int mode
                        vertstrings_list[vertstrings_count++] = shaderpermutationinfo[i].pretext;
                        geomstrings_list[geomstrings_count++] = shaderpermutationinfo[i].pretext;
                        fragstrings_list[fragstrings_count++] = shaderpermutationinfo[i].pretext;
-                       strlcat(permutationname, shaderpermutationinfo[i].name, sizeof(permutationname));
+                       dp_strlcat(permutationname, shaderpermutationinfo[i].name, sizeof(permutationname));
                }
                else
                {
@@ -1362,7 +1359,7 @@ static void R_SetupShader_SetPermutationGLSL(unsigned int mode, uint64_t permuta
                        if (!r_glsl_permutation->program)
                        {
                                // remove features until we find a valid permutation
-                               int i;
+                               unsigned i;
                                for (i = 0;i < SHADERPERMUTATION_COUNT;i++)
                                {
                                        // reduce i more quickly whenever it would not remove any bits
@@ -1421,7 +1418,8 @@ void R_GLSL_Restart_f(cmd_state_t *cmd)
 
 static void R_GLSL_DumpShader_f(cmd_state_t *cmd)
 {
-       int i, language, mode, dupe;
+       unsigned i;
+       int language, mode, dupe;
        char *text;
        shadermodeinfo_t *modeinfo;
        qfile_t *file;
@@ -1925,7 +1923,7 @@ void R_SetupShader_Surface(const float rtlightambient[3], const float rtlightdif
                        if (r_glsl_permutation->loc_Color_Ambient >= 0) qglUniform3f(r_glsl_permutation->loc_Color_Ambient, rtlightambient[0], rtlightambient[1], rtlightambient[2]);
                        if (r_glsl_permutation->loc_Color_Diffuse >= 0) qglUniform3f(r_glsl_permutation->loc_Color_Diffuse, rtlightdiffuse[0], rtlightdiffuse[1], rtlightdiffuse[2]);
                        if (r_glsl_permutation->loc_Color_Specular >= 0) qglUniform3f(r_glsl_permutation->loc_Color_Specular, rtlightspecular[0], rtlightspecular[1], rtlightspecular[2]);
-       
+
                        // additive passes are only darkened by fog, not tinted
                        if (r_glsl_permutation->loc_FogColor >= 0)
                                qglUniform3f(r_glsl_permutation->loc_FogColor, 0, 0, 0);
@@ -2263,7 +2261,7 @@ skinframe_t *R_SkinFrame_Find(const char *name, int textureflags, int comparewid
                        return NULL;
                item = (skinframe_t *)Mem_ExpandableArray_AllocRecord(&r_skinframe.array);
                memset(item, 0, sizeof(*item));
-               strlcpy(item->basename, basename, sizeof(item->basename));
+               dp_strlcpy(item->basename, basename, sizeof(item->basename));
                item->textureflags = compareflags;
                item->comparewidth = comparewidth;
                item->compareheight = compareheight;
@@ -2992,7 +2990,7 @@ rtexture_t *R_GetCubemap(const char *basename)
                return r_texture_whitecube;
        r_texture_numcubemaps++;
        r_texture_cubemaps[i] = (cubemapinfo_t *)Mem_Alloc(r_main_mempool, sizeof(cubemapinfo_t));
-       strlcpy(r_texture_cubemaps[i]->basename, basename, sizeof(r_texture_cubemaps[i]->basename));
+       dp_strlcpy(r_texture_cubemaps[i]->basename, basename, sizeof(r_texture_cubemaps[i]->basename));
        r_texture_cubemaps[i]->texture = R_LoadCubemap(r_texture_cubemaps[i]->basename);
        return r_texture_cubemaps[i]->texture;
 }
@@ -3071,9 +3069,6 @@ static void gl_main_start(void)
        {
        case RENDERPATH_GL32:
        case RENDERPATH_GLES2:
-               Cvar_SetValueQuick(&r_textureunits, MAX_TEXTUREUNITS);
-               Cvar_SetValueQuick(&gl_combine, 1);
-               Cvar_SetValueQuick(&r_glsl, 1);
                r_loadnormalmap = true;
                r_loadgloss = true;
                r_loadfog = false;
@@ -3335,8 +3330,6 @@ void GL_Main_Init(void)
        Cvar_RegisterVariable(&r_transparent_sortarraysize);
        Cvar_RegisterVariable(&r_texture_dds_load);
        Cvar_RegisterVariable(&r_texture_dds_save);
-       Cvar_RegisterVariable(&r_textureunits);
-       Cvar_RegisterVariable(&gl_combine);
        Cvar_RegisterVariable(&r_usedepthtextures);
        Cvar_RegisterVariable(&r_viewfbo);
        Cvar_RegisterVariable(&r_rendertarget_debug);
@@ -3347,7 +3340,6 @@ void GL_Main_Init(void)
        Cvar_RegisterVariable(&r_viewscale_fpsscaling_stepsize);
        Cvar_RegisterVariable(&r_viewscale_fpsscaling_stepmax);
        Cvar_RegisterVariable(&r_viewscale_fpsscaling_target);
-       Cvar_RegisterVariable(&r_glsl);
        Cvar_RegisterVariable(&r_glsl_deluxemapping);
        Cvar_RegisterVariable(&r_glsl_offsetmapping);
        Cvar_RegisterVariable(&r_glsl_offsetmapping_steps);
@@ -3368,6 +3360,7 @@ void GL_Main_Init(void)
        Cvar_RegisterVariable(&r_glsl_postprocess_uservec4_enable);
        Cvar_RegisterVariable(&r_celshading);
        Cvar_RegisterVariable(&r_celoutlines);
+       Cvar_RegisterVariable(&r_fxaa);
 
        Cvar_RegisterVariable(&r_water);
        Cvar_RegisterVariable(&r_water_cameraentitiesonly);
@@ -3836,7 +3829,7 @@ qbool R_AnimCache_GetEntity(entity_render_t *ent, qbool wantnormals, qbool wantt
                r_refdef.stats[r_stat_animcache_skeletal_bones] += model->num_bones;
                r_refdef.stats[r_stat_animcache_skeletal_maxbones] = max(r_refdef.stats[r_stat_animcache_skeletal_maxbones], model->num_bones);
                ent->animcache_skeletaltransform3x4 = (float *)R_FrameData_Alloc(sizeof(float[3][4]) * model->num_bones);
-               Mod_Skeletal_BuildTransforms(model, ent->frameblend, ent->skeleton, NULL, ent->animcache_skeletaltransform3x4); 
+               Mod_Skeletal_BuildTransforms(model, ent->frameblend, ent->skeleton, NULL, ent->animcache_skeletaltransform3x4);
                // note: this can fail if the buffer is at the grow limit
                ent->animcache_skeletaltransform3x4size = sizeof(float[3][4]) * model->num_bones;
                ent->animcache_skeletaltransform3x4buffer = R_BufferData_Store(ent->animcache_skeletaltransform3x4size, ent->animcache_skeletaltransform3x4, R_BUFFERDATA_UNIFORM, &ent->animcache_skeletaltransform3x4offset);
@@ -4387,7 +4380,7 @@ static void R_View_SetFrustum(const int *scissor)
        //PlaneClassify(&frustum[4]);
 }
 
-static void R_View_UpdateWithScissor(const int *myscissor)
+static void R_View_Update(const int *myscissor)
 {
        R_Main_ResizeViewCache();
        R_View_SetFrustum(myscissor);
@@ -4395,21 +4388,13 @@ static void R_View_UpdateWithScissor(const int *myscissor)
        R_View_UpdateEntityVisible();
 }
 
-static void R_View_Update(void)
-{
-       R_Main_ResizeViewCache();
-       R_View_SetFrustum(NULL);
-       R_View_WorldVisibility(!r_refdef.view.usevieworiginculling);
-       R_View_UpdateEntityVisible();
-}
-
 float viewscalefpsadjusted = 1.0f;
 
 void R_SetupView(qbool allowwaterclippingplane, int viewfbo, rtexture_t *viewdepthtexture, rtexture_t *viewcolortexture, int viewx, int viewy, int viewwidth, int viewheight)
 {
        const float *customclipplane = NULL;
        float plane[4];
-       int /*rtwidth,*/ rtheight;
+       int viewy_adjusted;
        if (r_refdef.view.useclipplane && allowwaterclippingplane)
        {
                // LadyHavoc: couldn't figure out how to make this approach work the same in DPSOFTRAST
@@ -4424,15 +4409,16 @@ void R_SetupView(qbool allowwaterclippingplane, int viewfbo, rtexture_t *viewdep
                customclipplane = plane;
        }
 
-       //rtwidth = viewfbo ? R_TextureWidth(viewdepthtexture ? viewdepthtexture : viewcolortexture) : vid.width;
-       rtheight = viewfbo ? R_TextureHeight(viewdepthtexture ? viewdepthtexture : viewcolortexture) : vid.height;
+       // GL is weird because it's bottom to top, r_refdef.view.y is top to bottom.
+       // Unless the render target is a FBO...
+       viewy_adjusted = viewfbo ? viewy : vid.height - viewheight - viewy;
 
        if (!r_refdef.view.useperspective)
-               R_Viewport_InitOrtho3D(&r_refdef.view.viewport, &r_refdef.view.matrix, viewx, rtheight - viewheight - viewy, viewwidth, viewheight, r_refdef.view.ortho_x, r_refdef.view.ortho_y, -r_refdef.farclip, r_refdef.farclip, customclipplane);
+               R_Viewport_InitOrtho3D(&r_refdef.view.viewport, &r_refdef.view.matrix, viewx, viewy_adjusted, viewwidth, viewheight, r_refdef.view.ortho_x, r_refdef.view.ortho_y, -r_refdef.farclip, r_refdef.farclip, customclipplane);
        else if (vid.stencil && r_useinfinitefarclip.integer)
-               R_Viewport_InitPerspectiveInfinite(&r_refdef.view.viewport, &r_refdef.view.matrix, viewx, rtheight - viewheight - viewy, viewwidth, viewheight, r_refdef.view.frustum_x, r_refdef.view.frustum_y, r_refdef.nearclip, customclipplane);
+               R_Viewport_InitPerspectiveInfinite(&r_refdef.view.viewport, &r_refdef.view.matrix, viewx, viewy_adjusted, viewwidth, viewheight, r_refdef.view.frustum_x, r_refdef.view.frustum_y, r_refdef.nearclip, customclipplane);
        else
-               R_Viewport_InitPerspective(&r_refdef.view.viewport, &r_refdef.view.matrix, viewx, rtheight - viewheight - viewy, viewwidth, viewheight, r_refdef.view.frustum_x, r_refdef.view.frustum_y, r_refdef.nearclip, r_refdef.farclip, customclipplane);
+               R_Viewport_InitPerspective(&r_refdef.view.viewport, &r_refdef.view.matrix, viewx, viewy_adjusted, viewwidth, viewheight, r_refdef.view.frustum_x, r_refdef.view.frustum_y, r_refdef.nearclip, r_refdef.farclip, customclipplane);
        R_Mesh_SetRenderTargets(viewfbo, viewdepthtexture, viewcolortexture, NULL, NULL, NULL);
        R_SetViewport(&r_refdef.view.viewport);
 }
@@ -4462,11 +4448,15 @@ void R_EntityMatrix(const matrix4x4_t *matrix)
 void R_ResetViewRendering2D_Common(int viewfbo, rtexture_t *viewdepthtexture, rtexture_t *viewcolortexture, int viewx, int viewy, int viewwidth, int viewheight, float x2, float y2)
 {
        r_viewport_t viewport;
+       int viewy_adjusted;
 
        CHECKGLERROR
 
-       // GL is weird because it's bottom to top, r_refdef.view.y is top to bottom
-       R_Viewport_InitOrtho(&viewport, &identitymatrix, viewx, vid.height - viewheight - viewy, viewwidth, viewheight, 0, 0, x2, y2, -10, 100, NULL);
+       // GL is weird because it's bottom to top, r_refdef.view.y is top to bottom.
+       // Unless the render target is a FBO...
+       viewy_adjusted = viewfbo ? viewy : vid.height - viewheight - viewy;
+
+       R_Viewport_InitOrtho(&viewport, &identitymatrix, viewx, viewy_adjusted, viewwidth, viewheight, 0, 0, x2, y2, -10, 100, NULL);
        R_Mesh_SetRenderTargets(viewfbo, viewdepthtexture, viewcolortexture, NULL, NULL, NULL);
        R_SetViewport(&viewport);
        GL_Scissor(viewport.x, viewport.y, viewport.width, viewport.height);
@@ -4870,10 +4860,7 @@ static void R_Water_ProcessPlanes(int fbo, rtexture_t *depthtexture, rtexture_t
                        GL_ScissorTest(false);
                        R_ClearScreen(r_refdef.fogenabled);
                        GL_ScissorTest(true);
-                       if(r_water_scissormode.integer & 2)
-                               R_View_UpdateWithScissor(myscissor);
-                       else
-                               R_View_Update();
+                       R_View_Update(r_water_scissormode.integer & 2 ? myscissor : NULL);
                        R_AnimCache_CacheVisibleEntities();
                        if(r_water_scissormode.integer & 1)
                                GL_Scissor(myscissor[0], myscissor[1], myscissor[2], myscissor[3]);
@@ -4938,10 +4925,7 @@ static void R_Water_ProcessPlanes(int fbo, rtexture_t *depthtexture, rtexture_t
                        GL_ScissorTest(false);
                        R_ClearScreen(r_refdef.fogenabled);
                        GL_ScissorTest(true);
-                       if(r_water_scissormode.integer & 2)
-                               R_View_UpdateWithScissor(myscissor);
-                       else
-                               R_View_Update();
+                       R_View_Update(r_water_scissormode.integer & 2 ? myscissor : NULL);
                        R_AnimCache_CacheVisibleEntities();
                        if(r_water_scissormode.integer & 1)
                                GL_Scissor(myscissor[0], myscissor[1], myscissor[2], myscissor[3]);
@@ -4988,7 +4972,7 @@ static void R_Water_ProcessPlanes(int fbo, rtexture_t *depthtexture, rtexture_t
                                r_refdef.view.usecustompvs = true;
                                r_refdef.scene.worldmodel->brush.FatPVS(r_refdef.scene.worldmodel, visorigin, 2, r_refdef.viewcache.world_pvsbits, (r_refdef.viewcache.world_numclusters+7)>>3, false);
                        }
-                       
+
                        // camera needs no clipplane
                        r_refdef.view.useclipplane = false;
                        // TODO: is the camera origin always valid?  if so we don't need to clear this
@@ -5002,7 +4986,7 @@ static void R_Water_ProcessPlanes(int fbo, rtexture_t *depthtexture, rtexture_t
                        GL_ScissorTest(false);
                        R_ClearScreen(r_refdef.fogenabled);
                        GL_ScissorTest(true);
-                       R_View_Update();
+                       R_View_Update(NULL);
                        R_AnimCache_CacheVisibleEntities();
                        R_RenderScene(rt->fbo, rt->depthtexture, rt->colortexture[0], 0, 0, rt->texturewidth, rt->textureheight);
 
@@ -5014,7 +4998,7 @@ static void R_Water_ProcessPlanes(int fbo, rtexture_t *depthtexture, rtexture_t
        r_fb.water.renderingscene = false;
        r_refdef.view = originalview;
        R_ResetViewRendering3D(fbo, depthtexture, colortexture, viewx, viewy, viewwidth, viewheight);
-       R_View_Update();
+       R_View_Update(NULL);
        R_AnimCache_CacheVisibleEntities();
        goto finish;
 error:
@@ -5246,35 +5230,57 @@ static void R_Bloom_MakeTexture(void)
        r_fb.rt_bloom = cur;
 }
 
-static void R_BlendView(int viewfbo, rtexture_t *viewdepthtexture, rtexture_t *viewcolortexture, int viewx, int viewy, int viewwidth, int viewheight)
+static qbool R_BlendView_IsTrivial(int viewwidth, int viewheight, int width, int height)
 {
-       uint64_t permutation;
-       float uservecs[4][4];
-       rtexture_t *viewtexture;
-       rtexture_t *bloomtexture;
+       // Scaling requested?
+       if (viewwidth != width || viewheight != height)
+               return false;
+       // Higher bit depth or explicit FBO requested?
+       if (r_viewfbo.integer)
+               return false;
+       // Non-trivial postprocessing shader permutation?
+       if (r_fb.bloomwidth
+       || r_refdef.viewblend[3] > 0
+       || !vid_gammatables_trivial
+       || r_glsl_postprocess.integer
+       || ((!R_Stereo_ColorMasking() && r_glsl_saturation.value != 1)))
+               return false;
+       // Other reasons for a non-trivial default postprocessing shader?
+       // (See R_CompileShader_CheckStaticParms but only those relevant for MODE_POSTPROCESS in shader_glsl.h)
+       // Skip: if (r_glsl_saturation_redcompensate.integer) (already covered by saturation above).
+       // Skip: if (r_glsl_postprocess.integer) (already covered by r_glsl_postprocess above).
+       // Skip: if (r_glsl_postprocess_uservec1_enable.integer) (already covered by r_glsl_postprocessing above).
+       if (r_fxaa.integer)
+               return false;
+       if (r_colorfringe.value)
+               return false;
+       return true;
+}
 
+static void R_MotionBlurView(int viewfbo, rtexture_t *viewdepthtexture, rtexture_t *viewcolortexture, int viewx, int viewy, int viewwidth, int viewheight)
+{
        R_EntityMatrix(&identitymatrix);
 
-       if(r_refdef.view.ismain && !R_Stereo_Active() && (r_motionblur.value > 0 || r_damageblur.value > 0) && r_fb.ghosttexture)
+       if(r_refdef.view.ismain && !R_Stereo_Active() && (r_motionblur.value > 0 || (r_damageblur.value > 0 && cl.cshifts[CSHIFT_DAMAGE].percent != 0)) && r_fb.ghosttexture)
        {
                // declare variables
                float blur_factor, blur_mouseaccel, blur_velocity;
-               static float blur_average; 
+               static float blur_average;
                static vec3_t blur_oldangles; // used to see how quickly the mouse is moving
 
                // set a goal for the factoring
-               blur_velocity = bound(0, (VectorLength(cl.movement_velocity) - r_motionblur_velocityfactor_minspeed.value) 
+               blur_velocity = bound(0, (VectorLength(cl.movement_velocity) - r_motionblur_velocityfactor_minspeed.value)
                        / max(1, r_motionblur_velocityfactor_maxspeed.value - r_motionblur_velocityfactor_minspeed.value), 1);
-               blur_mouseaccel = bound(0, ((fabs(VectorLength(cl.viewangles) - VectorLength(blur_oldangles)) * 10) - r_motionblur_mousefactor_minspeed.value) 
+               blur_mouseaccel = bound(0, ((fabs(VectorLength(cl.viewangles) - VectorLength(blur_oldangles)) * 10) - r_motionblur_mousefactor_minspeed.value)
                        / max(1, r_motionblur_mousefactor_maxspeed.value - r_motionblur_mousefactor_minspeed.value), 1);
-               blur_factor = ((blur_velocity * r_motionblur_velocityfactor.value) 
+               blur_factor = ((blur_velocity * r_motionblur_velocityfactor.value)
                        + (blur_mouseaccel * r_motionblur_mousefactor.value));
 
                // from the goal, pick an averaged value between goal and last value
                cl.motionbluralpha = bound(0, (cl.time - cl.oldtime) / max(0.001, r_motionblur_averaging.value), 1);
                blur_average = blur_average * (1 - cl.motionbluralpha) + blur_factor * cl.motionbluralpha;
 
-               // enforce minimum amount of blur 
+               // enforce minimum amount of blur
                blur_factor = blur_average * (1 - r_motionblur_minblur.value) + r_motionblur_minblur.value;
 
                //Con_Printf("motionblur: direct factor: %f, averaged factor: %f, velocity: %f, mouse accel: %f \n", blur_factor, blur_average, blur_velocity, blur_mouseaccel);
@@ -5294,7 +5300,7 @@ static void R_BlendView(int viewfbo, rtexture_t *viewdepthtexture, rtexture_t *v
                cl.motionbluralpha *= lhrandom(1 - r_motionblur_randomize.value, 1 + r_motionblur_randomize.value);
                cl.motionbluralpha = bound(0, cl.motionbluralpha, r_motionblur_maxblur.value);
 
-               // apply the blur
+               // apply the blur on top of the current view
                R_ResetViewRendering2D(viewfbo, viewdepthtexture, viewcolortexture, viewx, viewy, viewwidth, viewheight);
                if (cl.motionbluralpha > 0 && !r_refdef.envmap && r_fb.ghosttexture_valid)
                {
@@ -5315,6 +5321,16 @@ static void R_BlendView(int viewfbo, rtexture_t *viewdepthtexture, rtexture_t *v
                r_refdef.stats[r_stat_bloom_copypixels] += viewwidth * viewheight;
                r_fb.ghosttexture_valid = true;
        }
+}
+
+static void R_BlendView(rtexture_t *viewcolortexture, int fbo, rtexture_t *depthtexture, rtexture_t *colortexture, int x, int y, int width, int height)
+{
+       uint64_t permutation;
+       float uservecs[4][4];
+       rtexture_t *viewtexture;
+       rtexture_t *bloomtexture;
+
+       R_EntityMatrix(&identitymatrix);
 
        if (r_fb.bloomwidth)
        {
@@ -5336,11 +5352,11 @@ static void R_BlendView(int viewfbo, rtexture_t *viewdepthtexture, rtexture_t *v
                sscanf(r_glsl_postprocess_uservec4.string, "%f %f %f %f", &uservecs[3][0], &uservecs[3][1], &uservecs[3][2], &uservecs[3][3]);
 
        // render to the screen fbo
-       R_ResetViewRendering2D(viewfbo, viewdepthtexture, viewcolortexture, viewx, viewy, viewwidth, viewheight);
+       R_ResetViewRendering2D(fbo, depthtexture, colortexture, x, y, width, height);
        GL_Color(1, 1, 1, 1);
        GL_BlendFunc(GL_ONE, GL_ZERO);
 
-       viewtexture = r_fb.rt_screen->colortexture[0];
+       viewtexture = viewcolortexture;
        bloomtexture = r_fb.rt_bloom ? r_fb.rt_bloom->colortexture[0] : NULL;
 
        if (r_rendertarget_debug.integer >= 0)
@@ -5497,6 +5513,11 @@ void R_UpdateVariables(void)
        if (r_refdef.scene.worldmodel)
        {
                r_refdef.scene.lightmapintensity *= r_refdef.scene.worldmodel->lightmapscale;
+
+               // Apply the default lightstyle to the lightmap even on q3bsp
+               if (cl.worldmodel && cl.worldmodel->type == mod_brushq3) {
+                       r_refdef.scene.lightmapintensity *= r_refdef.scene.rtlightstylevalue[0];
+               }
        }
        if (r_showsurfaces.integer)
        {
@@ -5629,6 +5650,7 @@ void R_RenderView(int fbo, rtexture_t *depthtexture, rtexture_t *colortexture, i
        rtexture_t *viewdepthtexture = NULL;
        rtexture_t *viewcolortexture = NULL;
        int viewx = r_refdef.view.x, viewy = r_refdef.view.y, viewwidth = r_refdef.view.width, viewheight = r_refdef.view.height;
+       qbool skipblend;
 
        // finish any 2D rendering that was queued
        DrawQ_Finish();
@@ -5703,9 +5725,21 @@ void R_RenderView(int fbo, rtexture_t *depthtexture, rtexture_t *colortexture, i
        if(r_fb.rt_bloom)
                r_refdef.view.colorscale *= r_bloom_scenebrightness.value;
 
-       // R_Bloom_StartFrame probably set up an fbo for us to render into, it will be rendered to the window later in R_BlendView
-       if (r_fb.rt_screen)
+       skipblend = R_BlendView_IsTrivial(r_fb.rt_screen->texturewidth, r_fb.rt_screen->textureheight, width, height);
+       if (skipblend)
+       {
+               // Render to the screen right away.
+               viewfbo = fbo;
+               viewdepthtexture = depthtexture;
+               viewcolortexture = colortexture;
+               viewx = x;
+               viewy = y;
+               viewwidth = width;
+               viewheight = height;
+       }
+       else if (r_fb.rt_screen)
        {
+               // R_Bloom_StartFrame probably set up an fbo for us to render into, it will be rendered to the window later in R_BlendView
                viewfbo = r_fb.rt_screen->fbo;
                viewdepthtexture = r_fb.rt_screen->depthtexture;
                viewcolortexture = r_fb.rt_screen->colortexture[0];
@@ -5735,7 +5769,7 @@ void R_RenderView(int fbo, rtexture_t *depthtexture, rtexture_t *colortexture, i
 
        r_refdef.view.showdebug = true;
 
-       R_View_Update();
+       R_View_Update(NULL);
        if (r_timereport_active)
                R_TimeReport("visibility");
 
@@ -5754,14 +5788,16 @@ void R_RenderView(int fbo, rtexture_t *depthtexture, rtexture_t *colortexture, i
        // test needs to be on
        if (r_fb.rt_screen)
                GL_ScissorTest(true);
-       GL_Scissor(viewx, viewy, viewwidth, viewheight);
+       GL_Scissor(r_refdef.view.viewport.x, r_refdef.view.viewport.y, r_refdef.view.viewport.width, r_refdef.view.viewport.height);
        R_RenderScene(viewfbo, viewdepthtexture, viewcolortexture, viewx, viewy, viewwidth, viewheight);
        r_fb.water.numwaterplanes = 0;
 
        // postprocess uses textures that are not aligned with the viewport we're rendering, so no scissoring
        GL_ScissorTest(false);
 
-       R_BlendView(fbo, depthtexture, colortexture, x, y, width, height);
+       R_MotionBlurView(viewfbo, viewdepthtexture, viewcolortexture, viewx, viewy, viewwidth, viewheight);
+       if (!skipblend)
+               R_BlendView(viewcolortexture, fbo, depthtexture, colortexture, x, y, width, height);
        if (r_timereport_active)
                R_TimeReport("blendview");
 
@@ -6011,7 +6047,7 @@ static const unsigned short bboxelements[36] =
 };
 
 #define BBOXEDGES 13
-static const float bboxedges[BBOXEDGES][6] = 
+static const float bboxedges[BBOXEDGES][6] =
 {
        // whole box
        { 0, 0, 0, 1, 1, 1 },
@@ -6526,7 +6562,7 @@ static void R_LoadQWSkin(r_qwskincache_t *cache, const char *skinname)
        char name[MAX_QPATH];
        skinframe_t *skinframe;
        unsigned char pixels[296*194];
-       strlcpy(cache->name, skinname, sizeof(cache->name));
+       dp_strlcpy(cache->name, skinname, sizeof(cache->name));
        dpsnprintf(name, sizeof(name), "skins/%s.pcx", cache->name);
        if (developer_loading.integer)
                Con_Printf("loading %s\n", name);
@@ -8574,14 +8610,14 @@ static int RSurf_FindWaterPlaneForSurface(const msurface_t *surface)
        // render multiple smaller batches
 }
 
-void RSurf_SetupDepthAndCulling(void)
+void RSurf_SetupDepthAndCulling(bool ui)
 {
        // submodels are biased to avoid z-fighting with world surfaces that they
        // may be exactly overlapping (avoids z-fighting artifacts on certain
        // doors and things in Quake maps)
        GL_DepthRange(0, (rsurface.texture->currentmaterialflags & MATERIALFLAG_SHORTDEPTHRANGE) ? 0.0625 : 1);
        GL_PolygonOffset(rsurface.basepolygonfactor + rsurface.texture->biaspolygonfactor, rsurface.basepolygonoffset + rsurface.texture->biaspolygonoffset);
-       GL_DepthTest(!(rsurface.texture->currentmaterialflags & MATERIALFLAG_NODEPTHTEST));
+       GL_DepthTest(!ui && !(rsurface.texture->currentmaterialflags & MATERIALFLAG_NODEPTHTEST));
        GL_CullFace((rsurface.texture->currentmaterialflags & MATERIALFLAG_NOCULLFACE) ? GL_NONE : r_refdef.view.cullface_back);
 }
 
@@ -8596,7 +8632,7 @@ static void R_DrawTextureSurfaceList_Sky(int texturenumsurfaces, const msurface_
                return;
        R_SetupShader_Generic_NoTexture(false, false);
        skyrenderlater = true;
-       RSurf_SetupDepthAndCulling();
+       RSurf_SetupDepthAndCulling(false);
        GL_DepthMask(true);
 
        // add the vertices of the surfaces to a world bounding box so we can scissor the sky render later
@@ -8752,6 +8788,8 @@ static void R_DrawTextureSurfaceList_ShowSurfaces(int texturenumsurfaces, const
        int k;
        const msurface_t *surface;
        float surfacecolor4f[4];
+       float c[4];
+       texture_t *t = rsurface.texture;
 
 //     R_Mesh_ResetTextureState();
        R_SetupShader_Generic_NoTexture(false, false);
@@ -8759,18 +8797,70 @@ static void R_DrawTextureSurfaceList_ShowSurfaces(int texturenumsurfaces, const
        GL_BlendFunc(GL_ONE, GL_ZERO);
        GL_DepthMask(writedepth);
 
-       RSurf_PrepareVerticesForBatch(BATCHNEED_ARRAY_VERTEX | BATCHNEED_ARRAY_VERTEXCOLOR | BATCHNEED_ARRAY_TEXCOORD | BATCHNEED_ALWAYSCOPY, texturenumsurfaces, texturesurfacelist);
-       vi = 0;
-       for (texturesurfaceindex = 0;texturesurfaceindex < texturenumsurfaces;texturesurfaceindex++)
+       switch (r_showsurfaces.integer)
        {
-               surface = texturesurfacelist[texturesurfaceindex];
-               k = (int)(((size_t)surface) / sizeof(msurface_t));
-               Vector4Set(surfacecolor4f, (k & 0xF) * (1.0f / 16.0f), (k & 0xF0) * (1.0f / 256.0f), (k & 0xF00) * (1.0f / 4096.0f), 1);
-               for (j = 0;j < surface->num_vertices;j++)
-               {
-                       Vector4Copy(surfacecolor4f, rsurface.batchlightmapcolor4f + 4 * vi);
-                       vi++;
-               }
+               case 1:
+               default:
+                       RSurf_PrepareVerticesForBatch(BATCHNEED_ARRAY_VERTEX | BATCHNEED_ARRAY_VERTEXCOLOR | BATCHNEED_ALWAYSCOPY, texturenumsurfaces, texturesurfacelist);
+                       vi = 0;
+                       for (texturesurfaceindex = 0;texturesurfaceindex < texturenumsurfaces;texturesurfaceindex++)
+                       {
+                               surface = texturesurfacelist[texturesurfaceindex];
+                               k = (int)(((size_t)surface) / sizeof(msurface_t));
+                               Vector4Set(surfacecolor4f, (k & 0xF) * (1.0f / 16.0f), (k & 0xF0) * (1.0f / 256.0f), (k & 0xF00) * (1.0f / 4096.0f), 1);
+                               for (j = 0;j < surface->num_vertices;j++)
+                               {
+                                       Vector4Copy(surfacecolor4f, rsurface.batchlightmapcolor4f + 4 * vi);
+                                       vi++;
+                               }
+                       }
+                       break;
+               case 3:
+                       if(t && t->currentskinframe)
+                       {
+                               Vector4Copy(t->currentskinframe->avgcolor, c);
+                               c[3] *= t->currentalpha;
+                       }
+                       else
+                       {
+                               Vector4Set(c, 1, 0, 1, 1);
+                       }
+                       if (t && (t->pantstexture || t->shirttexture))
+                       {
+                               VectorMAM(0.7, t->render_colormap_pants, 0.3, t->render_colormap_shirt, c);
+                       }
+                       VectorScale(c, 2 * r_refdef.view.colorscale, c);
+                       if(t->currentmaterialflags & MATERIALFLAG_WATERALPHA)
+                               c[3] *= r_wateralpha.value;
+                       RSurf_PrepareVerticesForBatch(BATCHNEED_ARRAY_VERTEX | BATCHNEED_ARRAY_VERTEXCOLOR | BATCHNEED_ALWAYSCOPY, texturenumsurfaces, texturesurfacelist);
+                       vi = 0;
+                       if (rsurface.modellightmapcolor4f)
+                       {
+                               for (texturesurfaceindex = 0;texturesurfaceindex < texturenumsurfaces;texturesurfaceindex++)
+                               {
+                                       surface = texturesurfacelist[texturesurfaceindex];
+                                       for (j = 0;j < surface->num_vertices;j++)
+                                       {
+                                               float *ptr = rsurface.batchlightmapcolor4f + 4 * vi;
+                                               Vector4Multiply(ptr, c, ptr);
+                                               vi++;
+                                       }
+                               }
+                       }
+                       else
+                       {
+                               for (texturesurfaceindex = 0;texturesurfaceindex < texturenumsurfaces;texturesurfaceindex++)
+                               {
+                                       surface = texturesurfacelist[texturesurfaceindex];
+                                       for (j = 0;j < surface->num_vertices;j++)
+                                       {
+                                               float *ptr = rsurface.batchlightmapcolor4f + 4 * vi;
+                                               Vector4Copy(c, ptr);
+                                               vi++;
+                                       }
+                               }
+                       }
+                       break;
        }
        R_Mesh_PrepareVertices_Generic_Arrays(rsurface.batchnumvertices, rsurface.batchvertex3f, rsurface.batchlightmapcolor4f, rsurface.batchtexcoordtexture2f);
        RSurf_DrawBatch();
@@ -8779,7 +8869,7 @@ static void R_DrawTextureSurfaceList_ShowSurfaces(int texturenumsurfaces, const
 static void R_DrawModelTextureSurfaceList(int texturenumsurfaces, const msurface_t **texturesurfacelist, qbool writedepth, qbool prepass, qbool ui)
 {
        CHECKGLERROR
-       RSurf_SetupDepthAndCulling();
+       RSurf_SetupDepthAndCulling(ui);
        if (r_showsurfaces.integer && r_refdef.view.showdebug)
        {
                R_DrawTextureSurfaceList_ShowSurfaces(texturenumsurfaces, texturesurfacelist, writedepth);
@@ -8841,7 +8931,7 @@ static void R_DrawSurface_TransparentCallback(const entity_render_t *ent, const
                                GL_DepthMask(true);
 //                             R_Mesh_ResetTextureState();
                        }
-                       RSurf_SetupDepthAndCulling();
+                       RSurf_SetupDepthAndCulling(false);
                        RSurf_PrepareVerticesForBatch(BATCHNEED_ARRAY_VERTEX | BATCHNEED_ALLOWMULTIDRAW, texturenumsurfaces, texturesurfacelist);
                        R_SetupShader_DepthOrShadow(false, false, !!rsurface.batchskeletaltransform3x4);
                        R_Mesh_PrepareVertices_Vertex3f(rsurface.batchnumvertices, rsurface.batchvertex3f, rsurface.batchvertex3f_vertexbuffer, rsurface.batchvertex3f_bufferoffset);
@@ -8915,7 +9005,7 @@ static void R_DrawTextureSurfaceList_DepthOnly(int texturenumsurfaces, const msu
                return;
        if (r_fb.water.renderingscene && (rsurface.texture->currentmaterialflags & (MATERIALFLAG_WATERSHADER | MATERIALFLAG_REFLECTION)))
                return;
-       RSurf_SetupDepthAndCulling();
+       RSurf_SetupDepthAndCulling(false);
        RSurf_PrepareVerticesForBatch(BATCHNEED_ARRAY_VERTEX | BATCHNEED_ALLOWMULTIDRAW, texturenumsurfaces, texturesurfacelist);
        R_Mesh_PrepareVertices_Vertex3f(rsurface.batchnumvertices, rsurface.batchvertex3f, rsurface.batchvertex3f_vertexbuffer, rsurface.batchvertex3f_bufferoffset);
        R_SetupShader_DepthOrShadow(false, false, !!rsurface.batchskeletaltransform3x4);
@@ -10048,7 +10138,7 @@ void R_DrawModelSurfaces(entity_render_t *ent, qbool skysurfaces, qbool writedep
                // Now check if update flags are set on any surfaces that are visible
                if (r_q1bsp_lightmap_updates_hidden_surfaces.integer)
                {
-                       /* 
+                       /*
                         * We can do less frequent texture uploads (approximately 10hz for animated
                         * lightstyles) by rebuilding lightmaps on surfaces that are not currently visible.
                         * For optimal efficiency, this includes the submodels of the worldmodel, so we
index 723e9fb4ce3ee2028ffcc20b6924f1e02955dedd..a68daf5b68e539e032441a0d715e48d3977e0a5d 100644 (file)
@@ -1295,7 +1295,10 @@ void R_Mod_CompileShadowMap(entity_render_t *ent, vec3_t relativelightorigin, ve
        // exceeding the number of triangles in a single mesh) we have to make sure
        // that we make only a single mesh - so over-estimate the size of the mesh
        // to match the model.
-       r_shadow_compilingrtlight->static_meshchain_shadow_shadowmap = Mod_ShadowMesh_Begin(r_main_mempool, model->surfmesh.num_vertices, model->surfmesh.num_triangles);
+       // bones_was_here: +128 works around BUG https://github.com/DarkPlacesEngine/darkplaces/issues/119
+       // +64 was enough to start the map without triggering ASan, +96 was enough to also edit the light.
+       // See also: warning in Mod_ShadowMesh_AddMesh
+       r_shadow_compilingrtlight->static_meshchain_shadow_shadowmap = Mod_ShadowMesh_Begin(r_main_mempool, model->surfmesh.num_vertices, model->surfmesh.num_triangles + 128);
        R_Shadow_PrepareShadowSides(model->surfmesh.num_triangles);
        for (surfacelistindex = 0;surfacelistindex < numsurfaces;surfacelistindex++)
        {
index 1e3e1d7e5d79a63afd47e0840e0f05af35a14bdd..049240b63bccb4d80c842c4c3f577c7345d19620 100644 (file)
@@ -1291,7 +1291,7 @@ static rtexture_t *R_SetupTexture(rtexturepool_t *rtexturepool, const char *iden
 
        glt = (gltexture_t *)Mem_ExpandableArray_AllocRecord(&texturearray);
        if (identifier)
-               strlcpy (glt->identifier, identifier, sizeof(glt->identifier));
+               dp_strlcpy (glt->identifier, identifier, sizeof(glt->identifier));
        glt->pool = pool;
        glt->chain = pool->gltchain;
        pool->gltchain = glt;
@@ -1382,7 +1382,7 @@ rtexture_t *R_LoadTextureRenderBuffer(rtexturepool_t *rtexturepool, const char *
 
        glt = (gltexture_t *)Mem_ExpandableArray_AllocRecord(&texturearray);
        if (identifier)
-               strlcpy (glt->identifier, identifier, sizeof(glt->identifier));
+               dp_strlcpy (glt->identifier, identifier, sizeof(glt->identifier));
        glt->pool = pool;
        glt->chain = pool->gltchain;
        pool->gltchain = glt;
@@ -1686,7 +1686,7 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen
 
                        texinfo = R_GetTexTypeInfo(textype, flags);
 
-                       strlcpy (glt->identifier, vabuf, sizeof(glt->identifier));
+                       dp_strlcpy(glt->identifier, vabuf, sizeof(glt->identifier));
                        glt->pool = pool;
                        glt->chain = pool->gltchain;
                        pool->gltchain = glt;
@@ -1969,7 +1969,8 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen
                unsigned char *p = mipnewpixels;
                for (i = bytesperblock == 16 ? 8 : 0;i < (int)mipsize_total;i += bytesperblock, p += 4)
                {
-                       c = mippixels_start[i] + 256*mippixels_start[i+1] + 65536*mippixels_start[i+2] + 16777216*mippixels_start[i+3];
+                       // UBSan: unsigned literals because promotion to int causes signed overflow when mippixels_start >= 128
+                       c = mippixels_start[i] + 256u*mippixels_start[i+1] + 65536u*mippixels_start[i+2] + 16777216u*mippixels_start[i+3];
                        p[2] = (((c >> 11) & 0x1F) + ((c >> 27) & 0x1F)) * (0.5f / 31.0f * 255.0f);
                        p[1] = (((c >>  5) & 0x3F) + ((c >> 21) & 0x3F)) * (0.5f / 63.0f * 255.0f);
                        p[0] = (((c      ) & 0x1F) + ((c >> 16) & 0x1F)) * (0.5f / 31.0f * 255.0f);
@@ -2014,7 +2015,8 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen
                {
                        for (i = bytesperblock == 16 ? 8 : 0;i < mipsize;i += bytesperblock)
                        {
-                               c = mippixels[i] + 256*mippixels[i+1] + 65536*mippixels[i+2] + 16777216*mippixels[i+3];
+                               // UBSan: unsigned literals because promotion to int causes signed overflow when mippixels >= 128
+                               c = mippixels[i] + 256u*mippixels[i+1] + 65536u*mippixels[i+2] + 16777216u*mippixels[i+3];
                                avgcolor[0] += ((c >> 11) & 0x1F) + ((c >> 27) & 0x1F);
                                avgcolor[1] += ((c >>  5) & 0x3F) + ((c >> 21) & 0x3F);
                                avgcolor[2] += ((c      ) & 0x1F) + ((c >> 16) & 0x1F);
@@ -2164,7 +2166,7 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen
        texinfo = R_GetTexTypeInfo(textype, flags);
 
        glt = (gltexture_t *)Mem_ExpandableArray_AllocRecord(&texturearray);
-       strlcpy (glt->identifier, filename, sizeof(glt->identifier));
+       dp_strlcpy (glt->identifier, filename, sizeof(glt->identifier));
        glt->pool = pool;
        glt->chain = pool->gltchain;
        pool->gltchain = glt;
index e3f8f6d0eee4a40e35865228f932683369869952..46efbf0721fe6ac23334c0a201fe1f9502d918b4 100644 (file)
--- a/glquake.h
+++ b/glquake.h
@@ -1034,6 +1034,8 @@ extern void (GLAPIENTRY *qglViewport)(GLint x, GLint y, GLsizei width, GLsizei h
 #define GL_TEXTURE_3D                          0x806F
 
 #define GL_HALF_FLOAT                                    0x140B
+#define GL_MAJOR_VERSION                  0x821B
+#define GL_MINOR_VERSION                  0x821C
 #define GL_NUM_EXTENSIONS                 0x821D
 
 
diff --git a/host.c b/host.c
index aa8fb4c32bf9d712113f2bce98d71ec6d06f77e9..3f06d38e8ead78a23507cd5424575a62bc7e399c 100644 (file)
--- a/host.c
+++ b/host.c
@@ -42,10 +42,8 @@ host_static_t host;
 
 // pretend frames take this amount of time (in seconds), 0 = realtime
 cvar_t host_framerate = {CF_CLIENT | CF_SERVER, "host_framerate","0", "locks frame timing to this value in seconds, 0.05 is 20fps for example, note that this can easily run too fast, use cl_maxfps if you want to limit your framerate instead, or sys_ticrate to limit server speed"};
-cvar_t cl_maxphysicsframesperserverframe = {CF_CLIENT, "cl_maxphysicsframesperserverframe","10", "maximum number of physics frames per server frame"};
 // shows time used by certain subsystems
 cvar_t host_speeds = {CF_CLIENT | CF_SERVER, "host_speeds","0", "reports how much time is used in server/graphics/sound"};
-cvar_t host_maxwait = {CF_CLIENT | CF_SERVER, "host_maxwait","1000", "maximum sleep time requested from the operating system in millisecond. Larger sleeps will be done using multiple host_maxwait length sleeps. Lowering this value will increase CPU load, but may help working around problems with accuracy of sleep times."};
 
 cvar_t developer = {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "developer","0", "shows debugging messages and information (recommended for all developers and level designers); the value -1 also suppresses buffering and logging these messages"};
 cvar_t developer_extra = {CF_CLIENT | CF_SERVER, "developer_extra", "0", "prints additional debugging messages, often very verbose!"};
@@ -90,6 +88,10 @@ void Host_Error (const char *error, ...)
        static char hosterrorstring2[MAX_INPUTLINE]; // THREAD UNSAFE
        static qbool hosterror = false;
        va_list argptr;
+       int outfd = sys.outfd;
+
+       // set output to stderr
+       sys.outfd = fileno(stderr);
 
        // turn off rcon redirect if it was active when the crash occurred
        // to prevent loops when it is a networking problem
@@ -104,41 +106,37 @@ void Host_Error (const char *error, ...)
        // LadyHavoc: if crashing very early, or currently shutting down, do
        // Sys_Error instead
        if (host.framecount < 3 || host.state == host_shutdown)
-               Sys_Error ("Host_Error: %s", hosterrorstring1);
+               Sys_Error ("Host_Error during %s: %s", host.framecount < 3 ? "startup" : "shutdown", hosterrorstring1);
 
        if (hosterror)
                Sys_Error ("Host_Error: recursively entered (original error was: %s    new error is: %s)", hosterrorstring2, hosterrorstring1);
        hosterror = true;
 
-       strlcpy(hosterrorstring2, hosterrorstring1, sizeof(hosterrorstring2));
+       dp_strlcpy(hosterrorstring2, hosterrorstring1, sizeof(hosterrorstring2));
 
        CL_Parse_DumpPacket();
-
        CL_Parse_ErrorCleanUp();
 
-       //PR_Crash();
-
        // print out where the crash happened, if it was caused by QC (and do a cleanup)
-       PRVM_Crash(SVVM_prog);
-       PRVM_Crash(CLVM_prog);
-#ifdef CONFIG_MENU
-       PRVM_Crash(MVM_prog);
-#endif
-
-       Cvar_SetValueQuick(&csqc_progcrc, -1);
-       Cvar_SetValueQuick(&csqc_progsize, -1);
+       PRVM_Crash();
 
        if(host.hook.SV_Shutdown)
                host.hook.SV_Shutdown();
 
        if (cls.state == ca_dedicated)
-               Sys_Error ("Host_Error: %s",hosterrorstring2);  // dedicated servers exit
+               Sys_Error("Host_Error: %s", hosterrorstring1);        // dedicated servers exit
+
+       // prevent an endless loop if the error was triggered by a command
+       Cbuf_Clear(cmd_local->cbuf);
 
-       CL_Disconnect();
-       cls.demonum = -1;
+       CL_DisconnectEx(false, "Host_Error: %s", hosterrorstring1);
+       cls.demonum = -1; // stop demo loop
 
        hosterror = false;
 
+       // restore configured outfd
+       sys.outfd = outfd;
+
        Host_AbortCurrentFrame();
 }
 
@@ -157,7 +155,7 @@ static void Host_Quit_f(cmd_state_t *cmd)
 
 static void Host_Version_f(cmd_state_t *cmd)
 {
-       Con_Printf("Version: %s build %s\n", gamename, buildstring);
+       Con_Printf("Version: %s\n", engineversion);
 }
 
 static void Host_Framerate_c(cvar_t *var)
@@ -200,9 +198,11 @@ void Host_SaveConfig(const char *file)
                f = FS_OpenRealFile(file, "wb", false);
                if (!f)
                {
-                       Con_Printf(CON_ERROR "Couldn't write %s.\n", file);
+                       Con_Printf(CON_ERROR "Couldn't write %s\n", file);
                        return;
                }
+               else
+                       Con_Printf("Saving config to %s ...\n", file);
 
                Key_WriteBindings (f);
                Cvar_WriteVariables (&cvars_all, f);
@@ -215,10 +215,8 @@ static void Host_SaveConfig_f(cmd_state_t *cmd)
 {
        const char *file = CONFIGFILENAME;
 
-       if(Cmd_Argc(cmd) >= 2) {
+       if(Cmd_Argc(cmd) >= 2)
                file = Cmd_Argv(cmd, 1);
-               Con_Printf("Saving to %s\n", file);
-       }
 
        Host_SaveConfig(file);
 }
@@ -235,7 +233,10 @@ static void Host_AddConfigText(cmd_state_t *cmd)
                Cbuf_InsertText(cmd, "alias startmap_sp \"map start\"\nalias startmap_dm \"map start\"\nexec teu.rc\n");
        else
                Cbuf_InsertText(cmd, "alias startmap_sp \"map start\"\nalias startmap_dm \"map start\"\nexec " STARTCONFIGFILENAME "\n");
-       Cbuf_Execute(cmd->cbuf);
+
+       // if quake.rc is missing, use default
+       if (!FS_FileExists(STARTCONFIGFILENAME))
+               Cbuf_InsertText(cmd, "exec default.cfg\nexec " CONFIGFILENAME "\nexec autoexec.cfg\n");
 }
 
 /*
@@ -247,14 +248,17 @@ Resets key bindings and cvars to defaults and then reloads scripts
 */
 static void Host_LoadConfig_f(cmd_state_t *cmd)
 {
-       // reset all cvars, commands and aliases to init values
-       Cmd_RestoreInitState();
 #ifdef CONFIG_MENU
-       // prepend a menu restart command to execute after the config
-       Cbuf_InsertText(cmd_local, "\nmenu_restart\n");
+       // Xonotic QC complains/breaks if its cvars are deleted before its m_shutdown() is called
+       if(MR_Shutdown)
+               MR_Shutdown();
+       // append a menu restart command to execute after the config
+       Cbuf_AddText(cmd, "\nmenu_restart\n");
 #endif
+       // reset all cvars, commands and aliases to init values
+       Cmd_RestoreInitState();
        // reset cvars to their defaults, and then exec startup scripts again
-       Host_AddConfigText(cmd_local);
+       Host_AddConfigText(cmd);
 }
 
 /*
@@ -270,11 +274,9 @@ static void Host_InitLocal (void)
        Cmd_AddCommand(CF_SHARED, "saveconfig", Host_SaveConfig_f, "save settings to config.cfg (or a specified filename) immediately (also automatic when quitting)");
        Cmd_AddCommand(CF_SHARED, "loadconfig", Host_LoadConfig_f, "reset everything and reload configs");
        Cmd_AddCommand(CF_SHARED, "sendcvar", SendCvar_f, "sends the value of a cvar to the server as a sentcvar command, for use by QuakeC");
-       Cvar_RegisterVariable (&cl_maxphysicsframesperserverframe);
        Cvar_RegisterVariable (&host_framerate);
        Cvar_RegisterCallback (&host_framerate, Host_Framerate_c);
        Cvar_RegisterVariable (&host_speeds);
-       Cvar_RegisterVariable (&host_maxwait);
        Cvar_RegisterVariable (&host_isclient);
 
        Cvar_RegisterVariable (&developer);
@@ -292,7 +294,6 @@ static void Host_InitLocal (void)
 
 char engineversion[128];
 
-qbool sys_nostdout = false;
 
 static qfile_t *locksession_fh = NULL;
 static qbool locksession_run = false;
@@ -367,9 +368,12 @@ Host_Init
 static void Host_Init (void)
 {
        int i;
-       const char* os;
        char vabuf[1024];
 
+       Sys_SDL_Init();
+
+       Memory_Init();
+
        host.hook.ConnectLocal = NULL;
        host.hook.Disconnect = NULL;
        host.hook.ToggleMenu = NULL;
@@ -420,9 +424,9 @@ static void Host_Init (void)
                gl_printcheckerror.integer = 1;gl_printcheckerror.string = "1";
        }
 
-// COMMANDLINEOPTION: Console: -nostdout disables text output to the terminal the game was launched from
-       if (Sys_CheckParm("-nostdout"))
-               sys_nostdout = 1;
+       // -dedicated is checked in SV_ServerOptions() but that's too late for Cvar_RegisterVariable() to skip all the client-only cvars
+       if (Sys_CheckParm ("-dedicated") || !cl_available)
+               cls.state = ca_dedicated;
 
        // initialize console command/cvar/alias/command execution systems
        Cmd_Init();
@@ -431,6 +435,7 @@ static void Host_Init (void)
        Memory_Init_Commands();
 
        // initialize console and logging and its cvars/commands
+       // this enables Con_Printf() messages to be coloured
        Con_Init();
 
        // initialize various cvars that could not be initialized earlier
@@ -439,12 +444,11 @@ static void Host_Init (void)
        Sys_Init_Commands();
        COM_Init_Commands();
 
-       // initialize filesystem (including fs_basedir, fs_gamedir, -game, scr_screenshot_name)
+       // initialize filesystem (including fs_basedir, fs_gamedir, -game, scr_screenshot_name, gamename)
        FS_Init();
 
-       // construct a version string for the corner of the console
-       os = DP_OS_NAME;
-       dpsnprintf (engineversion, sizeof (engineversion), "%s %s %s", gamename, os, buildstring);
+       // ASAP! construct a version string for the corner of the console and for crash messages
+       dpsnprintf (engineversion, sizeof (engineversion), "%s %s%s, buildstring: %s", gamename, DP_OS_NAME, cls.state == ca_dedicated ? " dedicated" : "", buildstring);
        Con_Printf("%s\n", engineversion);
 
        // initialize process nice level
@@ -483,13 +487,7 @@ static void Host_Init (void)
        // here comes the not so critical stuff
 
        Host_AddConfigText(cmd_local);
-
-       // if quake.rc is missing, use default
-       if (!FS_FileExists("quake.rc"))
-       {
-               Cbuf_AddText(cmd_local, "exec default.cfg\nexec " CONFIGFILENAME "\nexec autoexec.cfg\n");
-               Cbuf_Execute(cmd_local->cbuf);
-       }
+       Cbuf_Execute(cmd_local->cbuf); // cannot be in Host_AddConfigText as that would cause Host_LoadConfig_f to loop!
 
        host.state = host_active;
 
@@ -497,12 +495,16 @@ static void Host_Init (void)
 
        Log_Start();
 
-       // put up the loading image so the user doesn't stare at a black screen...
-       SCR_BeginLoadingPlaque(true);
-#ifdef CONFIG_MENU
        if (cls.state != ca_dedicated)
+       {
+               // put up the loading image so the user doesn't stare at a black screen...
+               SCR_BeginLoadingPlaque(true);
+               S_Startup();
+#ifdef CONFIG_MENU
                MR_Init();
 #endif
+       }
+
        // check for special benchmark mode
 // COMMANDLINEOPTION: Client: -benchmark <demoname> runs a timedemo and quits, results of any timedemo can be found in gamedir/benchmark.log (for example id1/benchmark.log)
        i = Sys_CheckParm("-benchmark");
@@ -559,25 +561,13 @@ static void Host_Init (void)
 ===============
 Host_Shutdown
 
-FIXME: this is a callback from Sys_Quit and Sys_Error.  It would be better
-to run quit through here before the final handoff to the sys code.
+Cleanly shuts down after the main loop exits.
 ===============
 */
-void Host_Shutdown(void)
+static void Host_Shutdown(void)
 {
-       static qbool isdown = false;
-
-       if (isdown)
-       {
-               Con_Print("recursive shutdown\n");
-               return;
-       }
-       if (setjmp(host.abortframe))
-       {
-               Con_Print("aborted the quitting frame?!?\n");
-               return;
-       }
-       isdown = true;
+       if (Sys_CheckParm("-profilegameonly"))
+               Sys_AllowProfiling(false);
 
        if(cls.state != ca_dedicated)
                CL_Shutdown();
@@ -602,7 +592,7 @@ void Host_Shutdown(void)
        TaskQueue_Shutdown();
        Thread_Shutdown();
        Cmd_Shutdown();
-       Sys_Shutdown();
+       Sys_SDL_Shutdown();
        Log_Close();
        Crypto_Shutdown();
 
@@ -638,56 +628,26 @@ static double Host_Frame(double time)
        // Run any downloads
        Curl_Frame();
 
+       // get new SDL events and add commands from keybindings to the cbuf
+       Sys_SDL_HandleEvents();
+
        // process console commands
        Cbuf_Frame(host.cbuf);
 
        R_TimeReport("---");
 
-       sv_wait = SV_Frame(time);
-       cl_wait = CL_Frame(time);
-
-//     Con_Printf("%6.0f %6.0f\n", cl_wait * 1000000.0, sv_wait * 1000000.0);
+       // if the accumulators haven't become positive yet, wait a while
+       sv_wait = - SV_Frame(time);
+       cl_wait = - CL_Frame(time);
 
        Mem_CheckSentinelsGlobal();
 
-       if(host.restless)
-               return 0;
-
-       // if the accumulators haven't become positive yet, wait a while
        if (cls.state == ca_dedicated)
-               return sv_wait * -1000000.0; // dedicated
+               return sv_wait; // dedicated
        else if (!sv.active || svs.threaded)
-               return cl_wait * -1000000.0; // connected to server, main menu, or server is on different thread
+               return cl_wait; // connected to server, main menu, or server is on different thread
        else
-               return max(cl_wait, sv_wait) * -1000000.0; // listen server or singleplayer
-}
-
-static inline void Host_Sleep(double time)
-{
-       double delta, time0;
-
-       if(host_maxwait.value <= 0)
-               time = min(time, 1000000.0);
-       else
-               time = min(time, host_maxwait.value * 1000.0);
-       if(time < 1)
-               time = 1; // because we cast to int
-
-       time0 = Sys_DirtyTime();
-       if (sv_checkforpacketsduringsleep.integer && !sys_usenoclockbutbenchmark.integer && !svs.threaded) {
-               NetConn_SleepMicroseconds((int)time);
-               if (cls.state != ca_dedicated)
-                       NetConn_ClientFrame(); // helps server browser get good ping values
-               // TODO can we do the same for ServerFrame? Probably not.
-       }
-       else
-               Sys_Sleep((int)time);
-       delta = Sys_DirtyTime() - time0;
-       if (delta < 0 || delta >= 1800)
-               delta = 0;
-       host.sleeptime += delta;
-//                     R_TimeReport("sleep");
-       return;
+               return min(cl_wait, sv_wait); // listen server or singleplayer
 }
 
 // Cloudwalk: Most overpowered function declaration...
@@ -713,7 +673,7 @@ static inline double Host_UpdateTime (double newtime, double oldtime)
 
 void Host_Main(void)
 {
-       double time, newtime, oldtime, sleeptime;
+       double time, oldtime, sleeptime;
 
        Host_Init(); // Start!
 
@@ -721,7 +681,7 @@ void Host_Main(void)
        oldtime = Sys_DirtyTime();
 
        // Main event loop
-       while(host.state != host_shutdown)
+       while(host.state < host_shutdown) // see Sys_HandleCrash() comments
        {
                // Something bad happened, or the server disconnected
                if (setjmp(host.abortframe))
@@ -730,20 +690,15 @@ void Host_Main(void)
                        continue;
                }
 
-               newtime = host.dirtytime = Sys_DirtyTime();
-               host.realtime += time = Host_UpdateTime(newtime, oldtime);
+               host.dirtytime = Sys_DirtyTime();
+               host.realtime += time = Host_UpdateTime(host.dirtytime, oldtime);
+               oldtime = host.dirtytime;
 
                sleeptime = Host_Frame(time);
-               oldtime = newtime;
-
-               if (sleeptime >= 1)
-               {
-                       Host_Sleep(sleeptime);
-                       continue;
-               }
-
-               host.framecount++;
+               ++host.framecount;
+               sleeptime -= Sys_DirtyTime() - host.dirtytime; // execution time
+               host.sleeptime = Sys_Sleep(sleeptime);
        }
 
-       return;
+       Host_Shutdown();
 }
diff --git a/host.h b/host.h
index 26465423839b5523830ae599f25370180699f1c6..779ccc842b370af6082205885ac2e6619334632b 100644 (file)
--- a/host.h
+++ b/host.h
@@ -5,25 +5,38 @@
 #include "qtypes.h"
 #include "qdefs.h"
 #include "cmd.h"
+#include "cvar.h"
+
+extern cvar_t developer;
+extern cvar_t developer_entityparsing;
+extern cvar_t developer_extra;
+extern cvar_t developer_insane;
+extern cvar_t developer_loadfile;
+extern cvar_t developer_loading;
+extern cvar_t host_isclient;
+extern cvar_t sessionid;
 
 struct cmd_state_s;
 
 typedef enum host_state_e
 {
-       host_shutdown,
        host_init,
        host_loading,
-       host_active
+       host_active,
+       // states >= host_shutdown cause graceful shutdown, see Sys_HandleCrash() comments
+       host_shutdown,
+       host_failing, ///< crashing
+       host_failed ///< crashed or aborted, SDL dialog open
 } host_state_t;
 
 typedef struct host_static_s
 {
        jmp_buf abortframe;
        int state;
-       int framecount; // incremented every frame, never reset (checked by Host_Error and Host_SaveConfig_f)
+       unsigned int framecount; // incremented every frame, never reset (checked by Host_Error and Host_SaveConfig_f)
        double realtime; // the accumulated mainloop time since application started (with filtering), without any slowmo or clamping
        double dirtytime; // the main loop wall time for this frame, equal to Sys_DirtyTime() at the start of this host frame
-       double sleeptime; // time spent sleeping overall
+       double sleeptime; // time spent sleeping after the last frame
        qbool restless; // don't sleep
        qbool paused; // global paused state, pauses both client and server
        cmd_buf_t *cbuf;
@@ -43,7 +56,6 @@ typedef struct host_static_s
 extern host_static_t host;
 
 void Host_Main(void);
-void Host_Shutdown(void);
 void Host_Error(const char *error, ...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN;
 void Host_LockSession(void);
 void Host_UnlockSession(void);
diff --git a/image.c b/image.c
index ed498ed6562ce832080410a4fc25a9378aeb4727..15835797ecde5bf6c2df3ed18f4402a55a724a5d 100644 (file)
--- a/image.c
+++ b/image.c
@@ -921,7 +921,7 @@ void Image_StripImageExtension (const char *in, char *out, size_t size_out)
        if (ext && (!strcmp(ext, "tga") || !strcmp(ext, "pcx") || !strcmp(ext, "lmp") || !strcmp(ext, "png") || !strcmp(ext, "jpg") || !strcmp(ext, "wal")))
                FS_StripExtension(in, out, size_out);
        else
-               strlcpy(out, in, size_out);
+               dp_strlcpy(out, in, size_out);
 }
 
 static unsigned char image_linearfromsrgb[256];
@@ -1059,14 +1059,14 @@ unsigned char *loadimagepixelsbgra (const char *filename, qbool complain, qbool
                        *c = '#';
        path[0] = 0;
        name[0] = 0;
-       strlcpy(afterpath, basename, sizeof(afterpath));
+       dp_strlcpy(afterpath, basename, sizeof(afterpath));
        if (strchr(basename, '/'))
        {
                int i;
                for (i = 0;i < (int)sizeof(path)-1 && basename[i] != '/' && basename[i];i++)
                        path[i] = basename[i];
                path[i] = 0;
-               strlcpy(afterpath, basename + i + 1, sizeof(afterpath));
+               dp_strlcpy(afterpath, basename + i + 1, sizeof(afterpath));
        }
        if (gamemode == GAME_TENEBRAE)
                firstformat = imageformats_tenebrae;
diff --git a/jpeg.c b/jpeg.c
index beab84335221c9ad4e3f06cb4e765fdc8bbc45b8..70eb3e472d1478c5ff7736447e84e488ef99e767 100644 (file)
--- a/jpeg.c
+++ b/jpeg.c
@@ -1019,7 +1019,7 @@ static void CompressedImageCache_Add(const char *imagename, size_t maxsize, void
                return; // can't add this
 
        i = (CompressedImageCacheItem*) Z_Malloc(sizeof(CompressedImageCacheItem));
-       strlcpy(i->imagename, imagename, sizeof(i->imagename));
+       dp_strlcpy(i->imagename, imagename, sizeof(i->imagename));
        i->maxsize = maxsize;
        i->compressed = compressed;
        i->compressed_size = compressed_size;
diff --git a/keys.c b/keys.c
index cef9dc91d2e21286aed5e1d02702230b34fb9e74..a3a6d9268601045bd102472293893308021bc966 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -92,18 +92,20 @@ static void Key_History_Init(void)
 
 static void Key_History_Shutdown(void)
 {
-       // TODO write history to a file
-
 // not necessary for mobile
 #ifndef DP_MOBILETOUCH
        qfile_t *historyfile = FS_OpenRealFile("darkplaces_history.txt", "w", false);
        if(historyfile)
        {
                int i;
+
+               Con_Print("Saving command history to darkplaces_history.txt ...\n");
                for(i = 0; i < CONBUFFER_LINES_COUNT(&history); ++i)
                        FS_Printf(historyfile, "%s\n", ConBuffer_GetLine(&history, i));
                FS_Close(historyfile);
        }
+       else
+               Con_Print(CON_ERROR "Couldn't write darkplaces_history.txt\n");
 #endif
 
        ConBuffer_Shutdown(&history);
@@ -127,7 +129,7 @@ static qbool Key_History_Get_foundCommand(void)
 {
        if (!history_matchfound)
                return false;
-       strlcpy(key_line + 1, ConBuffer_GetLine(&history, history_line), sizeof(key_line) - 1);
+       dp_strlcpy(key_line + 1, ConBuffer_GetLine(&history, history_line), sizeof(key_line) - 1);
        key_linepos = (int)strlen(key_line);
        history_matchfound = false;
        return true;
@@ -136,7 +138,7 @@ static qbool Key_History_Get_foundCommand(void)
 static void Key_History_Up(void)
 {
        if(history_line == -1) // editing the "new" line
-               strlcpy(history_savedline, key_line + 1, sizeof(history_savedline));
+               dp_strlcpy(history_savedline, key_line + 1, sizeof(history_savedline));
 
        if (Key_History_Get_foundCommand())
                return;
@@ -146,14 +148,14 @@ static void Key_History_Up(void)
                history_line = CONBUFFER_LINES_COUNT(&history) - 1;
                if(history_line != -1)
                {
-                       strlcpy(key_line + 1, ConBuffer_GetLine(&history, history_line), sizeof(key_line) - 1);
+                       dp_strlcpy(key_line + 1, ConBuffer_GetLine(&history, history_line), sizeof(key_line) - 1);
                        key_linepos = (int)strlen(key_line);
                }
        }
        else if(history_line > 0)
        {
                --history_line; // this also does -1 -> 0, so it is good
-               strlcpy(key_line + 1, ConBuffer_GetLine(&history, history_line), sizeof(key_line) - 1);
+               dp_strlcpy(key_line + 1, ConBuffer_GetLine(&history, history_line), sizeof(key_line) - 1);
                key_linepos = (int)strlen(key_line);
        }
 }
@@ -169,12 +171,12 @@ static void Key_History_Down(void)
        if(history_line < CONBUFFER_LINES_COUNT(&history) - 1)
        {
                ++history_line;
-               strlcpy(key_line + 1, ConBuffer_GetLine(&history, history_line), sizeof(key_line) - 1);
+               dp_strlcpy(key_line + 1, ConBuffer_GetLine(&history, history_line), sizeof(key_line) - 1);
        }
        else
        {
                history_line = -1;
-               strlcpy(key_line + 1, history_savedline, sizeof(key_line) - 1);
+               dp_strlcpy(key_line + 1, history_savedline, sizeof(key_line) - 1);
        }
 
        key_linepos = (int)strlen(key_line);
@@ -183,12 +185,12 @@ static void Key_History_Down(void)
 static void Key_History_First(void)
 {
        if(history_line == -1) // editing the "new" line
-               strlcpy(history_savedline, key_line + 1, sizeof(history_savedline));
+               dp_strlcpy(history_savedline, key_line + 1, sizeof(history_savedline));
 
        if (CONBUFFER_LINES_COUNT(&history) > 0)
        {
                history_line = 0;
-               strlcpy(key_line + 1, ConBuffer_GetLine(&history, history_line), sizeof(key_line) - 1);
+               dp_strlcpy(key_line + 1, ConBuffer_GetLine(&history, history_line), sizeof(key_line) - 1);
                key_linepos = (int)strlen(key_line);
        }
 }
@@ -196,12 +198,12 @@ static void Key_History_First(void)
 static void Key_History_Last(void)
 {
        if(history_line == -1) // editing the "new" line
-               strlcpy(history_savedline, key_line + 1, sizeof(history_savedline));
+               dp_strlcpy(history_savedline, key_line + 1, sizeof(history_savedline));
 
        if (CONBUFFER_LINES_COUNT(&history) > 0)
        {
                history_line = CONBUFFER_LINES_COUNT(&history) - 1;
-               strlcpy(key_line + 1, ConBuffer_GetLine(&history, history_line), sizeof(key_line) - 1);
+               dp_strlcpy(key_line + 1, ConBuffer_GetLine(&history, history_line), sizeof(key_line) - 1);
                key_linepos = (int)strlen(key_line);
        }
 }
@@ -214,11 +216,11 @@ static void Key_History_Find_Backwards(void)
        size_t digits = strlen(va(vabuf, sizeof(vabuf), "%i", HIST_MAXLINES));
 
        if (history_line == -1) // editing the "new" line
-               strlcpy(history_savedline, key_line + 1, sizeof(history_savedline));
+               dp_strlcpy(history_savedline, key_line + 1, sizeof(history_savedline));
 
        if (strcmp(key_line + 1, history_searchstring)) // different string? Start a new search
        {
-               strlcpy(history_searchstring, key_line + 1, sizeof(history_searchstring));
+               dp_strlcpy(history_searchstring, key_line + 1, sizeof(history_searchstring));
                i = CONBUFFER_LINES_COUNT(&history) - 1;
        }
        else if (history_line == -1)
@@ -253,7 +255,7 @@ static void Key_History_Find_Forwards(void)
 
        if (strcmp(key_line + 1, history_searchstring)) // different string? Start a new search
        {
-               strlcpy(history_searchstring, key_line + 1, sizeof(history_searchstring));
+               dp_strlcpy(history_searchstring, key_line + 1, sizeof(history_searchstring));
                i = 0;
        }
        else i = history_line + 1;
@@ -694,7 +696,7 @@ Interactive line editing and console scrollback
 ====================
 */
 
-int chat_mode; // 0 for say, 1 for say_team, -1 for command
+signed char chat_mode; // 0 for say, 1 for say_team, -1 for command
 char chat_buffer[MAX_INPUTLINE];
 int chat_bufferpos = 0;
 
@@ -768,7 +770,7 @@ int Key_Parse_CommonKeys(cmd_state_t *cmd, qbool is_console, int key, int unicod
        if ((key == 'v' && KM_CTRL) || ((key == K_INS || key == K_KP_INS) && KM_SHIFT))
        {
                char *cbd, *p;
-               if ((cbd = Sys_GetClipboardData()) != 0)
+               if ((cbd = Sys_SDL_GetClipboardData()) != 0)
                {
                        int i;
 #if 1
@@ -949,7 +951,7 @@ int Key_Parse_CommonKeys(cmd_state_t *cmd, qbool is_console, int key, int unicod
                {
                        // hide ']' from u8_prevbyte otherwise it could go out of bounds
                        int newpos = (int)u8_prevbyte(line + linestart, linepos - linestart) + linestart;
-                       strlcpy(line + newpos, line + linepos, linesize + 1 - linepos);
+                       dp_strlcpy(line + newpos, line + linepos, linesize + 1 - linepos);
                        linepos = newpos;
                }
                return linepos;
@@ -1098,8 +1100,7 @@ static int Key_Convert_NumPadKey(int key)
        return key;
 }
 
-static void
-Key_Console(cmd_state_t *cmd, int key, int unicode)
+static void Key_Console(cmd_state_t *cmd, int key, int unicode)
 {
        int linepos;
 
@@ -1121,8 +1122,9 @@ Key_Console(cmd_state_t *cmd, int key, int unicode)
 
        if ((key == K_ENTER || key == K_KP_ENTER) && KM_NONE)
        {
-               Cbuf_AddText (cmd, key_line+1); // skip the ]
-               Cbuf_AddText (cmd, "\n");
+               // bones_was_here: prepending allows a loop such as `alias foo "bar; wait; foo"; foo`
+               // to be broken with an alias or unalias command
+               Cbuf_InsertText(cmd, key_line+1); // skip the ]
                Key_History_Push();
                key_linepos = Key_ClearEditLine(true);
                // force an update, because the command may take some time
@@ -1306,7 +1308,7 @@ Key_Message (cmd_state_t *cmd, int key, int ascii)
        if (key == K_ENTER || key == K_KP_ENTER || ascii == 10 || ascii == 13)
        {
                if(chat_mode < 0)
-                       Cmd_ExecuteString(cmd, chat_buffer, src_local, true); // not Cbuf_AddText to allow semiclons in args; however, this allows no variables then. Use aliases!
+                       Cmd_ExecuteString(cmd, chat_buffer, strlen(chat_buffer), src_local, true); // not Cbuf_AddText to allow semiclons in args; however, this allows no variables then. Use aliases!
                else
                        CL_ForwardToServer(va(vabuf, sizeof(vabuf), "%s %s", chat_mode ? "say_team" : "say ", chat_buffer));
 
@@ -1351,6 +1353,7 @@ the K_* names are matched up.
 int
 Key_StringToKeynum (const char *str)
 {
+       Uchar ch;
        const keyname_t  *kn;
 
        if (!str || !str[0])
@@ -1362,7 +1365,11 @@ Key_StringToKeynum (const char *str)
                if (!strcasecmp (str, kn->name))
                        return kn->keynum;
        }
-       return -1;
+
+       // non-ascii keys are Unicode codepoints, so give the character if it's valid;
+       // error message have more than one character, don't allow it
+       ch = u8_getnchar(str, &str, 3);
+       return (ch == 0 || *str != 0) ? -1 : (int)ch;
 }
 
 /*
@@ -1387,13 +1394,9 @@ Key_KeynumToString (int keynum, char *tinystr, size_t tinystrlength)
                        return kn->name;
 
        // if it is printable, output it as a single character
-       if (keynum > 32 && keynum < 256)
+       if (keynum > 32)
        {
-               if (tinystrlength >= 2)
-               {
-                       tinystr[0] = keynum;
-                       tinystr[1] = 0;
-               }
+               u8_fromchar(keynum, tinystr, tinystrlength);
                return tinystr;
        }
 
@@ -1513,9 +1516,9 @@ Key_In_Bind_f(cmd_state_t *cmd)
 // copy the rest of the command line
        line[0] = 0;                                                    // start out with a null string
        for (i = 3; i < c; i++) {
-               strlcat (line, Cmd_Argv(cmd, i), sizeof (line));
+               dp_strlcat (line, Cmd_Argv(cmd, i), sizeof (line));
                if (i != (c - 1))
-                       strlcat (line, " ", sizeof (line));
+                       dp_strlcat (line, " ", sizeof (line));
        }
 
        if(!Key_SetBinding (b, m, line))
@@ -1586,7 +1589,7 @@ static void
 Key_PrintBindList(int j)
 {
        char bindbuf[MAX_INPUTLINE];
-       char tinystr[2];
+       char tinystr[TINYSTR_LEN];
        const char *p;
        int i;
 
@@ -1597,9 +1600,9 @@ Key_PrintBindList(int j)
                {
                        Cmd_QuoteString(bindbuf, sizeof(bindbuf), p, "\"\\", false);
                        if (j == 0)
-                               Con_Printf("^2%s ^7= \"%s\"\n", Key_KeynumToString (i, tinystr, sizeof(tinystr)), bindbuf);
+                               Con_Printf("^2%s ^7= \"%s\"\n", Key_KeynumToString (i, tinystr, TINYSTR_LEN), bindbuf);
                        else
-                               Con_Printf("^3bindmap %d: ^2%s ^7= \"%s\"\n", j, Key_KeynumToString (i, tinystr, sizeof(tinystr)), bindbuf);
+                               Con_Printf("^3bindmap %d: ^2%s ^7= \"%s\"\n", j, Key_KeynumToString (i, tinystr, TINYSTR_LEN), bindbuf);
                }
        }
 }
@@ -1660,9 +1663,9 @@ Key_Bind_f(cmd_state_t *cmd)
 // copy the rest of the command line
        line[0] = 0;                                                    // start out with a null string
        for (i = 2; i < c; i++) {
-               strlcat (line, Cmd_Argv(cmd, i), sizeof (line));
+               dp_strlcat (line, Cmd_Argv(cmd, i), sizeof (line));
                if (i != (c - 1))
-                       strlcat (line, " ", sizeof (line));
+                       dp_strlcat (line, " ", sizeof (line));
        }
 
        if(!Key_SetBinding (b, 0, line))
@@ -1679,7 +1682,7 @@ Key_WriteBindings (qfile_t *f)
 {
        int         i, j;
        char bindbuf[MAX_INPUTLINE];
-       char tinystr[2];
+       char tinystr[TINYSTR_LEN];
        const char *p;
 
        // Override default binds
@@ -1694,9 +1697,9 @@ Key_WriteBindings (qfile_t *f)
                        {
                                Cmd_QuoteString(bindbuf, sizeof(bindbuf), p, "\"\\", false); // don't need to escape $ because cvars are not expanded inside bind
                                if (j == 0)
-                                       FS_Printf(f, "bind %s \"%s\"\n", Key_KeynumToString (i, tinystr, sizeof(tinystr)), bindbuf);
+                                       FS_Printf(f, "bind %s \"%s\"\n", Key_KeynumToString (i, tinystr, TINYSTR_LEN), bindbuf);
                                else
-                                       FS_Printf(f, "in_bind %d %s \"%s\"\n", j, Key_KeynumToString (i, tinystr, sizeof(tinystr)), bindbuf);
+                                       FS_Printf(f, "in_bind %d %s \"%s\"\n", j, Key_KeynumToString (i, tinystr, TINYSTR_LEN), bindbuf);
                        }
                }
        }
@@ -1970,14 +1973,14 @@ Key_Event (int key, int ascii, qbool down)
                        if(keydown[key] == 1 && down)
                        {
                                // button commands add keynum as a parm
+                               // prepend to avoid delays from `wait` commands added by other sources
                                if (bind[0] == '+')
-                                       Cbuf_AddText (cmd, va(vabuf, sizeof(vabuf), "%s %i\n", bind, key));
+                                       Cbuf_InsertText(cmd, va(vabuf, sizeof(vabuf), "%s %i\n", bind, key));
                                else
-                               {
-                                       Cbuf_AddText (cmd, bind);
-                                       Cbuf_AddText (cmd, "\n");
-                               }
-                       } else if(bind[0] == '+' && !down && keydown[key] == 0)
+                                       Cbuf_InsertText(cmd, bind);
+                       }
+                       else if(bind[0] == '+' && !down && keydown[key] == 0)
+                               // append -bind to ensure it's after the +bind in case they arrive in the same frame
                                Cbuf_AddText(cmd, va(vabuf, sizeof(vabuf), "-%s %i\n", bind + 1, key));
                }
                return;
@@ -2009,7 +2012,7 @@ Key_Event (int key, int ascii, qbool down)
        {
                if (down && con_closeontoggleconsole.integer && bind && !strncmp(bind, "toggleconsole", strlen("toggleconsole")) && ascii != STRING_COLOR_TAG)
                {
-                       Cbuf_AddText(cmd, "toggleconsole\n");  // Deferred to next frame so we're not sending the text event to the console.
+                       Cbuf_InsertText(cmd, "toggleconsole\n");  // Deferred to next frame so we're not sending the text event to the console.
                        tbl_keydest[key] = key_void; // key release should go nowhere (especially not to key_menu or key_game)
                        return;
                }
@@ -2051,14 +2054,14 @@ Key_Event (int key, int ascii, qbool down)
                                if(keydown[key] == 1 && down)
                                {
                                        // button commands add keynum as a parm
+                                       // prepend to avoid delays from `wait` commands added by other sources
                                        if (bind[0] == '+')
-                                               Cbuf_AddText (cmd, va(vabuf, sizeof(vabuf), "%s %i\n", bind, key));
+                                               Cbuf_InsertText(cmd, va(vabuf, sizeof(vabuf), "%s %i\n", bind, key));
                                        else
-                                       {
-                                               Cbuf_AddText (cmd, bind);
-                                               Cbuf_AddText (cmd, "\n");
-                                       }
-                               } else if(bind[0] == '+' && !down && keydown[key] == 0)
+                                               Cbuf_InsertText(cmd, bind);
+                               }
+                               else if(bind[0] == '+' && !down && keydown[key] == 0)
+                                       // append -bind to ensure it's after the +bind in case they arrive in the same frame
                                        Cbuf_AddText(cmd, va(vabuf, sizeof(vabuf), "-%s %i\n", bind + 1, key));
                        }
                        break;
diff --git a/keys.h b/keys.h
index f6b78cd0c841a385efea99dee7988d09c72530cd..2081e8009e21d9322df83943a5b834df86b8cf81 100644 (file)
--- a/keys.h
+++ b/keys.h
 #include "fs.h"
 #include "cmd.h"
 
+// the highest Unicode character to allow key binding.
+// note that an excessively high value may degrade fps
+// when code is looping through the bindings
+// U+ABFF is probably the highest bindable codepoint,
+// see: https://github.com/DarkPlacesEngine/darkplaces/pull/68#issuecomment-1416802873
+#define MAX_KEY_BINDS 0xAC00
+
+// how long is a "tinystr" to hold a keyboard key's
+// Unicode utf-8 presentation, plus final \x00
+// to allow all characters <= 0xffff, use 4
+#define TINYSTR_LEN 4
+
 //
 // these are the key numbers that should be passed to Key_Event
 //
@@ -353,7 +365,7 @@ typedef enum keynum_e
        K_MIDINOTE126,
        K_MIDINOTE127,
 
-       MAX_KEYS
+       MAX_KEYS = MAX_KEY_BINDS
 }
 keynum_t;
 
@@ -371,7 +383,7 @@ extern      keydest_t       key_dest;
 extern int                     key_consoleactive;
 extern char            *keybindings[MAX_BINDMAPS][MAX_KEYS];
 
-extern int chat_mode; // 0 for say, 1 for say_team, -1 for command
+extern signed char chat_mode; // 0 for say, 1 for say_team, -1 for command
 extern char chat_buffer[MAX_INPUTLINE];
 extern int     chat_bufferpos;
 
diff --git a/lhnet.c b/lhnet.c
index 97dc9b060487699240f24c99796a802561c9df69..e6a688de7c3fd67c4ee7108597da998dc947f284 100644 (file)
--- a/lhnet.c
+++ b/lhnet.c
@@ -2,13 +2,16 @@
 // Written by Ashley Rose Hale (LadyHavoc) 2003-06-15 and placed into public domain.
 
 #ifdef WIN32
-#ifdef _MSC_VER
-#pragma comment(lib, "ws2_32.lib")
-#endif
+# ifdef _MSC_VER
+#  pragma comment(lib, "ws2_32.lib")
+# endif
 # ifndef NOSUPPORTIPV6
 // Windows XP or higher is required for getaddrinfo, but the inclusion of wspiapi provides fallbacks for older versions
-# define _WIN32_WINNT 0x0501
+#  define _WIN32_WINNT 0x0501
 # endif
+// To increase FD_SETSIZE (defaults to 64 on Windows)
+// it must be defined before the first inclusion of winsock2.h
+# define FD_SETSIZE 1024 // Matches Linux and BSD defaults
 # include <winsock2.h>
 # include <ws2tcpip.h>
 # ifdef USE_WSPIAPI_H
@@ -550,8 +553,7 @@ int LHNETADDRESS_ToString(const lhnetaddress_t *vaddress, char *string, int stri
                {
                        if (stringbuffersize >= 12)
                        {
-                               dpsnprintf(string, stringbuffersize, "local:%d", address->port);
-                               return 1;
+                               return dpsnprintf(string, stringbuffersize, "local:%d", address->port);
                        }
                }
                else
@@ -559,7 +561,7 @@ int LHNETADDRESS_ToString(const lhnetaddress_t *vaddress, char *string, int stri
                        if (stringbuffersize >= 6)
                        {
                                memcpy(string, "local", 6);
-                               return 1;
+                               return 5;
                        }
                }
                break;
@@ -569,16 +571,14 @@ int LHNETADDRESS_ToString(const lhnetaddress_t *vaddress, char *string, int stri
                {
                        if (stringbuffersize >= 22)
                        {
-                               dpsnprintf(string, stringbuffersize, "%d.%d.%d.%d:%d", a[0], a[1], a[2], a[3], address->port);
-                               return 1;
+                               return dpsnprintf(string, stringbuffersize, "%d.%d.%d.%d:%d", a[0], a[1], a[2], a[3], address->port);
                        }
                }
                else
                {
                        if (stringbuffersize >= 16)
                        {
-                               dpsnprintf(string, stringbuffersize, "%d.%d.%d.%d", a[0], a[1], a[2], a[3]);
-                               return 1;
+                               return dpsnprintf(string, stringbuffersize, "%d.%d.%d.%d", a[0], a[1], a[2], a[3]);
                        }
                }
                break;
@@ -589,16 +589,14 @@ int LHNETADDRESS_ToString(const lhnetaddress_t *vaddress, char *string, int stri
                {
                        if (stringbuffersize >= 88)
                        {
-                               dpsnprintf(string, stringbuffersize, "[%x:%x:%x:%x:%x:%x:%x:%x]:%d", a[0] * 256 + a[1], a[2] * 256 + a[3], a[4] * 256 + a[5], a[6] * 256 + a[7], a[8] * 256 + a[9], a[10] * 256 + a[11], a[12] * 256 + a[13], a[14] * 256 + a[15], address->port);
-                               return 1;
+                               return dpsnprintf(string, stringbuffersize, "[%x:%x:%x:%x:%x:%x:%x:%x]:%d", a[0] * 256 + a[1], a[2] * 256 + a[3], a[4] * 256 + a[5], a[6] * 256 + a[7], a[8] * 256 + a[9], a[10] * 256 + a[11], a[12] * 256 + a[13], a[14] * 256 + a[15], address->port);
                        }
                }
                else
                {
                        if (stringbuffersize >= 80)
                        {
-                               dpsnprintf(string, stringbuffersize, "%x:%x:%x:%x:%x:%x:%x:%x", a[0] * 256 + a[1], a[2] * 256 + a[3], a[4] * 256 + a[5], a[6] * 256 + a[7], a[8] * 256 + a[9], a[10] * 256 + a[11], a[12] * 256 + a[13], a[14] * 256 + a[15]);
-                               return 1;
+                               return dpsnprintf(string, stringbuffersize, "%x:%x:%x:%x:%x:%x:%x:%x", a[0] * 256 + a[1], a[2] * 256 + a[3], a[4] * 256 + a[5], a[6] * 256 + a[7], a[8] * 256 + a[9], a[10] * 256 + a[11], a[12] * 256 + a[13], a[14] * 256 + a[15]);
                        }
                }
                break;
@@ -607,14 +605,6 @@ int LHNETADDRESS_ToString(const lhnetaddress_t *vaddress, char *string, int stri
        return 0;
 }
 
-int LHNETADDRESS_GetAddressType(const lhnetaddress_t *address)
-{
-       if (address)
-               return address->addresstype;
-       else
-               return LHNETADDRESSTYPE_NONE;
-}
-
 const char *LHNETADDRESS_GetInterfaceName(const lhnetaddress_t *vaddress, char *ifname, size_t ifnamelength)
 {
 #ifndef NOSUPPORTIPV6
@@ -724,7 +714,7 @@ typedef struct lhnetpacket_s
 lhnetpacket_t;
 
 static int lhnet_active;
-static lhnetsocket_t lhnet_socketlist;
+lhnetsocket_t lhnet_socketlist;
 static lhnetpacket_t lhnet_packetlist;
 static int lhnet_default_dscp = 0;
 #ifdef WIN32
@@ -839,36 +829,6 @@ static const char *LHNETPRIVATE_StrError(void)
 #endif
 }
 
-void LHNET_SleepUntilPacket_Microseconds(int microseconds)
-{
-#ifdef FD_SET
-       fd_set fdreadset;
-       struct timeval tv;
-       int lastfd;
-       lhnetsocket_t *s;
-       FD_ZERO(&fdreadset);
-       lastfd = 0;
-       List_For_Each_Entry(s, &lhnet_socketlist.list, lhnetsocket_t, list)
-       {
-               if (s->address.addresstype == LHNETADDRESSTYPE_INET4 || s->address.addresstype == LHNETADDRESSTYPE_INET6)
-               {
-                       if (lastfd < s->inetsocket)
-                               lastfd = s->inetsocket;
-#if defined(WIN32) && !defined(_MSC_VER)
-                       FD_SET((int)s->inetsocket, &fdreadset);
-#else
-                       FD_SET((unsigned int)s->inetsocket, &fdreadset);
-#endif
-               }
-       }
-       tv.tv_sec = microseconds / 1000000;
-       tv.tv_usec = microseconds % 1000000;
-       select(lastfd + 1, &fdreadset, NULL, NULL, &tv);
-#else
-       Sys_Sleep(microseconds);
-#endif
-}
-
 lhnetsocket_t *LHNET_OpenSocket_Connectionless(lhnetaddress_t *address)
 {
        lhnetsocket_t *lhnetsocket, *s;
diff --git a/lhnet.h b/lhnet.h
index 6d1d1f3f22c08f661d3c4ef40dc8da454f682e3a..d368940dbf2a04d79eb2243a4f18acda48f8cbce 100644 (file)
--- a/lhnet.h
+++ b/lhnet.h
@@ -26,8 +26,15 @@ lhnetaddress_t;
 
 int LHNETADDRESS_FromPort(lhnetaddress_t *address, lhnetaddresstype_t addresstype, int port);
 int LHNETADDRESS_FromString(lhnetaddress_t *address, const char *string, int defaultport);
+/// Returns the number of bytes written to *string excluding the \0 terminator.
 int LHNETADDRESS_ToString(const lhnetaddress_t *address, char *string, int stringbuffersize, int includeport);
-int LHNETADDRESS_GetAddressType(const lhnetaddress_t *address);
+static inline lhnetaddresstype_t LHNETADDRESS_GetAddressType(const lhnetaddress_t *address)
+{
+       if (address)
+               return address->addresstype;
+       else
+               return LHNETADDRESSTYPE_NONE;
+}
 const char *LHNETADDRESS_GetInterfaceName(const lhnetaddress_t *address, char *ifname, size_t ifnamelength);
 int LHNETADDRESS_GetPort(const lhnetaddress_t *address);
 int LHNETADDRESS_SetPort(lhnetaddress_t *address, int port);
@@ -40,6 +47,7 @@ typedef struct lhnetsocket_s
        llist_t list;
 }
 lhnetsocket_t;
+extern lhnetsocket_t lhnet_socketlist;
 
 void LHNET_Init(void);
 void LHNET_Shutdown(void);
index ecc1833c867b4b4e44c93ff29d4d9630a9902473..d4b2defce063377b6827b735a03bb0dd11bb988b 100644 (file)
--- a/libcurl.c
+++ b/libcurl.c
@@ -7,15 +7,17 @@
 #include "jpeg.h"
 #include "image_png.h"
 
-static cvar_t cl_curl_maxdownloads = {CF_CLIENT | CF_ARCHIVE, "cl_curl_maxdownloads","1", "maximum number of concurrent HTTP/FTP downloads"};
-static cvar_t cl_curl_maxspeed = {CF_CLIENT | CF_ARCHIVE, "cl_curl_maxspeed","300", "maximum download speed (KiB/s)"};
-static cvar_t sv_curl_defaulturl = {CF_SERVER | CF_ARCHIVE, "sv_curl_defaulturl","", "default autodownload source URL"};
-static cvar_t sv_curl_serverpackages = {CF_SERVER | CF_ARCHIVE, "sv_curl_serverpackages","", "list of required files for the clients, separated by spaces"};
-static cvar_t sv_curl_maxspeed = {CF_SERVER | CF_ARCHIVE, "sv_curl_maxspeed","0", "maximum download speed for clients downloading from sv_curl_defaulturl (KiB/s)"};
-static cvar_t cl_curl_enabled = {CF_CLIENT | CF_ARCHIVE, "cl_curl_enabled","1", "whether client's download support is enabled"};
-static cvar_t cl_curl_useragent = {CF_CLIENT, "cl_curl_useragent","1", "send the User-Agent string (note: turning this off may break stuff)"};
-static cvar_t cl_curl_useragent_append = {CF_CLIENT, "cl_curl_useragent_append","", "a string to append to the User-Agent string (useful for name and version number of your mod)"};
-static cvar_t developer_curl = {CF_CLIENT | CF_SERVER, "developer_curl","0", "whether verbose curl output should be printed to stderr"};
+static cvar_t curl_enabled = {CF_SHARED | CF_ARCHIVE, "curl_enabled","1", "whether libcurl may be used to GET files or POST data"};
+static cvar_t curl_maxdownloads = {CF_SHARED | CF_ARCHIVE, "curl_maxdownloads","3", "maximum number of concurrent HTTP/FTP downloads"};
+static cvar_t curl_maxspeed = {CF_SHARED | CF_ARCHIVE, "curl_maxspeed","0", "maximum download speed (KiB/s)"};
+static cvar_t curl_useragent = {CF_SHARED, "curl_useragent","1", "send the User-Agent string (note: turning this off may break stuff)"};
+static cvar_t curl_useragent_append = {CF_SHARED, "curl_useragent_append","", "a string to append to the User-Agent string (useful for name and version number of your mod)"};
+
+static cvar_t sv_curl_defaulturl = {CF_SERVER, "sv_curl_defaulturl","", "default autodownload source URL"};
+static cvar_t sv_curl_serverpackages = {CF_SERVER, "sv_curl_serverpackages","", "list of required files for the clients, separated by spaces"};
+static cvar_t sv_curl_maxspeed = {CF_SERVER, "sv_curl_maxspeed","0", "maximum download speed for clients downloading from sv_curl_defaulturl (KiB/s)"};
+
+static cvar_t developer_curl = {CF_SHARED, "developer_curl","0", "whether verbose libcurl output should be printed to stderr"};
 
 /*
 =================================================================
@@ -158,6 +160,7 @@ static const char * (*qcurl_easy_strerror) (CURLcode);
 
 static CURLM * (*qcurl_multi_init) (void);
 static CURLMcode (*qcurl_multi_perform) (CURLM *multi_handle, int *running_handles);
+static CURLMcode (*qcurl_multi_wait) (CURLM *multi_handle, void*, unsigned int extra_nfds, int timeout_ms, int *ret);
 static CURLMcode (*qcurl_multi_add_handle) (CURLM *multi_handle, CURL *easy_handle);
 static CURLMcode (*qcurl_multi_remove_handle) (CURLM *multi_handle, CURL *easy_handle);
 static CURLMsg * (*qcurl_multi_info_read) (CURLM *multi_handle, int *msgs_in_queue);
@@ -177,6 +180,7 @@ static dllfunction_t curlfuncs[] =
        {"curl_easy_getinfo",           (void **) &qcurl_easy_getinfo},
        {"curl_multi_init",                     (void **) &qcurl_multi_init},
        {"curl_multi_perform",          (void **) &qcurl_multi_perform},
+       {"curl_multi_wait",             (void **) &qcurl_multi_wait},
        {"curl_multi_add_handle",       (void **) &qcurl_multi_add_handle},
        {"curl_multi_remove_handle",(void **) &qcurl_multi_remove_handle},
        {"curl_multi_info_read",        (void **) &qcurl_multi_info_read},
@@ -252,7 +256,7 @@ static void Curl_CommandWhenDone(const char *cmd)
        if(!curl_dll)
                return;
        if(cmd)
-               strlcpy(command_when_done, cmd, sizeof(command_when_done));
+               dp_strlcpy(command_when_done, cmd, sizeof(command_when_done));
        else
                *command_when_done = 0;
 }
@@ -268,7 +272,7 @@ static void Curl_CommandWhenError(const char *cmd)
        if(!curl_dll)
                return;
        if(cmd)
-               strlcpy(command_when_error, cmd, sizeof(command_when_error));
+               dp_strlcpy(command_when_error, cmd, sizeof(command_when_error));
        else
                *command_when_error = 0;
 }
@@ -432,6 +436,8 @@ static size_t CURL_fwrite(void *data, size_t size, size_t nmemb, void *vdi)
 
        di->bytes_received += bytes;
 
+       //Con_Printf("CURL_fwrite callback timestamp: %f bytes: %ld\n", host.realtime, ret);
+
        return ret;
        // Why not ret / nmemb?
        // Because CURLOPT_WRITEFUNCTION docs say to return the number of bytes.
@@ -547,7 +553,7 @@ static void Curl_EndDownload(downloadinfo *di, CurlStatus status, CURLcode error
                        break;
        }
        if(content_type_)
-               strlcpy(content_type, content_type_, sizeof(content_type));
+               dp_strlcpy(content_type, content_type_, sizeof(content_type));
        else
                *content_type = 0;
 
@@ -583,7 +589,7 @@ static void Curl_EndDownload(downloadinfo *di, CurlStatus status, CURLcode error
 
        if(ok && di->loadtype == LOADTYPE_PAK)
        {
-               ok = FS_AddPack(di->filename, NULL, true);
+               ok = FS_AddPack(di->filename, NULL, true, true);
                if(!ok)
                        CLEAR_AND_RETRY();
        }
@@ -681,7 +687,7 @@ static void CheckPendingDownloads(void)
        char vabuf[1024];
        if(!curl_dll)
                return;
-       if(numdownloads < cl_curl_maxdownloads.integer)
+       if(numdownloads < curl_maxdownloads.integer)
        {
                downloadinfo *di;
                List_For_Each_Entry(di, &downloads, downloadinfo, list)
@@ -715,7 +721,7 @@ static void CheckPendingDownloads(void)
                                di->curle = qcurl_easy_init();
                                di->slist = NULL;
                                qcurl_easy_setopt(di->curle, CURLOPT_URL, di->url);
-                               if(cl_curl_useragent.integer)
+                               if(curl_useragent.integer)
                                {
                                        const char *ua
 #ifdef HTTP_USER_AGENT
@@ -725,13 +731,13 @@ static void CheckPendingDownloads(void)
 #endif
                                        if(!ua)
                                                ua = "";
-                                       if(*cl_curl_useragent_append.string)
+                                       if(*curl_useragent_append.string)
                                                ua = va(vabuf, sizeof(vabuf), "%s%s%s",
                                                        ua,
                                                        (ua[0] && ua[strlen(ua)-1] != ' ')
                                                                ? " "
                                                                : "",
-                                                       cl_curl_useragent_append.string);
+                                                       curl_useragent_append.string);
                                        qcurl_easy_setopt(di->curle, CURLOPT_USERAGENT, ua);
                                }
                                else
@@ -786,7 +792,7 @@ static void CheckPendingDownloads(void)
                                qcurl_multi_add_handle(curlm, di->curle);
                                di->started = true;
                                ++numdownloads;
-                               if(numdownloads >= cl_curl_maxdownloads.integer)
+                               if(numdownloads >= curl_maxdownloads.integer)
                                        break;
                        }
                }
@@ -830,6 +836,12 @@ void Curl_Shutdown(void)
        curl_dll = NULL;
 }
 
+// for VM_checkextension()
+qbool Curl_Available(void)
+{
+       return curl_dll ? true : false;
+}
+
 /*
 ====================
 Curl_Find
@@ -877,7 +889,7 @@ static qbool Curl_Begin(const char *URL, const char *extraheaders, double maxspe
                if(loadtype != LOADTYPE_NONE)
                        Host_Error("Curl_Begin: loadtype and buffer are both set");
 
-       if(!curl_dll || !cl_curl_enabled.integer)
+       if(!curl_dll || !curl_enabled.integer)
        {
                return false;
        }
@@ -986,7 +998,7 @@ static qbool Curl_Begin(const char *URL, const char *extraheaders, double maxspe
                                if(loadtype == LOADTYPE_PAK)
                                {
                                        qbool already_loaded;
-                                       if(FS_AddPack(fn, &already_loaded, true))
+                                       if(FS_AddPack(fn, &already_loaded, true, true))
                                        {
                                                Con_DPrintf("%s already exists, not downloading!\n", fn);
                                                if(already_loaded)
@@ -1049,8 +1061,8 @@ static qbool Curl_Begin(const char *URL, const char *extraheaders, double maxspe
                if(forthismap)
                        ++numdownloads_added;
                di = (downloadinfo *) Z_Malloc(sizeof(*di));
-               strlcpy(di->filename, name, sizeof(di->filename));
-               strlcpy(di->url, URL, sizeof(di->url));
+               dp_strlcpy(di->filename, name, sizeof(di->filename));
+               dp_strlcpy(di->url, URL, sizeof(di->url));
                dpsnprintf(di->referer, sizeof(di->referer), "dp://%s/", cls.netcon ? cls.netcon->address : "notconnected.invalid");
                di->forthismap = forthismap;
                di->stream = NULL;
@@ -1126,7 +1138,7 @@ void Curl_Frame(void)
 
        noclear = false;
 
-       if(!cl_curl_enabled.integer)
+       if(!curl_enabled.integer && cls.state != ca_dedicated)
                return;
 
        if(!curl_dll)
@@ -1216,7 +1228,7 @@ void Curl_Frame(void)
 
        // use the slowest allowing download to derive the maxspeed... this CAN
        // be done better, but maybe later
-       maxspeed = cl_curl_maxspeed.value;
+       maxspeed = curl_maxspeed.value;
        List_For_Each_Entry(di, &downloads, downloadinfo, list)
                if(di->maxspeed > 0)
                        if(di->maxspeed < maxspeed || maxspeed <= 0)
@@ -1235,6 +1247,34 @@ void Curl_Frame(void)
        if (curl_mutex) Thread_UnlockMutex(curl_mutex);
 }
 
+/*
+====================
+Curl_Select
+
+Sleeps until there's some transfer progress or a timeout is reached,
+unfortunately the timeout is only in milliseconds.
+This allows good throughput even at very low FPS.
+Less important on newer libcurl versions but still helps.
+
+Returns 0 immediately if there's no transfers to wait for,
+or > 0 if a transfer is ready or the timeout was reached.
+====================
+*/
+int Curl_Select(int timeout_ms)
+{
+       CURLMcode err;
+       int numfds;
+
+       if (List_Is_Empty(&downloads))
+               return 0;
+
+       err = qcurl_multi_wait(curlm, NULL, 0, timeout_ms, &numfds);
+       if (err == CURLM_OK)
+               return numfds;
+       Con_Printf("curl_multi_wait() failed, code %d\n", err);
+       return 0;
+}
+
 /*
 ====================
 Curl_CancelAll
@@ -1398,7 +1438,7 @@ static void Curl_Curl_f(cmd_state_t *cmd)
                return;
        }
 
-       if(!cl_curl_enabled.integer)
+       if(!curl_enabled.integer)
        {
                Con_Print("curl support not enabled. Set cl_curl_enabled to 1 to enable.\n");
                return;
@@ -1538,15 +1578,23 @@ loads the commands and cvars this library uses
 */
 void Curl_Init_Commands(void)
 {
-       Cvar_RegisterVariable (&cl_curl_enabled);
-       Cvar_RegisterVariable (&cl_curl_maxdownloads);
-       Cvar_RegisterVariable (&cl_curl_maxspeed);
+       Cvar_RegisterVariable (&curl_enabled);
+       Cvar_RegisterVariable (&curl_maxdownloads);
+       Cvar_RegisterVariable (&curl_maxspeed);
+       Cvar_RegisterVariable (&curl_useragent);
+       Cvar_RegisterVariable (&curl_useragent_append);
+       Cvar_RegisterVirtual  (&curl_enabled,          "cl_curl_enabled");
+       Cvar_RegisterVirtual  (&curl_maxdownloads,     "cl_curl_maxdownloads");
+       Cvar_RegisterVirtual  (&curl_maxspeed,         "cl_curl_maxspeed");
+       Cvar_RegisterVirtual  (&curl_useragent,        "cl_curl_useragent");
+       Cvar_RegisterVirtual  (&curl_useragent_append, "cl_curl_useragent_append");
+
        Cvar_RegisterVariable (&sv_curl_defaulturl);
        Cvar_RegisterVariable (&sv_curl_serverpackages);
        Cvar_RegisterVariable (&sv_curl_maxspeed);
-       Cvar_RegisterVariable (&cl_curl_useragent);
-       Cvar_RegisterVariable (&cl_curl_useragent_append);
+
        Cvar_RegisterVariable (&developer_curl);
+
        Cmd_AddCommand(CF_CLIENT | CF_CLIENT_FROM_SERVER, "curl", Curl_Curl_f, "download data from an URL and add to search path");
        //Cmd_AddCommand(cmd_local, "curlcat", Curl_CurlCat_f, "display data from an URL (debugging command)");
 }
@@ -1590,7 +1638,7 @@ Curl_downloadinfo_t *Curl_GetDownloadInfo(int *nDownloads, const char **addition
                if(developer.integer <= 0)
                        if(di->buffer)
                                continue;
-               strlcpy(downinfo[i].filename, di->filename, sizeof(downinfo[i].filename));
+               dp_strlcpy(downinfo[i].filename, di->filename, sizeof(downinfo[i].filename));
                if(di->curle)
                {
                        downinfo[i].progress = Curl_GetDownloadAmount(di);
@@ -1681,7 +1729,7 @@ static const char *Curl_FindPackURL(const char *filename)
                                                *urlend = 0;
                                                if(matchpattern(filename, pattern, true))
                                                {
-                                                       strlcpy(foundurl, url, sizeof(foundurl));
+                                                       dp_strlcpy(foundurl, url, sizeof(foundurl));
                                                        Z_Free(buf);
                                                        return foundurl;
                                                }
@@ -1733,7 +1781,7 @@ void Curl_RequireFile(const char *filename)
 {
        requirement *req = (requirement *) Z_Malloc(sizeof(*requirements));
        req->next = requirements;
-       strlcpy(req->filename, filename, sizeof(req->filename));
+       dp_strlcpy(req->filename, filename, sizeof(req->filename));
        requirements = req;
 }
 
@@ -1785,18 +1833,18 @@ static qbool Curl_SendRequirement(const char *filename, qbool foundone, char *se
        if(packurl && *packurl && strcmp(packurl, "-"))
        {
                if(!foundone)
-                       strlcat(sendbuffer, "curl --clear_autodownload\n", sendbuffer_len);
+                       dp_strlcat(sendbuffer, "curl --clear_autodownload\n", sendbuffer_len);
 
-               strlcat(sendbuffer, "curl --pak --forthismap --as ", sendbuffer_len);
-               strlcat(sendbuffer, thispack, sendbuffer_len);
+               dp_strlcat(sendbuffer, "curl --pak --forthismap --as ", sendbuffer_len);
+               dp_strlcat(sendbuffer, thispack, sendbuffer_len);
                if(sv_curl_maxspeed.value > 0)
                        dpsnprintf(sendbuffer + strlen(sendbuffer), sendbuffer_len - strlen(sendbuffer), " --maxspeed=%.1f", sv_curl_maxspeed.value);
-               strlcat(sendbuffer, " --for ", sendbuffer_len);
-               strlcat(sendbuffer, filename, sendbuffer_len);
-               strlcat(sendbuffer, " ", sendbuffer_len);
-               strlcat(sendbuffer, packurl, sendbuffer_len);
-               strlcat(sendbuffer, thispack, sendbuffer_len);
-               strlcat(sendbuffer, "\n", sendbuffer_len);
+               dp_strlcat(sendbuffer, " --for ", sendbuffer_len);
+               dp_strlcat(sendbuffer, filename, sendbuffer_len);
+               dp_strlcat(sendbuffer, " ", sendbuffer_len);
+               dp_strlcat(sendbuffer, packurl, sendbuffer_len);
+               dp_strlcat(sendbuffer, thispack, sendbuffer_len);
+               dp_strlcat(sendbuffer, "\n", sendbuffer_len);
 
                return true;
        }
@@ -1819,7 +1867,7 @@ void Curl_SendRequirements(void)
                foundone = Curl_SendRequirement(com_token, foundone, sendbuffer, sizeof(sendbuffer)) || foundone;
 
        if(foundone)
-               strlcat(sendbuffer, "curl --finish_autodownload\n", sizeof(sendbuffer));
+               dp_strlcat(sendbuffer, "curl --finish_autodownload\n", sizeof(sendbuffer));
 
        if(strlen(sendbuffer) + 1 < sizeof(sendbuffer))
                SV_ClientCommands("%s", sendbuffer);
index d960be8af0939c7c97eb19293e5bbe4657b75ecd..908bc4828f6c9b49c65dc0f94cece728cc986b14 100644 (file)
--- a/libcurl.h
+++ b/libcurl.h
@@ -14,6 +14,7 @@ typedef void (*curl_callback_t) (int status, size_t length_received, unsigned ch
 // code is one of the CURLCBSTATUS constants, or the HTTP error code (when > 0).
 
 void Curl_Frame(void);
+int Curl_Select(int timeout_ms);
 qbool Curl_Running(void);
 qbool Curl_Begin_ToFile(const char *URL, double maxspeed, const char *name, int loadtype, qbool forthismap);
 
@@ -24,6 +25,7 @@ void Curl_Cancel_ToMemory(curl_callback_t callback, void* cbdata);
 void Curl_Init(void);
 void Curl_Init_Commands(void);
 void Curl_Shutdown(void);
+qbool Curl_Available(void);
 void Curl_CancelAll(void);
 void Curl_Clear_forthismap(void);
 qbool Curl_Have_forthismap(void);
index 064a6e7b99d41c8cd387a8f981cad3ef143048e4..b62194cd42dc9a93e07649c33aec7b33817f054b 100644 (file)
--- a/makefile
+++ b/makefile
@@ -29,21 +29,27 @@ endif  # ifndef DP_MAKE_TARGET
 # If we're targeting an x86 CPU we want to enable DP_SSE (CFLAGS_SSE and SSE2)
 ifeq ($(DP_MAKE_TARGET), mingw)
        DP_SSE:=1
+else ifeq ($(OS),Windows_NT)
+       ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
+               DP_SSE:=1
+       else ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
+               DP_SSE:=1
+       else ifeq ($(PROCESSOR_ARCHITECTURE),x86)
+               DP_SSE:=1
+       else
+               DP_SSE:=0
+       endif
 else
        DP_MACHINE:=$(shell uname -m)
        ifeq ($(DP_MACHINE),x86_64)
                DP_SSE:=1
-       else
-       ifeq ($(DP_MACHINE),i686)
+       else ifeq ($(DP_MACHINE),i686)
                DP_SSE:=1
-       else
-       ifeq ($(DP_MACHINE),i386)
+       else ifeq ($(DP_MACHINE),i386)
                DP_SSE:=1
        else
                DP_SSE:=0
-       endif # ifeq ($(DP_MACHINE),i386)
-       endif # ifeq ($(DP_MACHINE),i686)
-       endif # ifeq ($(DP_MACHINE),x86_64)
+       endif
 endif
 
 # Makefile name
@@ -60,13 +66,6 @@ else
        CMD_MKDIR=$(CMD_UNIXMKDIR)
 endif
 
-# 64bits AMD CPUs use another lib directory
-ifeq ($(DP_MACHINE),x86_64)
-       UNIX_X11LIBPATH:=/usr/X11R6/lib64
-else
-       UNIX_X11LIBPATH:=/usr/X11R6/lib
-endif
-
 # default targets
 TARGETS_DEBUG=sv-debug sdl-debug
 TARGETS_PROFILE=sv-profile sdl-profile
@@ -74,6 +73,7 @@ TARGETS_RELEASE=sv-release sdl-release
 TARGETS_RELEASE_PROFILE=sv-release-profile sdl-release-profile
 TARGETS_NEXUIZ=sv-nexuiz sdl-nexuiz
 
+
 ###### Optional features #####
 DP_VIDEO_CAPTURE?=enabled
 ifeq ($(DP_VIDEO_CAPTURE), enabled)
@@ -139,8 +139,6 @@ ifeq ($(DP_MAKE_TARGET), macosx)
        DP_LINK_CRYPTO_RIJNDAEL?=dlopen
        DP_LINK_XMP?=dlopen
 
-       # on OS X, we don't build the CL by default because it uses deprecated
-       # and not-implemented-in-64bit Carbon
        TARGETS_DEBUG=sv-debug sdl-debug
        TARGETS_PROFILE=sv-profile sdl-profile
        TARGETS_RELEASE=sv-release sdl-release
@@ -204,26 +202,6 @@ ifeq ($(DP_MAKE_TARGET), bsd)
 endif
 
 # Win32 configuration
-ifeq ($(WIN32RELEASE), 1)
-#      TARGET=i686-pc-mingw32
-#      CC=$(TARGET)-g++
-#      WINDRES=$(TARGET)-windres
-       CPUOPTIMIZATIONS=-march=pentium3 -mfpmath=sse -fno-math-errno -fno-rounding-math -fno-signaling-nans -fno-trapping-math
-#       CPUOPTIMIZATIONS+=-DUSE_WSPIAPI_H -DSUPPORTIPV6
-       LDFLAGS_WINCOMMON=-Wl,--large-address-aware
-else
-       LDFLAGS_WINCOMMON=
-endif
-
-ifeq ($(WIN64RELEASE), 1)
-#      TARGET=x86_64-pc-mingw32
-#      CC=$(TARGET)-g++
-#      WINDRES=$(TARGET)-windres
-endif
-
-CFLAGS_WARNINGS=-Wall -Winline -Werror=c++-compat -Wwrite-strings -Wshadow -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement -Wmissing-prototypes
-
-
 ifeq ($(DP_MAKE_TARGET), mingw)
        OBJ_ICON=darkplaces.o
        OBJ_ICON_NEXUIZ=nexuiz.o
@@ -249,20 +227,35 @@ ifeq ($(DP_MAKE_TARGET), mingw)
        DP_LINK_XMP?=dlopen
 endif
 
-# set these to "" if you want to use dynamic loading instead
-# zlib
+
+##### Library linking #####
+# SDL2
+SDL_CONFIG?=sdl2-config
+SDLCONFIG_UNIXCFLAGS?=`$(SDL_CONFIG) --cflags`
+SDLCONFIG_UNIXCFLAGS_X11?=
+SDLCONFIG_UNIXLIBS?=`$(SDL_CONFIG) --libs`
+SDLCONFIG_UNIXLIBS_X11?=-lX11
+SDLCONFIG_UNIXSTATICLIBS?=`$(SDL_CONFIG) --static-libs`
+SDLCONFIG_UNIXSTATICLIBS_X11?=-lX11
+SDLCONFIG_MACOSXCFLAGS=$(SDLCONFIG_UNIXCFLAGS)
+SDLCONFIG_MACOSXLIBS=$(SDLCONFIG_UNIXLIBS)
+SDLCONFIG_MACOSXSTATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS)
 ifeq ($(DP_LINK_SDL), shared)
        SDL_LIBS=$(SDLCONFIG_LIBS)
-endif
-ifeq ($(DP_LINK_SDL), static)
+else ifeq ($(DP_LINK_SDL), static)
        SDL_LIBS=$(SDLCONFIG_STATICLIBS)
+else ifeq ($(DP_LINK_SDL), dlopen)
+  $(error libSDL2 can only be used with shared or static linking)
 endif
 
+# zlib
 ifeq ($(DP_LINK_ZLIB), shared)
        CFLAGS_LIBZ=-DLINK_TO_ZLIB
        LIB_Z=-lz
-endif
-ifeq ($(DP_LINK_ZLIB), dlopen)
+else ifeq ($(DP_LINK_ZLIB), static)
+       CFLAGS_LIBZ=-DLINK_TO_ZLIB
+       LIB_Z=-l:libz.a
+else ifeq ($(DP_LINK_ZLIB), dlopen)
        CFLAGS_LIBZ=
        LIB_Z=
 endif
@@ -271,8 +264,10 @@ endif
 ifeq ($(DP_LINK_JPEG), shared)
        CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG
        LIB_JPEG=-ljpeg
-endif
-ifeq ($(DP_LINK_JPEG), dlopen)
+else ifeq ($(DP_LINK_JPEG), static)
+       CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG
+       LIB_JPEG=-l:libjpeg.a
+else ifeq ($(DP_LINK_JPEG), dlopen)
        CFLAGS_LIBJPEG=
        LIB_JPEG=
 endif
@@ -282,8 +277,12 @@ ifeq ($(DP_LINK_ODE), shared)
        ODE_CONFIG?=ode-config
        LIB_ODE=`$(ODE_CONFIG) --libs`
        CFLAGS_ODE=`$(ODE_CONFIG) --cflags` -DUSEODE -DLINK_TO_LIBODE
-endif
-ifeq ($(DP_LINK_ODE), dlopen)
+else ifeq ($(DP_LINK_ODE), static)
+       # This is the configuration from Xonotic
+       ODE_CONFIG?=ode-config
+       LIB_ODE=-l:libode.a -lstdc++ -pthread
+       CFLAGS_ODE=-DUSEODE -DLINK_TO_LIBODE -DdDOUBLE
+else ifeq ($(DP_LINK_ODE), dlopen)
        LIB_ODE=
        CFLAGS_ODE=-DUSEODE
 endif
@@ -292,16 +291,25 @@ endif
 ifeq ($(DP_LINK_CRYPTO), shared)
        LIB_CRYPTO=-ld0_blind_id
        CFLAGS_CRYPTO=-DLINK_TO_CRYPTO
-endif
-ifeq ($(DP_LINK_CRYPTO), dlopen)
+else ifeq ($(DP_LINK_CRYPTO), static)
+       LIB_CRYPTO=-l:libd0_blind_id.a -lgmp
+       CFLAGS_CRYPTO=-DLINK_TO_CRYPTO
+else ifeq ($(DP_LINK_CRYPTO), static_inc_gmp)
+       LIB_CRYPTO=-l:libd0_blind_id.a -l:libgmp.a
+       CFLAGS_CRYPTO=-DLINK_TO_CRYPTO
+else ifeq ($(DP_LINK_CRYPTO), dlopen)
        LIB_CRYPTO=
        CFLAGS_CRYPTO=
 endif
+
+# d0_rijndael
 ifeq ($(DP_LINK_CRYPTO_RIJNDAEL), shared)
        LIB_CRYPTO_RIJNDAEL=-ld0_rijndael
        CFLAGS_CRYPTO_RIJNDAEL=-DLINK_TO_CRYPTO_RIJNDAEL
-endif
-ifeq ($(DP_LINK_CRYPTO_RIJNDAEL), dlopen)
+else ifeq ($(DP_LINK_CRYPTO_RIJNDAEL), static)
+       LIB_CRYPTO_RIJNDAEL=-l:libd0_rijndael.a
+       CFLAGS_CRYPTO_RIJNDAEL=-DLINK_TO_CRYPTO_RIJNDAEL
+else ifeq ($(DP_LINK_CRYPTO_RIJNDAEL), dlopen)
        LIB_CRYPTO_RIJNDAEL=
        CFLAGS_CRYPTO_RIJNDAEL=
 endif
@@ -311,8 +319,11 @@ ifeq ($(DP_LINK_XMP), shared)
        OBJ_SND_XMP=snd_xmp.o
        LIB_SND_XMP=-lxmp
        CFLAGS_SND_XMP=-DUSEXMP -DLINK_TO_LIBXMP
-endif
-ifeq ($(DP_LINK_XMP), dlopen)
+else ifeq ($(DP_LINK_XMP), static)
+       OBJ_SND_XMP=snd_xmp.o
+       LIB_SND_XMP=-l:libxmp.a
+       CFLAGS_SND_XMP=-DUSEXMP -DLINK_TO_LIBXMP
+else ifeq ($(DP_LINK_XMP), dlopen)
        OBJ_SND_XMP=snd_xmp.o
        LIB_SND_XMP=
        CFLAGS_SND_XMP=-DUSEXMP
@@ -320,10 +331,6 @@ endif
 
 
 ##### Extra CFLAGS #####
-ifneq ($(CC), tcc)
-       CFLAGS_MAKEDEP?=-MMD
-endif
-
 ifdef DP_FS_BASEDIR
        CFLAGS_FS=-DDP_FS_BASEDIR=\"$(DP_FS_BASEDIR)\"
 else
@@ -346,6 +353,7 @@ CFLAGS_NET=
 # Systems without IPv6 support should uncomment this:
 #CFLAGS_NET+=-DNOSUPPORTIPV6
 
+
 ##### GNU Make specific definitions #####
 
 DO_LD=$(CC) -o ../../../$@ $^ $(LDFLAGS)
index 2567612543e010e2aba67c906602f4de789a7e75..dc9c990e31dab1754b8e40414b320db135f98ed4 100644 (file)
@@ -2,44 +2,7 @@
 CHECKLEVEL1 = @if [ "$(LEVEL)" != 1 ]; then $(MAKE) help; false; fi
 CHECKLEVEL2 = @if [ "$(LEVEL)" != 2 ]; then $(MAKE) help; false; fi
 
-# Choose the compiler you want to use
-CC?=gcc
-
-# athlon optimizations
-#CPUOPTIMIZATIONS?=-march=athlon
-# athlon xp optimizations
-#CPUOPTIMIZATIONS?=-march=athlon-xp
-# athlon 64 optimizations
-#CPUOPTIMIZATIONS?=-march=athlon64 -m32
-# Pentium 3 optimizations
-#CPUOPTIMIZATIONS?=-march=pentium3
-# Pentium 4 optimizations
-#CPUOPTIMIZATIONS?=-march=pentium4
-# 686 (Pentium Pro/II) optimizations
-#CPUOPTIMIZATIONS?=-march=i686
-# No specific CPU (386 compatible)
-#CPUOPTIMIZATIONS?=
-# Experimental
-#CPUOPTIMIZATIONS?=-fno-math-errno -fno-rounding-math -fno-signaling-nans -fassociative-math -freciprocal-math -fno-signed-zeros -fno-trapping-math
-# Normal
-ifeq ($(CC), clang)
-       CPUOPTIMIZATIONS?=-fno-math-errno -fno-rounding-math -fno-trapping-math
-else
-       CPUOPTIMIZATIONS?=-fno-math-errno -fno-rounding-math -fno-signaling-nans -fno-trapping-math
-endif
-# NOTE: *never* *ever* use the -ffast-math or -funsafe-math-optimizations flag
-# Also, since gcc 5, -ffinite-math-only makes NaN and zero compare equal inside engine code but not inside QC, which causes error spam for seemingly valid QC code like if (x != 0) return 1 / x;
 
-SDL_CONFIG?=sdl2-config
-SDLCONFIG_UNIXCFLAGS?=`$(SDL_CONFIG) --cflags`
-SDLCONFIG_UNIXCFLAGS_X11?=
-SDLCONFIG_UNIXLIBS?=`$(SDL_CONFIG) --libs`
-SDLCONFIG_UNIXLIBS_X11?=-lX11
-SDLCONFIG_UNIXSTATICLIBS?=`$(SDL_CONFIG) --static-libs`
-SDLCONFIG_UNIXSTATICLIBS_X11?=-lX11
-SDLCONFIG_MACOSXCFLAGS=$(SDLCONFIG_UNIXCFLAGS)
-SDLCONFIG_MACOSXLIBS=$(SDLCONFIG_UNIXLIBS)
-SDLCONFIG_MACOSXSTATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS)
 STRIP?=strip
 
 
@@ -118,6 +81,7 @@ OBJ_COMMON= \
        model_sprite.o \
        netconn.o \
        palette.o \
+       phys.o \
        polygon.o \
        portals.o \
        protocol.o \
@@ -162,21 +126,26 @@ OBJ_MENU= \
 # note that builddate.c is very intentionally not compiled to a .o before
 # being linked, because it should be recompiled every time an executable is
 # built to give the executable a proper date string
-OBJ_SV= builddate.c sys_unix.o vid_null.o thread_null.o $(OBJ_SND_NULL) $(OBJ_COMMON)
+OBJ_SV= builddate.c sys_null.o vid_null.o thread_null.o $(OBJ_SND_NULL) $(OBJ_COMMON)
 OBJ_SDL= builddate.c sys_sdl.o vid_sdl.o thread_sdl.o $(OBJ_MENU) $(OBJ_SND_COMMON) $(OBJ_SND_XMP) snd_sdl.o $(OBJ_VIDEO_CAPTURE) $(OBJ_COMMON)
 
 
 # Compilation
+# -D_POSIX_C_SOURCE=200809L doesn't enable all of POSIX 2008, wtf?
+# -D_DEFAULT_SOURCE does enables all of POSIX 2008 (without GNU extensions).
 ifeq ($(PEDANTIC),1)
-       CFLAGS_STANDARD=-std=c11 -pedantic -D_POSIX_C_SOURCE=200809L -DCONFIG_PEDANTIC
+       CFLAGS_STANDARD=-std=c17 -pedantic -D_DEFAULT_SOURCE -DCONFIG_PEDANTIC
 else
        CFLAGS_STANDARD=
 endif
 
-CFLAGS_TCC=
+CFLAGS_WARNINGS=-Wall -Werror=vla -Werror=c++-compat -Wwrite-strings -Wshadow -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement -Wmissing-prototypes
 
+CFLAGS_TCC=
 ifeq ($(CC), tcc)
        CFLAGS_TCC=-DSDL_DISABLE_IMMINTRIN_H
+else
+       CFLAGS_MAKEDEP?=-MMD
 endif
 
 CFLAGS_COMMON=$(CFLAGS_STANDARD) $(CFLAGS_TCC) $(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_SND_XMP) $(CFLAGS_NET) $(CFLAGS_SDL) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES -I../../../
@@ -196,12 +165,25 @@ else
        CFLAGS_SSE2=
 endif # ifeq ($(DP_SSE),1)
 
-OPTIM_DEBUG=$(CPUOPTIMIZATIONS)
+# No specific CPU
+CPUOPTIMIZATIONS?=
+# x86
+ifeq ($(DP_SSE),1)
+       CPUOPTIMIZATIONS+=-mno-avx
+endif
+# bones_was_here: added -mno-avx because when compiling for (at least) haswell or skylake with gcc or clang, with both -O2 and -O3, AVX auto-vectorisation causes subtle bugs in Xonotic QC physics, and changes the hash generated by the CI pipeline.  AVX2 seems to be OK.
+
+# We can get good stack traces at -O1 with -fno-omit-frame-pointer (as recommended by ASan docs) for a hefty boost compared to unoptimised.
+OPTIM_DEBUG=-O1 -fno-omit-frame-pointer $(CPUOPTIMIZATIONS)
 #OPTIM_RELEASE=-O2 -fno-strict-aliasing -ffast-math -funroll-loops $(CPUOPTIMIZATIONS)
 #OPTIM_RELEASE=-O2 -fno-strict-aliasing -fno-math-errno -fno-trapping-math -fno-signaling-nans -fcx-limited-range -funroll-loops $(CPUOPTIMIZATIONS)
 #OPTIM_RELEASE=-O2 -fno-strict-aliasing -funroll-loops $(CPUOPTIMIZATIONS)
 #OPTIM_RELEASE=-O2 -fno-strict-aliasing $(CPUOPTIMIZATIONS)
-OPTIM_RELEASE=-O3 -fno-strict-aliasing $(CPUOPTIMIZATIONS)
+#OPTIM_RELEASE=-O3 -fno-strict-aliasing $(CPUOPTIMIZATIONS)
+#OPTIM_RELEASE=-O3 -fno-strict-aliasing -fno-math-errno -fno-trapping-math $(CPUOPTIMIZATIONS)
+# -Winline is here instead of in CFLAGS_WARNINGS because we need inlining disabled for good stack traces in debug builds,
+# also because UBSan and ASan cause this warning to be spammed.
+OPTIM_RELEASE=-O3 -fno-math-errno -fno-trapping-math $(CPUOPTIMIZATIONS) -Winline
 # NOTE: *never* *ever* use the -ffast-math or -funsafe-math-optimizations flag
 # Also, since gcc 5, -ffinite-math-only makes NaN and zero compare equal inside engine code but not inside QC, which causes error spam for seemingly valid QC code like if (x != 0) return 1 / x;
 
@@ -209,9 +191,13 @@ DO_CC=$(CC) $(CFLAGS) -c $< -o $@
 
 
 # Link
-LDFLAGS_DEBUG=-g -ggdb $(OPTIM_DEBUG) -DSVNREVISION=`{ test -d .svn && svnversion; } || { test -d .git && git describe --always; } || echo -` -DBUILDTYPE=debug
-LDFLAGS_PROFILE=-g -pg -fprofile-arcs $(OPTIM_RELEASE) -DSVNREVISION=`{ test -d .svn && svnversion; } || { test -d .git && git describe --always; } || echo -` -DBUILDTYPE=profile
-LDFLAGS_RELEASE=$(OPTIM_RELEASE) -DSVNREVISION=`{ test -d .svn && svnversion; } || { test -d .git && git describe --always; } || echo -` -DBUILDTYPE=release
+
+# not checking for .git directory before running `git describe` because that would stop it working in a subdirectory
+VCREVISION=$(shell { test -d .svn && svnversion; } || git describe --always --dirty='~' 2>/dev/null || echo -)
+
+LDFLAGS_DEBUG=-g -ggdb $(OPTIM_DEBUG)                  -DVCREVISION=$(VCREVISION) -DBUILDTYPE=debug
+LDFLAGS_PROFILE=-g -pg -fprofile-arcs $(OPTIM_RELEASE) -DVCREVISION=$(VCREVISION) -DBUILDTYPE=profile
+LDFLAGS_RELEASE=$(OPTIM_RELEASE)                       -DVCREVISION=$(VCREVISION) -DBUILDTYPE=release
 
 
 ##### UNIX specific variables #####
@@ -235,8 +221,10 @@ CMD_UNIXMKDIR=mkdir -p
 ##### Linux specific variables #####
 
 # Link
-LDFLAGS_LINUXSV=$(LDFLAGS_UNIXCOMMON) -lrt -ldl
-LDFLAGS_LINUXSDL=$(LDFLAGS_UNIXCOMMON) -lrt -ldl $(LDFLAGS_UNIXSDL)
+# -rdynamic allows glibc backtrace_symbols_fd() to convert addresses to function names
+# with a much smaller binary than with full debug symbols
+LDFLAGS_LINUXSV=$(LDFLAGS_UNIXCOMMON) -lrt -ldl -rdynamic
+LDFLAGS_LINUXSDL=$(LDFLAGS_UNIXCOMMON) -lrt -ldl -rdynamic $(LDFLAGS_UNIXSDL)
 
 
 ##### Mac OS X specific variables #####
@@ -485,6 +473,7 @@ nexuiz.o: %.o : %.rc
 .c.o:
        $(CHECKLEVEL2)
        $(DO_CC)
+.c.o: .EXTRA_PREREQS =  # According to POSIX, a suffix rule cannot contain prerequisites.
 
 $(EXE_SV): $(OBJ_SV) $(OBJ_ICON)
        $(CHECKLEVEL2)
@@ -502,6 +491,9 @@ $(EXE_SDLNEXUIZ): $(OBJ_SDL) $(OBJ_ICON_NEXUIZ)
        $(CHECKLEVEL2)
        $(DO_LD)
 
+# If requested, these targets must always run first:
+.EXTRA_PREREQS := $(filter clean clean-profile, $(MAKECMDGOALS))
+
 clean:
        -$(CMD_RM) $(EXE_SV)
        -$(CMD_RM) $(EXE_SDL)
@@ -511,6 +503,7 @@ clean:
        -$(CMD_RM) *.d
        -$(CMD_RM) *.gch
        -$(CMD_RM) build-obj/
+clean: .EXTRA_PREREQS =  # prevents circular dependency with clean-profile
 
 clean-profile: clean
        -$(CMD_RM) *.gcda
index e953333545fcb93fff94be815a979fdd58fe5285..2fa93a1cb6626b7826922aeae0e0c314d82cdbc6 100644 (file)
--- a/mathlib.h
+++ b/mathlib.h
@@ -31,23 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 struct mplane_s;
 extern vec3_t vec3_origin;
 
-#define float_nanmask (0x7F800000)
-#define double_nanmask (0x7FF8000000000000)
-#define FLOAT_IS_NAN(x) (((*(int *)&x)&float_nanmask)==float_nanmask)
-#define DOUBLE_IS_NAN(x) (((*(long long *)&x)&double_nanmask)==double_nanmask)
-
-#ifdef VEC_64
-#define VEC_IS_NAN(x) DOUBLE_IS_NAN(x)
-#else
-#define VEC_IS_NAN(x) FLOAT_IS_NAN(x)
-#endif
-
-#ifdef PRVM_64
-#define PRVM_IS_NAN(x) DOUBLE_IS_NAN(x)
-#else
-#define PRVM_IS_NAN(x) FLOAT_IS_NAN(x)
-#endif
-
 #define bound(min,num,max) ((num) >= (min) ? ((num) < (max) ? (num) : (max)) : (min))
 
 #ifndef min
index ae92e3758af2ac487f1b732662fe731a6d1cda79..5164994a01e246974c6ae8995a072c1f4b39f1b6 100644 (file)
--- a/mdfour.c
+++ b/mdfour.c
@@ -98,8 +98,9 @@ static void copy64(uint32_t *M, const unsigned char *in)
 {
        int i;
 
+       // UBSan: (unsigned) is because promotion to int causes signed overflow when in[] >= 128
        for (i=0;i<16;i++)
-               M[i] = (in[i*4+3]<<24) | (in[i*4+2]<<16) |
+               M[i] = ((unsigned)in[i*4+3]<<24) | (in[i*4+2]<<16) |
                        (in[i*4+1]<<8) | (in[i*4+0]<<0);
 }
 
diff --git a/menu.c b/menu.c
index ce154097118e91e32c8aef969f53f0c789caa89a..7b51ab4cf523f2069b30bfc1734903b04975ff7a 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -34,7 +34,6 @@ static cvar_t menu_progs = {CF_CLIENT, "menu_progs", "menu.dat", "name of quakec
 static int NehGameType;
 
 enum m_state_e m_state;
-char m_return_reason[128];
 
 void M_Menu_Main_f(cmd_state_t *cmd);
        void M_Menu_SinglePlayer_f(cmd_state_t *cmd);
@@ -108,13 +107,6 @@ static void M_ModList_Key(cmd_state_t *cmd, int key, int ascii);
 
 static qbool   m_entersound;           ///< play after drawing a frame, so caching won't disrupt the sound
 
-void M_Update_Return_Reason(const char *s)
-{
-       strlcpy(m_return_reason, s, sizeof(m_return_reason));
-       if (s)
-               Con_DPrintf("%s\n", s);
-}
-
 #define StartingGame   (m_multiplayer_cursor == 1)
 #define JoiningGame            (m_multiplayer_cursor == 0)
 
@@ -858,7 +850,7 @@ static void M_ScanSaves (void)
 
        for (i=0 ; i<MAX_SAVEGAMES ; i++)
        {
-               strlcpy (m_filenames[i], "--- UNUSED SLOT ---", sizeof(m_filenames[i]));
+               dp_strlcpy (m_filenames[i], "--- UNUSED SLOT ---", sizeof(m_filenames[i]));
                loadable[i] = false;
                dpsnprintf (name, sizeof(name), "s%i.sav", (int)i);
                f = FS_OpenRealFile (name, "rb", false);
@@ -874,7 +866,7 @@ static void M_ScanSaves (void)
                //version = atoi(com_token);
                // description
                COM_ParseToken_Simple(&t, false, false, true);
-               strlcpy (m_filenames[i], com_token, sizeof (m_filenames[i]));
+               dp_strlcpy (m_filenames[i], com_token, sizeof (m_filenames[i]));
 
        // change _ back to space
                for (j=0 ; j<SAVEGAME_COMMENT_LENGTH ; j++)
@@ -1292,7 +1284,7 @@ void M_Menu_Setup_f(cmd_state_t *cmd)
        key_dest = key_menu;
        m_state = m_setup;
        m_entersound = true;
-       strlcpy(setup_myname, cl_name.string, sizeof(setup_myname));
+       dp_strlcpy(setup_myname, cl_name.string, sizeof(setup_myname));
        setup_top = setup_oldtop = cl_topcolor.integer;
        setup_bottom = setup_oldbottom = cl_bottomcolor.integer;
        setup_rate = cl_rate.integer;
@@ -2640,18 +2632,18 @@ static void M_Keys_Draw (void)
 
                // LadyHavoc: redesigned to print more than 2 keys, inspired by Tomaz's MiniRacer
                if (keys[0] == -1)
-                       strlcpy(keystring, "???", sizeof(keystring));
+                       dp_strlcpy(keystring, "???", sizeof(keystring));
                else
                {
-                       char tinystr[2];
+                       char tinystr[TINYSTR_LEN];
                        keystring[0] = 0;
                        for (j = 0;j < NUMKEYS;j++)
                        {
                                if (keys[j] != -1)
                                {
                                        if (j > 0)
-                                               strlcat(keystring, " or ", sizeof(keystring));
-                                       strlcat(keystring, Key_KeynumToString (keys[j], tinystr, sizeof(tinystr)), sizeof(keystring));
+                                               dp_strlcat(keystring, " or ", sizeof(keystring));
+                                       dp_strlcat(keystring, Key_KeynumToString (keys[j], tinystr, TINYSTR_LEN), sizeof(keystring));
                                }
                        }
                }
@@ -2669,7 +2661,7 @@ static void M_Keys_Key(cmd_state_t *cmd, int k, int ascii)
 {
        char    line[80];
        int             keys[NUMKEYS];
-       char    tinystr[2];
+       char    tinystr[TINYSTR_LEN];
 
        if (bind_grab)
        {       // defining a key
@@ -2680,7 +2672,7 @@ static void M_Keys_Key(cmd_state_t *cmd, int k, int ascii)
                }
                else //if (k != '`')
                {
-                       dpsnprintf(line, sizeof(line), "bind \"%s\" \"%s\"\n", Key_KeynumToString(k, tinystr, sizeof(tinystr)), bindnames[keys_cursor][0]);
+                       dpsnprintf(line, sizeof(line), "bind \"%s\" \"%s\"\n", Key_KeynumToString(k, tinystr, TINYSTR_LEN), bindnames[keys_cursor][0]);
                        Cbuf_InsertText (cmd, line);
                }
 
@@ -3344,7 +3336,7 @@ void M_Menu_LanConfig_f(cmd_state_t *cmd)
        lanConfig_port = 26000;
        dpsnprintf(lanConfig_portname, sizeof(lanConfig_portname), "%u", (unsigned int) lanConfig_port);
 
-       M_Update_Return_Reason("");
+       cl_connect_status[0] = '\0';
 }
 
 
@@ -3397,8 +3389,8 @@ static void M_LanConfig_Draw (void)
        if (lanConfig_cursor == 3)
                M_DrawCharacter (basex+16 + 8*strlen(lanConfig_joinname), lanConfig_cursor_table [lanConfig_cursor], 10+((int)(host.realtime*4)&1));
 
-       if (*m_return_reason)
-               M_Print(basex, 168, m_return_reason);
+       if (*cl_connect_status)
+               M_Print(basex, 168, cl_connect_status);
 }
 
 
@@ -4385,7 +4377,8 @@ static void M_GameOptions_Key(cmd_state_t *cmd, int key, int ascii)
 //=============================================================================
 /* SLIST MENU */
 
-static int slist_cursor;
+static unsigned slist_cursor;
+static unsigned slist_visible;
 
 void M_Menu_ServerList_f(cmd_state_t *cmd)
 {
@@ -4393,7 +4386,7 @@ void M_Menu_ServerList_f(cmd_state_t *cmd)
        m_state = m_slist;
        m_entersound = true;
        slist_cursor = 0;
-       M_Update_Return_Reason("");
+       cl_connect_status[0] = '\0';
        if (lanConfig_cursor == 2)
                Net_SlistQW_f(cmd);
        else
@@ -4403,7 +4396,7 @@ void M_Menu_ServerList_f(cmd_state_t *cmd)
 
 static void M_ServerList_Draw (void)
 {
-       int n, y, visible, start, end, statnumplayers, statmaxplayers;
+       unsigned n, y, start, end, statnumplayers, statmaxplayers;
        cachepic_t *p;
        const char *s;
        char vabuf[1024];
@@ -4415,14 +4408,14 @@ static void M_ServerList_Draw (void)
                M_Background(640, vid_conheight.integer);
        // scroll the list as the cursor moves
        ServerList_GetPlayerStatistics(&statnumplayers, &statmaxplayers);
-       s = va(vabuf, sizeof(vabuf), "%i/%i masters %i/%i servers %i/%i players", masterreplycount, masterquerycount, serverreplycount, serverquerycount, statnumplayers, statmaxplayers);
+       s = va(vabuf, sizeof(vabuf), "%u/%u masters %u/%u servers %u/%u players", masterreplycount, masterquerycount, serverreplycount, serverquerycount, statnumplayers, statmaxplayers);
        M_PrintRed((640 - strlen(s) * 8) / 2, 32, s);
-       if (*m_return_reason)
-               M_Print(16, menu_height - 8, m_return_reason);
+       if (*cl_connect_status)
+               M_Print(16, menu_height - 8, cl_connect_status);
        y = 48;
-       visible = (int)((menu_height - 16 - y) / 8 / 2);
-       start = bound(0, slist_cursor - (visible >> 1), serverlist_viewcount - visible);
-       end = min(start + visible, serverlist_viewcount);
+       slist_visible = (menu_height - 16 - y) / 8 / 2;
+       start = min(slist_cursor - min(slist_cursor, slist_visible >> 1), serverlist_viewcount - min(serverlist_viewcount, slist_visible));
+       end = min(start + slist_visible, serverlist_viewcount);
 
        p = Draw_CachePic ("gfx/p_multi");
        M_DrawPic((640 - Draw_GetPicWidth(p)) / 2, 4, "gfx/p_multi");
@@ -4469,14 +4462,18 @@ static void M_ServerList_Key(cmd_state_t *cmd, int k, int ascii)
                        Net_Slist_f(cmd);
                break;
 
+       case K_PGUP:
+               slist_cursor -= slist_visible - 2;
        case K_UPARROW:
        case K_LEFTARROW:
                S_LocalSound ("sound/misc/menu1.wav");
                slist_cursor--;
-               if (slist_cursor < 0)
+               if (slist_cursor >= serverlist_viewcount)
                        slist_cursor = serverlist_viewcount - 1;
                break;
 
+       case K_PGDN:
+               slist_cursor += slist_visible - 2;
        case K_DOWNARROW:
        case K_RIGHTARROW:
                S_LocalSound ("sound/misc/menu1.wav");
@@ -4485,6 +4482,16 @@ static void M_ServerList_Key(cmd_state_t *cmd, int k, int ascii)
                        slist_cursor = 0;
                break;
 
+       case K_HOME:
+               S_LocalSound ("sound/misc/menu1.wav");
+               slist_cursor = 0;
+               break;
+
+       case K_END:
+               S_LocalSound ("sound/misc/menu1.wav");
+               slist_cursor = serverlist_viewcount - 1;
+               break;
+
        case K_ENTER:
                S_LocalSound ("sound/misc/menu2.wav");
                if (serverlist_viewcount)
@@ -4547,7 +4554,7 @@ static void ModList_RebuildList(void)
                description = FS_CheckGameDir(list.strings[i]);
                if (description == NULL || description == fs_checkgamedir_missing) continue;
 
-               strlcpy (modlist[modlist_count].dir, list.strings[i], sizeof(modlist[modlist_count].dir));
+               dp_strlcpy (modlist[modlist_count].dir, list.strings[i], sizeof(modlist[modlist_count].dir));
                //check currently loaded mods
                modlist[modlist_count].loaded = false;
                if (fs_numgamedirs)
@@ -4573,7 +4580,7 @@ static void ModList_Enable (void)
        // copy our mod list into an array for FS_ChangeGameDirs
        numgamedirs = modlist_numenabled;
        for (i = 0; i < modlist_numenabled; i++)
-               strlcpy (gamedirs[i], modlist[modlist_enabled[i]].dir,sizeof (gamedirs[i]));
+               dp_strlcpy (gamedirs[i], modlist[modlist_enabled[i]].dir,sizeof (gamedirs[i]));
 
        // this code snippet is from FS_ChangeGameDirs
        if (fs_numgamedirs == numgamedirs)
@@ -4602,7 +4609,7 @@ void M_Menu_ModList_f(cmd_state_t *cmd)
        m_state = m_modlist;
        m_entersound = true;
        modlist_cursor = 0;
-       M_Update_Return_Reason("");
+       cl_connect_status[0] = '\0';
        ModList_RebuildList();
 }
 
@@ -4652,8 +4659,8 @@ static void M_ModList_Draw (void)
        for (y = 0; y < modlist_numenabled; y++)
                M_PrintRed(432, 48 + y * 8, modlist[modlist_enabled[y]].dir);
 
-       if (*m_return_reason)
-               M_Print(16, menu_height - 8, m_return_reason);
+       if (*cl_connect_status)
+               M_Print(16, menu_height - 8, cl_connect_status);
        // scroll the list as the cursor moves
        y = 48;
        visible = (int)((menu_height - 16 - y) / 8 / 2);
@@ -5031,15 +5038,22 @@ void M_Shutdown(void)
 //============================================================================
 // Menu prog handling
 
-static const char *m_required_func[] = {
-"m_init",
-"m_keydown",
-"m_draw",
-"m_toggle",
-"m_shutdown",
-};
+static void MP_CheckRequiredFuncs(prvm_prog_t *prog, const char *filename)
+{
+       int i;
+       const char *m_required_func[] = {
+               "m_init",
+               "m_keydown",
+               "m_draw",
+               "m_toggle",
+               "m_shutdown",
+       };
+       int m_numrequiredfunc = sizeof(m_required_func) / sizeof(char*);
 
-static int m_numrequiredfunc = sizeof(m_required_func) / sizeof(char*);
+       for(i = 0; i < m_numrequiredfunc; ++i)
+               if(PRVM_ED_FindFunction(prog, m_required_func[i]) == 0)
+                       prog->error_cmd("%s: %s not found in %s",prog->name, m_required_func[i], filename);
+}
 
 static prvm_required_field_t m_required_fields[] =
 {
@@ -5204,41 +5218,45 @@ void MR_SetRouting (qbool forceold);
 void MVM_error_cmd(const char *format, ...) DP_FUNC_PRINTF(1);
 void MVM_error_cmd(const char *format, ...)
 {
-       prvm_prog_t *prog = MVM_prog;
        static qbool processingError = false;
        char errorstring[MAX_INPUTLINE];
        va_list argptr;
+       int outfd = sys.outfd;
+
+       // set output to stderr
+       sys.outfd = fileno(stderr);
 
        va_start (argptr, format);
        dpvsnprintf (errorstring, sizeof(errorstring), format, argptr);
        va_end (argptr);
 
        if (host.framecount < 3)
-               Sys_Error("Menu_Error: %s\n", errorstring);
+               Sys_Error("Menu_Error: %s", errorstring);
 
-       Con_Printf( "Menu_Error: %s\n", errorstring );
+       Con_Printf(CON_ERROR "Menu_Error: %s\n", errorstring);
 
-       if( !processingError ) {
+       if(!processingError)
+       {
                processingError = true;
-               PRVM_Crash(prog);
+               PRVM_Crash();
                processingError = false;
-       } else {
-               Con_Printf( "Menu_Error: Recursive call to MVM_error_cmd (from PRVM_Crash)!\n" );
        }
+       else
+               Sys_Error("Menu_Error: Recursive call to MVM_error_cmd (from PRVM_Crash)!");
 
-       // fall back to the normal menu
-
-       // say it
-       Con_Print("Falling back to normal menu\n");
-
+       Con_Print("Falling back to engine menu\n");
        key_dest = key_game;
-
-       // init the normal menu now -> this will also correct the menu router pointers
        MR_SetRouting (true);
 
        // reset the active scene, too (to be on the safe side ;))
        R_SelectScene( RST_CLIENT );
 
+       // prevent an endless loop if the error was triggered by a command
+       Cbuf_Clear(cmd_local->cbuf);
+
+       // restore configured outfd
+       sys.outfd = outfd;
+
        // Let video start at least
        Host_AbortCurrentFrame();
 }
@@ -5299,10 +5317,12 @@ static void MP_KeyEvent (int key, int ascii, qbool downevent)
 static void MP_Draw (void)
 {
        prvm_prog_t *prog = MVM_prog;
-       // declarations that are needed right now
-
        float oldquality;
 
+       // don't crash if we draw a frame between prog shutdown and restart, see Host_LoadConfig_f
+       if (!prog->loaded)
+               return;
+
        R_SelectScene( RST_MENU );
 
        // reset the temp entities each frame
@@ -5403,7 +5423,7 @@ static void MP_Init (void)
        // allocate the mempools
        prog->progs_mempool = Mem_AllocPool(menu_progs.string, 0, NULL);
 
-       PRVM_Prog_Load(prog, menu_progs.string, NULL, 0, m_numrequiredfunc, m_required_func, m_numrequiredfields, m_required_fields, m_numrequiredglobals, m_required_globals);
+       PRVM_Prog_Load(prog, menu_progs.string, NULL, 0, MP_CheckRequiredFuncs, m_numrequiredfields, m_required_fields, m_numrequiredglobals, m_required_globals);
 
        // note: OP_STATE is not supported by menu qc, we don't even try to detect
        // it here
diff --git a/menu.h b/menu.h
index 38a034f6629b1d419dbc6b996bca5c025e184e31..2344f44434da5b0338e787db258f8b9d7a297ab7 100644 (file)
--- a/menu.h
+++ b/menu.h
@@ -52,8 +52,7 @@ enum m_state_e {
 };
 
 extern enum m_state_e m_state;
-extern char m_return_reason[128];
-void M_Update_Return_Reason(const char *s);
+
 
 /*
 // hard-coded menus
@@ -72,7 +71,7 @@ void MP_Draw (void);
 void MP_ToggleMenu (int mode);
 void MP_Shutdown (void);*/
 
-qbool MP_ConsoleCommand(const char *text);
+qbool MP_ConsoleCommand(const char *text, size_t textlen);
 
 //
 // menu router
index 46375f962f0798e04917d777590fd81b2ca5b4e7..a18de3095dcc498534dbdb54ec979da5ef7a5698 100644 (file)
@@ -904,7 +904,7 @@ static void Mod_MDL_LoadFrames (unsigned char* datapointer, int inverts, int *ve
                // get scene name from first frame
                pinframe = (daliasframe_t *)datapointer;
 
-               strlcpy(scene->name, pinframe->name, sizeof(scene->name));
+               dp_strlcpy(scene->name, pinframe->name, sizeof(scene->name));
                scene->firstframe = pose;
                scene->framecount = groupframes;
                scene->framerate = 1.0f / interval;
@@ -1041,7 +1041,7 @@ void Mod_IDP0_Load(model_t *mod, void *buffer, void *bufferend)
        BOUNDI((int)loadmodel->synctype,0,2);
        // convert model flags to EF flags (MF_ROCKET becomes EF_ROCKET, etc)
        i = LittleLong (pinmodel->flags);
-       loadmodel->effects = ((i & 255) << 24) | (i & 0x00FFFF00);
+       loadmodel->effects = (((unsigned)i & 255) << 24) | (i & 0x00FFFF00);
 
        if (strstr(r_nolerp_list.string, loadmodel->name))
                loadmodel->nolerp = true;
@@ -1281,7 +1281,7 @@ void Mod_IDP0_Load(model_t *mod, void *buffer, void *bufferend)
 
                        // store the info about the new skin
                        Mod_LoadCustomMaterial(loadmodel->mempool, loadmodel->data_textures + totalskins * loadmodel->num_surfaces, name, SUPERCONTENTS_SOLID, MATERIALFLAG_WALL, tempskinframe);
-                       strlcpy(loadmodel->skinscenes[loadmodel->numskins].name, name, sizeof(loadmodel->skinscenes[loadmodel->numskins].name));
+                       dp_strlcpy(loadmodel->skinscenes[loadmodel->numskins].name, name, sizeof(loadmodel->skinscenes[loadmodel->numskins].name));
                        loadmodel->skinscenes[loadmodel->numskins].firstframe = totalskins;
                        loadmodel->skinscenes[loadmodel->numskins].framecount = 1;
                        loadmodel->skinscenes[loadmodel->numskins].framerate = 10.0f;
@@ -1542,7 +1542,7 @@ void Mod_IDP2_Load(model_t *mod, void *buffer, void *bufferend)
                        out[k] = v[vertremap[k]];
                datapointer += numxyz * sizeof(trivertx_t);
 
-               strlcpy(loadmodel->animscenes[i].name, pinframe->name, sizeof(loadmodel->animscenes[i].name));
+               dp_strlcpy(loadmodel->animscenes[i].name, pinframe->name, sizeof(loadmodel->animscenes[i].name));
                loadmodel->animscenes[i].firstframe = i;
                loadmodel->animscenes[i].framecount = 1;
                loadmodel->animscenes[i].framerate = 10;
@@ -1616,7 +1616,7 @@ void Mod_IDP3_Load(model_t *mod, void *buffer, void *bufferend)
        loadmodel->synctype = ST_RAND;
        // convert model flags to EF flags (MF_ROCKET becomes EF_ROCKET, etc)
        i = LittleLong (pinmodel->flags);
-       loadmodel->effects = ((i & 255) << 24) | (i & 0x00FFFF00);
+       loadmodel->effects = (((unsigned)i & 255) << 24) | (i & 0x00FFFF00);
 
        // set up some global info about the model
        loadmodel->numframes = LittleLong(pinmodel->num_frames);
@@ -1636,7 +1636,7 @@ void Mod_IDP3_Load(model_t *mod, void *buffer, void *bufferend)
        loadmodel->animscenes = (animscene_t *)Mem_Alloc(loadmodel->mempool, loadmodel->numframes * sizeof(animscene_t));
        for (i = 0, pinframe = (md3frameinfo_t *)((unsigned char *)pinmodel + LittleLong(pinmodel->lump_frameinfo));i < loadmodel->numframes;i++, pinframe++)
        {
-               strlcpy(loadmodel->animscenes[i].name, pinframe->name, sizeof(loadmodel->animscenes[i].name));
+               dp_strlcpy(loadmodel->animscenes[i].name, pinframe->name, sizeof(loadmodel->animscenes[i].name));
                loadmodel->animscenes[i].firstframe = i;
                loadmodel->animscenes[i].framecount = 1;
                loadmodel->animscenes[i].framerate = 10;
@@ -1649,7 +1649,7 @@ void Mod_IDP3_Load(model_t *mod, void *buffer, void *bufferend)
        loadmodel->data_tags = (aliastag_t *)Mem_Alloc(loadmodel->mempool, loadmodel->num_tagframes * loadmodel->num_tags * sizeof(aliastag_t));
        for (i = 0, pintag = (md3tag_t *)((unsigned char *)pinmodel + LittleLong(pinmodel->lump_tags));i < loadmodel->num_tagframes * loadmodel->num_tags;i++, pintag++)
        {
-               strlcpy(loadmodel->data_tags[i].name, pintag->name, sizeof(loadmodel->data_tags[i].name));
+               dp_strlcpy(loadmodel->data_tags[i].name, pintag->name, sizeof(loadmodel->data_tags[i].name));
                for (j = 0;j < 9;j++)
                        loadmodel->data_tags[i].matrixgl[j] = LittleFloat(pintag->rotationmatrix[j]);
                for (j = 0;j < 3;j++)
@@ -1674,21 +1674,31 @@ void Mod_IDP3_Load(model_t *mod, void *buffer, void *bufferend)
        loadmodel->submodelsurfaces_end = loadmodel->num_surfaces;
        loadmodel->num_textures = loadmodel->num_surfaces * loadmodel->numskins;
        loadmodel->num_texturesperskin = loadmodel->num_surfaces;
-       data = (unsigned char *)Mem_Alloc(loadmodel->mempool, loadmodel->num_surfaces * sizeof(msurface_t) + loadmodel->num_surfaces * sizeof(int) + loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t) + meshtriangles * sizeof(int[3]) + (meshvertices <= 65536 ? meshtriangles * sizeof(unsigned short[3]) : 0) + meshvertices * sizeof(float[2]) + meshvertices * loadmodel->numframes * sizeof(md3vertex_t));
-       loadmodel->data_surfaces = (msurface_t *)data;data += loadmodel->num_surfaces * sizeof(msurface_t);
-       loadmodel->modelsurfaces_sorted = (int *)data;data += loadmodel->num_surfaces * sizeof(int);
-       loadmodel->data_textures = (texture_t *)data;data += loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t);
        loadmodel->surfmesh.num_vertices = meshvertices;
        loadmodel->surfmesh.num_triangles = meshtriangles;
        loadmodel->surfmesh.num_morphframes = loadmodel->numframes; // TODO: remove?
        loadmodel->num_poses = loadmodel->surfmesh.num_morphframes;
-       loadmodel->surfmesh.data_element3i = (int *)data;data += meshtriangles * sizeof(int[3]);
-       loadmodel->surfmesh.data_texcoordtexture2f = (float *)data;data += meshvertices * sizeof(float[2]);
-       loadmodel->surfmesh.data_morphmd3vertex = (md3vertex_t *)data;data += meshvertices * loadmodel->numframes * sizeof(md3vertex_t);
+
+       // do most allocations as one merged chunk
+       // This is only robust for C standard types!
+       data = (unsigned char *)Mem_Alloc(loadmodel->mempool,
+               meshvertices * sizeof(float[2])
+               + loadmodel->num_surfaces * sizeof(int)
+               + meshtriangles * sizeof(int[3])
+               + (meshvertices <= 65536 ? meshtriangles * sizeof(unsigned short[3]) : 0));
+       // Pointers must be taken in descending order of alignment requirement!
+       loadmodel->surfmesh.data_texcoordtexture2f        = (float *)data; data += meshvertices * sizeof(float[2]);
+       loadmodel->modelsurfaces_sorted                     = (int *)data; data += loadmodel->num_surfaces * sizeof(int);
+       loadmodel->surfmesh.data_element3i                  = (int *)data; data += meshtriangles * sizeof(int[3]);
        if (meshvertices <= 65536)
        {
-               loadmodel->surfmesh.data_element3s = (unsigned short *)data;data += meshtriangles * sizeof(unsigned short[3]);
+               loadmodel->surfmesh.data_element3s = (unsigned short *)data; data += meshtriangles * sizeof(unsigned short[3]);
        }
+       // Struct alignment requirements could change so we can't assume them here
+       // otherwise a safe-looking commit could introduce undefined behaviour!
+       loadmodel->data_surfaces = Mem_AllocType(loadmodel->mempool, msurface_t, loadmodel->num_surfaces * sizeof(msurface_t));
+       loadmodel->data_textures = Mem_AllocType(loadmodel->mempool, texture_t, loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t));
+       loadmodel->surfmesh.data_morphmd3vertex = Mem_AllocType(loadmodel->mempool, md3vertex_t, meshvertices * loadmodel->numframes * sizeof(md3vertex_t));
 
        meshvertices = 0;
        meshtriangles = 0;
@@ -1931,29 +1941,41 @@ void Mod_ZYMOTICMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        loadmodel->submodelsurfaces_end = loadmodel->num_surfaces;
        loadmodel->num_textures = loadmodel->num_surfaces * loadmodel->numskins;
        loadmodel->num_texturesperskin = loadmodel->num_surfaces;
-       data = (unsigned char *)Mem_Alloc(loadmodel->mempool, loadmodel->num_surfaces * sizeof(msurface_t) + loadmodel->num_surfaces * sizeof(int) + loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t) + meshtriangles * sizeof(int[3]) + (meshvertices <= 65536 ? meshtriangles * sizeof(unsigned short[3]) : 0) + meshvertices * (sizeof(float[14]) + sizeof(unsigned short) + sizeof(unsigned char[2][4])) + loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7]) + loadmodel->num_bones * sizeof(float[12]));
-       loadmodel->data_surfaces = (msurface_t *)data;data += loadmodel->num_surfaces * sizeof(msurface_t);
-       loadmodel->modelsurfaces_sorted = (int *)data;data += loadmodel->num_surfaces * sizeof(int);
-       loadmodel->data_textures = (texture_t *)data;data += loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t);
        loadmodel->surfmesh.num_vertices = meshvertices;
        loadmodel->surfmesh.num_triangles = meshtriangles;
-       loadmodel->surfmesh.data_element3i = (int *)data;data += meshtriangles * sizeof(int[3]);
-       loadmodel->surfmesh.data_vertex3f = (float *)data;data += meshvertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_svector3f = (float *)data;data += meshvertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_tvector3f = (float *)data;data += meshvertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_normal3f = (float *)data;data += meshvertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_texcoordtexture2f = (float *)data;data += meshvertices * sizeof(float[2]);
-       loadmodel->surfmesh.data_skeletalindex4ub = (unsigned char *)data;data += meshvertices * sizeof(unsigned char[4]);
-       loadmodel->surfmesh.data_skeletalweight4ub = (unsigned char *)data;data += meshvertices * sizeof(unsigned char[4]);
-       loadmodel->data_baseboneposeinverse = (float *)data;data += loadmodel->num_bones * sizeof(float[12]);
        loadmodel->surfmesh.num_blends = 0;
-       loadmodel->surfmesh.blends = (unsigned short *)data;data += meshvertices * sizeof(unsigned short);
+       loadmodel->surfmesh.data_blendweights = NULL;
+
+       // do most allocations as one merged chunk
+       // This is only robust for C standard types!
+       data = (unsigned char *)Mem_Alloc(loadmodel->mempool,
+               loadmodel->num_surfaces * sizeof(int)
+               + meshtriangles * sizeof(int[3])
+               + (meshvertices <= 65536 ? loadmodel->surfmesh.num_triangles * sizeof(unsigned short[3]) : 0)
+               + meshvertices * (sizeof(float[14]) + sizeof(unsigned short) + sizeof(unsigned char[2][4]))
+               + loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7])
+               + loadmodel->num_bones * sizeof(float[12]));
+       // Pointers must be taken in descending order of alignment requirement!
+       loadmodel->surfmesh.data_vertex3f          = (float *)data; data += meshvertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_svector3f         = (float *)data; data += meshvertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_tvector3f         = (float *)data; data += meshvertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_normal3f          = (float *)data; data += meshvertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_texcoordtexture2f = (float *)data; data += meshvertices * sizeof(float[2]);
+       loadmodel->data_baseboneposeinverse        = (float *)data; data += loadmodel->num_bones * sizeof(float[12]);
+       loadmodel->modelsurfaces_sorted              = (int *)data; data += loadmodel->num_surfaces * sizeof(int);
+       loadmodel->surfmesh.data_element3i           = (int *)data; data += meshtriangles * sizeof(int[3]);
+       loadmodel->surfmesh.blends        = (unsigned short *)data; data += meshvertices * sizeof(unsigned short);
        if (loadmodel->surfmesh.num_vertices <= 65536)
        {
                loadmodel->surfmesh.data_element3s = (unsigned short *)data;data += loadmodel->surfmesh.num_triangles * sizeof(unsigned short[3]);
        }
-       loadmodel->data_poses7s = (short *)data;data += loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7]);
-       loadmodel->surfmesh.data_blendweights = NULL;
+       loadmodel->data_poses7s                            = (short *)data; data += loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7]);
+       loadmodel->surfmesh.data_skeletalindex4ub  = (unsigned char *)data; data += meshvertices * sizeof(unsigned char[4]);
+       loadmodel->surfmesh.data_skeletalweight4ub = (unsigned char *)data; data += meshvertices * sizeof(unsigned char[4]);
+       // Struct alignment requirements could change so we can't assume them here
+       // otherwise a safe-looking commit could introduce undefined behaviour!
+       loadmodel->data_surfaces = Mem_AllocType(loadmodel->mempool, msurface_t, loadmodel->num_surfaces * sizeof(msurface_t));
+       loadmodel->data_textures = Mem_AllocType(loadmodel->mempool, texture_t, loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t));
 
        //zymlump_t lump_poses; // float pose[numposes][numbones][3][4]; // animation data
        poses = (float *) (pheader->lump_poses.start + pbase);
@@ -2245,33 +2267,44 @@ void Mod_DARKPLACESMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        loadmodel->submodelsurfaces_end = loadmodel->num_surfaces = pheader->num_meshs;
        loadmodel->num_textures = loadmodel->num_surfaces * loadmodel->numskins;
        loadmodel->num_texturesperskin = loadmodel->num_surfaces;
-       // do most allocations as one merged chunk
-       data = (unsigned char *)Mem_Alloc(loadmodel->mempool, loadmodel->num_surfaces * sizeof(msurface_t) + loadmodel->num_surfaces * sizeof(int) + loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t) + meshtriangles * sizeof(int[3]) + (meshvertices <= 65536 ? meshtriangles * sizeof(unsigned short[3]) : 0) + meshvertices * (sizeof(float[14]) + sizeof(unsigned short) + sizeof(unsigned char[2][4])) + loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7]) + loadmodel->num_bones * sizeof(float[12]) + loadmodel->numskins * sizeof(animscene_t) + loadmodel->num_bones * sizeof(aliasbone_t) + loadmodel->numframes * sizeof(animscene_t));
-       loadmodel->data_surfaces = (msurface_t *)data;data += loadmodel->num_surfaces * sizeof(msurface_t);
-       loadmodel->modelsurfaces_sorted = (int *)data;data += loadmodel->num_surfaces * sizeof(int);
-       loadmodel->data_textures = (texture_t *)data;data += loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t);
        loadmodel->surfmesh.num_vertices = meshvertices;
        loadmodel->surfmesh.num_triangles = meshtriangles;
-       loadmodel->surfmesh.data_element3i = (int *)data;data += meshtriangles * sizeof(int[3]);
-       loadmodel->surfmesh.data_vertex3f = (float *)data;data += meshvertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_svector3f = (float *)data;data += meshvertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_tvector3f = (float *)data;data += meshvertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_normal3f = (float *)data;data += meshvertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_texcoordtexture2f = (float *)data;data += meshvertices * sizeof(float[2]);
-       loadmodel->surfmesh.data_skeletalindex4ub = (unsigned char *)data;data += meshvertices * sizeof(unsigned char[4]);
-       loadmodel->surfmesh.data_skeletalweight4ub = (unsigned char *)data;data += meshvertices * sizeof(unsigned char[4]);
-       loadmodel->data_baseboneposeinverse = (float *)data;data += loadmodel->num_bones * sizeof(float[12]);
-       loadmodel->skinscenes = (animscene_t *)data;data += loadmodel->numskins * sizeof(animscene_t);
-       loadmodel->data_bones = (aliasbone_t *)data;data += loadmodel->num_bones * sizeof(aliasbone_t);
-       loadmodel->animscenes = (animscene_t *)data;data += loadmodel->numframes * sizeof(animscene_t);
        loadmodel->surfmesh.num_blends = 0;
-       loadmodel->surfmesh.blends = (unsigned short *)data;data += meshvertices * sizeof(unsigned short);
+
+       // do most allocations as one merged chunk
+       // This is only robust for C standard types!
+       data = (unsigned char *)Mem_Alloc(loadmodel->mempool,
+               loadmodel->num_surfaces * sizeof(int)
+               + meshtriangles * sizeof(int[3])
+               + (meshvertices <= 65536 ? meshtriangles * sizeof(unsigned short[3]) : 0)
+               + meshvertices * (sizeof(float[14]) + sizeof(unsigned short) + sizeof(unsigned char[2][4]))
+               + loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7])
+               + loadmodel->num_bones * sizeof(float[12]));
+       // Pointers must be taken in descending order of alignment requirement!
+       loadmodel->surfmesh.data_vertex3f                  = (float *)data; data += meshvertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_svector3f                 = (float *)data; data += meshvertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_tvector3f                 = (float *)data; data += meshvertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_normal3f                  = (float *)data; data += meshvertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_texcoordtexture2f         = (float *)data; data += meshvertices * sizeof(float[2]);
+       loadmodel->data_baseboneposeinverse                = (float *)data; data += loadmodel->num_bones * sizeof(float[12]);
+       loadmodel->modelsurfaces_sorted                      = (int *)data; data += loadmodel->num_surfaces * sizeof(int);
+       loadmodel->surfmesh.data_element3i                   = (int *)data; data += meshtriangles * sizeof(int[3]);
+       loadmodel->surfmesh.blends                = (unsigned short *)data; data += meshvertices * sizeof(unsigned short);
        if (meshvertices <= 65536)
        {
-               loadmodel->surfmesh.data_element3s = (unsigned short *)data;data += meshtriangles * sizeof(unsigned short[3]);
+               loadmodel->surfmesh.data_element3s = (unsigned short *)data; data += meshtriangles * sizeof(unsigned short[3]);
        }
-       loadmodel->data_poses7s = (short *)data;data += loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7]);
-       loadmodel->surfmesh.data_blendweights = (blendweights_t *)Mem_Alloc(loadmodel->mempool, meshvertices * sizeof(blendweights_t));
+       loadmodel->data_poses7s                            = (short *)data; data += loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7]);
+       loadmodel->surfmesh.data_skeletalindex4ub  = (unsigned char *)data; data += meshvertices * sizeof(unsigned char[4]);
+       loadmodel->surfmesh.data_skeletalweight4ub = (unsigned char *)data; data += meshvertices * sizeof(unsigned char[4]);
+       // Struct alignment requirements could change so we can't assume them here
+       // otherwise a safe-looking commit could introduce undefined behaviour!
+       loadmodel->data_surfaces = Mem_AllocType(loadmodel->mempool, msurface_t, loadmodel->num_surfaces * sizeof(msurface_t));
+       loadmodel->data_textures = Mem_AllocType(loadmodel->mempool, texture_t, loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t));
+       loadmodel->skinscenes = Mem_AllocType(loadmodel->mempool, animscene_t, loadmodel->numskins * sizeof(animscene_t));
+       loadmodel->data_bones = Mem_AllocType(loadmodel->mempool, aliasbone_t, loadmodel->num_bones * sizeof(aliasbone_t));
+       loadmodel->animscenes = Mem_AllocType(loadmodel->mempool, animscene_t, loadmodel->numframes * sizeof(animscene_t));
+       loadmodel->surfmesh.data_blendweights = Mem_AllocType(loadmodel->mempool, blendweights_t, meshvertices * sizeof(blendweights_t));
 
        for (i = 0;i < loadmodel->numskins;i++)
        {
@@ -2478,7 +2511,7 @@ void Mod_DARKPLACESMODEL_Load(model_t *mod, void *buffer, void *bufferend)
                Mod_ValidateElements(loadmodel->surfmesh.data_element3i + surface->num_firsttriangle * 3, loadmodel->surfmesh.data_element3s + surface->num_firsttriangle * 3, surface->num_triangles, surface->num_firstvertex, surface->num_vertices, __FILE__, __LINE__);
        }
        if (loadmodel->surfmesh.num_blends < meshvertices)
-               loadmodel->surfmesh.data_blendweights = (blendweights_t *)Mem_Realloc(loadmodel->mempool, loadmodel->surfmesh.data_blendweights, loadmodel->surfmesh.num_blends * sizeof(blendweights_t));
+               loadmodel->surfmesh.data_blendweights = Mem_ReallocType(loadmodel->mempool, loadmodel->surfmesh.data_blendweights, blendweights_t, loadmodel->surfmesh.num_blends * sizeof(blendweights_t));
        Z_Free(bonepose);
        Mod_FreeSkinFiles(skinfiles);
        Mod_MakeSortedSurfaces(loadmodel);
@@ -2523,7 +2556,6 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        pskchunk_t *pchunk;
        skinfile_t *skinfiles;
        char animname[MAX_QPATH];
-       size_t size;
        float biggestorigin;
 
        pchunk = (pskchunk_t *)buffer;
@@ -2547,7 +2579,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        loadmodel->synctype = ST_RAND;
 
        FS_StripExtension(loadmodel->name, animname, sizeof(animname));
-       strlcat(animname, ".psa", sizeof(animname));
+       dp_strlcat(animname, ".psa", sizeof(animname));
        animbuffer = animfilebuffer = FS_LoadFile(animname, loadmodel->mempool, false, &filesize);
        animbufferend = (void *)((unsigned char*)animbuffer + (int)filesize);
        if (!animbuffer)
@@ -2898,32 +2930,49 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        loadmodel->num_texturesperskin = loadmodel->num_surfaces;
        loadmodel->surfmesh.num_vertices = meshvertices;
        loadmodel->surfmesh.num_triangles = meshtriangles;
+
        // do most allocations as one merged chunk
-       size = loadmodel->num_surfaces * sizeof(msurface_t) + loadmodel->num_surfaces * sizeof(int) + loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t) + loadmodel->surfmesh.num_triangles * sizeof(int[3]) + loadmodel->surfmesh.num_vertices * sizeof(float[3]) + loadmodel->surfmesh.num_vertices * sizeof(float[3]) + loadmodel->surfmesh.num_vertices * sizeof(float[3]) + loadmodel->surfmesh.num_vertices * sizeof(float[3]) + loadmodel->surfmesh.num_vertices * sizeof(float[2]) + loadmodel->surfmesh.num_vertices * sizeof(unsigned char[4]) + loadmodel->surfmesh.num_vertices * sizeof(unsigned char[4]) + loadmodel->surfmesh.num_vertices * sizeof(unsigned short) + loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7]) + loadmodel->num_bones * sizeof(float[12]) + loadmodel->numskins * sizeof(animscene_t) + loadmodel->num_bones * sizeof(aliasbone_t) + loadmodel->numframes * sizeof(animscene_t) + ((loadmodel->surfmesh.num_vertices <= 65536) ? (loadmodel->surfmesh.num_triangles * sizeof(unsigned short[3])) : 0);
-       data = (unsigned char *)Mem_Alloc(loadmodel->mempool, size);
-       loadmodel->data_surfaces = (msurface_t *)data;data += loadmodel->num_surfaces * sizeof(msurface_t);
-       loadmodel->modelsurfaces_sorted = (int *)data;data += loadmodel->num_surfaces * sizeof(int);
-       loadmodel->data_textures = (texture_t *)data;data += loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t);
-       loadmodel->surfmesh.data_element3i = (int *)data;data += loadmodel->surfmesh.num_triangles * sizeof(int[3]);
-       loadmodel->surfmesh.data_vertex3f = (float *)data;data += loadmodel->surfmesh.num_vertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_svector3f = (float *)data;data += loadmodel->surfmesh.num_vertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_tvector3f = (float *)data;data += loadmodel->surfmesh.num_vertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_normal3f = (float *)data;data += loadmodel->surfmesh.num_vertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_texcoordtexture2f = (float *)data;data += loadmodel->surfmesh.num_vertices * sizeof(float[2]);
-       loadmodel->surfmesh.data_skeletalindex4ub = (unsigned char *)data;data += loadmodel->surfmesh.num_vertices * sizeof(unsigned char[4]);
-       loadmodel->surfmesh.data_skeletalweight4ub = (unsigned char *)data;data += loadmodel->surfmesh.num_vertices * sizeof(unsigned char[4]);
-       loadmodel->data_baseboneposeinverse = (float *)data;data += loadmodel->num_bones * sizeof(float[12]);
-       loadmodel->skinscenes = (animscene_t *)data;data += loadmodel->numskins * sizeof(animscene_t);
-       loadmodel->data_bones = (aliasbone_t *)data;data += loadmodel->num_bones * sizeof(aliasbone_t);
-       loadmodel->animscenes = (animscene_t *)data;data += loadmodel->numframes * sizeof(animscene_t);
+       // This is only robust for C standard types!
+       data = (unsigned char *)Mem_Alloc(loadmodel->mempool,
+               loadmodel->surfmesh.num_vertices * sizeof(float[3])
+               + loadmodel->surfmesh.num_vertices * sizeof(float[3])
+               + loadmodel->surfmesh.num_vertices * sizeof(float[3])
+               + loadmodel->surfmesh.num_vertices * sizeof(float[3])
+               + loadmodel->surfmesh.num_vertices * sizeof(float[2])
+               + loadmodel->num_bones * sizeof(float[12])
+               + loadmodel->num_surfaces * sizeof(int)
+               + loadmodel->surfmesh.num_triangles * sizeof(int[3])
+               + loadmodel->surfmesh.num_vertices * sizeof(unsigned short)
+               + ((loadmodel->surfmesh.num_vertices <= 65536) ? (loadmodel->surfmesh.num_triangles * sizeof(unsigned short[3])) : 0)
+               + loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7])
+               + loadmodel->surfmesh.num_vertices * sizeof(unsigned char[4])
+               + loadmodel->surfmesh.num_vertices * sizeof(unsigned char[4]));
+       // Pointers must be taken in descending order of alignment requirement!
+       loadmodel->surfmesh.data_vertex3f          = (float *)data; data += loadmodel->surfmesh.num_vertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_svector3f         = (float *)data; data += loadmodel->surfmesh.num_vertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_tvector3f         = (float *)data; data += loadmodel->surfmesh.num_vertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_normal3f          = (float *)data; data += loadmodel->surfmesh.num_vertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_texcoordtexture2f = (float *)data; data += loadmodel->surfmesh.num_vertices * sizeof(float[2]);
+       loadmodel->data_baseboneposeinverse        = (float *)data; data += loadmodel->num_bones * sizeof(float[12]);
+       loadmodel->modelsurfaces_sorted              = (int *)data; data += loadmodel->num_surfaces * sizeof(int);
+       loadmodel->surfmesh.data_element3i           = (int *)data; data += loadmodel->surfmesh.num_triangles * sizeof(int[3]);
        loadmodel->surfmesh.num_blends = 0;
-       loadmodel->surfmesh.blends = (unsigned short *)data;data += meshvertices * sizeof(unsigned short);
+       loadmodel->surfmesh.blends        = (unsigned short *)data; data += loadmodel->surfmesh.num_vertices * sizeof(unsigned short);
        if (loadmodel->surfmesh.num_vertices <= 65536)
        {
                loadmodel->surfmesh.data_element3s = (unsigned short *)data;data += loadmodel->surfmesh.num_triangles * sizeof(unsigned short[3]);
        }
-       loadmodel->data_poses7s = (short *)data;data += loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7]);
-       loadmodel->surfmesh.data_blendweights = (blendweights_t *)Mem_Alloc(loadmodel->mempool, loadmodel->surfmesh.num_vertices * sizeof(blendweights_t));
+       loadmodel->data_poses7s                            = (short *)data; data += loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7]);
+       loadmodel->surfmesh.data_skeletalindex4ub  = (unsigned char *)data; data += loadmodel->surfmesh.num_vertices * sizeof(unsigned char[4]);
+       loadmodel->surfmesh.data_skeletalweight4ub = (unsigned char *)data; data += loadmodel->surfmesh.num_vertices * sizeof(unsigned char[4]);
+       // Struct alignment requirements could change so we can't assume them here
+       // otherwise a safe-looking commit could introduce undefined behaviour!
+       loadmodel->data_surfaces = Mem_AllocType(loadmodel->mempool, msurface_t, loadmodel->num_surfaces * sizeof(msurface_t));
+       loadmodel->data_textures = Mem_AllocType(loadmodel->mempool, texture_t, loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t));
+       loadmodel->skinscenes = Mem_AllocType(loadmodel->mempool, animscene_t, loadmodel->numskins * sizeof(animscene_t));
+       loadmodel->data_bones = Mem_AllocType(loadmodel->mempool, aliasbone_t, loadmodel->num_bones * sizeof(aliasbone_t));
+       loadmodel->animscenes = Mem_AllocType(loadmodel->mempool, animscene_t, loadmodel->numframes * sizeof(animscene_t));
+       loadmodel->surfmesh.data_blendweights = Mem_AllocType(loadmodel->mempool, blendweights_t, loadmodel->surfmesh.num_vertices * sizeof(blendweights_t));
 
        for (i = 0;i < loadmodel->numskins;i++)
        {
@@ -2974,7 +3023,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        // copy over the bones
        for (index = 0;index < numbones;index++)
        {
-               strlcpy(loadmodel->data_bones[index].name, bones[index].name, sizeof(loadmodel->data_bones[index].name));
+               dp_strlcpy(loadmodel->data_bones[index].name, bones[index].name, sizeof(loadmodel->data_bones[index].name));
                loadmodel->data_bones[index].parent = (index || bones[index].parent > 0) ? bones[index].parent : -1;
                if (loadmodel->data_bones[index].parent >= index)
                        Host_Error("%s bone[%i].parent >= %i", loadmodel->name, index, index);
@@ -3047,7 +3096,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend)
                loadmodel->surfmesh.data_skeletalweight4ub[index*4+3] = (unsigned char)(weightinfluence[3]*255.0f);
        }
        if (loadmodel->surfmesh.num_blends < loadmodel->surfmesh.num_vertices)
-               loadmodel->surfmesh.data_blendweights = (blendweights_t *)Mem_Realloc(loadmodel->mempool, loadmodel->surfmesh.data_blendweights, loadmodel->surfmesh.num_blends * sizeof(blendweights_t));
+               loadmodel->surfmesh.data_blendweights = Mem_ReallocType(loadmodel->mempool, loadmodel->surfmesh.data_blendweights, blendweights_t, loadmodel->surfmesh.num_blends * sizeof(blendweights_t));
 
        // set up the animscenes based on the anims
        if (numanims)
@@ -3098,7 +3147,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        }
        else
        {
-               strlcpy(loadmodel->animscenes[0].name, "base", sizeof(loadmodel->animscenes[0].name));
+               dp_strlcpy(loadmodel->animscenes[0].name, "base", sizeof(loadmodel->animscenes[0].name));
                loadmodel->animscenes[0].firstframe = 0;
                loadmodel->animscenes[0].framecount = 1;
                loadmodel->animscenes[0].loop = true;
@@ -3174,7 +3223,7 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        const unsigned char *pbase, *pend;
        iqmheader_t header;
        skinfile_t *skinfiles;
-       int i, j, k, meshvertices, meshtriangles;
+       int i, j, k;
        float biggestorigin;
        const unsigned int *inelements;
        int *outelements;
@@ -3280,7 +3329,8 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend)
                return;
        }
 
-       // copy structs to make them aligned in memory (otherwise we crash on Sparc and PowerPC and others)
+       // Structs will be copied for alignment in memory, otherwise we crash on Sparc, PowerPC and others
+       // and get big spam from UBSan, because these offsets may not be aligned.
        if (header.num_vertexarrays)
                vas = (iqmvertexarray_t *)(pbase + header.ofs_vertexarrays);
        if (header.num_anims)
@@ -3294,11 +3344,13 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        {
                iqmvertexarray_t va;
                size_t vsize;
-               va.type = LittleLong(vas[i].type);
-               va.flags = LittleLong(vas[i].flags);
-               va.format = LittleLong(vas[i].format);
-               va.size = LittleLong(vas[i].size);
-               va.offset = LittleLong(vas[i].offset);
+
+               memcpy(&va, &vas[i], sizeof(iqmvertexarray_t));
+               va.type = LittleLong(va.type);
+               va.flags = LittleLong(va.flags);
+               va.format = LittleLong(va.format);
+               va.size = LittleLong(va.size);
+               va.offset = LittleLong(va.offset);
                vsize = header.num_vertexes*va.size;
                switch (va.format)
                { 
@@ -3375,48 +3427,53 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        loadmodel->submodelsurfaces_end = loadmodel->num_surfaces = header.num_meshes;
        loadmodel->num_textures = loadmodel->num_surfaces * loadmodel->numskins;
        loadmodel->num_texturesperskin = loadmodel->num_surfaces;
-
-       meshvertices = header.num_vertexes;
-       meshtriangles = header.num_triangles;
+       loadmodel->surfmesh.num_vertices = header.num_vertexes;
+       loadmodel->surfmesh.num_triangles = header.num_triangles;
 
        // do most allocations as one merged chunk
-       data = (unsigned char *)Mem_Alloc(loadmodel->mempool, loadmodel->num_surfaces * sizeof(msurface_t) + loadmodel->num_surfaces * sizeof(int) + loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t) + meshtriangles * sizeof(int[3]) + (meshvertices <= 65536 ? meshtriangles * sizeof(unsigned short[3]) : 0) + meshvertices * (sizeof(float[14]) + (vcolor4f || vcolor4ub ? sizeof(float[4]) : 0)) + (vblendindexes && vblendweights ? meshvertices * (sizeof(unsigned short) + sizeof(unsigned char[2][4])) : 0) + loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7]) + loadmodel->num_bones * sizeof(float[12]) + loadmodel->numskins * sizeof(animscene_t) + loadmodel->num_bones * sizeof(aliasbone_t) + loadmodel->numframes * sizeof(animscene_t));
-       loadmodel->data_surfaces = (msurface_t *)data;data += loadmodel->num_surfaces * sizeof(msurface_t);
-       loadmodel->modelsurfaces_sorted = (int *)data;data += loadmodel->num_surfaces * sizeof(int);
-       loadmodel->data_textures = (texture_t *)data;data += loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t);
-       loadmodel->surfmesh.num_vertices = meshvertices;
-       loadmodel->surfmesh.num_triangles = meshtriangles;
-       loadmodel->surfmesh.data_element3i = (int *)data;data += meshtriangles * sizeof(int[3]);
-       loadmodel->surfmesh.data_vertex3f = (float *)data;data += meshvertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_svector3f = (float *)data;data += meshvertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_tvector3f = (float *)data;data += meshvertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_normal3f = (float *)data;data += meshvertices * sizeof(float[3]);
-       loadmodel->surfmesh.data_texcoordtexture2f = (float *)data;data += meshvertices * sizeof(float[2]);
+       // This is only robust for C standard types!
+       data = (unsigned char *)Mem_Alloc(loadmodel->mempool,
+               loadmodel->surfmesh.num_vertices * (sizeof(float[14]) + (vcolor4f || vcolor4ub ? sizeof(float[4]) : 0))
+               + loadmodel->num_bones * sizeof(float[12])
+               + loadmodel->num_surfaces * sizeof(int)
+               + loadmodel->surfmesh.num_triangles * sizeof(int[3])
+               + (loadmodel->surfmesh.num_vertices <= 65536 ? loadmodel->surfmesh.num_triangles * sizeof(unsigned short[3]) : 0)
+               + loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7])
+               + (vblendindexes && vblendweights ? loadmodel->surfmesh.num_vertices * (sizeof(unsigned short) + sizeof(unsigned char[2][4])) : 0));
+       // Pointers must be taken in descending order of alignment requirement!
+       loadmodel->surfmesh.data_vertex3f          = (float *)data; data += loadmodel->surfmesh.num_vertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_svector3f         = (float *)data; data += loadmodel->surfmesh.num_vertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_tvector3f         = (float *)data; data += loadmodel->surfmesh.num_vertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_normal3f          = (float *)data; data += loadmodel->surfmesh.num_vertices * sizeof(float[3]);
+       loadmodel->surfmesh.data_texcoordtexture2f = (float *)data; data += loadmodel->surfmesh.num_vertices * sizeof(float[2]);
        if (vcolor4f || vcolor4ub)
        {
-               loadmodel->surfmesh.data_lightmapcolor4f = (float *)data;data += meshvertices * sizeof(float[4]);
+               loadmodel->surfmesh.data_lightmapcolor4f = (float *)data; data += loadmodel->surfmesh.num_vertices * sizeof(float[4]);
        }
-       if (vblendindexes && vblendweights)
+       loadmodel->data_baseboneposeinverse = (float *)data; data += loadmodel->num_bones * sizeof(float[12]);
+       loadmodel->modelsurfaces_sorted       = (int *)data; data += loadmodel->num_surfaces * sizeof(int);
+       loadmodel->surfmesh.data_element3i    = (int *)data; data += loadmodel->surfmesh.num_triangles * sizeof(int[3]);
+       loadmodel->data_poses7s             = (short *)data; data += loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7]);
+       if (loadmodel->surfmesh.num_vertices <= 65536)
        {
-               loadmodel->surfmesh.data_skeletalindex4ub = (unsigned char *)data;data += meshvertices * sizeof(unsigned char[4]);
-               loadmodel->surfmesh.data_skeletalweight4ub = (unsigned char *)data;data += meshvertices * sizeof(unsigned char[4]);
+               loadmodel->surfmesh.data_element3s = (unsigned short *)data; data += loadmodel->surfmesh.num_triangles * sizeof(unsigned short[3]);
        }
-       loadmodel->data_baseboneposeinverse = (float *)data;data += loadmodel->num_bones * sizeof(float[12]);
-       loadmodel->skinscenes = (animscene_t *)data;data += loadmodel->numskins * sizeof(animscene_t);
-       loadmodel->data_bones = (aliasbone_t *)data;data += loadmodel->num_bones * sizeof(aliasbone_t);
-       loadmodel->animscenes = (animscene_t *)data;data += loadmodel->numframes * sizeof(animscene_t);
        if (vblendindexes && vblendweights)
        {
                loadmodel->surfmesh.num_blends = 0;
-               loadmodel->surfmesh.blends = (unsigned short *)data;data += meshvertices * sizeof(unsigned short);
-       }
-       if (meshvertices <= 65536)
-       {
-               loadmodel->surfmesh.data_element3s = (unsigned short *)data;data += meshtriangles * sizeof(unsigned short[3]);
-       }
-       loadmodel->data_poses7s = (short *)data;data += loadmodel->num_poses * loadmodel->num_bones * sizeof(short[7]);
+               loadmodel->surfmesh.blends                = (unsigned short *)data; data += loadmodel->surfmesh.num_vertices * sizeof(unsigned short);
+               loadmodel->surfmesh.data_skeletalindex4ub  = (unsigned char *)data; data += loadmodel->surfmesh.num_vertices * sizeof(unsigned char[4]);
+               loadmodel->surfmesh.data_skeletalweight4ub = (unsigned char *)data; data += loadmodel->surfmesh.num_vertices * sizeof(unsigned char[4]);
+       }
+       // Struct alignment requirements could change so we can't assume them here
+       // otherwise a safe-looking commit could introduce undefined behaviour!
+       loadmodel->data_surfaces = Mem_AllocType(loadmodel->mempool, msurface_t, loadmodel->num_surfaces * sizeof(msurface_t));
+       loadmodel->data_textures = Mem_AllocType(loadmodel->mempool, texture_t, loadmodel->num_surfaces * loadmodel->numskins * sizeof(texture_t));
+       loadmodel->skinscenes = Mem_AllocType(loadmodel->mempool, animscene_t, loadmodel->numskins * sizeof(animscene_t));
+       loadmodel->data_bones = Mem_AllocType(loadmodel->mempool, aliasbone_t, loadmodel->num_bones * sizeof(aliasbone_t));
+       loadmodel->animscenes = Mem_AllocType(loadmodel->mempool, animscene_t, loadmodel->numframes * sizeof(animscene_t));
        if (vblendindexes && vblendweights)
-               loadmodel->surfmesh.data_blendweights = (blendweights_t *)Mem_Alloc(loadmodel->mempool, meshvertices * sizeof(blendweights_t));
+               loadmodel->surfmesh.data_blendweights = Mem_AllocType(loadmodel->mempool, blendweights_t, loadmodel->surfmesh.num_vertices * sizeof(blendweights_t));
 
        for (i = 0;i < loadmodel->numskins;i++)
        {
@@ -3429,21 +3486,25 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        // load the bone info
        if (header.version == 1)
        {
-               iqmjoint1_t *injoint1 = (iqmjoint1_t *)(pbase + header.ofs_joints);
+               iqmjoint1_t *injoints1 = (iqmjoint1_t *)(pbase + header.ofs_joints);
+
                if (loadmodel->num_bones)
                        joint1 = (iqmjoint1_t *)Mem_Alloc(loadmodel->mempool, loadmodel->num_bones * sizeof(iqmjoint1_t));
                for (i = 0;i < loadmodel->num_bones;i++)
                {
                        matrix4x4_t relbase, relinvbase, pinvbase, invbase;
-                       joint1[i].name = LittleLong(injoint1[i].name);
-                       joint1[i].parent = LittleLong(injoint1[i].parent);
+                       iqmjoint1_t injoint1;
+
+                       memcpy(&injoint1, &injoints1[i], sizeof(iqmjoint1_t));
+                       joint1[i].name = LittleLong(injoint1.name);
+                       joint1[i].parent = LittleLong(injoint1.parent);
                        for (j = 0;j < 3;j++)
                        {
-                               joint1[i].origin[j] = LittleFloat(injoint1[i].origin[j]);
-                               joint1[i].rotation[j] = LittleFloat(injoint1[i].rotation[j]);
-                               joint1[i].scale[j] = LittleFloat(injoint1[i].scale[j]);
+                               joint1[i].origin[j] = LittleFloat(injoint1.origin[j]);
+                               joint1[i].rotation[j] = LittleFloat(injoint1.rotation[j]);
+                               joint1[i].scale[j] = LittleFloat(injoint1.scale[j]);
                        }
-                       strlcpy(loadmodel->data_bones[i].name, &text[joint1[i].name], sizeof(loadmodel->data_bones[i].name));
+                       dp_strlcpy(loadmodel->data_bones[i].name, &text[joint1[i].name], sizeof(loadmodel->data_bones[i].name));
                        loadmodel->data_bones[i].parent = joint1[i].parent;
                        if (loadmodel->data_bones[i].parent >= i)
                                Host_Error("%s bone[%i].parent >= %i", loadmodel->name, i, i);
@@ -3460,22 +3521,26 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        }
        else
        {
-               iqmjoint_t *injoint = (iqmjoint_t *)(pbase + header.ofs_joints);
+               iqmjoint_t *injoints = (iqmjoint_t *)(pbase + header.ofs_joints);
+
                if (header.num_joints)
                        joint = (iqmjoint_t *)Mem_Alloc(loadmodel->mempool, loadmodel->num_bones * sizeof(iqmjoint_t));
                for (i = 0;i < loadmodel->num_bones;i++)
                {
                        matrix4x4_t relbase, relinvbase, pinvbase, invbase;
-                       joint[i].name = LittleLong(injoint[i].name);
-                       joint[i].parent = LittleLong(injoint[i].parent);
+                       iqmjoint_t injoint;
+
+                       memcpy(&injoint, &injoints[i], sizeof(iqmjoint_t));
+                       joint[i].name = LittleLong(injoint.name);
+                       joint[i].parent = LittleLong(injoint.parent);
                        for (j = 0;j < 3;j++)
                        {
-                               joint[i].origin[j] = LittleFloat(injoint[i].origin[j]);
-                               joint[i].rotation[j] = LittleFloat(injoint[i].rotation[j]);
-                               joint[i].scale[j] = LittleFloat(injoint[i].scale[j]);
+                               joint[i].origin[j] = LittleFloat(injoint.origin[j]);
+                               joint[i].rotation[j] = LittleFloat(injoint.rotation[j]);
+                               joint[i].scale[j] = LittleFloat(injoint.scale[j]);
                        }
-                       joint[i].rotation[3] = LittleFloat(injoint[i].rotation[3]);
-                       strlcpy(loadmodel->data_bones[i].name, &text[joint[i].name], sizeof(loadmodel->data_bones[i].name));
+                       joint[i].rotation[3] = LittleFloat(injoint.rotation[3]);
+                       dp_strlcpy(loadmodel->data_bones[i].name, &text[joint[i].name], sizeof(loadmodel->data_bones[i].name));
                        loadmodel->data_bones[i].parent = joint[i].parent;
                        if (loadmodel->data_bones[i].parent >= i)
                                Host_Error("%s bone[%i].parent >= %i", loadmodel->name, i, i);
@@ -3498,12 +3563,14 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        for (i = 0;i < (int)header.num_anims;i++)
        {
                iqmanim_t anim;
-               anim.name = LittleLong(anims[i].name);
-               anim.first_frame = LittleLong(anims[i].first_frame);
-               anim.num_frames = LittleLong(anims[i].num_frames);
-               anim.framerate = LittleFloat(anims[i].framerate);
-               anim.flags = LittleLong(anims[i].flags);
-               strlcpy(loadmodel->animscenes[i].name, &text[anim.name], sizeof(loadmodel->animscenes[i].name));
+
+               memcpy(&anim, &anims[i], sizeof(iqmanim_t));
+               anim.name = LittleLong(anim.name);
+               anim.first_frame = LittleLong(anim.first_frame);
+               anim.num_frames = LittleLong(anim.num_frames);
+               anim.framerate = LittleFloat(anim.framerate);
+               anim.flags = LittleLong(anim.flags);
+               dp_strlcpy(loadmodel->animscenes[i].name, &text[anim.name], sizeof(loadmodel->animscenes[i].name));
                loadmodel->animscenes[i].firstframe = anim.first_frame;
                loadmodel->animscenes[i].framecount = anim.num_frames;
                loadmodel->animscenes[i].loop = ((anim.flags & IQM_LOOP) != 0);
@@ -3511,7 +3578,7 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        }
        if (header.num_anims <= 0)
        {
-               strlcpy(loadmodel->animscenes[0].name, "static", sizeof(loadmodel->animscenes[0].name));
+               dp_strlcpy(loadmodel->animscenes[0].name, "static", sizeof(loadmodel->animscenes[0].name));
                loadmodel->animscenes[0].firstframe = 0;
                loadmodel->animscenes[0].framecount = 1;
                loadmodel->animscenes[0].loop = true;
@@ -3525,18 +3592,22 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        biggestorigin = 0;
        if (header.version == 1)
        {
-               iqmpose1_t *inpose1 = (iqmpose1_t *)(pbase + header.ofs_poses);
+               iqmpose1_t *inposes1 = (iqmpose1_t *)(pbase + header.ofs_poses);
+
                if (header.num_poses)
                        pose1 = (iqmpose1_t *)Mem_Alloc(loadmodel->mempool, header.num_poses * sizeof(iqmpose1_t));
                for (i = 0;i < (int)header.num_poses;i++)
                {
                        float f;
-                       pose1[i].parent = LittleLong(inpose1[i].parent);
-                       pose1[i].channelmask = LittleLong(inpose1[i].channelmask);
+                       iqmpose1_t inpose;
+
+                       memcpy(&inpose, &inposes1[i], sizeof(iqmpose1_t));
+                       pose1[i].parent = LittleLong(inpose.parent);
+                       pose1[i].channelmask = LittleLong(inpose.channelmask);
                        for (j = 0;j < 9;j++)
                        {
-                               pose1[i].channeloffset[j] = LittleFloat(inpose1[i].channeloffset[j]);
-                               pose1[i].channelscale[j] = LittleFloat(inpose1[i].channelscale[j]);
+                               pose1[i].channeloffset[j] = LittleFloat(inpose.channeloffset[j]);
+                               pose1[i].channelscale[j] = LittleFloat(inpose.channelscale[j]);
                        }
                        f = fabs(pose1[i].channeloffset[0]); biggestorigin = max(biggestorigin, f);
                        f = fabs(pose1[i].channeloffset[1]); biggestorigin = max(biggestorigin, f);
@@ -3558,18 +3629,22 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend)
        }
        else
        {
-               iqmpose_t *inpose = (iqmpose_t *)(pbase + header.ofs_poses);
+               iqmpose_t *inposes = (iqmpose_t *)(pbase + header.ofs_poses);
+
                if (header.num_poses)
                        pose = (iqmpose_t *)Mem_Alloc(loadmodel->mempool, header.num_poses * sizeof(iqmpose_t));
                for (i = 0;i < (int)header.num_poses;i++)
                {
                        float f;
-                       pose[i].parent = LittleLong(inpose[i].parent);
-                       pose[i].channelmask = LittleLong(inpose[i].channelmask);
+                       iqmpose_t inpose;
+
+                       memcpy(&inpose, &inposes[i], sizeof(iqmpose_t));
+                       pose[i].parent = LittleLong(inpose.parent);
+                       pose[i].channelmask = LittleLong(inpose.channelmask);
                        for (j = 0;j < 10;j++)
                        {
-                               pose[i].channeloffset[j] = LittleFloat(inpose[i].channeloffset[j]);
-                               pose[i].channelscale[j] = LittleFloat(inpose[i].channelscale[j]);
+                               pose[i].channeloffset[j] = LittleFloat(inpose.channeloffset[j]);
+                               pose[i].channelscale[j] = LittleFloat(inpose.channelscale[j]);
                        }
                        f = fabs(pose[i].channeloffset[0]); biggestorigin = max(biggestorigin, f);
                        f = fabs(pose[i].channeloffset[1]); biggestorigin = max(biggestorigin, f);
@@ -3858,12 +3933,13 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend)
                iqmmesh_t mesh;
                msurface_t *surface;
 
-               mesh.name = LittleLong(meshes[i].name);
-               mesh.material = LittleLong(meshes[i].material);
-               mesh.first_vertex = LittleLong(meshes[i].first_vertex);
-               mesh.num_vertexes = LittleLong(meshes[i].num_vertexes);
-               mesh.first_triangle = LittleLong(meshes[i].first_triangle);
-               mesh.num_triangles = LittleLong(meshes[i].num_triangles);
+               memcpy(&mesh, &meshes[i], sizeof(iqmmesh_t));
+               mesh.name = LittleLong(mesh.name);
+               mesh.material = LittleLong(mesh.material);
+               mesh.first_vertex = LittleLong(mesh.first_vertex);
+               mesh.num_vertexes = LittleLong(mesh.num_vertexes);
+               mesh.first_triangle = LittleLong(mesh.first_triangle);
+               mesh.num_triangles = LittleLong(mesh.num_triangles);
 
                loadmodel->modelsurfaces_sorted[i] = i;
                surface = loadmodel->data_surfaces + i;
index 9b97b8014f1c937cb9367fb035c012a8c222835b..3357d0dfe6968920bd025a6d2afc7f1e7c76f380 100644 (file)
@@ -26,28 +26,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "wad.h"
 
 
+cvar_t r_trippy = {CF_CLIENT, "r_trippy", "0", "easter egg"};
 //cvar_t r_subdivide_size = {CF_CLIENT | CF_ARCHIVE, "r_subdivide_size", "128", "how large water polygons should be (smaller values produce more polygons which give better warping effects)"};
-cvar_t mod_bsp_portalize = {CF_CLIENT | CF_SERVER, "mod_bsp_portalize", "1", "enables portal generation from BSP tree (may take several seconds per map), used by r_drawportals, r_useportalculling, r_shadow_realtime_world_compileportalculling, sv_cullentities_portal"};
 cvar_t r_novis = {CF_CLIENT, "r_novis", "0", "draws whole level, see also sv_cullentities_pvs 0"};
 cvar_t r_nosurftextures = {CF_CLIENT, "r_nosurftextures", "0", "pretends there was no texture lump found in the q1bsp/hlbsp loading (useful for debugging this rare case)"};
+
 cvar_t r_subdivisions_tolerance = {CF_CLIENT, "r_subdivisions_tolerance", "4", "maximum error tolerance on curve subdivision for rendering purposes (in other words, the curves will be given as many polygons as necessary to represent curves at this quality)"};
 cvar_t r_subdivisions_mintess = {CF_CLIENT, "r_subdivisions_mintess", "0", "minimum number of subdivisions (values above 0 will smooth curves that don't need it)"};
 cvar_t r_subdivisions_maxtess = {CF_CLIENT, "r_subdivisions_maxtess", "1024", "maximum number of subdivisions (prevents curves beyond a certain detail level, limits smoothing)"};
 cvar_t r_subdivisions_maxvertices = {CF_CLIENT, "r_subdivisions_maxvertices", "65536", "maximum vertices allowed per subdivided curve"};
-cvar_t r_subdivisions_collision_tolerance = {CF_CLIENT, "r_subdivisions_collision_tolerance", "15", "maximum error tolerance on curve subdivision for collision purposes (usually a larger error tolerance than for rendering)"};
-cvar_t r_subdivisions_collision_mintess = {CF_CLIENT, "r_subdivisions_collision_mintess", "0", "minimum number of subdivisions (values above 0 will smooth curves that don't need it)"};
-cvar_t r_subdivisions_collision_maxtess = {CF_CLIENT, "r_subdivisions_collision_maxtess", "1024", "maximum number of subdivisions (prevents curves beyond a certain detail level, limits smoothing)"};
-cvar_t r_subdivisions_collision_maxvertices = {CF_CLIENT, "r_subdivisions_collision_maxvertices", "4225", "maximum vertices allowed per subdivided curve"};
-cvar_t r_trippy = {CF_CLIENT, "r_trippy", "0", "easter egg"};
-cvar_t r_fxaa = {CF_CLIENT | CF_ARCHIVE, "r_fxaa", "0", "fast approximate anti aliasing"};
-cvar_t mod_noshader_default_offsetmapping = {CF_CLIENT | CF_ARCHIVE, "mod_noshader_default_offsetmapping", "1", "use offsetmapping by default on all surfaces that are not using q3 shader files"};
-cvar_t mod_obj_orientation = {CF_CLIENT | CF_SERVER, "mod_obj_orientation", "1", "fix orientation of OBJ models to the usual conventions (if zero, use coordinates as is)"};
-cvar_t mod_q2bsp_littransparentsurfaces = {CF_CLIENT, "mod_q2bsp_littransparentsurfaces", "0", "allows lighting on rain in 3v3gloom3 and other cases of transparent surfaces that have lightmaps that were ignored by quake2"};
+cvar_t mod_q3bsp_curves_subdivisions_tolerance = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_subdivisions_tolerance", "15", "maximum error tolerance on curve subdivision for collision purposes (usually a larger error tolerance than for rendering)"};
+cvar_t mod_q3bsp_curves_subdivisions_mintess = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_subdivisions_mintess", "0", "minimum number of subdivisions for collision purposes (values above 0 will smooth curves that don't need it)"};
+cvar_t mod_q3bsp_curves_subdivisions_maxtess = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_subdivisions_maxtess", "1024", "maximum number of subdivisions for collision purposes (prevents curves beyond a certain detail level, limits smoothing)"};
+cvar_t mod_q3bsp_curves_subdivisions_maxvertices = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_subdivisions_maxvertices", "4225", "maximum vertices allowed per subdivided curve for collision purposes"};
 cvar_t mod_q3bsp_curves_collisions = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_collisions", "1", "enables collisions with curves (SLOW)"};
-cvar_t mod_q3bsp_curves_collisions_stride = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_collisions_stride", "16", "collisions against curves: optimize performance by doing a combined collision check for this triangle amount first (-1 avoids any box tests)"};
-cvar_t mod_q3bsp_curves_stride = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_stride", "16", "particle effect collisions against curves: optimize performance by doing a combined collision check for this triangle amount first (-1 avoids any box tests)"};
 cvar_t mod_q3bsp_optimizedtraceline = {CF_CLIENT | CF_SERVER, "mod_q3bsp_optimizedtraceline", "1", "whether to use optimized traceline code for line traces (as opposed to tracebox code)"};
-cvar_t mod_q3bsp_debugtracebrush = {CF_CLIENT | CF_SERVER, "mod_q3bsp_debugtracebrush", "0", "selects different tracebrush bsp recursion algorithms (for debugging purposes only)"};
 cvar_t mod_q3bsp_lightmapmergepower = {CF_CLIENT | CF_ARCHIVE, "mod_q3bsp_lightmapmergepower", "4", "merges the quake3 128x128 lightmap textures into larger lightmap group textures to speed up rendering, 1 = 256x256, 2 = 512x512, 3 = 1024x1024, 4 = 2048x2048, 5 = 4096x4096, ..."};
 cvar_t mod_q3bsp_nolightmaps = {CF_CLIENT | CF_ARCHIVE, "mod_q3bsp_nolightmaps", "0", "do not load lightmaps in Q3BSP maps (to save video RAM, but be warned: it looks ugly)"};
 cvar_t mod_q3bsp_tracelineofsight_brushes = {CF_CLIENT | CF_SERVER, "mod_q3bsp_tracelineofsight_brushes", "0", "enables culling of entities behind detail brushes, curves, etc"};
@@ -55,6 +48,7 @@ cvar_t mod_q3bsp_sRGBlightmaps = {CF_CLIENT, "mod_q3bsp_sRGBlightmaps", "0", "tr
 cvar_t mod_q3bsp_lightgrid_texture = {CF_CLIENT, "mod_q3bsp_lightgrid_texture", "1", "directly apply the lightgrid as a global texture rather than only reading it at the entity origin"};
 cvar_t mod_q3bsp_lightgrid_world_surfaces = {CF_CLIENT, "mod_q3bsp_lightgrid_world_surfaces", "0", "apply lightgrid lighting to the world bsp geometry rather than using lightmaps (experimental/debug tool)"};
 cvar_t mod_q3bsp_lightgrid_bsp_surfaces = {CF_CLIENT, "mod_q3bsp_lightgrid_bsp_surfaces", "0", "apply lightgrid lighting to bsp models other than the world rather than using their lightmaps (experimental/debug tool)"};
+cvar_t mod_noshader_default_offsetmapping = {CF_CLIENT | CF_ARCHIVE, "mod_noshader_default_offsetmapping", "1", "use offsetmapping by default on all surfaces that are not using q3 shader files"};
 cvar_t mod_q3shader_default_offsetmapping = {CF_CLIENT | CF_ARCHIVE, "mod_q3shader_default_offsetmapping", "1", "use offsetmapping by default on all surfaces that are using q3 shader files"};
 cvar_t mod_q3shader_default_offsetmapping_scale = {CF_CLIENT | CF_ARCHIVE, "mod_q3shader_default_offsetmapping_scale", "1", "default scale used for offsetmapping"};
 cvar_t mod_q3shader_default_offsetmapping_bias = {CF_CLIENT | CF_ARCHIVE, "mod_q3shader_default_offsetmapping_bias", "0", "default bias used for offsetmapping"};
@@ -64,9 +58,16 @@ cvar_t mod_q3shader_default_refractive_index = {CF_CLIENT, "mod_q3shader_default
 cvar_t mod_q3shader_force_addalpha = {CF_CLIENT, "mod_q3shader_force_addalpha", "0", "treat GL_ONE GL_ONE (or add) blendfunc as GL_SRC_ALPHA GL_ONE for compatibility with older DarkPlaces releases"};
 cvar_t mod_q3shader_force_terrain_alphaflag = {CF_CLIENT, "mod_q3shader_force_terrain_alphaflag", "0", "for multilayered terrain shaders force TEXF_ALPHA flag on both layers"};
 
+cvar_t mod_q2bsp_littransparentsurfaces = {CF_CLIENT, "mod_q2bsp_littransparentsurfaces", "0", "allows lighting on rain in 3v3gloom3 and other cases of transparent surfaces that have lightmaps that were ignored by quake2"};
+
 cvar_t mod_q1bsp_polygoncollisions = {CF_CLIENT | CF_SERVER, "mod_q1bsp_polygoncollisions", "0", "disables use of precomputed cliphulls and instead collides with polygons (uses Bounding Interval Hierarchy optimizations)"};
+cvar_t mod_q1bsp_zero_hullsize_cutoff = {CF_CLIENT | CF_SERVER, "mod_q1bsp_zero_hullsize_cutoff", "3", "bboxes with an X dimension smaller than this will use the smallest cliphull (0x0x0) instead of being rounded up to the player cliphull (32x32x56) in Q1BSP, or crouching player (32x32x36) in HLBSP"};
+
+cvar_t mod_bsp_portalize = {CF_CLIENT, "mod_bsp_portalize", "1", "enables portal generation from BSP tree (may take several seconds per map), used by r_drawportals, r_useportalculling, r_shadow_realtime_dlight_portalculling, r_shadow_realtime_world_compileportalculling"};
 cvar_t mod_recalculatenodeboxes = {CF_CLIENT | CF_SERVER, "mod_recalculatenodeboxes", "1", "enables use of generated node bounding boxes based on BSP tree portal reconstruction, rather than the node boxes supplied by the map compiler"};
 
+cvar_t mod_obj_orientation = {CF_CLIENT | CF_SERVER, "mod_obj_orientation", "1", "fix orientation of OBJ models to the usual conventions (if zero, use coordinates as is)"};
+
 static texture_t mod_q1bsp_texture_solid;
 static texture_t mod_q1bsp_texture_sky;
 static texture_t mod_q1bsp_texture_lava;
@@ -85,20 +86,16 @@ void Mod_BrushInit(void)
        Cvar_RegisterVariable(&r_subdivisions_mintess);
        Cvar_RegisterVariable(&r_subdivisions_maxtess);
        Cvar_RegisterVariable(&r_subdivisions_maxvertices);
-       Cvar_RegisterVariable(&r_subdivisions_collision_tolerance);
-       Cvar_RegisterVariable(&r_subdivisions_collision_mintess);
-       Cvar_RegisterVariable(&r_subdivisions_collision_maxtess);
-       Cvar_RegisterVariable(&r_subdivisions_collision_maxvertices);
+       Cvar_RegisterVariable(&mod_q3bsp_curves_subdivisions_tolerance);
+       Cvar_RegisterVariable(&mod_q3bsp_curves_subdivisions_mintess);
+       Cvar_RegisterVariable(&mod_q3bsp_curves_subdivisions_maxtess);
+       Cvar_RegisterVariable(&mod_q3bsp_curves_subdivisions_maxvertices);
        Cvar_RegisterVariable(&r_trippy);
-       Cvar_RegisterVariable(&r_fxaa);
        Cvar_RegisterVariable(&mod_noshader_default_offsetmapping);
        Cvar_RegisterVariable(&mod_obj_orientation);
        Cvar_RegisterVariable(&mod_q2bsp_littransparentsurfaces);
        Cvar_RegisterVariable(&mod_q3bsp_curves_collisions);
-       Cvar_RegisterVariable(&mod_q3bsp_curves_collisions_stride);
-       Cvar_RegisterVariable(&mod_q3bsp_curves_stride);
        Cvar_RegisterVariable(&mod_q3bsp_optimizedtraceline);
-       Cvar_RegisterVariable(&mod_q3bsp_debugtracebrush);
        Cvar_RegisterVariable(&mod_q3bsp_lightmapmergepower);
        Cvar_RegisterVariable(&mod_q3bsp_nolightmaps);
        Cvar_RegisterVariable(&mod_q3bsp_sRGBlightmaps);
@@ -115,6 +112,7 @@ void Mod_BrushInit(void)
        Cvar_RegisterVariable(&mod_q3shader_force_addalpha);
        Cvar_RegisterVariable(&mod_q3shader_force_terrain_alphaflag);
        Cvar_RegisterVariable(&mod_q1bsp_polygoncollisions);
+       Cvar_RegisterVariable(&mod_q1bsp_zero_hullsize_cutoff);
        Cvar_RegisterVariable(&mod_recalculatenodeboxes);
 
        // these games were made for older DP engines and are no longer
@@ -123,27 +121,27 @@ void Mod_BrushInit(void)
                Cvar_SetQuick(&mod_q3shader_force_addalpha, "1");
 
        memset(&mod_q1bsp_texture_solid, 0, sizeof(mod_q1bsp_texture_solid));
-       strlcpy(mod_q1bsp_texture_solid.name, "solid" , sizeof(mod_q1bsp_texture_solid.name));
+       dp_strlcpy(mod_q1bsp_texture_solid.name, "solid" , sizeof(mod_q1bsp_texture_solid.name));
        mod_q1bsp_texture_solid.surfaceflags = 0;
        mod_q1bsp_texture_solid.supercontents = SUPERCONTENTS_SOLID;
 
        mod_q1bsp_texture_sky = mod_q1bsp_texture_solid;
-       strlcpy(mod_q1bsp_texture_sky.name, "sky", sizeof(mod_q1bsp_texture_sky.name));
+       dp_strlcpy(mod_q1bsp_texture_sky.name, "sky", sizeof(mod_q1bsp_texture_sky.name));
        mod_q1bsp_texture_sky.surfaceflags = Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT | Q3SURFACEFLAG_NOMARKS | Q3SURFACEFLAG_NODLIGHT | Q3SURFACEFLAG_NOLIGHTMAP;
        mod_q1bsp_texture_sky.supercontents = SUPERCONTENTS_SKY | SUPERCONTENTS_NODROP;
 
        mod_q1bsp_texture_lava = mod_q1bsp_texture_solid;
-       strlcpy(mod_q1bsp_texture_lava.name, "*lava", sizeof(mod_q1bsp_texture_lava.name));
+       dp_strlcpy(mod_q1bsp_texture_lava.name, "*lava", sizeof(mod_q1bsp_texture_lava.name));
        mod_q1bsp_texture_lava.surfaceflags = Q3SURFACEFLAG_NOMARKS;
        mod_q1bsp_texture_lava.supercontents = SUPERCONTENTS_LAVA | SUPERCONTENTS_NODROP;
 
        mod_q1bsp_texture_slime = mod_q1bsp_texture_solid;
-       strlcpy(mod_q1bsp_texture_slime.name, "*slime", sizeof(mod_q1bsp_texture_slime.name));
+       dp_strlcpy(mod_q1bsp_texture_slime.name, "*slime", sizeof(mod_q1bsp_texture_slime.name));
        mod_q1bsp_texture_slime.surfaceflags = Q3SURFACEFLAG_NOMARKS;
        mod_q1bsp_texture_slime.supercontents = SUPERCONTENTS_SLIME;
 
        mod_q1bsp_texture_water = mod_q1bsp_texture_solid;
-       strlcpy(mod_q1bsp_texture_water.name, "*water", sizeof(mod_q1bsp_texture_water.name));
+       dp_strlcpy(mod_q1bsp_texture_water.name, "*water", sizeof(mod_q1bsp_texture_water.name));
        mod_q1bsp_texture_water.surfaceflags = Q3SURFACEFLAG_NOMARKS;
        mod_q1bsp_texture_water.supercontents = SUPERCONTENTS_WATER;
 }
@@ -762,7 +760,7 @@ static int Mod_Q1BSP_RecursiveHullCheck(RecursiveHullCheckTraceInfo_t *t, int nu
                        // recurse both sides, front side first
                        ret = Mod_Q1BSP_RecursiveHullCheck(t, node->children[p1side], p1f, midf, p1, mid);
                        // if this side is not empty, return what it is (solid or done)
-                       if (ret != HULLCHECKSTATE_EMPTY)
+                       if (ret != HULLCHECKSTATE_EMPTY && !t->trace->allsolid)
                                return ret;
 
                        ret = Mod_Q1BSP_RecursiveHullCheck(t, node->children[p2side], midf, p2f, mid, p2);
@@ -976,7 +974,7 @@ static void Mod_Q1BSP_TraceBox(struct model_s *model, const frameblend_t *frameb
        rhc.trace->fraction = 1;
        rhc.trace->allsolid = true;
        VectorSubtract(boxmaxs, boxmins, boxsize);
-       if (boxsize[0] < 3)
+       if (boxsize[0] < mod_q1bsp_zero_hullsize_cutoff.value)
                rhc.hull = &model->brushq1.hulls[0]; // 0x0x0
        else if (model->brush.ishlbsp)
        {
@@ -1005,7 +1003,7 @@ static void Mod_Q1BSP_TraceBox(struct model_s *model, const frameblend_t *frameb
        VectorMAMAM(1, end, 1, boxmins, -1, rhc.hull->clip_mins, rhc.end);
        VectorSubtract(rhc.end, rhc.start, rhc.dist);
 #if COLLISIONPARANOID >= 2
-       Con_Printf("t(%f %f %f,%f %f %f,%i %f %f %f)", rhc.start[0], rhc.start[1], rhc.start[2], rhc.end[0], rhc.end[1], rhc.end[2], rhc.hull - model->brushq1.hulls, rhc.hull->clip_mins[0], rhc.hull->clip_mins[1], rhc.hull->clip_mins[2]);
+       Con_Printf("t(%f %f %f,%f %f %f,%li %f %f %f)", rhc.start[0], rhc.start[1], rhc.start[2], rhc.end[0], rhc.end[1], rhc.end[2], rhc.hull - model->brushq1.hulls, rhc.hull->clip_mins[0], rhc.hull->clip_mins[1], rhc.hull->clip_mins[2]);
        Mod_Q1BSP_RecursiveHullCheck(&rhc, rhc.hull->firstclipnode, 0, 1, rhc.start, rhc.end);
        {
 
@@ -1685,6 +1683,10 @@ static void Mod_Q1BSP_LoadTextures(sizebuf_t *sb)
                        // pretty up the buffer (replacing any trailing garbage with 0)
                        for (j = (int)strlen(name); j < 16; j++)
                                name[j] = 0;
+                       // bones_was_here: force all names to lowercase (matching code below) so we don't crash on e2m9
+                       for (j = 0;name[j];j++)
+                               if (name[j] >= 'A' && name[j] <= 'Z')
+                                       name[j] += 'a' - 'A';
 
                        if (!strncmp(name, "sky", 3))
                                numsky++;
@@ -1712,7 +1714,7 @@ static void Mod_Q1BSP_LoadTextures(sizebuf_t *sb)
        skinframemissing = R_SkinFrame_LoadMissing();
        for (i = 0, tx = loadmodel->data_textures;i < loadmodel->num_textures;i++, tx++)
        {
-               strlcpy(tx->name, "NO TEXTURE FOUND", sizeof(tx->name));
+               dp_strlcpy(tx->name, "NO TEXTURE FOUND", sizeof(tx->name));
                tx->width = 16;
                tx->height = 16;
                tx->basealpha = 1.0f;
@@ -1830,7 +1832,7 @@ static void Mod_Q1BSP_LoadTextures(sizebuf_t *sb)
                // no luck with loading shaders or external textures - restore the in-progress texture loading
                loadmodel->data_textures[i] = backuptex;
 
-               strlcpy(tx->name, name, sizeof(tx->name));
+               dp_strlcpy(tx->name, name, sizeof(tx->name));
                tx->width = mtwidth;
                tx->height = mtheight;
                tx->basealpha = 1.0f;
@@ -2107,11 +2109,11 @@ static void Mod_Q1BSP_LoadLighting(sizebuf_t *sb)
        else // LadyHavoc: bsp version 29 (normal white lighting)
        {
                // LadyHavoc: hope is not lost yet, check for a .lit file to load
-               strlcpy (litfilename, loadmodel->name, sizeof (litfilename));
+               dp_strlcpy (litfilename, loadmodel->name, sizeof (litfilename));
                FS_StripExtension (litfilename, litfilename, sizeof (litfilename));
-               strlcpy (dlitfilename, litfilename, sizeof (dlitfilename));
-               strlcat (litfilename, ".lit", sizeof (litfilename));
-               strlcat (dlitfilename, ".dlit", sizeof (dlitfilename));
+               dp_strlcpy (dlitfilename, litfilename, sizeof (dlitfilename));
+               dp_strlcat (litfilename, ".lit", sizeof (litfilename));
+               dp_strlcat (dlitfilename, ".dlit", sizeof (dlitfilename));
                data = (unsigned char*) FS_LoadFile(litfilename, tempmempool, false, &filesize);
                if (data)
                {
@@ -2204,9 +2206,9 @@ static void Mod_Q1BSP_ParseWadsFromEntityLump(const char *data)
                if (com_token[0] == '}')
                        break; // end of worldspawn
                if (com_token[0] == '_')
-                       strlcpy(key, com_token + 1, sizeof(key));
+                       dp_strlcpy(key, com_token + 1, sizeof(key));
                else
-                       strlcpy(key, com_token, sizeof(key));
+                       dp_strlcpy(key, com_token, sizeof(key));
                while (key[strlen(key)-1] == ' ') // remove trailing spaces
                        key[strlen(key)-1] = 0;
                if (!COM_ParseToken_Simple(&data, false, false, true))
@@ -3826,11 +3828,11 @@ static void Mod_Q1BSP_RoundUpToHullSize(model_t *cmodel, const vec3_t inmins, co
        const hull_t *hull;
 
        VectorSubtract(inmaxs, inmins, size);
-       if (cmodel->brush.ishlbsp)
+       if (size[0] < mod_q1bsp_zero_hullsize_cutoff.value)
+               hull = &cmodel->brushq1.hulls[0]; // 0x0x0
+       else if (cmodel->brush.ishlbsp)
        {
-               if (size[0] < 3)
-                       hull = &cmodel->brushq1.hulls[0]; // 0x0x0
-               else if (size[0] <= 32)
+               if (size[0] <= 32)
                {
                        if (size[2] < 54) // pick the nearest of 36 or 72
                                hull = &cmodel->brushq1.hulls[3]; // 32x32x36
@@ -3842,9 +3844,7 @@ static void Mod_Q1BSP_RoundUpToHullSize(model_t *cmodel, const vec3_t inmins, co
        }
        else
        {
-               if (size[0] < 3)
-                       hull = &cmodel->brushq1.hulls[0]; // 0x0x0
-               else if (size[0] <= 32)
+               if (size[0] <= 32)
                        hull = &cmodel->brushq1.hulls[1]; // 32x32x56
                else
                        hull = &cmodel->brushq1.hulls[2]; // 64x64x88
@@ -3887,7 +3887,8 @@ void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend)
        hullinfo_t hullinfo;
        int totalstylesurfaces, totalstyles, stylecounts[256], remapstyles[256];
        model_brush_lightstyleinfo_t styleinfo[256];
-       unsigned char *datapointer;
+       int *datapointer;
+       model_brush_lightstyleinfo_t *lsidatapointer;
        sizebuf_t sb;
 
        MSG_InitReadBuffer(&sb, (unsigned char *)buffer, (unsigned char *)bufferend - (unsigned char *)buffer);
@@ -4008,7 +4009,7 @@ void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend)
        mod->brushq1.num_compressedpvs = 0;
 
        Mod_Q1BSP_MakeHull0();
-       if (mod_bsp_portalize.integer)
+       if (mod_bsp_portalize.integer && cls.state != ca_dedicated)
                Mod_BSP_MakePortals();
 
        mod->numframes = 2;             // regular and alternate animation
@@ -4049,8 +4050,11 @@ void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend)
                                totalstylesurfaces += stylecounts[k];
                }
        }
-       datapointer = (unsigned char *)Mem_Alloc(mod->mempool, mod->num_surfaces * sizeof(int) + totalstyles * sizeof(model_brush_lightstyleinfo_t) + totalstylesurfaces * sizeof(int *));
-       mod->modelsurfaces_sorted = (int*)datapointer;datapointer += mod->num_surfaces * sizeof(int);
+       // bones_was_here: using a separate allocation for model_brush_lightstyleinfo_t
+       // because on a 64-bit machine it no longer has the same alignment requirement as int.
+       lsidatapointer = Mem_AllocType(mod->mempool, model_brush_lightstyleinfo_t, totalstyles * sizeof(model_brush_lightstyleinfo_t));
+       datapointer = Mem_AllocType(mod->mempool, int, mod->num_surfaces * sizeof(int) + totalstylesurfaces * sizeof(int));
+       mod->modelsurfaces_sorted = datapointer;datapointer += mod->num_surfaces;
        for (i = 0;i < mod->brush.numsubmodels;i++)
        {
                // LadyHavoc: this code was originally at the end of this loop, but
@@ -4065,7 +4069,7 @@ void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend)
                        // copy the base model to this one
                        *mod = *loadmodel;
                        // rename the clone back to its proper name
-                       strlcpy(mod->name, name, sizeof(mod->name));
+                       dp_strlcpy(mod->name, name, sizeof(mod->name));
                        mod->brush.parentmodel = loadmodel;
                        // textures and memory belong to the main model
                        mod->texturepool = NULL;
@@ -4142,7 +4146,7 @@ void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend)
                                        styleinfo[mod->brushq1.num_lightstyles].style = k;
                                        styleinfo[mod->brushq1.num_lightstyles].value = 0;
                                        styleinfo[mod->brushq1.num_lightstyles].numsurfaces = 0;
-                                       styleinfo[mod->brushq1.num_lightstyles].surfacelist = (int *)datapointer;datapointer += stylecounts[k] * sizeof(int);
+                                       styleinfo[mod->brushq1.num_lightstyles].surfacelist = datapointer;datapointer += stylecounts[k];
                                        remapstyles[k] = mod->brushq1.num_lightstyles;
                                        mod->brushq1.num_lightstyles++;
                                }
@@ -4159,7 +4163,7 @@ void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend)
                                        }
                                }
                        }
-                       mod->brushq1.data_lightstyleinfo = (model_brush_lightstyleinfo_t *)datapointer;datapointer += mod->brushq1.num_lightstyles * sizeof(model_brush_lightstyleinfo_t);
+                       mod->brushq1.data_lightstyleinfo = lsidatapointer;lsidatapointer += mod->brushq1.num_lightstyles;
                        memcpy(mod->brushq1.data_lightstyleinfo, styleinfo, mod->brushq1.num_lightstyles * sizeof(model_brush_lightstyleinfo_t));
                }
                else
@@ -4824,7 +4828,8 @@ static void Mod_Q2BSP_Load(model_t *mod, void *buffer, void *bufferend)
        msurface_t *surface;
        int totalstylesurfaces, totalstyles, stylecounts[256], remapstyles[256];
        model_brush_lightstyleinfo_t styleinfo[256];
-       unsigned char *datapointer;
+       int *datapointer;
+       model_brush_lightstyleinfo_t *lsidatapointer;
        sizebuf_t sb;
 
        MSG_InitReadBuffer(&sb, (unsigned char *)buffer, (unsigned char *)bufferend - (unsigned char *)buffer);
@@ -4939,7 +4944,7 @@ static void Mod_Q2BSP_Load(model_t *mod, void *buffer, void *bufferend)
        mod->brushq1.num_compressedpvs = 0;
 
        // the MakePortals code works fine on the q2bsp data as well
-       if (mod_bsp_portalize.integer)
+       if (mod_bsp_portalize.integer && cls.state != ca_dedicated)
                Mod_BSP_MakePortals();
 
        mod->numframes = 0;             // q2bsp animations are kind of special, frame is unbounded...
@@ -4966,8 +4971,11 @@ static void Mod_Q2BSP_Load(model_t *mod, void *buffer, void *bufferend)
                                totalstylesurfaces += stylecounts[k];
                }
        }
-       datapointer = (unsigned char *)Mem_Alloc(mod->mempool, mod->num_surfaces * sizeof(int) + totalstyles * sizeof(model_brush_lightstyleinfo_t) + totalstylesurfaces * sizeof(int *));
-       mod->modelsurfaces_sorted = (int*)datapointer; datapointer += mod->num_surfaces * sizeof(int);
+       // bones_was_here: using a separate allocation for model_brush_lightstyleinfo_t
+       // because on a 64-bit machine it no longer has the same alignment requirement as int.
+       lsidatapointer = Mem_AllocType(mod->mempool, model_brush_lightstyleinfo_t, totalstyles * sizeof(model_brush_lightstyleinfo_t));
+       datapointer = Mem_AllocType(mod->mempool, int, mod->num_surfaces * sizeof(int) + totalstylesurfaces * sizeof(int));
+       mod->modelsurfaces_sorted = datapointer; datapointer += mod->num_surfaces;
        // set up the world model, then on each submodel copy from the world model
        // and set up the submodel with the respective model info.
        mod = loadmodel;
@@ -4984,7 +4992,7 @@ static void Mod_Q2BSP_Load(model_t *mod, void *buffer, void *bufferend)
                        // copy the base model to this one
                        *mod = *loadmodel;
                        // rename the clone back to its proper name
-                       strlcpy(mod->name, name, sizeof(mod->name));
+                       dp_strlcpy(mod->name, name, sizeof(mod->name));
                        mod->brush.parentmodel = loadmodel;
                        // textures and memory belong to the main model
                        mod->texturepool = NULL;
@@ -5070,7 +5078,7 @@ static void Mod_Q2BSP_Load(model_t *mod, void *buffer, void *bufferend)
                                        styleinfo[mod->brushq1.num_lightstyles].style = k;
                                        styleinfo[mod->brushq1.num_lightstyles].value = 0;
                                        styleinfo[mod->brushq1.num_lightstyles].numsurfaces = 0;
-                                       styleinfo[mod->brushq1.num_lightstyles].surfacelist = (int *)datapointer;datapointer += stylecounts[k] * sizeof(int);
+                                       styleinfo[mod->brushq1.num_lightstyles].surfacelist = datapointer;datapointer += stylecounts[k];
                                        remapstyles[k] = mod->brushq1.num_lightstyles;
                                        mod->brushq1.num_lightstyles++;
                                }
@@ -5087,7 +5095,7 @@ static void Mod_Q2BSP_Load(model_t *mod, void *buffer, void *bufferend)
                                        }
                                }
                        }
-                       mod->brushq1.data_lightstyleinfo = (model_brush_lightstyleinfo_t *)datapointer;datapointer += mod->brushq1.num_lightstyles * sizeof(model_brush_lightstyleinfo_t);
+                       mod->brushq1.data_lightstyleinfo = lsidatapointer;lsidatapointer += mod->brushq1.num_lightstyles;
                        memcpy(mod->brushq1.data_lightstyleinfo, styleinfo, mod->brushq1.num_lightstyles * sizeof(model_brush_lightstyleinfo_t));
                }
                else
@@ -5143,14 +5151,14 @@ static void Mod_Q3BSP_LoadEntities(lump_t *l)
                        if (com_token[0] == '}')
                                break; // end of worldspawn
                        if (com_token[0] == '_')
-                               strlcpy(key, com_token + 1, sizeof(key));
+                               dp_strlcpy(key, com_token + 1, sizeof(key));
                        else
-                               strlcpy(key, com_token, sizeof(key));
+                               dp_strlcpy(key, com_token, sizeof(key));
                        while (key[strlen(key)-1] == ' ') // remove trailing spaces
                                key[strlen(key)-1] = 0;
                        if (!COM_ParseToken_Simple(&data, false, false, true))
                                break; // error
-                       strlcpy(value, com_token, sizeof(value));
+                       dp_strlcpy(value, com_token, sizeof(value));
                        if (!strcasecmp("gridsize", key)) // this one is case insensitive to 100% match q3map2
                        {
 #if _MSC_VER >= 1400
@@ -5368,7 +5376,7 @@ static void Mod_Q3BSP_LoadEffects(lump_t *l)
 
        for (i = 0;i < count;i++, in++, out++)
        {
-               strlcpy (out->shadername, in->shadername, sizeof (out->shadername));
+               dp_strlcpy (out->shadername, in->shadername, sizeof (out->shadername));
                n = LittleLong(in->brushindex);
                if (n >= loadmodel->brush.num_brushes)
                {
@@ -5893,7 +5901,7 @@ static void Mod_Q3BSP_LoadFaces(lump_t *l)
                case Q3FACETYPE_PATCH:
                        patchsize[0] = LittleLong(in->specific.patch.patchsize[0]);
                        patchsize[1] = LittleLong(in->specific.patch.patchsize[1]);
-                       if (numvertices != (patchsize[0] * patchsize[1]) || patchsize[0] < 3 || patchsize[1] < 3 || !(patchsize[0] & 1) || !(patchsize[1] & 1) || patchsize[0] * patchsize[1] >= min(r_subdivisions_maxvertices.integer, r_subdivisions_collision_maxvertices.integer))
+                       if (numvertices != (patchsize[0] * patchsize[1]) || patchsize[0] < 3 || patchsize[1] < 3 || !(patchsize[0] & 1) || !(patchsize[1] & 1) || patchsize[0] * patchsize[1] >= (cls.state == ca_dedicated ? mod_q3bsp_curves_subdivisions_maxvertices.integer : min(r_subdivisions_maxvertices.integer, mod_q3bsp_curves_subdivisions_maxvertices.integer)))
                        {
                                Con_Printf("Mod_Q3BSP_LoadFaces: face #%i (texture \"%s\"): invalid patchsize %ix%i\n", i, out->texture->name, patchsize[0], patchsize[1]);
                                continue;
@@ -5912,11 +5920,11 @@ static void Mod_Q3BSP_LoadFaces(lump_t *l)
 
                        // lower quality collision patches! Same procedure as before, but different cvars
                        // convert patch to Q3FACETYPE_MESH
-                       cxtess = Q3PatchTesselationOnX(patchsize[0], patchsize[1], 3, originalvertex3f, r_subdivisions_collision_tolerance.value);
-                       cytess = Q3PatchTesselationOnY(patchsize[0], patchsize[1], 3, originalvertex3f, r_subdivisions_collision_tolerance.value);
+                       cxtess = Q3PatchTesselationOnX(patchsize[0], patchsize[1], 3, originalvertex3f, mod_q3bsp_curves_subdivisions_tolerance.value);
+                       cytess = Q3PatchTesselationOnY(patchsize[0], patchsize[1], 3, originalvertex3f, mod_q3bsp_curves_subdivisions_tolerance.value);
                        // bound to user settings
-                       cxtess = bound(r_subdivisions_collision_mintess.integer, cxtess, r_subdivisions_collision_maxtess.integer);
-                       cytess = bound(r_subdivisions_collision_mintess.integer, cytess, r_subdivisions_collision_maxtess.integer);
+                       cxtess = bound(mod_q3bsp_curves_subdivisions_mintess.integer, cxtess, mod_q3bsp_curves_subdivisions_maxtess.integer);
+                       cytess = bound(mod_q3bsp_curves_subdivisions_mintess.integer, cytess, mod_q3bsp_curves_subdivisions_maxtess.integer);
                        // bound to sanity settings
                        cxtess = bound(0, cxtess, 1024);
                        cytess = bound(0, cytess, 1024);
@@ -7520,7 +7528,7 @@ static void Mod_Q3BSP_Load(model_t *mod, void *buffer, void *bufferend)
        loadmodel->brush.numsubmodels = loadmodel->brushq3.num_models;
 
        // the MakePortals code works fine on the q3bsp data as well
-       if (mod_bsp_portalize.integer)
+       if (mod_bsp_portalize.integer && cls.state != ca_dedicated)
                Mod_BSP_MakePortals();
 
        // FIXME: shader alpha should replace r_wateralpha support in q3bsp
@@ -7545,7 +7553,7 @@ static void Mod_Q3BSP_Load(model_t *mod, void *buffer, void *bufferend)
                        // copy the base model to this one
                        *mod = *loadmodel;
                        // rename the clone back to its proper name
-                       strlcpy(mod->name, name, sizeof(mod->name));
+                       dp_strlcpy(mod->name, name, sizeof(mod->name));
                        mod->brush.parentmodel = loadmodel;
                        // textures and memory belong to the main model
                        mod->texturepool = NULL;
@@ -8390,7 +8398,7 @@ void Mod_OBJ_Load(model_t *mod, void *buffer, void *bufferend)
                                        texturenames = (char *)Mem_Realloc(loadmodel->mempool, texturenames, maxtextures * MAX_QPATH);
                                }
                                textureindex = numtextures++;
-                               strlcpy(texturenames + textureindex*MAX_QPATH, loadmodel->name, MAX_QPATH);
+                               dp_strlcpy(texturenames + textureindex*MAX_QPATH, loadmodel->name, MAX_QPATH);
                        }
                        for (j = 1;j < argc;j++)
                        {
@@ -8483,7 +8491,7 @@ void Mod_OBJ_Load(model_t *mod, void *buffer, void *bufferend)
                                        texturenames = (char *)Mem_Realloc(loadmodel->mempool, texturenames, maxtextures * MAX_QPATH);
                                }
                                textureindex = numtextures++;
-                               strlcpy(texturenames + textureindex*MAX_QPATH, argv[1], MAX_QPATH);
+                               dp_strlcpy(texturenames + textureindex*MAX_QPATH, argv[1], MAX_QPATH);
                        }
                }
        }
@@ -8693,7 +8701,7 @@ void Mod_OBJ_Load(model_t *mod, void *buffer, void *bufferend)
                        // copy the base model to this one
                        *mod = *loadmodel;
                        // rename the clone back to its proper name
-                       strlcpy(mod->name, name, sizeof(mod->name));
+                       dp_strlcpy(mod->name, name, sizeof(mod->name));
                        mod->brush.parentmodel = loadmodel;
                        // textures and memory belong to the main model
                        mod->texturepool = NULL;
index bcf683e33f5a6677f3ca4777d9fb814fd68b8dd7..d6cea915396455ffce1b181e5ed6a0f99018af31 100644 (file)
@@ -217,7 +217,7 @@ void Mod_UnloadModel (model_t *mod)
        if (developer_loading.integer)
                Con_Printf("unloading model %s\n", mod->name);
 
-       strlcpy(name, mod->name, sizeof(name));
+       dp_strlcpy(name, mod->name, sizeof(name));
        parentmodel = mod->brush.parentmodel;
        used = mod->used;
        if (mod->mempool)
@@ -246,7 +246,7 @@ void Mod_UnloadModel (model_t *mod)
        // clear the struct to make it available
        memset(mod, 0, sizeof(model_t));
        // restore the fields we want to preserve
-       strlcpy(mod->name, name, sizeof(mod->name));
+       dp_strlcpy(mod->name, name, sizeof(mod->name));
        mod->brush.parentmodel = parentmodel;
        mod->used = used;
        mod->loaded = false;
@@ -315,7 +315,7 @@ static int Mod_FrameGroupify_ParseGroups(const char *buf, mod_framegroupify_pars
                name[0] = 0;
                if (bufptr && strcmp(com_token, "\n"))
                {
-                       strlcpy(name, com_token, sizeof(name));
+                       dp_strlcpy(name, com_token, sizeof(name));
                        COM_ParseToken_Simple(&bufptr, true, false, true);
                }
 
@@ -338,7 +338,7 @@ static void Mod_FrameGroupify_ParseGroups_Store (unsigned int i, int start, int
        model_t *mod = (model_t *) pass;
        animscene_t *anim = &mod->animscenes[i];
        if(name)
-               strlcpy(anim->name, name, sizeof(anim[i].name));
+               dp_strlcpy(anim->name, name, sizeof(anim[i].name));
        else
                dpsnprintf(anim->name, sizeof(anim[i].name), "groupified_%d_anim", i);
        anim->firstframe = bound(0, start, mod->num_poses - 1);
@@ -618,7 +618,7 @@ model_t *Mod_FindName(const char *name, const char *parentname)
 
        // no match found, create a new one
        mod = (model_t *) Mem_ExpandableArray_AllocRecord(&models);
-       strlcpy(mod->name, name, sizeof(mod->name));
+       dp_strlcpy(mod->name, name, sizeof(mod->name));
        if (parentname[0])
                mod->brush.parentmodel = Mod_FindName(parentname, NULL);
        else
@@ -1044,6 +1044,12 @@ void Mod_ShadowMesh_AddMesh(shadowmesh_t *mesh, const float *vertex3f, int numtr
 
        for (i = 0;i < numtris;i++)
        {
+               if ((mesh->numtriangles * 3 + 2) * sizeof(int) + 1 >= ((memheader_t *)((unsigned char *)mesh->element3i - sizeof(memheader_t)))->size)
+               {
+                       // FIXME: we didn't allocate enough space for all the tris, see R_Mod_CompileShadowMap
+                       Con_Print(CON_WARN "Mod_ShadowMesh_AddMesh: insufficient memory allocated!\n");
+                       return;
+               }
                mesh->element3i[mesh->numtriangles * 3 + 0] = Mod_ShadowMesh_AddVertex(mesh, vertex3f + 3 * element3i[i * 3 + 0]);
                mesh->element3i[mesh->numtriangles * 3 + 1] = Mod_ShadowMesh_AddVertex(mesh, vertex3f + 3 * element3i[i * 3 + 1]);
                mesh->element3i[mesh->numtriangles * 3 + 2] = Mod_ShadowMesh_AddVertex(mesh, vertex3f + 3 * element3i[i * 3 + 2]);
@@ -1512,7 +1518,7 @@ void Mod_LoadQ3Shaders(void)
                                        // name
                                        j = (int)strlen(com_token)+1;
                                        custsurfaceparmnames[numcustsurfaceflags] = (char *)Mem_Alloc(tempmempool, j);
-                                       strlcpy(custsurfaceparmnames[numcustsurfaceflags], com_token, j+1);
+                                       dp_strlcpy(custsurfaceparmnames[numcustsurfaceflags], com_token, j+1);
                                        // value
                                        if (COM_ParseToken_QuakeC(&text, false))
                                                custsurfaceflags[numcustsurfaceflags] = strtol(com_token, NULL, 0);
@@ -1574,7 +1580,7 @@ void Mod_LoadQ3Shaders(void)
                        // WHEN ADDING DEFAULTS HERE, REMEMBER TO PUT DEFAULTS IN ALL LOADERS
                        // JUST GREP FOR "specularscalemod = 1".
 
-                       strlcpy(shader.name, com_token, sizeof(shader.name));
+                       dp_strlcpy(shader.name, com_token, sizeof(shader.name));
                        if (!COM_ParseToken_QuakeC(&text, false) || strcasecmp(com_token, "{"))
                        {
                                Con_DPrintf("%s parsing error - expected \"{\", found \"%s\"\n", search->filenames[fileindex], com_token);
@@ -1617,7 +1623,7 @@ void Mod_LoadQ3Shaders(void)
                                                                if(j == 0 && !strncasecmp(com_token, "dp_", 3))
                                                                        dpsnprintf(parameter[j], sizeof(parameter[j]), "dp%s", &com_token[3]);
                                                                else
-                                                                       strlcpy(parameter[j], com_token, sizeof(parameter[j]));
+                                                                       dp_strlcpy(parameter[j], com_token, sizeof(parameter[j]));
                                                                numparameters = j + 1;
                                                        }
                                                        if (!COM_ParseToken_QuakeC(&text, true))
@@ -1872,7 +1878,7 @@ void Mod_LoadQ3Shaders(void)
                                                if(j == 0 && !strncasecmp(com_token, "dp_", 3))
                                                        dpsnprintf(parameter[j], sizeof(parameter[j]), "dp%s", &com_token[3]);
                                                else
-                                                       strlcpy(parameter[j], com_token, sizeof(parameter[j]));
+                                                       dp_strlcpy(parameter[j], com_token, sizeof(parameter[j]));
                                                numparameters = j + 1;
                                        }
                                        if (!COM_ParseToken_QuakeC(&text, true))
@@ -1982,7 +1988,7 @@ void Mod_LoadQ3Shaders(void)
                                else if (!strcasecmp(parameter[0], "dpnortlight"))
                                        shader.dpnortlight = true;
                                else if (!strcasecmp(parameter[0], "dpreflectcube"))
-                                       strlcpy(shader.dpreflectcube, parameter[1], sizeof(shader.dpreflectcube));
+                                       dp_strlcpy(shader.dpreflectcube, parameter[1], sizeof(shader.dpreflectcube));
                                else if (!strcasecmp(parameter[0], "dpmeshcollisions"))
                                        shader.dpmeshcollisions = true;
                                // this sets dpshaderkill to true if dpshaderkillifcvarzero was used, and to false if dpnoshaderkillifcvarzero was used
@@ -2041,14 +2047,14 @@ void Mod_LoadQ3Shaders(void)
                                {
                                        // some q3 skies don't have the sky parm set
                                        shader.surfaceparms |= Q3SURFACEPARM_SKY;
-                                       strlcpy(shader.skyboxname, parameter[1], sizeof(shader.skyboxname));
+                                       dp_strlcpy(shader.skyboxname, parameter[1], sizeof(shader.skyboxname));
                                }
                                else if (!strcasecmp(parameter[0], "skyparms") && numparameters >= 2)
                                {
                                        // some q3 skies don't have the sky parm set
                                        shader.surfaceparms |= Q3SURFACEPARM_SKY;
                                        if (!atoi(parameter[1]) && strcasecmp(parameter[1], "-"))
-                                               strlcpy(shader.skyboxname, parameter[1], sizeof(shader.skyboxname));
+                                               dp_strlcpy(shader.skyboxname, parameter[1], sizeof(shader.skyboxname));
                                }
                                else if (!strcasecmp(parameter[0], "cull") && numparameters >= 2)
                                {
@@ -2268,7 +2274,7 @@ qbool Mod_LoadTextureFromQ3Shader(mempool_t *mempool, const char *modelname, tex
        shader_t *shader;
        if (!name)
                name = "";
-       strlcpy(texture->name, name, sizeof(texture->name));
+       dp_strlcpy(texture->name, name, sizeof(texture->name));
        texture->basealpha = 1.0f;
        shader = name[0] ? Mod_LookupQ3Shader(name) : NULL;
 
@@ -2649,7 +2655,7 @@ void Mod_LoadCustomMaterial(mempool_t *mempool, texture_t *texture, const char *
        if (!(materialflags & (MATERIALFLAG_WALL | MATERIALFLAG_SKY)))
                Con_DPrintf("^1Custom texture ^3\"%s\" does not have MATERIALFLAG_WALL set\n", texture->name);
 
-       strlcpy(texture->name, name, sizeof(texture->name));
+       dp_strlcpy(texture->name, name, sizeof(texture->name));
        texture->basealpha = 1.0f;
        texture->basematerialflags = materialflags;
        texture->supercontents = supercontents;
@@ -2749,7 +2755,7 @@ tag_torso,
                        do
                        {
                                if (words < 10)
-                                       strlcpy(word[words++], com_token, sizeof (word[0]));
+                                       dp_strlcpy(word[words++], com_token, sizeof (word[0]));
                                else
                                        wordsoverflow = true;
                        }
@@ -2769,8 +2775,8 @@ tag_torso,
                                        skinfileitem = (skinfileitem_t *)Mem_Alloc(loadmodel->mempool, sizeof(skinfileitem_t));
                                        skinfileitem->next = skinfile->items;
                                        skinfile->items = skinfileitem;
-                                       strlcpy (skinfileitem->name, word[1], sizeof (skinfileitem->name));
-                                       strlcpy (skinfileitem->replacement, word[2], sizeof (skinfileitem->replacement));
+                                       dp_strlcpy (skinfileitem->name, word[1], sizeof (skinfileitem->name));
+                                       dp_strlcpy (skinfileitem->replacement, word[2], sizeof (skinfileitem->replacement));
                                }
                                else
                                        Con_Printf("Mod_LoadSkinFiles: parsing error in file \"%s_%i.skin\" on line #%i: wrong number of parameters to command \"%s\", see documentation in DP_GFX_SKINFILES extension in dpextensions.qc\n", loadmodel->name, i, line, word[0]);
@@ -2788,8 +2794,8 @@ tag_torso,
                                skinfileitem = (skinfileitem_t *)Mem_Alloc(loadmodel->mempool, sizeof(skinfileitem_t));
                                skinfileitem->next = skinfile->items;
                                skinfile->items = skinfileitem;
-                               strlcpy (skinfileitem->name, word[0], sizeof (skinfileitem->name));
-                               strlcpy (skinfileitem->replacement, word[2], sizeof (skinfileitem->replacement));
+                               dp_strlcpy (skinfileitem->name, word[0], sizeof (skinfileitem->name));
+                               dp_strlcpy (skinfileitem->replacement, word[2], sizeof (skinfileitem->replacement));
                        }
                        else
                                Con_Printf("Mod_LoadSkinFiles: parsing error in file \"%s_%i.skin\" on line #%i: does not look like tag or mesh specification, or replace command, see documentation in DP_GFX_SKINFILES extension in dpextensions.qc\n", loadmodel->name, i, line);
@@ -3058,7 +3064,7 @@ static void Mod_Decompile_OBJ(model_t *model, const char *filename, const char *
                if (textureindex >= maxtextures)
                        continue; // just a precaution
                textureindex = counttextures++;
-               strlcpy(texturenames + textureindex * MAX_QPATH, texname, MAX_QPATH);
+               dp_strlcpy(texturenames + textureindex * MAX_QPATH, texname, MAX_QPATH);
                if (outbufferpos >= outbuffermax >> 1)
                {
                        outbuffermax *= 2;
@@ -3333,7 +3339,7 @@ static void Mod_Decompile_f(cmd_state_t *cmd)
                return;
        }
 
-       strlcpy(inname, Cmd_Argv(cmd, 1), sizeof(inname));
+       dp_strlcpy(inname, Cmd_Argv(cmd, 1), sizeof(inname));
        FS_StripExtension(inname, basename, sizeof(basename));
 
        mod = Mod_ForName(inname, false, true, inname[0] == '*' ? cl.model_name[1] : NULL);
@@ -3374,7 +3380,7 @@ static void Mod_Decompile_f(cmd_state_t *cmd)
                if (l > 0) dpmtextsize += l;
                for (i = 0;i < mod->numframes;i = j)
                {
-                       strlcpy(animname, mod->animscenes[i].name, sizeof(animname));
+                       dp_strlcpy(animname, mod->animscenes[i].name, sizeof(animname));
                        first = mod->animscenes[i].firstframe;
                        if (mod->animscenes[i].framecount > 1)
                        {
@@ -3395,7 +3401,7 @@ static void Mod_Decompile_f(cmd_state_t *cmd)
                                count = mod->num_poses - first;
                                for (j = i + 1;j < mod->numframes;j++)
                                {
-                                       strlcpy(animname2, mod->animscenes[j].name, sizeof(animname2));
+                                       dp_strlcpy(animname2, mod->animscenes[j].name, sizeof(animname2));
                                        for (l = 0, k = (int)strlen(animname2);animname2[l];l++)
                                                if(animname2[l] < '0' || animname2[l] > '9')
                                                        k = l + 1;
@@ -3410,7 +3416,7 @@ static void Mod_Decompile_f(cmd_state_t *cmd)
                                }
                                // if it's only one frame, use the original frame name
                                if (j == i + 1)
-                                       strlcpy(animname, mod->animscenes[i].name, sizeof(animname));
+                                       dp_strlcpy(animname, mod->animscenes[i].name, sizeof(animname));
                                
                        }
                        dpsnprintf(outname, sizeof(outname), "%s_decompiled/%s.smd", basename, animname);
@@ -4437,7 +4443,7 @@ static void Mod_GenerateLightmaps_f(cmd_state_t *cmd)
 void Mod_Mesh_Create(model_t *mod, const char *name)
 {
        memset(mod, 0, sizeof(*mod));
-       strlcpy(mod->name, name, sizeof(mod->name));
+       dp_strlcpy(mod->name, name, sizeof(mod->name));
        mod->mempool = Mem_AllocPool(name, 0, NULL);
        mod->texturepool = R_AllocTexturePool();
        mod->Draw = R_Mod_Draw;
@@ -4461,7 +4467,8 @@ void Mod_Mesh_Reset(model_t *mod)
        mod->num_surfaces = 0;
        mod->surfmesh.num_vertices = 0;
        mod->surfmesh.num_triangles = 0;
-       memset(mod->surfmesh.data_vertexhash, -1, mod->surfmesh.num_vertexhashsize * sizeof(*mod->surfmesh.data_vertexhash));
+       if (mod->surfmesh.data_vertexhash) // UBSan: memset arg 1 isn't allowed to be null, but sometimes this is NULL.
+               memset(mod->surfmesh.data_vertexhash, -1, mod->surfmesh.num_vertexhashsize * sizeof(*mod->surfmesh.data_vertexhash));
        mod->DrawSky = NULL; // will be set if a texture needs it
        mod->DrawAddWaterPlanes = NULL; // will be set if a texture needs it
 }
index cf5e02dc1ec4450210fceb52f9767a01ca738caf..39572b5408315dc02d7dd7a8bba25a8483849620 100644 (file)
@@ -442,7 +442,7 @@ typedef struct model_s
        // all models use textures...
        rtexturepool_t  *texturepool;
        // EF_* flags (translated from the model file's different flags layout)
-       int                             effects;
+       unsigned                                effects;
        // number of QC accessible frame(group)s in the model
        int                             numframes;
        // number of QC accessible skin(group)s in the model
index 44d8f0aee893c34bfbd4bc07b52ec3d401189a6a..5b2e36d7cc72a1346723fed30e7519222da7086e 100644 (file)
@@ -298,6 +298,7 @@ void Mod_IDSP_Load(model_t *mod, void *buffer, void *bufferend)
                unsigned char palette[256][4];
                const unsigned char *in;
                dspritehl_t *pinhlsprite;
+               unsigned char *aligneddata;
 
                pinhlsprite = (dspritehl_t *)datapointer;
                datapointer += sizeof(dspritehl_t);
@@ -361,7 +362,11 @@ void Mod_IDSP_Load(model_t *mod, void *buffer, void *bufferend)
                        return;
                }
 
-               Mod_Sprite_SharedSetup(datapointer, LittleLong (pinhlsprite->version), (unsigned int *)(&palette[0][0]), rendermode == SPRHL_ADDITIVE);
+               // the above datapointer arithmetic causes misaligned access
+               aligneddata = (unsigned char *)Mem_Alloc(tempmempool, (unsigned char *)bufferend - datapointer);
+               memcpy(aligneddata, datapointer, (unsigned char *)bufferend - datapointer);
+               Mod_Sprite_SharedSetup(aligneddata, LittleLong (pinhlsprite->version), (unsigned int *)(&palette[0][0]), rendermode == SPRHL_ADDITIVE);
+               Mem_Free(aligneddata);
        }
        else
                Host_Error("Mod_IDSP_Load: %s has wrong version number (%i). Only %i (quake), %i (HalfLife), and %i (sprite32) supported",
index 69801a04a7078fa7d4916f0da00277f1fb69983e..41c0d1bb82f8d7e0f6ed04cffc35ff68ec59354e 100644 (file)
@@ -53,10 +53,10 @@ const char *vm_m_extensions[] = {
 NULL
 };
 
-qbool MP_ConsoleCommand(const char *text)
+qbool MP_ConsoleCommand(const char *text, size_t textlen)
 {
        prvm_prog_t *prog = MVM_prog;
-       return PRVM_ConsoleCommand(prog, text, &prog->funcoffsets.GameCommand, false, -1, 0, prog->loaded, "QC function GameCommand is missing");
+       return PRVM_ConsoleCommand(prog, text, textlen, &prog->funcoffsets.GameCommand, false, -1, 0, "QC function GameCommand is missing");
 }
 
 /*
@@ -193,19 +193,10 @@ static void VM_M_getresolution(prvm_prog_t *prog)
        }
        else if(nr == -1)
        {
-               vid_mode_t *m = VID_GetDesktopMode();
-               if (m)
-               {
-                       PRVM_G_VECTOR(OFS_RETURN)[0] = m->width;
-                       PRVM_G_VECTOR(OFS_RETURN)[1] = m->height;
-                       PRVM_G_VECTOR(OFS_RETURN)[2] = m->pixelheight_num / (prvm_vec_t) m->pixelheight_denom;
-               }
-               else
-               {
-                       PRVM_G_VECTOR(OFS_RETURN)[0] = 0;
-                       PRVM_G_VECTOR(OFS_RETURN)[1] = 0;
-                       PRVM_G_VECTOR(OFS_RETURN)[2] = 0;
-               }
+               vid_mode_t m = VID_GetDesktopMode();
+               PRVM_G_VECTOR(OFS_RETURN)[0] = m.width;
+               PRVM_G_VECTOR(OFS_RETURN)[1] = m.height;
+               PRVM_G_VECTOR(OFS_RETURN)[2] = m.pixelheight_num / (prvm_vec_t) m.pixelheight_denom;
        }
        else
        {
@@ -229,9 +220,9 @@ static void VM_M_getgamedirinfo(prvm_prog_t *prog)
        if(nr >= 0 && nr < fs_all_gamedirs_count)
        {
                if(item == 0)
-                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString( prog, fs_all_gamedirs[nr].name );
+                       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, fs_all_gamedirs[nr].name, strlen(fs_all_gamedirs[nr].name));
                else if(item == 1)
-                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString( prog, fs_all_gamedirs[nr].description );
+                       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, fs_all_gamedirs[nr].description, strlen(fs_all_gamedirs[nr].description));
        }
 }
 
@@ -340,25 +331,25 @@ static void VM_M_setserverlistmaskstring(prvm_prog_t *prog)
 
        switch( field ) {
                case SLIF_CNAME:
-                       strlcpy( mask->info.cname, str, sizeof(mask->info.cname) );
+                       mask->info.cname_len = dp_strlcpy(mask->info.cname, str, sizeof(mask->info.cname));
                        break;
                case SLIF_NAME:
-                       strlcpy( mask->info.name, str, sizeof(mask->info.name)  );
+                       mask->info.name_len = dp_strlcpy(mask->info.name, str, sizeof(mask->info.name));
                        break;
                case SLIF_QCSTATUS:
-                       strlcpy( mask->info.qcstatus, str, sizeof(mask->info.qcstatus)  );
+                       mask->info.qcstatus_len = dp_strlcpy(mask->info.qcstatus, str, sizeof(mask->info.qcstatus));
                        break;
                case SLIF_PLAYERS:
-                       strlcpy( mask->info.players, str, sizeof(mask->info.players)  );
+                       mask->info.players_len = dp_strlcpy(mask->info.players, str, sizeof(mask->info.players));
                        break;
                case SLIF_MAP:
-                       strlcpy( mask->info.map, str, sizeof(mask->info.map)  );
+                       mask->info.map_len = dp_strlcpy(mask->info.map, str, sizeof(mask->info.map));
                        break;
                case SLIF_MOD:
-                       strlcpy( mask->info.mod, str, sizeof(mask->info.mod)  );
+                       mask->info.mod_len = dp_strlcpy(mask->info.mod, str, sizeof(mask->info.mod));
                        break;
                case SLIF_GAME:
-                       strlcpy( mask->info.game, str, sizeof(mask->info.game)  );
+                       mask->info.game_len = dp_strlcpy(mask->info.game, str, sizeof(mask->info.game));
                        break;
                default:
                        VM_Warning(prog, "VM_M_setserverlistmaskstring: Bad field number %i passed!\n", field );
@@ -449,7 +440,7 @@ resortserverlist
 static void VM_M_resortserverlist(prvm_prog_t *prog)
 {
        VM_SAFEPARMCOUNT(0, VM_M_resortserverlist);
-       ServerList_RebuildViewList();
+       ServerList_RebuildViewList(NULL);
 }
 
 /*
@@ -476,7 +467,7 @@ static void VM_M_getserverliststring(prvm_prog_t *prog)
        }
        else
        {
-               if(hostnr < 0 || hostnr >= serverlist_viewcount)
+               if(hostnr < 0 || (unsigned)hostnr >= serverlist_viewcount)
                {
                        Con_Print("VM_M_getserverliststring: bad hostnr passed!\n");
                        return;
@@ -485,32 +476,32 @@ static void VM_M_getserverliststring(prvm_prog_t *prog)
        }
        switch( (int) PRVM_G_FLOAT(OFS_PARM0) ) {
                case SLIF_CNAME:
-                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString( prog, cache->info.cname );
+                       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cache->info.cname, cache->info.cname_len);
                        break;
                case SLIF_NAME:
-                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString( prog, cache->info.name );
+                       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cache->info.name, cache->info.name_len);
                        break;
                case SLIF_QCSTATUS:
-                       PRVM_G_INT (OFS_RETURN ) = PRVM_SetTempString( prog, cache->info.qcstatus );
+                       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cache->info.qcstatus, cache->info.qcstatus_len);
                        break;
                case SLIF_PLAYERS:
-                       PRVM_G_INT (OFS_RETURN ) = PRVM_SetTempString( prog, cache->info.players );
+                       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cache->info.players, cache->info.players_len);
                        break;
                case SLIF_GAME:
-                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString( prog, cache->info.game );
+                       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cache->info.game, cache->info.game_len);
                        break;
                case SLIF_MOD:
-                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString( prog, cache->info.mod );
+                       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cache->info.mod, cache->info.mod_len);
                        break;
                case SLIF_MAP:
-                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString( prog, cache->info.map );
+                       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cache->info.map, cache->info.map_len);
                        break;
                // TODO remove this again
                case 1024:
-                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString( prog, cache->line1 );
+                       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cache->line1, cache->line1_len);
                        break;
                case 1025:
-                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString( prog, cache->line2 );
+                       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cache->line2, cache->line2_len);
                        break;
                default:
                        Con_Print("VM_M_getserverliststring: bad field number passed!\n");
@@ -541,7 +532,7 @@ static void VM_M_getserverlistnumber(prvm_prog_t *prog)
        }
        else
        {
-               if(hostnr < 0 || hostnr >= serverlist_viewcount)
+               if(hostnr < 0 || (unsigned)hostnr >= serverlist_viewcount)
                {
                        Con_Print("VM_M_getserverliststring: bad hostnr passed!\n");
                        return;
@@ -565,7 +556,8 @@ static void VM_M_getserverlistnumber(prvm_prog_t *prog)
                        PRVM_G_FLOAT( OFS_RETURN ) = cache->info.freeslots;
                        break;
                case SLIF_PING:
-                       PRVM_G_FLOAT( OFS_RETURN ) = cache->info.ping;
+                       // display inf when a listed server times out and net_slist_pause blocks its removal
+                       PRVM_G_FLOAT( OFS_RETURN ) = cache->info.ping ? cache->info.ping : INFINITY;
                        break;
                case SLIF_PROTOCOL:
                        PRVM_G_FLOAT( OFS_RETURN ) = cache->info.protocol;
@@ -818,7 +810,7 @@ static void VM_M_crypto_getkeyfp(prvm_prog_t *prog)
        VM_CheckEmptyString( prog, s );
 
        if(LHNETADDRESS_FromString(&addr, s, 26000) && Crypto_RetrieveHostKey(&addr, NULL, keyfp, sizeof(keyfp), NULL, 0, NULL, NULL))
-               PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString( prog, keyfp );
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, keyfp, strlen(keyfp));
        else
                PRVM_G_INT( OFS_RETURN ) = OFS_NULL;
 }
@@ -834,7 +826,7 @@ static void VM_M_crypto_getidfp(prvm_prog_t *prog)
        VM_CheckEmptyString( prog, s );
 
        if(LHNETADDRESS_FromString(&addr, s, 26000) && Crypto_RetrieveHostKey(&addr, NULL, NULL, 0, idfp, sizeof(idfp), NULL, NULL))
-               PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString( prog, idfp );
+               PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString( prog, idfp, strlen(idfp));
        else
                PRVM_G_INT( OFS_RETURN ) = OFS_NULL;
 }
@@ -867,7 +859,15 @@ static void VM_M_crypto_getencryptlevel(prvm_prog_t *prog)
        VM_CheckEmptyString( prog, s );
 
        if(LHNETADDRESS_FromString(&addr, s, 26000) && Crypto_RetrieveHostKey(&addr, NULL, NULL, 0, NULL, 0, &aeslevel, NULL))
-               PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog, aeslevel ? va(vabuf, sizeof(vabuf), "%d AES128", aeslevel) : "0");
+       {
+               if (aeslevel)
+               {
+                       size_t vabuf_len = dpsnprintf(vabuf, sizeof(vabuf), "%d AES128", aeslevel);
+                       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, vabuf, vabuf_len);
+               }
+               else
+                       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "0", 1);
+       }
        else
                PRVM_G_INT( OFS_RETURN ) = OFS_NULL;
 }
@@ -882,14 +882,14 @@ static void VM_M_crypto_getmykeyfp(prvm_prog_t *prog)
        switch(Crypto_RetrieveLocalKey(i, keyfp, sizeof(keyfp), NULL, 0, NULL))
        {
                case -1:
-                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog, "");
+                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog, "", 0);
                        break;
                case 0:
                        PRVM_G_INT( OFS_RETURN ) = OFS_NULL;
                        break;
                default:
                case 1:
-                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog, keyfp);
+                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog, keyfp, strlen(keyfp));
                        break;
        }
 }
@@ -904,14 +904,14 @@ static void VM_M_crypto_getmyidfp(prvm_prog_t *prog)
        switch(Crypto_RetrieveLocalKey(i, NULL, 0, idfp, sizeof(idfp), NULL))
        {
                case -1:
-                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog, "");
+                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog, "", 0);
                        break;
                case 0:
                        PRVM_G_INT( OFS_RETURN ) = OFS_NULL;
                        break;
                default:
                case 1:
-                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog, idfp);
+                       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog, idfp, strlen(idfp));
                        break;
        }
 }
@@ -1058,8 +1058,7 @@ void VM_cin_restart(prvm_prog_t *prog)
 static void VM_M_registercommand(prvm_prog_t *prog)
 {
        VM_SAFEPARMCOUNT(1, VM_M_registercommand);
-       if(!Cmd_Exists(cmd_local, PRVM_G_STRING(OFS_PARM0)))
-               Cmd_AddCommand(CF_CLIENT, PRVM_G_STRING(OFS_PARM0), NULL, "console command created by QuakeC");
+       Cmd_AddCommand(CF_CLIENT, PRVM_G_STRING(OFS_PARM0), NULL, "console command created by QuakeC");
 }
 
 prvm_builtin_t vm_m_builtins[] = {
@@ -1076,7 +1075,7 @@ VM_vlen,                                                          //   #9
 VM_vectoyaw,                                           //  #10
 VM_vectoangles,                                        //  #11
 VM_random,                                                     //  #12
-VM_localcmd_local,                                             //  #13
+VM_localcmd,                                           //  #13
 VM_cvar,                                                               //  #14
 VM_cvar_set,                                           //  #15
 VM_dprint,                                                     //  #16
old mode 100755 (executable)
new mode 100644 (file)
index 91c800b..4ff6a57
--- a/netconn.c
+++ b/netconn.c
@@ -47,21 +47,19 @@ static cvar_t sv_masters [] =
        {CF_CLIENT | CF_SERVER, "sv_masterextra1", "dpmaster.deathmask.net", "dpmaster.deathmask.net - default master server 1 (admin: Willis)"},
        {CF_CLIENT | CF_SERVER, "sv_masterextra2", "dpmaster.tchr.no", "dpmaster.tchr.no - default master server 2 (admin: tChr)"},
        {CF_CLIENT | CF_SERVER, "sv_masterextra3", "dpm.dpmaster.org:27777", "dpm.dpmaster.org - default master server 3 (admin: gazby/soylent_cow)"},
-       {0, NULL, NULL, NULL}
 };
 
 #ifdef CONFIG_MENU
 static cvar_t sv_qwmasters [] =
 {
-       {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "sv_qwmaster1", "", "user-chosen qwmaster server 1"},
-       {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "sv_qwmaster2", "", "user-chosen qwmaster server 2"},
-       {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "sv_qwmaster3", "", "user-chosen qwmaster server 3"},
-       {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "sv_qwmaster4", "", "user-chosen qwmaster server 4"},
-       {CF_CLIENT | CF_SERVER, "sv_qwmasterextra1", "master.quakeservers.net:27000", "Global master server. (admin: unknown)"},
-       {CF_CLIENT | CF_SERVER, "sv_qwmasterextra2", "asgaard.morphos-team.net:27000", "Global master server. (admin: unknown)"},
-       {CF_CLIENT | CF_SERVER, "sv_qwmasterextra3", "qwmaster.ocrana.de:27000", "German master server. (admin: unknown)"},
-       {CF_CLIENT | CF_SERVER, "sv_qwmasterextra4", "qwmaster.fodquake.net:27000", "Global master server. (admin: unknown)"},
-       {0, NULL, NULL, NULL}
+       {CF_CLIENT | CF_ARCHIVE, "sv_qwmaster1", "", "user-chosen qwmaster server 1"},
+       {CF_CLIENT | CF_ARCHIVE, "sv_qwmaster2", "", "user-chosen qwmaster server 2"},
+       {CF_CLIENT | CF_ARCHIVE, "sv_qwmaster3", "", "user-chosen qwmaster server 3"},
+       {CF_CLIENT | CF_ARCHIVE, "sv_qwmaster4", "", "user-chosen qwmaster server 4"},
+       {CF_CLIENT, "sv_qwmasterextra1", "master.quakeservers.net:27000", "Global master server. (admin: unknown)"},
+       {CF_CLIENT, "sv_qwmasterextra2", "asgaard.morphos-team.net:27000", "Global master server. (admin: unknown)"},
+       {CF_CLIENT, "sv_qwmasterextra3", "qwmaster.ocrana.de:27000", "German master server. (admin: unknown)"},
+       {CF_CLIENT, "sv_qwmasterextra4", "qwmaster.fodquake.net:27000", "Global master server. (admin: unknown)"},
 };
 #endif
 
@@ -81,7 +79,7 @@ cvar_t net_messagetimeout = {CF_CLIENT | CF_SERVER, "net_messagetimeout","300",
 cvar_t net_connecttimeout = {CF_CLIENT | CF_SERVER, "net_connecttimeout","15", "after requesting a connection, the client must reply within this many seconds or be dropped (cuts down on connect floods). Must be above 10 seconds."};
 cvar_t net_connectfloodblockingtimeout = {CF_SERVER, "net_connectfloodblockingtimeout", "5", "when a connection packet is received, it will block all future connect packets from that IP address for this many seconds (cuts down on connect floods). Note that this does not include retries from the same IP; these are handled earlier and let in."};
 cvar_t net_challengefloodblockingtimeout = {CF_SERVER, "net_challengefloodblockingtimeout", "0.5", "when a challenge packet is received, it will block all future challenge packets from that IP address for this many seconds (cuts down on challenge floods). DarkPlaces clients retry once per second, so this should be <= 1. Failure here may lead to connect attempts failing."};
-cvar_t net_getstatusfloodblockingtimeout = {CF_SERVER, "net_getstatusfloodblockingtimeout", "1", "when a getstatus packet is received, it will block all future getstatus packets from that IP address for this many seconds (cuts down on getstatus floods). DarkPlaces retries every 4 seconds, and qstat retries once per second, so this should be <= 1. Failure here may lead to server not showing up in the server list."};
+cvar_t net_getstatusfloodblockingtimeout = {CF_SERVER, "net_getstatusfloodblockingtimeout", "1", "when a getstatus packet is received, it will block all future getstatus packets from that IP address for this many seconds (cuts down on getstatus floods). DarkPlaces retries every net_slist_timeout seconds, and qstat retries once per second, so this should be <= 1. Failure here may lead to server not showing up in the server list."};
 cvar_t net_sourceaddresscheck = {CF_CLIENT, "net_sourceaddresscheck", "1", "compare the source IP address for replies (more secure, may break some bad multihoming setups"};
 cvar_t hostname = {CF_SERVER | CF_ARCHIVE, "hostname", "UNNAMED", "server message to show in server browser"};
 cvar_t developer_networking = {CF_CLIENT | CF_SERVER, "developer_networking", "0", "prints all received and sent packets (recommended only for debugging)"};
@@ -89,12 +87,19 @@ cvar_t developer_networking = {CF_CLIENT | CF_SERVER, "developer_networking", "0
 cvar_t net_fakelag = {CF_CLIENT, "net_fakelag","0", "lags local loopback connection by this much ping time (useful to play more fairly on your own server with people with higher pings)"};
 static cvar_t net_fakeloss_send = {CF_CLIENT, "net_fakeloss_send","0", "drops this percentage of outgoing packets, useful for testing network protocol robustness (jerky movement, prediction errors, etc)"};
 static cvar_t net_fakeloss_receive = {CF_CLIENT, "net_fakeloss_receive","0", "drops this percentage of incoming packets, useful for testing network protocol robustness (jerky movement, effects failing to start, sounds failing to play, etc)"};
-static cvar_t net_slist_queriespersecond = {CF_CLIENT, "net_slist_queriespersecond", "20", "how many server information requests to send per second"};
-static cvar_t net_slist_queriesperframe = {CF_CLIENT, "net_slist_queriesperframe", "4", "maximum number of server information requests to send each rendered frame (guards against low framerates causing problems)"};
-static cvar_t net_slist_timeout = {CF_CLIENT, "net_slist_timeout", "4", "how long to listen for a server information response before giving up"};
-static cvar_t net_slist_pause = {CF_CLIENT, "net_slist_pause", "0", "when set to 1, the server list won't update until it is set back to 0"};
-static cvar_t net_slist_maxtries = {CF_CLIENT, "net_slist_maxtries", "3", "how many times to ask the same server for information (more times gives better ping reports but takes longer)"};
+
+#ifdef CONFIG_MENU
+static cvar_t net_slist_debug = {CF_CLIENT, "net_slist_debug", "0", "enables verbose messages for master server queries"};
 static cvar_t net_slist_favorites = {CF_CLIENT | CF_ARCHIVE, "net_slist_favorites", "", "contains a list of IP addresses and ports to always query explicitly"};
+static cvar_t net_slist_interval = {CF_CLIENT, "net_slist_interval", "1", "minimum number of seconds to wait between getstatus queries to the same DP server, must be >= server's net_getstatusfloodblockingtimeout"};
+static cvar_t net_slist_maxping = {CF_CLIENT | CF_ARCHIVE, "net_slist_maxping", "420", "server query responses are ignored if their ping in milliseconds is higher than this"};
+static cvar_t net_slist_maxtries = {CF_CLIENT, "net_slist_maxtries", "3", "how many times to ask the same server for information (more times gives better ping reports but takes longer)"};
+static cvar_t net_slist_pause = {CF_CLIENT, "net_slist_pause", "0", "when set to 1, the server list sorting in the menu won't update until it is set back to 0"};
+static cvar_t net_slist_queriespersecond = {CF_CLIENT, "net_slist_queriespersecond", "128", "how many server information requests to send per second"};
+static cvar_t net_slist_queriesperframe = {CF_CLIENT, "net_slist_queriesperframe", "2", "maximum number of server information requests to send each rendered frame (guards against low framerates causing problems)"};
+static cvar_t net_slist_timeout = {CF_CLIENT, "net_slist_timeout", "4", "minimum number of seconds to wait between status queries to the same QW server, determines which response belongs to which query so low values will cause impossible pings; also a warning is printed if a dpmaster query fails to complete within this time"};
+#endif
+
 static cvar_t net_tos_dscp = {CF_CLIENT | CF_ARCHIVE, "net_tos_dscp", "32", "DiffServ Codepoint for network sockets (may need game restart to apply)"};
 static cvar_t gameversion = {CF_SERVER, "gameversion", "0", "version of game data (mod-specific) to be sent to querying clients"};
 static cvar_t gameversion_min = {CF_CLIENT | CF_SERVER, "gameversion_min", "-1", "minimum version of game data (mod-specific), when client and server gameversion mismatch in the server browser the server is shown as incompatible; if -1, gameversion is used alone"};
@@ -106,26 +111,37 @@ extern cvar_t rcon_secure;
 extern cvar_t rcon_secure_challengetimeout;
 
 double masterquerytime = -1000;
-int masterquerycount = 0;
-int masterreplycount = 0;
-int serverquerycount = 0;
-int serverreplycount = 0;
+unsigned masterquerycount = 0;
+unsigned masterreplycount = 0;
+unsigned serverquerycount = 0;
+unsigned serverreplycount = 0;
 
 challenge_t challenges[MAX_CHALLENGES];
 
+#define DPMASTER_COUNT sizeof(sv_masters) / sizeof(cvar_t)
+#define QWMASTER_COUNT sizeof(sv_qwmasters) / sizeof(cvar_t)
+
+/// bitfield because in theory we could be doing QW & DP simultaneously
+uint8_t serverlist_querystage = 0;
+
 #ifdef CONFIG_MENU
-/// this is only false if there are still servers left to query
-static qbool serverlist_querysleep = true;
-static qbool serverlist_paused = false;
-/// this is pushed a second or two ahead of realtime whenever a master server
-/// reply is received, to avoid issuing queries while master replies are still
-/// flooding in (which would make a mess of the ping times)
-static double serverlist_querywaittime = 0;
+#define SLIST_QUERYSTAGE_DPMASTERS 1
+#define SLIST_QUERYSTAGE_QWMASTERS 2
+#define SLIST_QUERYSTAGE_SERVERS 4
+
+static uint8_t dpmasterstatus[DPMASTER_COUNT] = {0};
+static uint8_t qwmasterstatus[QWMASTER_COUNT] = {0};
+#define MASTER_TX_QUERY 1    // we sent the query
+#define MASTER_RX_RESPONSE 2 // we got at least 1 packet of the response
+#define MASTER_RX_COMPLETE 3 // we saw the EOT marker (assumes dpmaster >= 2.0, see dpmaster/doc/techinfo.txt)
+
+/// the hash password for timestamp verification
+char serverlist_dpserverquerykey[12]; // challenge_t uses [12]
 #endif
 
-static int cl_numsockets;
+static unsigned cl_numsockets;
 static lhnetsocket_t *cl_sockets[16];
-static int sv_numsockets;
+static unsigned sv_numsockets;
 static lhnetsocket_t *sv_sockets[16];
 
 netconn_t *netconn_list = NULL;
@@ -138,12 +154,12 @@ cvar_t net_address = {CF_CLIENT | CF_SERVER, "net_address", "", "network address
 cvar_t net_address_ipv6 = {CF_CLIENT | CF_SERVER, "net_address_ipv6", "", "network address to open ipv6 ports on (if empty, use default interfaces)"};
 
 char cl_net_extresponse[NET_EXTRESPONSE_MAX][1400];
-int cl_net_extresponse_count = 0;
-int cl_net_extresponse_last = 0;
+unsigned cl_net_extresponse_count = 0;
+unsigned cl_net_extresponse_last = 0;
 
 char sv_net_extresponse[NET_EXTRESPONSE_MAX][1400];
-int sv_net_extresponse_count = 0;
-int sv_net_extresponse_last = 0;
+unsigned sv_net_extresponse_count = 0;
+unsigned sv_net_extresponse_last = 0;
 
 #ifdef CONFIG_MENU
 // ServerList interface
@@ -151,20 +167,20 @@ serverlist_mask_t serverlist_andmasks[SERVERLIST_ANDMASKCOUNT];
 serverlist_mask_t serverlist_ormasks[SERVERLIST_ORMASKCOUNT];
 
 serverlist_infofield_t serverlist_sortbyfield;
-int serverlist_sortflags;
+unsigned serverlist_sortflags;
 
-int serverlist_viewcount = 0;
-unsigned short serverlist_viewlist[SERVERLIST_VIEWLISTSIZE];
+unsigned serverlist_viewcount = 0;
+uint16_t serverlist_viewlist[SERVERLIST_VIEWLISTSIZE];
 
-int serverlist_maxcachecount = 0;
-int serverlist_cachecount = 0;
+unsigned serverlist_maxcachecount = 0;
+unsigned serverlist_cachecount = 0;
 serverlist_entry_t *serverlist_cache = NULL;
 
-qbool serverlist_consoleoutput;
+static qbool serverlist_consoleoutput;
 
-static int nFavorites = 0;
+static unsigned nFavorites = 0;
 static lhnetaddress_t favorites[MAX_FAVORITESERVERS];
-static int nFavorites_idfp = 0;
+static unsigned nFavorites_idfp = 0;
 static char favorites_idfp[MAX_FAVORITESERVERS][FP64_SIZE+1];
 
 void NetConn_UpdateFavorites_c(cvar_t *var)
@@ -179,7 +195,7 @@ void NetConn_UpdateFavorites_c(cvar_t *var)
                // currently 44 bytes, longest possible IPv6 address: 39 bytes, so this works
                // (if v6 address contains port, it must start with '[')
                {
-                       strlcpy(favorites_idfp[nFavorites_idfp], com_token, sizeof(favorites_idfp[nFavorites_idfp]));
+                       dp_strlcpy(favorites_idfp[nFavorites_idfp], com_token, sizeof(favorites_idfp[nFavorites_idfp]));
                        ++nFavorites_idfp;
                }
                else 
@@ -192,9 +208,10 @@ void NetConn_UpdateFavorites_c(cvar_t *var)
 
 /// helper function to insert a value into the viewset
 /// spare entries will be removed
-static void _ServerList_ViewList_Helper_InsertBefore( int index, serverlist_entry_t *entry )
+static void _ServerList_ViewList_Helper_InsertBefore(unsigned index, serverlist_entry_t *entry)
 {
-    int i;
+       unsigned i;
+
        if( serverlist_viewcount < SERVERLIST_VIEWLISTSIZE ) {
                i = serverlist_viewcount++;
        } else {
@@ -208,7 +225,7 @@ static void _ServerList_ViewList_Helper_InsertBefore( int index, serverlist_entr
 }
 
 /// we suppose serverlist_viewcount to be valid, ie > 0
-static void _ServerList_ViewList_Helper_Remove( int index )
+static inline void _ServerList_ViewList_Helper_Remove(unsigned index)
 {
        serverlist_viewcount--;
        for( ; index < serverlist_viewcount ; index++ )
@@ -412,7 +429,7 @@ static qbool _ServerList_Entry_Mask( serverlist_mask_t *mask, serverlist_info_t
 
 static void ServerList_ViewList_Insert( serverlist_entry_t *entry )
 {
-       int start, end, mid, i;
+       unsigned start, end, mid, i;
        lhnetaddress_t addr;
 
        // reject incompatible servers
@@ -428,6 +445,11 @@ static void ServerList_ViewList_Insert( serverlist_entry_t *entry )
        )
                return;
 
+       // also display entries that are currently being refreshed [11/8/2007 Black]
+       // bones_was_here: if their previous ping was acceptable (unset if timeout occurs)
+       if (!entry->info.ping)
+               return;
+
        // refresh the "favorite" status
        entry->info.isfavorite = false;
        if(LHNETADDRESS_FromString(&addr, entry->info.cname, 26000))
@@ -503,7 +525,8 @@ static void ServerList_ViewList_Insert( serverlist_entry_t *entry )
 
 static void ServerList_ViewList_Remove( serverlist_entry_t *entry )
 {
-       int i;
+       unsigned i;
+
        for( i = 0; i < serverlist_viewcount; i++ )
        {
                if (ServerList_GetViewEntry(i) == entry)
@@ -514,17 +537,16 @@ static void ServerList_ViewList_Remove( serverlist_entry_t *entry )
        }
 }
 
-void ServerList_RebuildViewList(void)
+void ServerList_RebuildViewList(cvar_t *var)
 {
-       int i;
+       unsigned i;
+
+       if (net_slist_pause.integer)
+               return;
 
        serverlist_viewcount = 0;
-       for( i = 0 ; i < serverlist_cachecount ; i++ ) {
-               serverlist_entry_t *entry = &serverlist_cache[i];
-               // also display entries that are currently being refreshed [11/8/2007 Black]
-               if( entry->query == SQS_QUERIED || entry->query == SQS_REFRESHING )
-                       ServerList_ViewList_Insert( entry );
-       }
+       for (i = 0; i < serverlist_cachecount; ++i)
+               ServerList_ViewList_Insert(&serverlist_cache[i]);
 }
 
 void ServerList_ResetMasks(void)
@@ -540,13 +562,14 @@ void ServerList_ResetMasks(void)
                serverlist_ormasks[i].info.numbots = -1;
 }
 
-void ServerList_GetPlayerStatistics(int *numplayerspointer, int *maxplayerspointer)
+void ServerList_GetPlayerStatistics(unsigned *numplayerspointer, unsigned *maxplayerspointer)
 {
-       int i;
-       int numplayers = 0, maxplayers = 0;
+       unsigned i;
+       unsigned numplayers = 0, maxplayers = 0;
+
        for (i = 0;i < serverlist_cachecount;i++)
        {
-               if (serverlist_cache[i].query == SQS_QUERIED)
+               if (serverlist_cache[i].info.ping)
                {
                        numplayers += serverlist_cache[i].info.numhumans;
                        maxplayers += serverlist_cache[i].info.maxplayers;
@@ -577,25 +600,62 @@ static void _ServerList_Test(void)
 }
 #endif
 
+/*
+====================
+ServerList_BuildDPServerQuery
+
+Generates the string for pinging DP servers with a hash-verified timestamp
+to provide reliable pings while preventing ping cheating,
+and discard spurious getstatus/getinfo packets.
+
+14 bytes of header including the mandatory space,
+22 bytes of base64-encoded hash,
+up to 16 bytes of unsigned hexadecimal milliseconds (typically 4-5 bytes sent),
+null terminator.
+
+The maximum challenge length (after the space) for existing DP7 servers is 49.
+====================
+*/
+static inline void ServerList_BuildDPServerQuery(char *buffer, size_t buffersize, double querytime)
+{
+       unsigned char hash[24]; // 4*(16/3) rounded up to 4 byte multiple
+       uint64_t timestamp = querytime * 1000.0; // no rounding up as that could make small pings go <= 0
+
+       HMAC_MDFOUR_16BYTES(hash,
+               (unsigned char *)&timestamp, sizeof(timestamp),
+               (unsigned char *)serverlist_dpserverquerykey, sizeof(serverlist_dpserverquerykey));
+       base64_encode(hash, 16, sizeof(hash));
+       dpsnprintf(buffer, buffersize, "\377\377\377\377getstatus %.22s%" PRIx64, hash, timestamp);
+}
+
+static void NetConn_BuildChallengeString(char *buffer, int bufferlength);
 void ServerList_QueryList(qbool resetcache, qbool querydp, qbool queryqw, qbool consoleoutput)
 {
-       masterquerytime = host.realtime;
+       unsigned i;
+       lhnetaddress_t broadcastaddress;
+       char dpquery[53]; // theoretical max: 14+22+16+1
+
+       if (net_slist_debug.integer)
+               Con_Printf("^2Querying master, favourite and LAN servers, reset=%u\n", resetcache);
+       serverlist_querystage = (querydp ? SLIST_QUERYSTAGE_DPMASTERS : 0) | (queryqw ? SLIST_QUERYSTAGE_QWMASTERS : 0);
        masterquerycount = 0;
        masterreplycount = 0;
-       if( resetcache ) {
+       if (resetcache)
+       {
                serverquerycount = 0;
                serverreplycount = 0;
                serverlist_cachecount = 0;
                serverlist_viewcount = 0;
                serverlist_maxcachecount = 0;
                serverlist_cache = (serverlist_entry_t *)Mem_Realloc(netconn_mempool, (void *)serverlist_cache, sizeof(serverlist_entry_t) * serverlist_maxcachecount);
-       } else {
+       }
+       else
+       {
                // refresh all entries
-               int n;
-               for( n = 0 ; n < serverlist_cachecount ; n++ ) {
-                       serverlist_entry_t *entry = &serverlist_cache[ n ];
-                       entry->query = SQS_REFRESHING;
-                       entry->querycounter = 0;
+               for (i = 0; i < serverlist_cachecount; ++i)
+               {
+                       serverlist_entry_t *entry = &serverlist_cache[i];
+                       entry->responded = false;
                }
        }
        serverlist_consoleoutput = consoleoutput;
@@ -603,6 +663,51 @@ void ServerList_QueryList(qbool resetcache, qbool querydp, qbool queryqw, qbool
        //_ServerList_Test();
 
        NetConn_QueryMasters(querydp, queryqw);
+
+       // Generate new DP server query key string
+       // Used to prevent ping cheating and discard spurious getstatus/getinfo packets
+       if (!serverlist_querystage) // don't change key while updating
+               NetConn_BuildChallengeString(serverlist_dpserverquerykey, sizeof(serverlist_dpserverquerykey));
+
+       // LAN search
+
+       // Master and and/or favourite queries were likely delayed by DNS lag,
+       // for correct pings we need to know what host.realtime would be if it were updated now.
+       masterquerytime = host.realtime + (Sys_DirtyTime() - host.dirtytime);
+       ServerList_BuildDPServerQuery(dpquery, sizeof(dpquery), masterquerytime);
+
+       // 26000 is the default quake server port, servers on other ports will not be found
+       // note this is IPv4-only, I doubt there are IPv6-only LANs out there
+       LHNETADDRESS_FromString(&broadcastaddress, "255.255.255.255", 26000);
+
+       for (i = 0; i < cl_numsockets; ++i)
+       {
+               if (!cl_sockets[i])
+                       continue;
+               if (LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(cl_sockets[i])) != LHNETADDRESS_GetAddressType(&broadcastaddress))
+                       continue;
+
+               if (querydp)
+               {
+                       // search LAN for Quake servers
+                       SZ_Clear(&cl_message);
+                       // save space for the header, filled in later
+                       MSG_WriteLong(&cl_message, 0);
+                       MSG_WriteByte(&cl_message, CCREQ_SERVER_INFO);
+                       MSG_WriteString(&cl_message, "QUAKE");
+                       MSG_WriteByte(&cl_message, NET_PROTOCOL_VERSION);
+                       StoreBigLong(cl_message.data, NETFLAG_CTL | (cl_message.cursize & NETFLAG_LENGTH_MASK));
+                       NetConn_Write(cl_sockets[i], cl_message.data, cl_message.cursize, &broadcastaddress);
+                       SZ_Clear(&cl_message);
+
+                       // search LAN for DarkPlaces servers
+                       NetConn_WriteString(cl_sockets[i], dpquery, &broadcastaddress);
+               }
+
+               if (queryqw)
+                       // search LAN for QuakeWorld servers
+                       NetConn_WriteString(cl_sockets[i], "\377\377\377\377status\n", &broadcastaddress);
+       }
 }
 #endif
 
@@ -611,7 +716,8 @@ void ServerList_QueryList(qbool resetcache, qbool querydp, qbool queryqw, qbool
 int NetConn_Read(lhnetsocket_t *mysocket, void *data, int maxlength, lhnetaddress_t *peeraddress)
 {
        int length;
-       int i;
+       unsigned i;
+
        if (mysocket->address.addresstype == LHNETADDRESSTYPE_LOOP && netconn_mutex)
                Thread_LockMutex(netconn_mutex);
        length = LHNET_Read(mysocket, data, maxlength, peeraddress);
@@ -642,7 +748,8 @@ int NetConn_Read(lhnetsocket_t *mysocket, void *data, int maxlength, lhnetaddres
 int NetConn_Write(lhnetsocket_t *mysocket, const void *data, int length, const lhnetaddress_t *peeraddress)
 {
        int ret;
-       int i;
+       unsigned i;
+
        if (net_fakeloss_send.integer)
                for (i = 0;i < cl_numsockets;i++)
                        if (cl_sockets[i] == mysocket && (rand() % 100) < net_fakeloss_send.integer)
@@ -1080,7 +1187,9 @@ void NetConn_OpenServerPorts(int opennetports)
 
 lhnetsocket_t *NetConn_ChooseClientSocketForAddress(lhnetaddress_t *address)
 {
-       int i, a = LHNETADDRESS_GetAddressType(address);
+       unsigned i;
+       lhnetaddresstype_t a = LHNETADDRESS_GetAddressType(address);
+
        for (i = 0;i < cl_numsockets;i++)
                if (cl_sockets[i] && LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(cl_sockets[i])) == a)
                        return cl_sockets[i];
@@ -1089,7 +1198,9 @@ lhnetsocket_t *NetConn_ChooseClientSocketForAddress(lhnetaddress_t *address)
 
 lhnetsocket_t *NetConn_ChooseServerSocketForAddress(lhnetaddress_t *address)
 {
-       int i, a = LHNETADDRESS_GetAddressType(address);
+       unsigned i;
+       lhnetaddresstype_t a = LHNETADDRESS_GetAddressType(address);
+
        for (i = 0;i < sv_numsockets;i++)
                if (sv_sockets[i] && LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(sv_sockets[i])) == a)
                        return sv_sockets[i];
@@ -1146,22 +1257,9 @@ void NetConn_Close(netconn_t *conn)
 
 static int clientport = -1;
 static int clientport2 = -1;
-static int hostport = -1;
-
-// Call on disconnect, during startup, or if cl_netport is changed
-void NetConn_UpdateSockets_Client(void)
-{
-       if (cls.state == ca_disconnected && clientport != clientport2)
-       {
-               clientport = clientport2;
-               NetConn_CloseClientPorts();
-       }
-       if (cl_numsockets == 0)
-               NetConn_OpenClientPorts();
-}
 
-// Call when cl_port is changed
-static void NetConn_cl_netport_Callback(cvar_t *var)
+// Call on disconnect, during startup, or if cl_port/cl_netport is changed
+static void NetConn_CL_UpdateSockets_Callback(cvar_t *var)
 {
        if(cls.state != ca_dedicated)
        {
@@ -1171,11 +1269,20 @@ static void NetConn_cl_netport_Callback(cvar_t *var)
                        if (cls.state == ca_connected)
                                Con_Print("Changing \"cl_port\" will not take effect until you reconnect.\n");
                }
-               NetConn_UpdateSockets_Client();
+
+               if (cls.state == ca_disconnected && clientport != clientport2)
+               {
+                       clientport = clientport2;
+                       NetConn_CloseClientPorts();
+               }
+               if (cl_numsockets == 0)
+                       NetConn_OpenClientPorts();
        }
 }
 
-// Call when port is changed
+static int hostport = -1;
+
+// Call when port/sv_netport is changed
 static void NetConn_sv_netport_Callback(cvar_t *var)
 {
        if (hostport != var->integer)
@@ -1246,8 +1353,8 @@ static int NetConn_ReceivedMessage(netconn_t *conn, const unsigned char *data, s
                conn->packetsReceived++;
                reliable_message = (sequence >> 31) != 0;
                reliable_ack = (sequence_ack >> 31) != 0;
-               sequence &= ~(1<<31);
-               sequence_ack &= ~(1<<31);
+               sequence &= ~(1u<<31);
+               sequence_ack &= ~(1u<<31);
                if (sequence <= conn->qw.incoming_sequence)
                {
                        //Con_DPrint("Got a stale datagram\n");
@@ -1524,15 +1631,14 @@ static int NetConn_ReceivedMessage(netconn_t *conn, const unsigned char *data, s
 static void NetConn_ConnectionEstablished(lhnetsocket_t *mysocket, lhnetaddress_t *peeraddress, protocolversion_t initialprotocol)
 {
        crypto_t *crypto;
+
        cls.connect_trying = false;
-#ifdef CONFIG_MENU
-       M_Update_Return_Reason("");
-#endif
        // Disconnect from the current server or stop demo playback
        if(cls.state == ca_connected || cls.demoplayback)
                CL_Disconnect();
        // allocate a net connection to keep track of things
        cls.netcon = NetConn_Open(mysocket, peeraddress);
+       dp_strlcpy(cl_connect_status, "Connection established", sizeof(cl_connect_status));
        crypto = &cls.netcon->crypto;
        if(cls.crypto.authenticated)
        {
@@ -1548,7 +1654,9 @@ static void NetConn_ConnectionEstablished(lhnetsocket_t *mysocket, lhnetaddress_
                                crypto_keyfp_recommended_length, crypto->client_keyfp[0] ? crypto->client_keyfp : "-"
                                );
        }
-       Con_Printf("Connection accepted to %s\n", cls.netcon->address);
+       else
+               Con_Printf("%s to %s\n", cl_connect_status, cls.netcon->address);
+
        key_dest = key_game;
 #ifdef CONFIG_MENU
        m_state = m_none;
@@ -1583,23 +1691,26 @@ int NetConn_IsLocalGame(void)
 }
 
 #ifdef CONFIG_MENU
-static int NetConn_ClientParsePacket_ServerList_ProcessReply(const char *addressstring)
+static qbool hmac_mdfour_time_matching(lhnetaddress_t *peeraddress, const char *password, const char *hash, const char *s, int slen);
+static int NetConn_ClientParsePacket_ServerList_ProcessReply(const char *addressstring, const char *challenge)
 {
-       int n;
-       int pingtime;
-       serverlist_entry_t *entry = NULL;
+       unsigned n;
+       float ping;
+       double currentrealtime;
+       serverlist_entry_t *entry;
 
        // search the cache for this server and update it
-       for (n = 0;n < serverlist_cachecount;n++) {
-               entry = &serverlist_cache[ n ];
+       for (n = 0; n < serverlist_cachecount; ++n)
+       {
+               entry = &serverlist_cache[n];
                if (!strcmp(addressstring, entry->info.cname))
                        break;
        }
 
        if (n == serverlist_cachecount)
        {
-               // LAN search doesnt require an answer from the master server so we wont
-               // know the ping nor will it be initialized already...
+               if (net_slist_debug.integer)
+                       Con_Printf("^6Received LAN broadcast response from %s\n", addressstring);
 
                // find a slot
                if (serverlist_cachecount == SERVERLIST_TOTALSIZE)
@@ -1610,31 +1721,60 @@ static int NetConn_ClientParsePacket_ServerList_ProcessReply(const char *address
                        serverlist_maxcachecount += 64;
                        serverlist_cache = (serverlist_entry_t *)Mem_Realloc(netconn_mempool, (void *)serverlist_cache, sizeof(serverlist_entry_t) * serverlist_maxcachecount);
                }
+               ++serverlist_cachecount;
                entry = &serverlist_cache[n];
 
                memset(entry, 0, sizeof(*entry));
-               // store the data the engine cares about (address and ping)
-               strlcpy(entry->info.cname, addressstring, sizeof(entry->info.cname));
-               entry->info.ping = 100000;
-               entry->querytime = host.realtime;
-               // if not in the slist menu we should print the server to console
+               entry->info.cname_len = dp_strlcpy(entry->info.cname, addressstring, sizeof(entry->info.cname));
+
+               // use the broadcast as the first query, NetConn_QueryQueueFrame() will send more
+               entry->querytime = masterquerytime;
+               // protocol is one of these at all
+               // NetConn_ClientParsePacket_ServerList_PrepareQuery() callsites
+               entry->protocol = challenge ? PROTOCOL_DARKPLACES7 : PROTOCOL_QUAKEWORLD;
+
                if (serverlist_consoleoutput)
                        Con_Printf("querying %s\n", addressstring);
-               ++serverlist_cachecount;
        }
-       // if this is the first reply from this server, count it as having replied
-       pingtime = (int)((host.realtime - entry->querytime) * 1000.0 + 0.5);
-       pingtime = bound(0, pingtime, 9999);
-       if (entry->query == SQS_REFRESHING) {
-               entry->info.ping = pingtime;
-               entry->query = SQS_QUERIED;
-       } else {
-               // convert to unsigned to catch the -1
-               // I still dont like this but its better than the old 10000 magic ping number - as in easier to type and read :( [11/8/2007 Black]
-               entry->info.ping = min((unsigned) entry->info.ping, (unsigned) pingtime);
+
+       // If the client stalls partway through a frame (test command: `alias a a;a`)
+       // for correct pings we need to know what host.realtime would be if it were updated now.
+       currentrealtime = host.realtime + (Sys_DirtyTime() - host.dirtytime);
+
+       if (challenge)
+       {
+               unsigned char hash[24]; // 4*(16/3) rounded up to 4 byte multiple
+               uint64_t timestamp = strtoull(&challenge[22], NULL, 16);
+
+               HMAC_MDFOUR_16BYTES(hash,
+                       (unsigned char *)&timestamp, sizeof(timestamp),
+                       (unsigned char *)serverlist_dpserverquerykey, sizeof(serverlist_dpserverquerykey));
+               base64_encode(hash, 16, sizeof(hash));
+               if (memcmp(hash, challenge, 22) != 0)
+                       return -1;
+
+               ping = currentrealtime * 1000.0 - timestamp;
+       }
+       else
+               ping = 1000 * (currentrealtime - entry->querytime);
+
+       if (ping <= 0 || ping > net_slist_maxping.value
+       || (entry->info.ping && ping > entry->info.ping + 100)) // server loading map, client stall, etc
+               return -1;
+
+       // never round down to 0, 0 latency is impossible, 0 means no data available
+       if (ping < 1)
+               ping = 1;
+
+       if (entry->info.ping)
+               entry->info.ping = (entry->info.ping + ping) * 0.5 + 0.5; // "average" biased toward most recent results
+       else
+       {
+               entry->info.ping = ping + 0.5;
                serverreplycount++;
        }
-       
+       entry->responded = true;
+
        // other server info is updated by the caller
        return n;
 }
@@ -1643,9 +1783,16 @@ static void NetConn_ClientParsePacket_ServerList_UpdateCache(int n)
 {
        serverlist_entry_t *entry = &serverlist_cache[n];
        serverlist_info_t *info = &entry->info;
+
        // update description strings for engine menu and console output
-       dpsnprintf(entry->line1, sizeof(serverlist_cache[n].line1), "^%c%5d^7 ^%c%3u^7/%3u %-65.65s", info->ping >= 300 ? '1' : (info->ping >= 200 ? '3' : '7'), (int)info->ping, ((info->numhumans > 0 && info->numhumans < info->maxplayers) ? (info->numhumans >= 4 ? '7' : '3') : '1'), info->numplayers, info->maxplayers, info->name);
-       dpsnprintf(entry->line2, sizeof(serverlist_cache[n].line2), "^4%-21.21s %-19.19s ^%c%-17.17s^4 %-20.20s", info->cname, info->game,
+       entry->line1_len = dpsnprintf(entry->line1, sizeof(serverlist_cache[n].line1), "^%c%5.0f^7 ^%c%3u^7/%3u %-65.65s",
+                  info->ping >= 300 ? '1' : (info->ping >= 200 ? '3' : '7'),
+                  info->ping ? info->ping : INFINITY, // display inf when a listed server times out and net_slist_pause blocks its removal
+                  ((info->numhumans > 0 && info->numhumans < info->maxplayers) ? (info->numhumans >= 4 ? '7' : '3') : '1'),
+                  info->numplayers,
+                  info->maxplayers,
+                  info->name);
+       entry->line2_len = dpsnprintf(entry->line2, sizeof(serverlist_cache[n].line2), "^4%-21.21s %-19.19s ^%c%-17.17s^4 %-20.20s", info->cname, info->game,
                        (
                         info->gameversion != gameversion.integer
                         &&
@@ -1657,38 +1804,34 @@ static void NetConn_ClientParsePacket_ServerList_UpdateCache(int n)
                          )
                        ) ? '1' : '4',
                        info->mod, info->map);
-       if (entry->query == SQS_QUERIED)
+
+       if(!net_slist_pause.integer)
        {
-               if(!serverlist_paused)
-                       ServerList_ViewList_Remove(entry);
+               ServerList_ViewList_Remove(entry);
+               ServerList_ViewList_Insert(entry);
        }
-       // if not in the slist menu we should print the server to console (if wanted)
-       else if( serverlist_consoleoutput )
-               Con_Printf("%s\n%s\n", serverlist_cache[n].line1, serverlist_cache[n].line2);
-       // and finally, update the view set
-       if(!serverlist_paused)
-               ServerList_ViewList_Insert( entry );
-       //      update the entry's state
-       serverlist_cache[n].query = SQS_QUERIED;
+
+       if (serverlist_consoleoutput)
+               Con_Printf("%s\n%s\n", entry->line1, entry->line2);
 }
 
 // returns true, if it's sensible to continue the processing
-static qbool NetConn_ClientParsePacket_ServerList_PrepareQuery( int protocol, const char *ipstring, qbool isfavorite ) {
-       int n;
+static qbool NetConn_ClientParsePacket_ServerList_PrepareQuery(int protocol, const char *ipstring, qbool isfavorite)
+{
+       unsigned n;
        serverlist_entry_t *entry;
 
-       //      ignore the rest of the message if the serverlist is full
-       if( serverlist_cachecount == SERVERLIST_TOTALSIZE )
+       // ignore the rest of the message if the serverlist is full
+       if (serverlist_cachecount == SERVERLIST_TOTALSIZE)
                return false;
-       //      also ignore     it      if      we      have already queried    it      (other master server    response)
-       for( n =        0 ; n   < serverlist_cachecount ; n++   )
-               if( !strcmp( ipstring, serverlist_cache[ n ].info.cname ) )
+
+       for (n = 0; n < serverlist_cachecount; ++n)
+               if (!strcmp(ipstring, serverlist_cache[n].info.cname))
                        break;
 
-       if( n < serverlist_cachecount ) {
-               // the entry has already been queried once or 
+       // also ignore it if we have already queried it (other master server response)
+       if (n < serverlist_cachecount)
                return true;
-       }
 
        if (serverlist_maxcachecount <= n)
        {
@@ -1697,30 +1840,38 @@ static qbool NetConn_ClientParsePacket_ServerList_PrepareQuery( int protocol, co
        }
 
        entry = &serverlist_cache[n];
-
        memset(entry, 0, sizeof(*entry));
-       entry->protocol =       protocol;
-       //      store   the data        the engine cares about (address and     ping)
-       strlcpy (entry->info.cname, ipstring, sizeof(entry->info.cname));
-
+       entry->protocol = protocol;
+       entry->info.cname_len = dp_strlcpy(entry->info.cname, ipstring, sizeof(entry->info.cname));
        entry->info.isfavorite = isfavorite;
-       
-       // no, then reset the ping right away
-       entry->info.ping = -1;
-       // we also want to increase the serverlist_cachecount then
+
        serverlist_cachecount++;
        serverquerycount++;
 
-       entry->query =  SQS_QUERYING;
-
        return true;
 }
 
-static void NetConn_ClientParsePacket_ServerList_ParseDPList(lhnetaddress_t *senderaddress, const unsigned char *data, int length, qbool isextended)
+static void NetConn_ClientParsePacket_ServerList_ParseDPList(lhnetaddress_t *masteraddress, const char *masteraddressstring, const unsigned char *data, int length, qbool isextended)
 {
+       unsigned masternum;
+       lhnetaddress_t testaddress;
+
+       for (masternum = 0; masternum < DPMASTER_COUNT; ++masternum)
+               if (sv_masters[masternum].string[0]
+               && LHNETADDRESS_FromString(&testaddress, sv_masters[masternum].string, DPMASTER_PORT)
+               && LHNETADDRESS_Compare(&testaddress, masteraddress) == 0)
+                       break;
+       if (net_sourceaddresscheck.integer && masternum >= DPMASTER_COUNT)
+       {
+               Con_Printf(CON_WARN "ignoring DarkPlaces %sserver list from unrecognised master %s\n", isextended ? "extended " : "", masteraddressstring);
+               return;
+       }
+
        masterreplycount++;
-       if (serverlist_consoleoutput)
-               Con_Printf("received DarkPlaces %sserver list...\n", isextended ? "extended " : "");
+       dpmasterstatus[masternum] = MASTER_RX_RESPONSE;
+       if (serverlist_consoleoutput || net_slist_debug.integer)
+               Con_Printf("^5Received DarkPlaces server list %sfrom %s\n", isextended ? "(extended) " : "", sv_masters[masternum].string);
+
        while (length >= 7)
        {
                char ipstring [128];
@@ -1732,6 +1883,13 @@ static void NetConn_ClientParsePacket_ServerList_ParseDPList(lhnetaddress_t *sen
 
                        if (port != 0 && (data[1] != 0xFF || data[2] != 0xFF || data[3] != 0xFF || data[4] != 0xFF))
                                dpsnprintf (ipstring, sizeof (ipstring), "%u.%u.%u.%u:%hu", data[1], data[2], data[3], data[4], port);
+                       else if (port == 0 && data[1] == 'E' && data[2] == 'O' && data[3] == 'T' && data[4] == '\0')
+                       {
+                               dpmasterstatus[masternum] = MASTER_RX_COMPLETE;
+                               if (net_slist_debug.integer)
+                                       Con_Printf("^4End Of Transmission %sfrom %s\n", isextended ? "(extended) " : "", sv_masters[masternum].string);
+                               break;
+                       }
 
                        // move on to next address in packet
                        data += 7;
@@ -1774,22 +1932,70 @@ static void NetConn_ClientParsePacket_ServerList_ParseDPList(lhnetaddress_t *sen
                }
                else
                {
-                       Con_Print("Error while parsing the server list\n");
+                       Con_Print(CON_WARN "Error while parsing the server list\n");
                        break;
                }
 
                if (serverlist_consoleoutput && developer_networking.integer)
                        Con_Printf("Requesting info from DarkPlaces server %s\n", ipstring);
-               
-               if( !NetConn_ClientParsePacket_ServerList_PrepareQuery( PROTOCOL_DARKPLACES7, ipstring, false ) ) {
-                       break;
-               }
 
+               if (!NetConn_ClientParsePacket_ServerList_PrepareQuery(PROTOCOL_DARKPLACES7, ipstring, false))
+                       break;
        }
 
+       if (serverlist_querystage & SLIST_QUERYSTAGE_QWMASTERS)
+               return; // we must wait if we're also querying QW as it has no EOT marker
        // begin or resume serverlist queries
-       serverlist_querysleep = false;
-       serverlist_querywaittime = host.realtime + 3;
+       for (masternum = 0; masternum < DPMASTER_COUNT; ++masternum)
+               if (dpmasterstatus[masternum] && dpmasterstatus[masternum] < MASTER_RX_COMPLETE)
+                       break; // was queried but no EOT marker received yet
+       if (masternum >= DPMASTER_COUNT)
+       {
+               serverlist_querystage = SLIST_QUERYSTAGE_SERVERS;
+               if (net_slist_debug.integer)
+                       Con_Print("^2Starting to query servers early (got EOT from all masters)\n");
+       }
+}
+
+static void NetConn_ClientParsePacket_ServerList_ParseQWList(lhnetaddress_t *masteraddress, const char *masteraddressstring, const unsigned char *data, int length)
+{
+       uint8_t masternum;
+       lhnetaddress_t testaddress;
+
+       for (masternum = 0; masternum < QWMASTER_COUNT; ++masternum)
+               if (sv_qwmasters[masternum].string[0]
+               && LHNETADDRESS_FromString(&testaddress, sv_qwmasters[masternum].string, QWMASTER_PORT)
+               && LHNETADDRESS_Compare(&testaddress, masteraddress) == 0)
+                       break;
+       if (net_sourceaddresscheck.integer && masternum >= QWMASTER_COUNT)
+       {
+               Con_Printf(CON_WARN "ignoring QuakeWorld server list from unrecognised master %s\n", masteraddressstring);
+               return;
+       }
+
+       masterreplycount++;
+       qwmasterstatus[masternum] = MASTER_RX_RESPONSE;
+       if (serverlist_consoleoutput || net_slist_debug.integer)
+               Con_Printf("^5Received QuakeWorld server list from %s\n", sv_qwmasters[masternum].string);
+
+       while (length >= 6 && (data[0] != 0xFF || data[1] != 0xFF || data[2] != 0xFF || data[3] != 0xFF) && data[4] * 256 + data[5] != 0)
+       {
+               char ipstring[32];
+
+               dpsnprintf (ipstring, sizeof (ipstring), "%u.%u.%u.%u:%u", data[0], data[1], data[2], data[3], data[4] * 256 + data[5]);
+               if (serverlist_consoleoutput && developer_networking.integer)
+                       Con_Printf("Requesting info from QuakeWorld server %s\n", ipstring);
+
+               if (!NetConn_ClientParsePacket_ServerList_PrepareQuery(PROTOCOL_QUAKEWORLD, ipstring, false))
+                       break;
+
+               // move on to next address in packet
+               data += 6;
+               length -= 6;
+       }
+
+       // Unlike in NetConn_ClientParsePacket_ServerList_ParseDPList()
+       // we can't start to query servers early here because QW has no EOT marker.
 }
 #endif
 
@@ -1803,8 +2009,6 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
        size_t sendlength;
 #ifdef CONFIG_MENU
        char infostringvalue[MAX_INPUTLINE];
-       char ipstring[32];
-       const char *s;
 #endif
 
        // quakeworld ingame packet
@@ -1831,7 +2035,7 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                }
 
                sendlength = sizeof(senddata) - 4;
-               switch(Crypto_ClientParsePacket(string, length, senddata+4, &sendlength, peeraddress))
+               switch(Crypto_ClientParsePacket(string, length, senddata+4, &sendlength, peeraddress, addressstring2))
                {
                        case CRYPTO_NOMATCH:
                                // nothing to do
@@ -1884,7 +2088,7 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                {
                                        int k;
                                        buf[45] = ' ';
-                                       strlcpy(buf + 46, argbuf, sizeof(buf) - 46);
+                                       dp_strlcpy(buf + 46, argbuf, sizeof(buf) - 46);
                                        NetConn_Write(mysocket, buf, 46 + (int)strlen(buf + 46), peeraddress);
                                        cls.rcon_commands[i][0] = 0;
                                        --cls.rcon_trying;
@@ -1912,15 +2116,15 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                {
                        // darkplaces or quake3
                        char protocolnames[1400];
-                       Con_DPrintf("\"%s\" received, sending connect request back to %s\n", string, addressstring2);
+
                        if (net_sourceaddresscheck.integer && LHNETADDRESS_Compare(peeraddress, &cls.connect_address)) {
-                               Con_DPrintf("challenge message from wrong server %s\n", addressstring2);
+                               Con_Printf(CON_WARN "ignoring challenge message from wrong server %s\n", addressstring2);
                                return true;
                        }
+                       Con_DPrintf("\"%s\" received, sending connect request back to %s\n", string, addressstring2);
+                       dp_strlcpy(cl_connect_status, "Connect: replying to challenge...", sizeof(cl_connect_status));
+
                        Protocol_Names(protocolnames, sizeof(protocolnames));
-#ifdef CONFIG_MENU
-                       M_Update_Return_Reason("Got challenge response");
-#endif
                        // update the server IP in the userinfo (QW servers expect this, and it is used by the reconnect command)
                        InfoString_SetValue(cls.userinfo, sizeof(cls.userinfo), "*ip", addressstring2);
                        // TODO: add userinfo stuff here instead of using NQ commands?
@@ -1933,30 +2137,23 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                {
                        // darkplaces or quake3
                        if (net_sourceaddresscheck.integer && LHNETADDRESS_Compare(peeraddress, &cls.connect_address)) {
-                               Con_DPrintf("accept message from wrong server %s\n", addressstring2);
+                               Con_Printf(CON_WARN "ignoring accept message from wrong server %s\n", addressstring2);
                                return true;
                        }
-#ifdef CONFIG_MENU
-                       M_Update_Return_Reason("Accepted");
-#endif
                        NetConn_ConnectionEstablished(mysocket, peeraddress, PROTOCOL_DARKPLACES3);
                        return true;
                }
                if (length > 7 && !memcmp(string, "reject ", 7) && cls.connect_trying)
                {
-                       char rejectreason[128];
                        if (net_sourceaddresscheck.integer && LHNETADDRESS_Compare(peeraddress, &cls.connect_address)) {
-                               Con_DPrintf("reject message from wrong server %s\n", addressstring2);
+                               Con_Printf(CON_WARN "ignoring reject message from wrong server %s\n", addressstring2);
                                return true;
                        }
                        cls.connect_trying = false;
                        string += 7;
-                       length = min(length - 7, (int)sizeof(rejectreason) - 1);
-                       memcpy(rejectreason, string, length);
-                       rejectreason[length] = 0;
-#ifdef CONFIG_MENU
-                       M_Update_Return_Reason(rejectreason);
-#endif
+                       length = min(length - 7, (int)sizeof(cl_connect_status) - 1);
+                       dpsnprintf(cl_connect_status, sizeof(cl_connect_status), "Connect: rejected, %.*s", length, string);
+                       Con_Printf(CON_ERROR "Connect: rejected by %s\n" CON_ERROR "%.*s\n", addressstring2, length, string);
                        return true;
                }
 #ifdef CONFIG_MENU
@@ -1970,43 +2167,35 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
 
                                string += 15;
                                // search the cache for this server and update it
-                               n = NetConn_ClientParsePacket_ServerList_ProcessReply(addressstring2);
+                               // the challenge is (ab)used to return the query time
+                               InfoString_GetValue(string, "challenge", infostringvalue, sizeof(infostringvalue));
+                               n = NetConn_ClientParsePacket_ServerList_ProcessReply(addressstring2, infostringvalue);
                                if (n < 0)
                                        return true;
 
                                info = &serverlist_cache[n].info;
-                               info->game[0] = 0;
-                               info->mod[0]  = 0;
-                               info->map[0]  = 0;
-                               info->name[0] = 0;
-                               info->qcstatus[0] = 0;
-                               info->players[0] = 0;
-                               info->protocol = -1;
-                               info->numplayers = 0;
-                               info->numbots = -1;
-                               info->maxplayers  = 0;
-                               info->gameversion = 0;
-
                                p = strchr(string, '\n');
                                if(p)
                                {
                                        *p = 0; // cut off the string there
                                        ++p;
+                                       info->players_len = dp_strlcpy(info->players, p, sizeof(info->players));
                                }
                                else
+                               {
                                        Con_Printf("statusResponse without players block?\n");
-
-                               if ((s = InfoString_GetValue(string, "gamename"     , infostringvalue, sizeof(infostringvalue))) != NULL) strlcpy(info->game, s, sizeof (info->game));
-                               if ((s = InfoString_GetValue(string, "modname"      , infostringvalue, sizeof(infostringvalue))) != NULL) strlcpy(info->mod , s, sizeof (info->mod ));
-                               if ((s = InfoString_GetValue(string, "mapname"      , infostringvalue, sizeof(infostringvalue))) != NULL) strlcpy(info->map , s, sizeof (info->map ));
-                               if ((s = InfoString_GetValue(string, "hostname"     , infostringvalue, sizeof(infostringvalue))) != NULL) strlcpy(info->name, s, sizeof (info->name));
-                               if ((s = InfoString_GetValue(string, "protocol"     , infostringvalue, sizeof(infostringvalue))) != NULL) info->protocol = atoi(s);
-                               if ((s = InfoString_GetValue(string, "clients"      , infostringvalue, sizeof(infostringvalue))) != NULL) info->numplayers = atoi(s);
-                               if ((s = InfoString_GetValue(string, "bots"         , infostringvalue, sizeof(infostringvalue))) != NULL) info->numbots = atoi(s);
-                               if ((s = InfoString_GetValue(string, "sv_maxclients", infostringvalue, sizeof(infostringvalue))) != NULL) info->maxplayers = atoi(s);
-                               if ((s = InfoString_GetValue(string, "gameversion"  , infostringvalue, sizeof(infostringvalue))) != NULL) info->gameversion = atoi(s);
-                               if ((s = InfoString_GetValue(string, "qcstatus"     , infostringvalue, sizeof(infostringvalue))) != NULL) strlcpy(info->qcstatus, s, sizeof(info->qcstatus));
-                               if (p                                                                                         != NULL) strlcpy(info->players, p, sizeof(info->players));
+                                       info->players_len = info->players[0] = 0;
+                               }
+                               info->game_len     = InfoString_GetValue(string, "gamename", info->game,     sizeof(info->game));
+                               info->mod_len      = InfoString_GetValue(string, "modname",  info->mod,      sizeof(info->mod));
+                               info->map_len      = InfoString_GetValue(string, "mapname",  info->map,      sizeof(info->map));
+                               info->name_len     = InfoString_GetValue(string, "hostname", info->name,     sizeof(info->name));
+                               info->qcstatus_len = InfoString_GetValue(string, "qcstatus", info->qcstatus, sizeof(info->qcstatus));
+                               info->protocol    = InfoString_GetValue(string, "protocol"     , infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : -1;
+                               info->numplayers  = InfoString_GetValue(string, "clients"      , infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : 0;
+                               info->numbots     = InfoString_GetValue(string, "bots"         , infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : -1;
+                               info->maxplayers  = InfoString_GetValue(string, "sv_maxclients", infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : 0;
+                               info->gameversion = InfoString_GetValue(string, "gameversion"  , infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : 0;
                                info->numhumans = info->numplayers - max(0, info->numbots);
                                info->freeslots = info->maxplayers - info->numplayers;
 
@@ -2021,33 +2210,24 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
 
                                string += 13;
                                // search the cache for this server and update it
-                               n = NetConn_ClientParsePacket_ServerList_ProcessReply(addressstring2);
+                               // the challenge is (ab)used to return the query time
+                               InfoString_GetValue(string, "challenge", infostringvalue, sizeof(infostringvalue));
+                               n = NetConn_ClientParsePacket_ServerList_ProcessReply(addressstring2, infostringvalue);
                                if (n < 0)
                                        return true;
 
                                info = &serverlist_cache[n].info;
-                               info->game[0] = 0;
-                               info->mod[0]  = 0;
-                               info->map[0]  = 0;
-                               info->name[0] = 0;
-                               info->qcstatus[0] = 0;
-                               info->players[0] = 0;
-                               info->protocol = -1;
-                               info->numplayers = 0;
-                               info->numbots = -1;
-                               info->maxplayers  = 0;
-                               info->gameversion = 0;
-
-                               if ((s = InfoString_GetValue(string, "gamename"     , infostringvalue, sizeof(infostringvalue))) != NULL) strlcpy(info->game, s, sizeof (info->game));
-                               if ((s = InfoString_GetValue(string, "modname"      , infostringvalue, sizeof(infostringvalue))) != NULL) strlcpy(info->mod , s, sizeof (info->mod ));
-                               if ((s = InfoString_GetValue(string, "mapname"      , infostringvalue, sizeof(infostringvalue))) != NULL) strlcpy(info->map , s, sizeof (info->map ));
-                               if ((s = InfoString_GetValue(string, "hostname"     , infostringvalue, sizeof(infostringvalue))) != NULL) strlcpy(info->name, s, sizeof (info->name));
-                               if ((s = InfoString_GetValue(string, "protocol"     , infostringvalue, sizeof(infostringvalue))) != NULL) info->protocol = atoi(s);
-                               if ((s = InfoString_GetValue(string, "clients"      , infostringvalue, sizeof(infostringvalue))) != NULL) info->numplayers = atoi(s);
-                               if ((s = InfoString_GetValue(string, "bots"         , infostringvalue, sizeof(infostringvalue))) != NULL) info->numbots = atoi(s);
-                               if ((s = InfoString_GetValue(string, "sv_maxclients", infostringvalue, sizeof(infostringvalue))) != NULL) info->maxplayers = atoi(s);
-                               if ((s = InfoString_GetValue(string, "gameversion"  , infostringvalue, sizeof(infostringvalue))) != NULL) info->gameversion = atoi(s);
-                               if ((s = InfoString_GetValue(string, "qcstatus"     , infostringvalue, sizeof(infostringvalue))) != NULL) strlcpy(info->qcstatus, s, sizeof(info->qcstatus));
+                               info->players_len = info->players[0] = 0;
+                               info->game_len     = InfoString_GetValue(string, "gamename", info->game,     sizeof(info->game));
+                               info->mod_len      = InfoString_GetValue(string, "modname",  info->mod,      sizeof(info->mod));
+                               info->map_len      = InfoString_GetValue(string, "mapname",  info->map,      sizeof(info->map));
+                               info->name_len     = InfoString_GetValue(string, "hostname", info->name,     sizeof(info->name));
+                               info->qcstatus_len = InfoString_GetValue(string, "qcstatus", info->qcstatus, sizeof(info->qcstatus));
+                               info->protocol    = InfoString_GetValue(string, "protocol"     , infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : -1;
+                               info->numplayers  = InfoString_GetValue(string, "clients"      , infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : 0;
+                               info->numbots     = InfoString_GetValue(string, "bots"         , infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : -1;
+                               info->maxplayers  = InfoString_GetValue(string, "sv_maxclients", infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : 0;
+                               info->gameversion = InfoString_GetValue(string, "gameversion"  , infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : 0;
                                info->numhumans = info->numplayers - max(0, info->numbots);
                                info->freeslots = info->maxplayers - info->numplayers;
 
@@ -2060,7 +2240,7 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                // Extract the IP addresses
                                data += 18;
                                length -= 18;
-                               NetConn_ClientParsePacket_ServerList_ParseDPList(peeraddress, data, length, false);
+                               NetConn_ClientParsePacket_ServerList_ParseDPList(peeraddress, addressstring2, data, length, false);
                                return true;
                        }
                        if (!strncmp(string, "getserversExtResponse", 21) && serverlist_cachecount < SERVERLIST_TOTALSIZE)
@@ -2068,7 +2248,7 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                // Extract the IP addresses
                                data += 21;
                                length -= 21;
-                               NetConn_ClientParsePacket_ServerList_ParseDPList(peeraddress, data, length, true);
+                               NetConn_ClientParsePacket_ServerList_ParseDPList(peeraddress, addressstring2, data, length, true);
                                return true;
                        }
                        if (!memcmp(string, "d\n", 2) && serverlist_cachecount < SERVERLIST_TOTALSIZE)
@@ -2076,26 +2256,7 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                // Extract the IP addresses
                                data += 2;
                                length -= 2;
-                               masterreplycount++;
-                               if (serverlist_consoleoutput)
-                                       Con_Printf("received QuakeWorld server list from %s...\n", addressstring2);
-                               while (length >= 6 && (data[0] != 0xFF || data[1] != 0xFF || data[2] != 0xFF || data[3] != 0xFF) && data[4] * 256 + data[5] != 0)
-                               {
-                                       dpsnprintf (ipstring, sizeof (ipstring), "%u.%u.%u.%u:%u", data[0], data[1], data[2], data[3], data[4] * 256 + data[5]);
-                                       if (serverlist_consoleoutput && developer_networking.integer)
-                                               Con_Printf("Requesting info from QuakeWorld server %s\n", ipstring);
-                                       
-                                       if( !NetConn_ClientParsePacket_ServerList_PrepareQuery( PROTOCOL_QUAKEWORLD, ipstring, false ) ) {
-                                               break;
-                                       }
-
-                                       // move on to next address in packet
-                                       data += 6;
-                                       length -= 6;
-                               }
-                               // begin or resume serverlist queries
-                               serverlist_querysleep = false;
-                               serverlist_querywaittime = host.realtime + 3;
+                               NetConn_ClientParsePacket_ServerList_ParseQWList(peeraddress, addressstring2, data, length);
                                return true;
                        }
                }
@@ -2123,13 +2284,12 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                {
                        // challenge message
                        if (net_sourceaddresscheck.integer && LHNETADDRESS_Compare(peeraddress, &cls.connect_address)) {
-                               Con_DPrintf("c message from wrong server %s\n", addressstring2);
+                               Con_Printf(CON_WARN "ignoring c message from wrong server %s\n", addressstring2);
                                return true;
                        }
-                       Con_Printf("challenge %s received, sending QuakeWorld connect request back to %s\n", string + 1, addressstring2);
-#ifdef CONFIG_MENU
-                       M_Update_Return_Reason("Got QuakeWorld challenge response");
-#endif
+                       Con_DPrintf("challenge %s received, sending QuakeWorld connect request back to %s\n", string + 1, addressstring2);
+                       dp_strlcpy(cl_connect_status, "Connect: replying to challenge...", sizeof(cl_connect_status));
+
                        cls.qw_qport = qport.integer;
                        // update the server IP in the userinfo (QW servers expect this, and it is used by the reconnect command)
                        InfoString_SetValue(cls.userinfo, sizeof(cls.userinfo), "*ip", addressstring2);
@@ -2142,12 +2302,9 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                {
                        // accept message
                        if (net_sourceaddresscheck.integer && LHNETADDRESS_Compare(peeraddress, &cls.connect_address)) {
-                               Con_DPrintf("j message from wrong server %s\n", addressstring2);
+                               Con_Printf(CON_WARN "ignoring j message from wrong server %s\n", addressstring2);
                                return true;
                        }
-#ifdef CONFIG_MENU
-                       M_Update_Return_Reason("QuakeWorld Accepted");
-#endif
                        NetConn_ConnectionEstablished(mysocket, peeraddress, PROTOCOL_QUAKEWORLD);
                        return true;
                }
@@ -2156,6 +2313,7 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
 #ifdef CONFIG_MENU
                        serverlist_info_t *info;
                        int n;
+                       const char *s;
 
                        // qw server status
                        if (serverlist_consoleoutput && developer_networking.integer >= 2)
@@ -2163,20 +2321,20 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
 
                        string += 1;
                        // search the cache for this server and update it
-                       n = NetConn_ClientParsePacket_ServerList_ProcessReply(addressstring2);
+                       n = NetConn_ClientParsePacket_ServerList_ProcessReply(addressstring2, NULL);
                        if (n < 0)
                                return true;
 
                        info = &serverlist_cache[n].info;
-                       strlcpy(info->game, "QuakeWorld", sizeof(info->game));
-                       if ((s = InfoString_GetValue(string, "*gamedir"     , infostringvalue, sizeof(infostringvalue))) != NULL) strlcpy(info->mod , s, sizeof (info->mod ));else info->mod[0]  = 0;
-                       if ((s = InfoString_GetValue(string, "map"          , infostringvalue, sizeof(infostringvalue))) != NULL) strlcpy(info->map , s, sizeof (info->map ));else info->map[0]  = 0;
-                       if ((s = InfoString_GetValue(string, "hostname"     , infostringvalue, sizeof(infostringvalue))) != NULL) strlcpy(info->name, s, sizeof (info->name));else info->name[0] = 0;
+                       dp_strlcpy(info->game, "QuakeWorld", sizeof(info->game));
+                       info->mod_len  = InfoString_GetValue(string, "*gamedir", info->mod, sizeof(info->mod));
+                       info->map_len  = InfoString_GetValue(string, "map"     , info->map, sizeof(info->map));
+                       info->name_len = InfoString_GetValue(string, "hostname", info->name, sizeof(info->name));
                        info->protocol = 0;
                        info->numplayers = 0; // updated below
                        info->numhumans = 0; // updated below
-                       if ((s = InfoString_GetValue(string, "maxclients"   , infostringvalue, sizeof(infostringvalue))) != NULL) info->maxplayers = atoi(s);else info->maxplayers  = 0;
-                       if ((s = InfoString_GetValue(string, "gameversion"  , infostringvalue, sizeof(infostringvalue))) != NULL) info->gameversion = atoi(s);else info->gameversion = 0;
+                       info->maxplayers  = InfoString_GetValue(string, "maxclients" , infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : 0;
+                       info->gameversion = InfoString_GetValue(string, "gameversion", infostringvalue, sizeof(infostringvalue)) ? atoi(infostringvalue) : 0;
 
                        // count active players on server
                        // (we could gather more info, but we're just after the number)
@@ -2204,7 +2362,7 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                {
                        // qw print command, used by rcon replies too
                        if (net_sourceaddresscheck.integer && LHNETADDRESS_Compare(peeraddress, &cls.connect_address) && LHNETADDRESS_Compare(peeraddress, &cls.rcon_address)) {
-                               Con_DPrintf("n message from wrong server %s\n", addressstring2);
+                               Con_Printf(CON_WARN "ignoring n message from wrong server %s\n", addressstring2);
                                return true;
                        }
                        Con_Printf("QW print command from server at %s:\n%s\n", addressstring2, string + 1);
@@ -2243,7 +2401,7 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                        {
                                lhnetaddress_t clientportaddress;
                                if (net_sourceaddresscheck.integer && LHNETADDRESS_Compare(peeraddress, &cls.connect_address)) {
-                                       Con_DPrintf("CCREP_ACCEPT message from wrong server %s\n", addressstring2);
+                                       Con_Printf(CON_WARN "ignoring CCREP_ACCEPT message from wrong server %s\n", addressstring2);
                                        break;
                                }
                                clientportaddress = *peeraddress;
@@ -2265,23 +2423,18 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                        Con_Printf("Connected to ProQuake %.1f server, enabling precise aim\n", cls.proquake_serverversion / 10.0f);
                                // update the server IP in the userinfo (QW servers expect this, and it is used by the reconnect command)
                                InfoString_SetValue(cls.userinfo, sizeof(cls.userinfo), "*ip", addressstring2);
-#ifdef CONFIG_MENU
-                               M_Update_Return_Reason("Accepted");
-#endif
                                NetConn_ConnectionEstablished(mysocket, &clientportaddress, PROTOCOL_QUAKE);
                        }
                        break;
                case CCREP_REJECT:
-                       if (developer_extra.integer) {
-                               Con_DPrintf("CCREP_REJECT message from wrong server %s\n", addressstring2);
-                               break;
-                       }
                        if (net_sourceaddresscheck.integer && LHNETADDRESS_Compare(peeraddress, &cls.connect_address))
+                       {
+                               Con_Printf(CON_WARN "ignoring CCREP_REJECT message from wrong server %s\n", addressstring2);
                                break;
+                       }
                        cls.connect_trying = false;
-#ifdef CONFIG_MENU
-                       M_Update_Return_Reason((char *)MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)));
-#endif
+                       dpsnprintf(cl_connect_status, sizeof(cl_connect_status), "Connect: rejected, %s", MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)));
+                       Con_Printf(CON_ERROR "Connect: rejected by %s\n%s\n", addressstring2, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)));
                        break;
                case CCREP_SERVER_INFO:
                        if (developer_extra.integer)
@@ -2291,15 +2444,15 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                        // we just ignore it and keep the real address
                        MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring));
                        // search the cache for this server and update it
-                       n = NetConn_ClientParsePacket_ServerList_ProcessReply(addressstring2);
+                       n = NetConn_ClientParsePacket_ServerList_ProcessReply(addressstring2, NULL);
                        if (n < 0)
                                break;
 
                        info = &serverlist_cache[n].info;
-                       strlcpy(info->game, "Quake", sizeof(info->game));
-                       strlcpy(info->mod , "", sizeof(info->mod)); // mod name is not specified
-                       strlcpy(info->name, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(info->name));
-                       strlcpy(info->map , MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(info->map));
+                       info->game_len = dp_strlcpy(info->game, "Quake", sizeof(info->game));
+                       info->mod_len  = dp_strlcpy(info->mod, "", sizeof(info->mod)); // mod name is not specified
+                       info->name_len = dp_strlcpy(info->name, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(info->name));
+                       info->map_len  = dp_strlcpy(info->map, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof(info->map));
                        info->numplayers = MSG_ReadByte(&cl_message);
                        info->maxplayers = MSG_ReadByte(&cl_message);
                        info->protocol = MSG_ReadByte(&cl_message);
@@ -2309,7 +2462,7 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                        break;
                case CCREP_RCON: // RocketGuy: ProQuake rcon support
                        if (net_sourceaddresscheck.integer && LHNETADDRESS_Compare(peeraddress, &cls.rcon_address)) {
-                               Con_DPrintf("CCREP_RCON message from wrong server %s\n", addressstring2);
+                               Con_Printf(CON_WARN "ignoring CCREP_RCON message from wrong server %s\n", addressstring2);
                                break;
                        }
                        if (developer_extra.integer)
@@ -2344,116 +2497,157 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
 #ifdef CONFIG_MENU
 void NetConn_QueryQueueFrame(void)
 {
-       int index;
-       int queries;
-       int maxqueries;
-       double timeouttime;
+       unsigned index;
+       unsigned maxqueries;
+       char dpquery[53]; // theoretical max: 14+22+16+1
+       double currentrealtime;
        static double querycounter = 0;
+       static unsigned pass = 0, server = 0;
+       unsigned queriesperserver = bound(1, net_slist_maxtries.integer, 8);
 
-       if(!net_slist_pause.integer && serverlist_paused)
-               ServerList_RebuildViewList();
-       serverlist_paused = net_slist_pause.integer != 0;
-
-       if (serverlist_querysleep)
+       if (!serverlist_querystage)
                return;
 
+       // If the client stalls partway through a frame (test command: `alias a a;a`)
+       // for correct pings we need to know what host.realtime would be if it were updated now.
+       currentrealtime = host.realtime + (Sys_DirtyTime() - host.dirtytime);
+
        // apply a cool down time after master server replies,
        // to avoid messing up the ping times on the servers
-       if (serverlist_querywaittime > host.realtime)
-               return;
+       if (serverlist_querystage < SLIST_QUERYSTAGE_SERVERS)
+       {
+               if (currentrealtime < masterquerytime + net_slist_timeout.value)
+                       return;
+
+               // Report the masters that timed out or whose response was incomplete.
+               for (index = 0; index < DPMASTER_COUNT; ++index)
+                       if (dpmasterstatus[index] && dpmasterstatus[index] < MASTER_RX_COMPLETE)
+                               Con_Printf(CON_WARN "WARNING: dpmaster %s %s\n", sv_masters[index].string, dpmasterstatus[index] == MASTER_TX_QUERY ? "timed out" : "response incomplete");
+               for (index = 0; index < QWMASTER_COUNT; ++index)
+                       if (qwmasterstatus[index] && qwmasterstatus[index] < MASTER_RX_RESPONSE) // no EOT marker in QW lists
+                               Con_Printf(CON_WARN "WARNING: qwmaster %s timed out\n", sv_qwmasters[index].string);
+
+               serverlist_querystage = SLIST_QUERYSTAGE_SERVERS;
+       }
 
        // each time querycounter reaches 1.0 issue a query
        querycounter += cl.realframetime * net_slist_queriespersecond.value;
-       maxqueries = (int)querycounter;
-       maxqueries = bound(0, maxqueries, net_slist_queriesperframe.integer);
+       maxqueries = bound(0, (int)querycounter, net_slist_queriesperframe.integer);
        querycounter -= maxqueries;
-
-       if( maxqueries == 0 ) {
+       if (maxqueries == 0)
                return;
-       }
 
-       //      scan serverlist and issue queries as needed
-       serverlist_querysleep = true;
-
-       timeouttime     = host.realtime - net_slist_timeout.value;
-       for( index = 0, queries = 0 ;   index   < serverlist_cachecount &&      queries < maxqueries    ; index++ )
+       if (pass < queriesperserver)
        {
-               serverlist_entry_t *entry = &serverlist_cache[ index ];
-               if( entry->query != SQS_QUERYING && entry->query != SQS_REFRESHING )
-               {
-                       continue;
-               }
+               // QW depends on waiting "long enough" between queries that responses "definitely" refer to the most recent querytime
+               // DP servers can echo back a timestamp for reliable (and more frequent, see net_slist_interval) pings
+               ServerList_BuildDPServerQuery(dpquery, sizeof(dpquery), currentrealtime);
 
-               serverlist_querysleep   = false;
-               if( entry->querycounter !=      0 && entry->querytime > timeouttime     )
+               for (unsigned queries = 0; server < serverlist_cachecount; ++server)
                {
-                       continue;
-               }
+                       lhnetaddress_t address;
+                       unsigned socket;
+                       serverlist_entry_t *entry = &serverlist_cache[server];
 
-               if( entry->querycounter !=      (unsigned) net_slist_maxtries.integer )
-               {
-                       lhnetaddress_t  address;
-                       int socket;
+                       if (queries >= maxqueries
+                       || currentrealtime <= entry->querytime + (entry->protocol == PROTOCOL_QUAKEWORLD ? net_slist_timeout : net_slist_interval).value)
+                               return; // continue this pass at the current server on a later frame
 
                        LHNETADDRESS_FromString(&address, entry->info.cname, 0);
-                       if      (entry->protocol == PROTOCOL_QUAKEWORLD)
+                       if (entry->protocol == PROTOCOL_QUAKEWORLD)
                        {
-                               for (socket     = 0; socket     < cl_numsockets ;       socket++)
-                                       NetConn_WriteString(cl_sockets[socket], "\377\377\377\377status\n", &address);
+                               for (socket = 0; socket < cl_numsockets; ++socket)
+                                       if (cl_sockets[socket])
+                                               NetConn_WriteString(cl_sockets[socket], "\377\377\377\377status\n", &address);
                        }
                        else
                        {
-                               for (socket     = 0; socket     < cl_numsockets ;       socket++)
-                                       NetConn_WriteString(cl_sockets[socket], "\377\377\377\377getstatus", &address);
+                               for (socket = 0; socket < cl_numsockets; ++socket)
+                                       if (cl_sockets[socket])
+                                               NetConn_WriteString(cl_sockets[socket], dpquery, &address);
                        }
 
-                       //      update the entry fields
-                       entry->querytime = host.realtime;
-                       entry->querycounter++;
+                       entry->querytime = currentrealtime;
+                       queries++;
 
-                       // if not in the slist menu we should print the server to console
                        if (serverlist_consoleoutput)
-                               Con_Printf("querying %25s (%i. try)\n", entry->info.cname, entry->querycounter);
-
-                       queries++;
+                               Con_Printf("querying %25s (%i. try)\n", entry->info.cname, pass + 1);
                }
-               else
+       }
+       else
+       {
+               // check timeouts
+               for (; server < serverlist_cachecount; ++server)
                {
-                       // have we tried to refresh this server?
-                       if( entry->query == SQS_REFRESHING ) {
-                               // yes, so update the reply count (since its not responding anymore)
-                               serverreplycount--;
-                               if(!serverlist_paused)
-                                       ServerList_ViewList_Remove(entry);
+                       serverlist_entry_t *entry = &serverlist_cache[server];
+
+                       if (!entry->responded // no acceptable response during this refresh cycle
+                       && entry->info.ping) // visible in the list (has old ping from previous refresh cycle)
+                       {
+                               if (currentrealtime > entry->querytime + net_slist_maxping.integer/1000)
+                               {
+                                       // you have no chance to survive make your timeout
+                                       serverreplycount--;
+                                       if(!net_slist_pause.integer)
+                                               ServerList_ViewList_Remove(entry);
+                                       entry->info.ping = 0; // removed later if net_slist_pause
+                               }
+                               else // still has time
+                                       return; // continue this pass at the current server on a later frame
                        }
-                       entry->query = SQS_TIMEDOUT;
                }
        }
+
+       // We finished the pass, ie didn't stop at maxqueries
+       // or a server that can't be (re)queried or timed out yet.
+       ++pass;
+       server = 0;
+
+       if (pass == queriesperserver)
+       {
+               // timeout pass begins next frame
+               if (net_slist_debug.integer)
+                       Con_Printf("^2Finished querying masters and servers in %f\n", currentrealtime - masterquerytime);
+       }
+       else if (pass > queriesperserver)
+       {
+               // Nothing else to do until the next refresh cycle.
+               if (net_slist_debug.integer)
+                       Con_Printf("^4Finished checking server timeouts in %f\n", currentrealtime - serverlist_cache[serverlist_cachecount - 1].querytime);
+               serverlist_querystage = 0;
+               pass = 0;
+       }
 }
 #endif
 
 void NetConn_ClientFrame(void)
 {
-       int i, length;
+       unsigned i;
+       int length;
        lhnetaddress_t peeraddress;
        unsigned char readbuffer[NET_HEADERSIZE+NET_MAXMESSAGE];
+
        NetConn_UpdateSockets();
+
        if (cls.connect_trying && cls.connect_nextsendtime < host.realtime)
        {
-#ifdef CONFIG_MENU
-               if (cls.connect_remainingtries == 0)
-                       M_Update_Return_Reason("Connect: Waiting 10 seconds for reply");
-#endif
-               cls.connect_nextsendtime = host.realtime + 1;
-               cls.connect_remainingtries--;
-               if (cls.connect_remainingtries <= -10)
+               if (cls.connect_remainingtries > 0)
                {
+                       cls.connect_remainingtries--;
+                       dpsnprintf(cl_connect_status, sizeof(cl_connect_status), "Connect: sending initial request, %i %s left...", cls.connect_remainingtries, cls.connect_remainingtries == 1 ? "retry" : "retries");
+               }
+               else
+               {
+                       char address[128];
+
                        cls.connect_trying = false;
-#ifdef CONFIG_MENU
-                       M_Update_Return_Reason("Connect: Failed");
-#endif
+                       LHNETADDRESS_ToString(&cls.connect_address, address, sizeof(address), true);
+                       dp_strlcpy(cl_connect_status, "Connect: failed, no reply", sizeof(cl_connect_status));
+                       Con_Printf(CON_ERROR "%s from %s\n", cl_connect_status, address);
                        return;
                }
+               cls.connect_nextsendtime = host.realtime + 1;
+
                // try challenge first (newer DP server or QW)
                NetConn_WriteString(cls.connect_mysocket, "\377\377\377\377getchallenge", &cls.connect_address);
                // then try netquake as a fallback (old server, or netquake)
@@ -2476,6 +2670,7 @@ void NetConn_ClientFrame(void)
                NetConn_Write(cls.connect_mysocket, cl_message.data, cl_message.cursize, &cls.connect_address);
                SZ_Clear(&cl_message);
        }
+
        for (i = 0;i < cl_numsockets;i++)
        {
                while (cl_sockets[i] && (length = NetConn_Read(cl_sockets[i], readbuffer, sizeof(readbuffer), &peeraddress)) > 0)
@@ -2624,17 +2819,17 @@ static qbool NetConn_BuildStatusResponse(const char* challenge, char* out_msg, s
                                if (IS_NEXUIZ_DERIVED(gamemode) && (teamplay.integer > 0))
                                {
                                        if(client->frags == -666) // spectator
-                                               strlcpy(teambuf, " 0", sizeof(teambuf));
+                                               dp_strlcpy(teambuf, " 0", sizeof(teambuf));
                                        else if(client->colors == 0x44) // red team
-                                               strlcpy(teambuf, " 1", sizeof(teambuf));
+                                               dp_strlcpy(teambuf, " 1", sizeof(teambuf));
                                        else if(client->colors == 0xDD) // blue team
-                                               strlcpy(teambuf, " 2", sizeof(teambuf));
+                                               dp_strlcpy(teambuf, " 2", sizeof(teambuf));
                                        else if(client->colors == 0xCC) // yellow team
-                                               strlcpy(teambuf, " 3", sizeof(teambuf));
+                                               dp_strlcpy(teambuf, " 3", sizeof(teambuf));
                                        else if(client->colors == 0x99) // pink team
-                                               strlcpy(teambuf, " 4", sizeof(teambuf));
+                                               dp_strlcpy(teambuf, " 4", sizeof(teambuf));
                                        else
-                                               strlcpy(teambuf, " 0", sizeof(teambuf));
+                                               dp_strlcpy(teambuf, " 0", sizeof(teambuf));
                                }
                                else
                                        *teambuf = 0;
@@ -2818,7 +3013,7 @@ static const char *RCon_Authenticate(lhnetaddress_t *peeraddress, const char *pa
        while((userpass_end = strchr(userpass_start, ' ')))
        {
                have_usernames = true;
-               strlcpy(buf, userpass_start, ((size_t)(userpass_end-userpass_start) >= sizeof(buf)) ? (int)(sizeof(buf)) : (int)(userpass_end-userpass_start+1));
+               dp_ustr2stp(buf, sizeof(buf), userpass_start, userpass_end - userpass_start);
                if(buf[0])  // Ignore empty entries due to leading/duplicate space.
                        if(comparator(peeraddress, buf, password, cs, cslen))
                                goto allow;
@@ -2837,7 +3032,7 @@ static const char *RCon_Authenticate(lhnetaddress_t *peeraddress, const char *pa
        while((userpass_end = strchr(userpass_start, ' ')))
        {
                have_usernames = true;
-               strlcpy(buf, userpass_start, ((size_t)(userpass_end-userpass_start) >= sizeof(buf)) ? (int)(sizeof(buf)) : (int)(userpass_end-userpass_start+1));
+               dp_ustr2stp(buf, sizeof(buf), userpass_start, userpass_end - userpass_start);
                if(buf[0])  // Ignore empty entries due to leading/duplicate space.
                        if(comparator(peeraddress, buf, password, cs, cslen))
                                goto check;
@@ -2927,7 +3122,7 @@ static void RCon_Execute(lhnetsocket_t *mysocket, lhnetaddress_t *peeraddress, c
                        if(l)
                        {
                                client_t *host_client_save = host_client;
-                               Cmd_ExecuteString(cmd_local, s, src_local, true);
+                               Cmd_PreprocessAndExecuteString(cmd_local, s, l, src_local, true);
                                host_client = host_client_save;
                                // in case it is a command that changes host_client (like restart)
                        }
@@ -2937,7 +3132,10 @@ static void RCon_Execute(lhnetsocket_t *mysocket, lhnetaddress_t *peeraddress, c
        }
        else
        {
-               Con_Printf("server denied rcon access to %s\n", host_client ? host_client->name : addressstring2);
+               if (!host_client || !host_client->netconnection || LHNETADDRESS_GetAddressType(&host_client->netconnection->peeraddress) != LHNETADDRESSTYPE_LOOP)
+                       Con_Rcon_Redirect_Init(mysocket, peeraddress, proquakeprotocol);
+               Con_Printf(CON_ERROR "server denied rcon access to %s\n", host_client ? host_client->name : addressstring2);
+               Con_Rcon_Redirect_End();
        }
 }
 
@@ -3046,7 +3244,6 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                }
                if (length > 8 && !memcmp(string, "connect\\", 8))
                {
-                       char *s;
                        client_t *client;
                        crypto_t *crypto = Crypto_ServerGetInstance(peeraddress);
                        string += 7;
@@ -3071,12 +3268,12 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                        }
                        else
                        {
-                               if ((s = InfoString_GetValue(string, "challenge", infostringvalue, sizeof(infostringvalue))))
+                               if (InfoString_GetValue(string, "challenge", infostringvalue, sizeof(infostringvalue)))
                                {
                                        // validate the challenge
                                        for (i = 0;i < MAX_CHALLENGES;i++)
                                                if(challenges[i].time > 0)
-                                                       if (!LHNETADDRESS_Compare(peeraddress, &challenges[i].address) && !strcmp(challenges[i].string, s))
+                                                       if (!LHNETADDRESS_Compare(peeraddress, &challenges[i].address) && !strcmp(challenges[i].string, infostringvalue))
                                                                break;
                                        // if the challenge is not recognized, drop the packet
                                        if (i == MAX_CHALLENGES)
@@ -3084,8 +3281,8 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                }
                        }
 
-                       if((s = InfoString_GetValue(string, "message", infostringvalue, sizeof(infostringvalue))))
-                               Con_DPrintf("Connecting client %s sent us the message: %s\n", addressstring2, s);
+                       if(InfoString_GetValue(string, "message", infostringvalue, sizeof(infostringvalue)))
+                               Con_DPrintf("Connecting client %s sent us the message: %s\n", addressstring2, infostringvalue);
 
                        if(!(islocal || sv_public.integer > -2))
                        {
@@ -3098,7 +3295,7 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                        }
 
                        // check engine protocol
-                       if(!(s = InfoString_GetValue(string, "protocol", infostringvalue, sizeof(infostringvalue))) || strcmp(s, "darkplaces 3"))
+                       if(!InfoString_GetValue(string, "protocol", infostringvalue, sizeof(infostringvalue)) || strcmp(infostringvalue, "darkplaces 3"))
                        {
                                if (developer_extra.integer)
                                        Con_Printf("Datagram_ParseConnectionless: sending \"reject Wrong game protocol.\" to %s.\n", addressstring2);
@@ -3430,7 +3627,7 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                {
                                        // connect to the client
                                        // everything is allocated, just fill in the details
-                                       strlcpy (conn->address, addressstring2, sizeof (conn->address));
+                                       dp_strlcpy (conn->address, addressstring2, sizeof (conn->address));
                                        if (developer_extra.integer)
                                                Con_DPrintf("Datagram_ParseConnectionless: sending CCREP_ACCEPT to %s.\n", addressstring2);
                                        // send back the info about the server connection
@@ -3483,7 +3680,7 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                LHNETADDRESS_ToString(LHNET_AddressFromSocket(mysocket), myaddressstring, sizeof(myaddressstring), true);
                                MSG_WriteString(&sv_message, myaddressstring);
                                MSG_WriteString(&sv_message, hostname.string);
-                               MSG_WriteString(&sv_message, sv.name);
+                               MSG_WriteString(&sv_message, sv.worldbasename);
                                // How many clients are there?
                                for (i = 0, numclients = 0;i < svs.maxclients;i++)
                                        if (svs.clients[i].active)
@@ -3578,8 +3775,8 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                char *s;
                                char *endpos;
                                const char *userlevel;
-                               strlcpy(password, MSG_ReadString(&sv_message, sv_readstring, sizeof(sv_readstring)), sizeof(password));
-                               strlcpy(cmd, MSG_ReadString(&sv_message, sv_readstring, sizeof(sv_readstring)), sizeof(cmd));
+                               dp_strlcpy(password, MSG_ReadString(&sv_message, sv_readstring, sizeof(sv_readstring)), sizeof(password));
+                               dp_strlcpy(cmd, MSG_ReadString(&sv_message, sv_readstring, sizeof(sv_readstring)), sizeof(cmd));
                                s = cmd;
                                endpos = cmd + strlen(cmd) + 1; // one behind the NUL, so adding strlen+1 will eventually reach it
                                userlevel = RCon_Authenticate(peeraddress, password, s, endpos, plaintext_matching, NULL, 0);
@@ -3608,35 +3805,30 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
 
 void NetConn_ServerFrame(void)
 {
-       int i, length;
+       unsigned i;
+       int length;
        lhnetaddress_t peeraddress;
        unsigned char readbuffer[NET_HEADERSIZE+NET_MAXMESSAGE];
+
        for (i = 0;i < sv_numsockets;i++)
                while (sv_sockets[i] && (length = NetConn_Read(sv_sockets[i], readbuffer, sizeof(readbuffer), &peeraddress)) > 0)
                        NetConn_ServerParsePacket(sv_sockets[i], readbuffer, length, &peeraddress);
 }
 
-void NetConn_SleepMicroseconds(int microseconds)
-{
-       LHNET_SleepUntilPacket_Microseconds(microseconds);
-}
-
 #ifdef CONFIG_MENU
 void NetConn_QueryMasters(qbool querydp, qbool queryqw)
 {
-       int i, j;
-       int masternum;
+       unsigned i, j;
+       unsigned masternum;
        lhnetaddress_t masteraddress;
-       lhnetaddress_t broadcastaddress;
        char request[256];
+       char lookupstring[128];
 
        if (serverlist_cachecount >= SERVERLIST_TOTALSIZE)
                return;
 
-       // 26000 is the default quake server port, servers on other ports will not
-       // be found
-       // note this is IPv4-only, I doubt there are IPv6-only LANs out there
-       LHNETADDRESS_FromString(&broadcastaddress, "255.255.255.255", 26000);
+       memset(dpmasterstatus, 0, sizeof(*dpmasterstatus));
+       memset(qwmasterstatus, 0, sizeof(*qwmasterstatus));
 
        if (querydp)
        {
@@ -3645,24 +3837,7 @@ void NetConn_QueryMasters(qbool querydp, qbool queryqw)
                        if (cl_sockets[i])
                        {
                                const char *cmdname, *extraoptions;
-                               int af = LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(cl_sockets[i]));
-
-                               if(LHNETADDRESS_GetAddressType(&broadcastaddress) == af)
-                               {
-                                       // search LAN for Quake servers
-                                       SZ_Clear(&cl_message);
-                                       // save space for the header, filled in later
-                                       MSG_WriteLong(&cl_message, 0);
-                                       MSG_WriteByte(&cl_message, CCREQ_SERVER_INFO);
-                                       MSG_WriteString(&cl_message, "QUAKE");
-                                       MSG_WriteByte(&cl_message, NET_PROTOCOL_VERSION);
-                                       StoreBigLong(cl_message.data, NETFLAG_CTL | (cl_message.cursize & NETFLAG_LENGTH_MASK));
-                                       NetConn_Write(cl_sockets[i], cl_message.data, cl_message.cursize, &broadcastaddress);
-                                       SZ_Clear(&cl_message);
-
-                                       // search LAN for DarkPlaces servers
-                                       NetConn_WriteString(cl_sockets[i], "\377\377\377\377getstatus", &broadcastaddress);
-                               }
+                               lhnetaddresstype_t af = LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(cl_sockets[i]));
 
                                // build the getservers message to send to the dpmaster master servers
                                if (LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(cl_sockets[i])) == LHNETADDRESSTYPE_INET6)
@@ -3679,24 +3854,28 @@ void NetConn_QueryMasters(qbool querydp, qbool queryqw)
                                dpsnprintf(request+4, sizeof(request)-4, "%s %s %u empty full%s", cmdname, gamenetworkfiltername, NET_PROTOCOL_VERSION, extraoptions);
 
                                // search internet
-                               for (masternum = 0;sv_masters[masternum].name;masternum++)
+                               for (masternum = 0; masternum < DPMASTER_COUNT; ++masternum)
                                {
-                                       if (sv_masters[masternum].string && sv_masters[masternum].string[0] && LHNETADDRESS_FromString(&masteraddress, sv_masters[masternum].string, DPMASTER_PORT) && LHNETADDRESS_GetAddressType(&masteraddress) == af)
+                                       if(sv_masters[masternum].string[0]
+                                       && LHNETADDRESS_FromString(&masteraddress, sv_masters[masternum].string, DPMASTER_PORT)
+                                       && LHNETADDRESS_GetAddressType(&masteraddress) == af)
                                        {
+                                               if (serverlist_consoleoutput || net_slist_debug.integer)
+                                               {
+                                                       LHNETADDRESS_ToString(&masteraddress, lookupstring, sizeof(lookupstring), true);
+                                                       Con_Printf("Querying DP master %s (resolved from %s)\n", lookupstring, sv_masters[masternum].string);
+                                               }
                                                masterquerycount++;
                                                NetConn_WriteString(cl_sockets[i], request, &masteraddress);
+                                               dpmasterstatus[masternum] = MASTER_TX_QUERY;
                                        }
                                }
 
                                // search favorite servers
                                for(j = 0; j < nFavorites; ++j)
-                               {
-                                       if(LHNETADDRESS_GetAddressType(&favorites[j]) == af)
-                                       {
-                                               if(LHNETADDRESS_ToString(&favorites[j], request, sizeof(request), true))
-                                                       NetConn_ClientParsePacket_ServerList_PrepareQuery( PROTOCOL_DARKPLACES7, request, true );
-                                       }
-                               }
+                                       if(LHNETADDRESS_GetAddressType(&favorites[j]) == af
+                                       && LHNETADDRESS_ToString(&favorites[j], lookupstring, sizeof(lookupstring), true))
+                                               NetConn_ClientParsePacket_ServerList_PrepareQuery(PROTOCOL_DARKPLACES7, lookupstring, true);
                        }
                }
        }
@@ -3704,57 +3883,45 @@ void NetConn_QueryMasters(qbool querydp, qbool queryqw)
        // only query QuakeWorld servers when the user wants to
        if (queryqw)
        {
+               dpsnprintf(request, sizeof(request), "c\n");
+
                for (i = 0;i < cl_numsockets;i++)
                {
                        if (cl_sockets[i])
                        {
-                               int af = LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(cl_sockets[i]));
-
-                               if(LHNETADDRESS_GetAddressType(&broadcastaddress) == af)
-                               {
-                                       // search LAN for QuakeWorld servers
-                                       NetConn_WriteString(cl_sockets[i], "\377\377\377\377status\n", &broadcastaddress);
-
-                                       // build the getservers message to send to the qwmaster master servers
-                                       // note this has no -1 prefix, and the trailing nul byte is sent
-                                       dpsnprintf(request, sizeof(request), "c\n");
-                               }
+                               lhnetaddresstype_t af = LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(cl_sockets[i]));
 
                                // search internet
-                               for (masternum = 0;sv_qwmasters[masternum].name;masternum++)
+                               for (masternum = 0; masternum < QWMASTER_COUNT; ++masternum)
                                {
-                                       if (sv_qwmasters[masternum].string && LHNETADDRESS_FromString(&masteraddress, sv_qwmasters[masternum].string, QWMASTER_PORT) && LHNETADDRESS_GetAddressType(&masteraddress) == LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(cl_sockets[i])))
+                                       if(sv_qwmasters[masternum].string[0]
+                                       && LHNETADDRESS_FromString(&masteraddress, sv_qwmasters[masternum].string, QWMASTER_PORT)
+                                       && LHNETADDRESS_GetAddressType(&masteraddress) == af)
                                        {
-                                               if (m_state != m_slist)
+                                               if (serverlist_consoleoutput || net_slist_debug.integer)
                                                {
-                                                       char lookupstring[128];
                                                        LHNETADDRESS_ToString(&masteraddress, lookupstring, sizeof(lookupstring), true);
-                                                       Con_Printf("Querying master %s (resolved from %s)\n", lookupstring, sv_qwmasters[masternum].string);
+                                                       Con_Printf("Querying QW master %s (resolved from %s)\n", lookupstring, sv_qwmasters[masternum].string);
                                                }
                                                masterquerycount++;
                                                NetConn_Write(cl_sockets[i], request, (int)strlen(request) + 1, &masteraddress);
+                                               qwmasterstatus[masternum] = MASTER_TX_QUERY;
                                        }
                                }
 
                                // search favorite servers
                                for(j = 0; j < nFavorites; ++j)
-                               {
-                                       if(LHNETADDRESS_GetAddressType(&favorites[j]) == af)
-                                       {
-                                               if(LHNETADDRESS_ToString(&favorites[j], request, sizeof(request), true))
-                                               {
-                                                       NetConn_WriteString(cl_sockets[i], "\377\377\377\377status\n", &favorites[j]);
-                                                       NetConn_ClientParsePacket_ServerList_PrepareQuery( PROTOCOL_QUAKEWORLD, request, true );
-                                               }
-                                       }
-                               }
+                                       if(LHNETADDRESS_GetAddressType(&favorites[j]) == af
+                                       && LHNETADDRESS_ToString(&favorites[j], lookupstring, sizeof(lookupstring), true))
+                                               NetConn_ClientParsePacket_ServerList_PrepareQuery(PROTOCOL_QUAKEWORLD, lookupstring, true);
                        }
                }
        }
+
        if (!masterquerycount)
        {
                Con_Print(CON_ERROR "Unable to query master servers, no suitable network sockets active.\n");
-               M_Update_Return_Reason("No network");
+               dp_strlcpy(cl_connect_status, "No network", sizeof(cl_connect_status));
        }
 }
 #endif
@@ -3762,7 +3929,7 @@ void NetConn_QueryMasters(qbool querydp, qbool queryqw)
 void NetConn_Heartbeat(int priority)
 {
        lhnetaddress_t masteraddress;
-       int masternum;
+       uint8_t masternum;
        lhnetsocket_t *mysocket;
 
        // if it's a state change (client connected), limit next heartbeat to no
@@ -3784,8 +3951,10 @@ void NetConn_Heartbeat(int priority)
        if (sv.active && sv_public.integer > 0 && svs.maxclients >= 2 && (priority > 1 || host.realtime > nextheartbeattime))
        {
                nextheartbeattime = host.realtime + sv_heartbeatperiod.value;
-               for (masternum = 0;sv_masters[masternum].name;masternum++)
-                       if (sv_masters[masternum].string && sv_masters[masternum].string[0] && LHNETADDRESS_FromString(&masteraddress, sv_masters[masternum].string, DPMASTER_PORT) && (mysocket = NetConn_ChooseServerSocketForAddress(&masteraddress)))
+               for (masternum = 0; masternum < DPMASTER_COUNT; ++masternum)
+                       if (sv_masters[masternum].string[0]
+                       && LHNETADDRESS_FromString(&masteraddress, sv_masters[masternum].string, DPMASTER_PORT)
+                       && (mysocket = NetConn_ChooseServerSocketForAddress(&masteraddress)))
                                NetConn_WriteString(mysocket, "\377\377\377\377heartbeat DarkPlaces\x0A", &masteraddress);
        }
 }
@@ -3826,11 +3995,13 @@ void Net_Stats_f(cmd_state_t *cmd)
 #ifdef CONFIG_MENU
 void Net_Refresh_f(cmd_state_t *cmd)
 {
-       if (m_state != m_slist) {
-               Con_Print("Sending new requests to master servers\n");
+       if (m_state != m_slist)
+       {
+               Con_Print("Sending new requests to DP master servers\n");
                ServerList_QueryList(false, true, false, true);
                Con_Print("Listening for replies...\n");
-       } else
+       }
+       else
                ServerList_QueryList(false, true, false, false);
 }
 
@@ -3839,11 +4010,13 @@ void Net_Slist_f(cmd_state_t *cmd)
        ServerList_ResetMasks();
        serverlist_sortbyfield = SLIF_PING;
        serverlist_sortflags = 0;
-    if (m_state != m_slist) {
-               Con_Print("Sending requests to master servers\n");
+       if (m_state != m_slist)
+       {
+               Con_Print("Sending requests to DP master servers\n");
                ServerList_QueryList(true, true, false, true);
                Con_Print("Listening for replies...\n");
-       } else
+       }
+       else
                ServerList_QueryList(true, true, false, false);
 }
 
@@ -3852,12 +4025,13 @@ void Net_SlistQW_f(cmd_state_t *cmd)
        ServerList_ResetMasks();
        serverlist_sortbyfield = SLIF_PING;
        serverlist_sortflags = 0;
-    if (m_state != m_slist) {
-               Con_Print("Sending requests to master servers\n");
+       if (m_state != m_slist)
+       {
+               Con_Print("Sending requests to QW master servers\n");
                ServerList_QueryList(true, false, true, true);
-               serverlist_consoleoutput = true;
                Con_Print("Listening for replies...\n");
-       } else
+       }
+       else
                ServerList_QueryList(true, false, true, false);
 }
 #endif
@@ -3865,7 +4039,9 @@ void Net_SlistQW_f(cmd_state_t *cmd)
 void NetConn_Init(void)
 {
        int i;
+       unsigned j;
        lhnetaddress_t tempaddress;
+
        netconn_mempool = Mem_AllocPool("network connections", 0, NULL);
        Cmd_AddCommand(CF_SHARED, "net_stats", Net_Stats_f, "print network statistics");
 #ifdef CONFIG_MENU
@@ -3880,15 +4056,21 @@ void NetConn_Init(void)
        Cvar_RegisterVariable(&rcon_restricted_password);
        Cvar_RegisterVariable(&rcon_restricted_commands);
        Cvar_RegisterVariable(&rcon_secure_maxdiff);
+
+#ifdef CONFIG_MENU
+       Cvar_RegisterVariable(&net_slist_debug);
+       Cvar_RegisterVariable(&net_slist_favorites);
+       Cvar_RegisterCallback(&net_slist_favorites, NetConn_UpdateFavorites_c);
+       Cvar_RegisterVariable(&net_slist_interval);
+       Cvar_RegisterVariable(&net_slist_maxping);
+       Cvar_RegisterVariable(&net_slist_maxtries);
+       Cvar_RegisterVariable(&net_slist_pause);
+       Cvar_RegisterCallback(&net_slist_pause, ServerList_RebuildViewList);
        Cvar_RegisterVariable(&net_slist_queriespersecond);
        Cvar_RegisterVariable(&net_slist_queriesperframe);
        Cvar_RegisterVariable(&net_slist_timeout);
-       Cvar_RegisterVariable(&net_slist_maxtries);
-       Cvar_RegisterVariable(&net_slist_favorites);
-#ifdef CONFIG_MENU
-       Cvar_RegisterCallback(&net_slist_favorites, NetConn_UpdateFavorites_c);
 #endif
-       Cvar_RegisterVariable(&net_slist_pause);
+
 #ifdef IP_TOS // register cvar only if supported
        Cvar_RegisterVariable(&net_tos_dscp);
 #endif
@@ -3907,7 +4089,7 @@ void NetConn_Init(void)
        Cvar_RegisterVariable(&hostname);
        Cvar_RegisterVariable(&developer_networking);
        Cvar_RegisterVariable(&cl_netport);
-       Cvar_RegisterCallback(&cl_netport, NetConn_cl_netport_Callback);
+       Cvar_RegisterCallback(&cl_netport, NetConn_CL_UpdateSockets_Callback);
        Cvar_RegisterVariable(&sv_netport);
        Cvar_RegisterCallback(&sv_netport, NetConn_sv_netport_Callback);
        Cvar_RegisterVariable(&net_address);
@@ -3915,8 +4097,12 @@ void NetConn_Init(void)
        Cvar_RegisterVariable(&sv_public);
        Cvar_RegisterVariable(&sv_public_rejectreason);
        Cvar_RegisterVariable(&sv_heartbeatperiod);
-       for (i = 0;sv_masters[i].name;i++)
-               Cvar_RegisterVariable(&sv_masters[i]);
+       for (j = 0; j < DPMASTER_COUNT; ++j)
+               Cvar_RegisterVariable(&sv_masters[j]);
+#ifdef CONFIG_MENU
+       for (j = 0; j < QWMASTER_COUNT; ++j)
+               Cvar_RegisterVariable(&sv_qwmasters[j]);
+#endif
        Cvar_RegisterVariable(&gameversion);
        Cvar_RegisterVariable(&gameversion_min);
        Cvar_RegisterVariable(&gameversion_max);
index f8e9f7a459031b78188819a900b41801144c9474..a7ef91d22d59999492f7490d8004dd0c75b90db7 100755 (executable)
--- a/netconn.h
+++ b/netconn.h
@@ -274,20 +274,27 @@ typedef struct serverlist_info_s
 {
        /// address for connecting
        char cname[128];
-       /// ping time for sorting servers
-       int ping;
+       unsigned cname_len;
+       /// ping time for sorting servers, in milliseconds, 0 means no data
+       unsigned ping;
        /// name of the game
        char game[32];
+       unsigned game_len;
        /// name of the mod
        char mod[32];
+       unsigned mod_len;
        /// name of the map
        char map[32];
+       unsigned map_len;
        /// name of the session
        char name[128];
+       unsigned name_len;
        /// qc-defined short status string
        char qcstatus[128];
+       unsigned qcstatus_len;
        /// frags/ping/name list (if they fit in the packet)
        char players[2800];
+       unsigned players_len;
        /// max client number
        int maxplayers;
        /// number of currently connected players (including bots)
@@ -305,7 +312,7 @@ typedef struct serverlist_info_s
        ///  not filterable by QC)
        int gameversion;
 
-       // categorized sorting
+       /// categorized sorting
        int category;
        /// favorite server flag
        qbool isfavorite;
@@ -339,22 +346,11 @@ typedef enum
        SLSF_CATEGORIES = 4
 } serverlist_sortflags_t;
 
-typedef enum
-{
-       SQS_NONE = 0,
-       SQS_QUERYING,
-       SQS_QUERIED,
-       SQS_TIMEDOUT,
-       SQS_REFRESHING
-} serverlist_query_state;
-
 typedef struct serverlist_entry_s
 {
-       /// used to determine whether this entry should be included into the final view
-       serverlist_query_state query;
-       /// used to count the number of times the host has tried to query this server already
-       unsigned querycounter;
-       /// used to calculate ping when update comes in
+       /// used to track when a server should be considered timed out and removed from the final view
+       qbool responded;
+       /// used to calculate ping in PROTOCOL_QUAKEWORLD, and for net_slist_maxtries interval, and for timeouts
        double querytime;
        /// query protocol to use on this server, may be PROTOCOL_QUAKEWORLD or PROTOCOL_DARKPLACES7
        int protocol;
@@ -363,7 +359,9 @@ typedef struct serverlist_entry_s
 
        // legacy stuff
        char line1[128];
+       unsigned line1_len;
        char line2[128];
+       unsigned line2_len;
 } serverlist_entry_t;
 
 typedef struct serverlist_mask_s
@@ -380,21 +378,19 @@ extern serverlist_mask_t serverlist_andmasks[SERVERLIST_ANDMASKCOUNT];
 extern serverlist_mask_t serverlist_ormasks[SERVERLIST_ORMASKCOUNT];
 
 extern serverlist_infofield_t serverlist_sortbyfield;
-extern int serverlist_sortflags; // not using the enum, as it is a bitmask
+extern unsigned serverlist_sortflags; // not using the enum, as it is a bitmask
 
 #if SERVERLIST_TOTALSIZE > 65536
 #error too many servers, change type of index array
 #endif
-extern int serverlist_viewcount;
-extern unsigned short serverlist_viewlist[SERVERLIST_VIEWLISTSIZE];
+extern unsigned serverlist_viewcount;
+extern uint16_t serverlist_viewlist[SERVERLIST_VIEWLISTSIZE];
 
-extern int serverlist_cachecount;
+extern unsigned serverlist_cachecount;
 extern serverlist_entry_t *serverlist_cache;
 extern const serverlist_entry_t *serverlist_callbackentry;
 
-extern qbool serverlist_consoleoutput;
-
-void ServerList_GetPlayerStatistics(int *numplayerspointer, int *maxplayerspointer);
+void ServerList_GetPlayerStatistics(unsigned *numplayerspointer, unsigned *maxplayerspointer);
 #endif
 
 //============================================================================
@@ -404,19 +400,19 @@ void ServerList_GetPlayerStatistics(int *numplayerspointer, int *maxplayerspoint
 //============================================================================
 
 extern char cl_net_extresponse[NET_EXTRESPONSE_MAX][1400];
-extern int cl_net_extresponse_count;
-extern int cl_net_extresponse_last;
+extern unsigned cl_net_extresponse_count;
+extern unsigned cl_net_extresponse_last;
 
 extern char sv_net_extresponse[NET_EXTRESPONSE_MAX][1400];
-extern int sv_net_extresponse_count;
-extern int sv_net_extresponse_last;
+extern unsigned sv_net_extresponse_count;
+extern unsigned sv_net_extresponse_last;
 
 #ifdef CONFIG_MENU
 extern double masterquerytime;
-extern int masterquerycount;
-extern int masterreplycount;
-extern int serverquerycount;
-extern int serverreplycount;
+extern unsigned masterquerycount;
+extern unsigned masterreplycount;
+extern unsigned serverquerycount;
+extern unsigned serverreplycount;
 #endif
 
 extern sizebuf_t cl_message;
@@ -443,7 +439,6 @@ void NetConn_CloseClientPorts(void);
 void NetConn_OpenClientPorts(void);
 void NetConn_CloseServerPorts(void);
 void NetConn_OpenServerPorts(int opennetports);
-void NetConn_UpdateSockets_Client(void);
 void NetConn_UpdateSockets(void);
 lhnetsocket_t *NetConn_ChooseClientSocketForAddress(lhnetaddress_t *address);
 lhnetsocket_t *NetConn_ChooseServerSocketForAddress(lhnetaddress_t *address);
@@ -458,7 +453,6 @@ int NetConn_WriteString(lhnetsocket_t *mysocket, const char *string, const lhnet
 int NetConn_IsLocalGame(void);
 void NetConn_ClientFrame(void);
 void NetConn_ServerFrame(void);
-void NetConn_SleepMicroseconds(int microseconds);
 void NetConn_Heartbeat(int priority);
 void Net_Stats_f(struct cmd_state_s *cmd);
 
@@ -471,7 +465,7 @@ void Net_Refresh_f(struct cmd_state_s *cmd);
 
 /// ServerList interface (public)
 /// manually refresh the view set, do this after having changed the mask or any other flag
-void ServerList_RebuildViewList(void);
+void ServerList_RebuildViewList(cvar_t* var);
 void ServerList_ResetMasks(void);
 void ServerList_QueryList(qbool resetcache, qbool querydp, qbool queryqw, qbool consoleoutput);
 
index ff39e0aaf920caf8df5e0875f620de28e6cb4a54..4892fdc1d436c359c7be87bb8e5d1b5503cc1b0a 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
 <packages>\r
-  <package id="sdl2.nuget" version="2.0.22" targetFramework="native" />\r
-  <package id="sdl2.nuget.redist" version="2.0.22" targetFramework="native" />\r
+  <package id="sdl2.nuget" version="2.30.2" targetFramework="native" />\r
+  <package id="sdl2.nuget.redist" version="2.30.2" targetFramework="native" />\r
 </packages>
\ No newline at end of file
diff --git a/packages/sdl2.nuget.2.0.22/.signature.p7s b/packages/sdl2.nuget.2.0.22/.signature.p7s
deleted file mode 100644 (file)
index 294beee..0000000
Binary files a/packages/sdl2.nuget.2.0.22/.signature.p7s and /dev/null differ
diff --git a/packages/sdl2.nuget.2.0.22/build/configurations.autopkg b/packages/sdl2.nuget.2.0.22/build/configurations.autopkg
deleted file mode 100644 (file)
index 209e90d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-configurations {\r
-    Platform { \r
-        key : "Platform";\r
-        choices : { Win32, x64 };\r
-        Win32.aliases : { x86, win32, ia32, 386 };\r
-        x64.aliases : { x64, amd64, em64t, intel64, x86-64, x86_64 };\r
-    };\r
-    Linkage { \r
-        choices : { dynamic };\r
-    };\r
-};\r
diff --git a/packages/sdl2.nuget.2.0.22/build/native/default-propertiesui.xml b/packages/sdl2.nuget.2.0.22/build/native/default-propertiesui.xml
deleted file mode 100644 (file)
index 8556c8e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ProjectSchemaDefinitions xmlns="clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework">
-  <Rule Name="ProjectSettings_globals" PageTemplate="tool" DisplayName="Project Master Settings" SwitchPrefix="/" Order="1">
-    <Rule.Categories>
-      <Category Name="cpp" DisplayName="C/C++ Settings" />
-    </Rule.Categories>
-    <Rule.DataSource>
-      <DataSource Persistence="ProjectFile" ItemType="" />
-    </Rule.DataSource>
-    <EnumProperty Name="RuntimeLibrary" DisplayName="Runtime Library" Description="Specify runtime library for linking." Category="cpp" >
-      <EnumValue Name="MultiThreaded"  DisplayName="Multi-threaded" Description="Causes your application to use the multithread, static version of the run-time library.">
-      </EnumValue>
-      <EnumValue Name="MultiThreadedDebug" DisplayName="Multi-threaded Debug" Description="Defines _DEBUG and _MT. This option also causes the compiler to place the library name LIBCMTD.lib into the .obj file so that the linker will use LIBCMTD.lib to resolve external symbols.">
-      </EnumValue>
-      <EnumValue Name="MultiThreadedDLL" DisplayName="Multi-threaded DLL" Description="Causes your application to use the multithread- and DLL-specific version of the run-time library. Defines _MT and _DLL and causes the compiler to place the library name MSVCRT.lib into the .obj file.">
-      </EnumValue>
-      <EnumValue Name="MultiThreadedDebugDLL" DisplayName="Multi-threaded Debug DLL" Description="Defines _DEBUG, _MT, and _DLL and causes your application to use the debug multithread- and DLL-specific version of the run-time library. It also causes the compiler to place the library name MSVCRTD.lib into the .obj file.">
-      </EnumValue>
-    </EnumProperty>
-  </Rule>
-</ProjectSchemaDefinitions>
\ No newline at end of file
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL.h
deleted file mode 100644 (file)
index 7cdd324..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL.h
- *
- *  Main include header for the SDL library
- */
-
-
-#ifndef SDL_h_
-#define SDL_h_
-
-#include "SDL_main.h"
-#include "SDL_stdinc.h"
-#include "SDL_assert.h"
-#include "SDL_atomic.h"
-#include "SDL_audio.h"
-#include "SDL_clipboard.h"
-#include "SDL_cpuinfo.h"
-#include "SDL_endian.h"
-#include "SDL_error.h"
-#include "SDL_events.h"
-#include "SDL_filesystem.h"
-#include "SDL_gamecontroller.h"
-#include "SDL_haptic.h"
-#include "SDL_hidapi.h"
-#include "SDL_hints.h"
-#include "SDL_joystick.h"
-#include "SDL_loadso.h"
-#include "SDL_log.h"
-#include "SDL_messagebox.h"
-#include "SDL_metal.h"
-#include "SDL_mutex.h"
-#include "SDL_power.h"
-#include "SDL_render.h"
-#include "SDL_rwops.h"
-#include "SDL_sensor.h"
-#include "SDL_shape.h"
-#include "SDL_system.h"
-#include "SDL_thread.h"
-#include "SDL_timer.h"
-#include "SDL_version.h"
-#include "SDL_video.h"
-#include "SDL_locale.h"
-#include "SDL_misc.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* As of version 0.5, SDL is loaded dynamically into the application */
-
-/**
- *  \name SDL_INIT_*
- *
- *  These are the flags which may be passed to SDL_Init().  You should
- *  specify the subsystems which you will be using in your application.
- */
-/* @{ */
-#define SDL_INIT_TIMER          0x00000001u
-#define SDL_INIT_AUDIO          0x00000010u
-#define SDL_INIT_VIDEO          0x00000020u  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
-#define SDL_INIT_JOYSTICK       0x00000200u  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
-#define SDL_INIT_HAPTIC         0x00001000u
-#define SDL_INIT_GAMECONTROLLER 0x00002000u  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
-#define SDL_INIT_EVENTS         0x00004000u
-#define SDL_INIT_SENSOR         0x00008000u
-#define SDL_INIT_NOPARACHUTE    0x00100000u  /**< compatibility; this flag is ignored. */
-#define SDL_INIT_EVERYTHING ( \
-                SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
-                SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
-            )
-/* @} */
-
-/**
- * Initialize the SDL library.
- *
- * SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the
- * two may be used interchangeably. Though for readability of your code
- * SDL_InitSubSystem() might be preferred.
- *
- * The file I/O (for example: SDL_RWFromFile) and threading (SDL_CreateThread)
- * subsystems are initialized by default. Message boxes
- * (SDL_ShowSimpleMessageBox) also attempt to work without initializing the
- * video subsystem, in hopes of being useful in showing an error dialog when
- * SDL_Init fails. You must specifically initialize other subsystems if you
- * use them in your application.
- *
- * Logging (such as SDL_Log) works without initialization, too.
- *
- * `flags` may be any of the following OR'd together:
- *
- * - `SDL_INIT_TIMER`: timer subsystem
- * - `SDL_INIT_AUDIO`: audio subsystem
- * - `SDL_INIT_VIDEO`: video subsystem; automatically initializes the events
- *   subsystem
- * - `SDL_INIT_JOYSTICK`: joystick subsystem; automatically initializes the
- *   events subsystem
- * - `SDL_INIT_HAPTIC`: haptic (force feedback) subsystem
- * - `SDL_INIT_GAMECONTROLLER`: controller subsystem; automatically
- *   initializes the joystick subsystem
- * - `SDL_INIT_EVENTS`: events subsystem
- * - `SDL_INIT_EVERYTHING`: all of the above subsystems
- * - `SDL_INIT_NOPARACHUTE`: compatibility; this flag is ignored
- *
- * Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem()
- * for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or
- * call SDL_Quit() to force shutdown). If a subsystem is already loaded then
- * this call will increase the ref-count and return.
- *
- * \param flags subsystem initialization flags
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_InitSubSystem
- * \sa SDL_Quit
- * \sa SDL_SetMainReady
- * \sa SDL_WasInit
- */
-extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
-
-/**
- * Compatibility function to initialize the SDL library.
- *
- * In SDL2, this function and SDL_Init() are interchangeable.
- *
- * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Init
- * \sa SDL_Quit
- * \sa SDL_QuitSubSystem
- */
-extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
-
-/**
- * Shut down specific SDL subsystems.
- *
- * If you start a subsystem using a call to that subsystem's init function
- * (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
- * SDL_QuitSubSystem() and SDL_WasInit() will not work. You will need to use
- * that subsystem's quit function (SDL_VideoQuit()) directly instead. But
- * generally, you should not be using those functions directly anyhow; use
- * SDL_Init() instead.
- *
- * You still need to call SDL_Quit() even if you close all open subsystems
- * with SDL_QuitSubSystem().
- *
- * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_InitSubSystem
- * \sa SDL_Quit
- */
-extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
-
-/**
- * Get a mask of the specified subsystems which are currently initialized.
- *
- * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
- * \returns a mask of all initialized subsystems if `flags` is 0, otherwise it
- *          returns the initialization status of the specified subsystems.
- *
- *          The return value does not include SDL_INIT_NOPARACHUTE.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Init
- * \sa SDL_InitSubSystem
- */
-extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
-
-/**
- * Clean up all initialized subsystems.
- *
- * You should call this function even if you have already shutdown each
- * initialized subsystem with SDL_QuitSubSystem(). It is safe to call this
- * function even in the case of errors in initialization.
- *
- * If you start a subsystem using a call to that subsystem's init function
- * (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
- * then you must use that subsystem's quit function (SDL_VideoQuit()) to shut
- * it down before calling SDL_Quit(). But generally, you should not be using
- * those functions directly anyhow; use SDL_Init() instead.
- *
- * You can use this function with atexit() to ensure that it is run when your
- * application is shutdown, but it is not wise to do this from a library or
- * other dynamically loaded code.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Init
- * \sa SDL_QuitSubSystem
- */
-extern DECLSPEC void SDLCALL SDL_Quit(void);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_assert.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_assert.h
deleted file mode 100644 (file)
index defadf1..0000000
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_assert_h_
-#define SDL_assert_h_
-
-#include "SDL_config.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef SDL_ASSERT_LEVEL
-#ifdef SDL_DEFAULT_ASSERT_LEVEL
-#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
-#elif defined(_DEBUG) || defined(DEBUG) || \
-      (defined(__GNUC__) && !defined(__OPTIMIZE__))
-#define SDL_ASSERT_LEVEL 2
-#else
-#define SDL_ASSERT_LEVEL 1
-#endif
-#endif /* SDL_ASSERT_LEVEL */
-
-/*
-These are macros and not first class functions so that the debugger breaks
-on the assertion line and not in some random guts of SDL, and so each
-assert can have unique static variables associated with it.
-*/
-
-#if defined(_MSC_VER)
-/* Don't include intrin.h here because it contains C++ code */
-    extern void __cdecl __debugbreak(void);
-    #define SDL_TriggerBreakpoint() __debugbreak()
-#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
-    #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
-#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) )  /* this might work on other ARM targets, but this is a known quantity... */
-    #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
-#elif defined(__APPLE__) && defined(__arm__)
-    #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
-#elif defined(__386__) && defined(__WATCOMC__)
-    #define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
-#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
-    #include <signal.h>
-    #define SDL_TriggerBreakpoint() raise(SIGTRAP)
-#else
-    /* How do we trigger breakpoints on this platform? */
-    #define SDL_TriggerBreakpoint()
-#endif
-
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
-#   define SDL_FUNCTION __func__
-#elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__))
-#   define SDL_FUNCTION __FUNCTION__
-#else
-#   define SDL_FUNCTION "???"
-#endif
-#define SDL_FILE    __FILE__
-#define SDL_LINE    __LINE__
-
-/*
-sizeof (x) makes the compiler still parse the expression even without
-assertions enabled, so the code is always checked at compile time, but
-doesn't actually generate code for it, so there are no side effects or
-expensive checks at run time, just the constant size of what x WOULD be,
-which presumably gets optimized out as unused.
-This also solves the problem of...
-
-    int somevalue = blah();
-    SDL_assert(somevalue == 1);
-
-...which would cause compiles to complain that somevalue is unused if we
-disable assertions.
-*/
-
-/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
-    this condition isn't constant. And looks like an owl's face! */
-#ifdef _MSC_VER  /* stupid /W4 warnings. */
-#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
-#else
-#define SDL_NULL_WHILE_LOOP_CONDITION (0)
-#endif
-
-#define SDL_disabled_assert(condition) \
-    do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
-
-typedef enum
-{
-    SDL_ASSERTION_RETRY,  /**< Retry the assert immediately. */
-    SDL_ASSERTION_BREAK,  /**< Make the debugger trigger a breakpoint. */
-    SDL_ASSERTION_ABORT,  /**< Terminate the program. */
-    SDL_ASSERTION_IGNORE,  /**< Ignore the assert. */
-    SDL_ASSERTION_ALWAYS_IGNORE  /**< Ignore the assert from now on. */
-} SDL_AssertState;
-
-typedef struct SDL_AssertData
-{
-    int always_ignore;
-    unsigned int trigger_count;
-    const char *condition;
-    const char *filename;
-    int linenum;
-    const char *function;
-    const struct SDL_AssertData *next;
-} SDL_AssertData;
-
-#if (SDL_ASSERT_LEVEL > 0)
-
-/* Never call this directly. Use the SDL_assert* macros. */
-extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
-                                                             const char *,
-                                                             const char *, int)
-#if defined(__clang__)
-#if __has_feature(attribute_analyzer_noreturn)
-/* this tells Clang's static analysis that we're a custom assert function,
-   and that the analyzer should assume the condition was always true past this
-   SDL_assert test. */
-   __attribute__((analyzer_noreturn))
-#endif
-#endif
-;
-
-/* the do {} while(0) avoids dangling else problems:
-    if (x) SDL_assert(y); else blah();
-       ... without the do/while, the "else" could attach to this macro's "if".
-   We try to handle just the minimum we need here in a macro...the loop,
-   the static vars, and break points. The heavy lifting is handled in
-   SDL_ReportAssertion(), in SDL_assert.c.
-*/
-#define SDL_enabled_assert(condition) \
-    do { \
-        while ( !(condition) ) { \
-            static struct SDL_AssertData sdl_assert_data = { \
-                0, 0, #condition, 0, 0, 0, 0 \
-            }; \
-            const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
-            if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
-                continue; /* go again. */ \
-            } else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
-                SDL_TriggerBreakpoint(); \
-            } \
-            break; /* not retrying. */ \
-        } \
-    } while (SDL_NULL_WHILE_LOOP_CONDITION)
-
-#endif  /* enabled assertions support code */
-
-/* Enable various levels of assertions. */
-#if SDL_ASSERT_LEVEL == 0   /* assertions disabled */
-#   define SDL_assert(condition) SDL_disabled_assert(condition)
-#   define SDL_assert_release(condition) SDL_disabled_assert(condition)
-#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
-#elif SDL_ASSERT_LEVEL == 1  /* release settings. */
-#   define SDL_assert(condition) SDL_disabled_assert(condition)
-#   define SDL_assert_release(condition) SDL_enabled_assert(condition)
-#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
-#elif SDL_ASSERT_LEVEL == 2  /* normal settings. */
-#   define SDL_assert(condition) SDL_enabled_assert(condition)
-#   define SDL_assert_release(condition) SDL_enabled_assert(condition)
-#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
-#elif SDL_ASSERT_LEVEL == 3  /* paranoid settings. */
-#   define SDL_assert(condition) SDL_enabled_assert(condition)
-#   define SDL_assert_release(condition) SDL_enabled_assert(condition)
-#   define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
-#else
-#   error Unknown assertion level.
-#endif
-
-/* this assertion is never disabled at any level. */
-#define SDL_assert_always(condition) SDL_enabled_assert(condition)
-
-
-/**
- * A callback that fires when an SDL assertion fails.
- *
- * \param data a pointer to the SDL_AssertData structure corresponding to the
- *             current assertion
- * \param userdata what was passed as `userdata` to SDL_SetAssertionHandler()
- * \returns an SDL_AssertState value indicating how to handle the failure.
- */
-typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
-                                 const SDL_AssertData* data, void* userdata);
-
-/**
- * Set an application-defined assertion handler.
- *
- * This function allows an application to show its own assertion UI and/or
- * force the response to an assertion failure. If the application doesn't
- * provide this, SDL will try to do the right thing, popping up a
- * system-specific GUI dialog, and probably minimizing any fullscreen windows.
- *
- * This callback may fire from any thread, but it runs wrapped in a mutex, so
- * it will only fire from one thread at a time.
- *
- * This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
- *
- * \param handler the SDL_AssertionHandler function to call when an assertion
- *                fails or NULL for the default handler
- * \param userdata a pointer that is passed to `handler`
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetAssertionHandler
- */
-extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
-                                            SDL_AssertionHandler handler,
-                                            void *userdata);
-
-/**
- * Get the default assertion handler.
- *
- * This returns the function pointer that is called by default when an
- * assertion is triggered. This is an internal function provided by SDL, that
- * is used for assertions when SDL_SetAssertionHandler() hasn't been used to
- * provide a different function.
- *
- * \returns the default SDL_AssertionHandler that is called when an assert
- *          triggers.
- *
- * \since This function is available since SDL 2.0.2.
- *
- * \sa SDL_GetAssertionHandler
- */
-extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
-
-/**
- * Get the current assertion handler.
- *
- * This returns the function pointer that is called when an assertion is
- * triggered. This is either the value last passed to
- * SDL_SetAssertionHandler(), or if no application-specified function is set,
- * is equivalent to calling SDL_GetDefaultAssertionHandler().
- *
- * The parameter `puserdata` is a pointer to a void*, which will store the
- * "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
- * will always be NULL for the default handler. If you don't care about this
- * data, it is safe to pass a NULL pointer to this function to ignore it.
- *
- * \param puserdata pointer which is filled with the "userdata" pointer that
- *                  was passed to SDL_SetAssertionHandler()
- * \returns the SDL_AssertionHandler that is called when an assert triggers.
- *
- * \since This function is available since SDL 2.0.2.
- *
- * \sa SDL_SetAssertionHandler
- */
-extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
-
-/**
- * Get a list of all assertion failures.
- *
- * This function gets all assertions triggered since the last call to
- * SDL_ResetAssertionReport(), or the start of the program.
- *
- * The proper way to examine this data looks something like this:
- *
- * ```c
- * const SDL_AssertData *item = SDL_GetAssertionReport();
- * while (item) {
- *    printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
- *           item->condition, item->function, item->filename,
- *           item->linenum, item->trigger_count,
- *           item->always_ignore ? "yes" : "no");
- *    item = item->next;
- * }
- * ```
- *
- * \returns a list of all failed assertions or NULL if the list is empty. This
- *          memory should not be modified or freed by the application.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ResetAssertionReport
- */
-extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
-
-/**
- * Clear the list of all assertion failures.
- *
- * This function will clear the list of all assertions triggered up to that
- * point. Immediately following this call, SDL_GetAssertionReport will return
- * no items. In addition, any previously-triggered assertions will be reset to
- * a trigger_count of zero, and their always_ignore state will be false.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetAssertionReport
- */
-extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
-
-
-/* these had wrong naming conventions until 2.0.4. Please update your app! */
-#define SDL_assert_state SDL_AssertState
-#define SDL_assert_data SDL_AssertData
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_assert_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_atomic.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_atomic.h
deleted file mode 100644 (file)
index b29ceea..0000000
+++ /dev/null
@@ -1,395 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- * \file SDL_atomic.h
- *
- * Atomic operations.
- *
- * IMPORTANT:
- * If you are not an expert in concurrent lockless programming, you should
- * only be using the atomic lock and reference counting functions in this
- * file.  In all other cases you should be protecting your data structures
- * with full mutexes.
- *
- * The list of "safe" functions to use are:
- *  SDL_AtomicLock()
- *  SDL_AtomicUnlock()
- *  SDL_AtomicIncRef()
- *  SDL_AtomicDecRef()
- *
- * Seriously, here be dragons!
- * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
- *
- * You can find out a little more about lockless programming and the
- * subtle issues that can arise here:
- * http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx
- *
- * There's also lots of good information here:
- * http://www.1024cores.net/home/lock-free-algorithms
- * http://preshing.com/
- *
- * These operations may or may not actually be implemented using
- * processor specific atomic operations. When possible they are
- * implemented as true processor specific atomic operations. When that
- * is not possible the are implemented using locks that *do* use the
- * available atomic operations.
- *
- * All of the atomic operations that modify memory are full memory barriers.
- */
-
-#ifndef SDL_atomic_h_
-#define SDL_atomic_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_platform.h"
-
-#include "begin_code.h"
-
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \name SDL AtomicLock
- *
- * The atomic locks are efficient spinlocks using CPU instructions,
- * but are vulnerable to starvation and can spin forever if a thread
- * holding a lock has been terminated.  For this reason you should
- * minimize the code executed inside an atomic lock and never do
- * expensive things like API or system calls while holding them.
- *
- * The atomic locks are not safe to lock recursively.
- *
- * Porting Note:
- * The spin lock functions and type are required and can not be
- * emulated because they are used in the atomic emulation code.
- */
-/* @{ */
-
-typedef int SDL_SpinLock;
-
-/**
- * Try to lock a spin lock by setting it to a non-zero value.
- *
- * ***Please note that spinlocks are dangerous if you don't know what you're
- * doing. Please be careful using any sort of spinlock!***
- *
- * \param lock a pointer to a lock variable
- * \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already
- *          held.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AtomicLock
- * \sa SDL_AtomicUnlock
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
-
-/**
- * Lock a spin lock by setting it to a non-zero value.
- *
- * ***Please note that spinlocks are dangerous if you don't know what you're
- * doing. Please be careful using any sort of spinlock!***
- *
- * \param lock a pointer to a lock variable
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AtomicTryLock
- * \sa SDL_AtomicUnlock
- */
-extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
-
-/**
- * Unlock a spin lock by setting it to 0.
- *
- * Always returns immediately.
- *
- * ***Please note that spinlocks are dangerous if you don't know what you're
- * doing. Please be careful using any sort of spinlock!***
- *
- * \param lock a pointer to a lock variable
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AtomicLock
- * \sa SDL_AtomicTryLock
- */
-extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
-
-/* @} *//* SDL AtomicLock */
-
-
-/**
- * The compiler barrier prevents the compiler from reordering
- * reads and writes to globally visible variables across the call.
- */
-#if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
-void _ReadWriteBarrier(void);
-#pragma intrinsic(_ReadWriteBarrier)
-#define SDL_CompilerBarrier()   _ReadWriteBarrier()
-#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
-/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
-#define SDL_CompilerBarrier()   __asm__ __volatile__ ("" : : : "memory")
-#elif defined(__WATCOMC__)
-extern __inline void SDL_CompilerBarrier(void);
-#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
-#else
-#define SDL_CompilerBarrier()   \
-{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
-#endif
-
-/**
- * Memory barriers are designed to prevent reads and writes from being
- * reordered by the compiler and being seen out of order on multi-core CPUs.
- *
- * A typical pattern would be for thread A to write some data and a flag, and
- * for thread B to read the flag and get the data. In this case you would
- * insert a release barrier between writing the data and the flag,
- * guaranteeing that the data write completes no later than the flag is
- * written, and you would insert an acquire barrier between reading the flag
- * and reading the data, to ensure that all the reads associated with the flag
- * have completed.
- *
- * In this pattern you should always see a release barrier paired with an
- * acquire barrier and you should gate the data reads/writes with a single
- * flag variable.
- *
- * For more information on these semantics, take a look at the blog post:
- * http://preshing.com/20120913/acquire-and-release-semantics
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
-extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
-
-#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
-#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("lwsync" : : : "memory")
-#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("lwsync" : : : "memory")
-#elif defined(__GNUC__) && defined(__aarch64__)
-#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("dmb ish" : : : "memory")
-#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("dmb ish" : : : "memory")
-#elif defined(__GNUC__) && defined(__arm__)
-#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
-/* Information from:
-   https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
-
-   The Linux kernel provides a helper function which provides the right code for a memory barrier,
-   hard-coded at address 0xffff0fa0
-*/
-typedef void (*SDL_KernelMemoryBarrierFunc)();
-#define SDL_MemoryBarrierRelease()     ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
-#define SDL_MemoryBarrierAcquire()     ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
-#elif 0 /* defined(__QNXNTO__) */
-#include <sys/cpuinline.h>
-
-#define SDL_MemoryBarrierRelease()   __cpu_membarrier()
-#define SDL_MemoryBarrierAcquire()   __cpu_membarrier()
-#else
-#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__)
-#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("dmb ish" : : : "memory")
-#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("dmb ish" : : : "memory")
-#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__)
-#ifdef __thumb__
-/* The mcr instruction isn't available in thumb mode, use real functions */
-#define SDL_MEMORY_BARRIER_USES_FUNCTION
-#define SDL_MemoryBarrierRelease()   SDL_MemoryBarrierReleaseFunction()
-#define SDL_MemoryBarrierAcquire()   SDL_MemoryBarrierAcquireFunction()
-#else
-#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
-#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
-#endif /* __thumb__ */
-#else
-#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("" : : : "memory")
-#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("" : : : "memory")
-#endif /* __LINUX__ || __ANDROID__ */
-#endif /* __GNUC__ && __arm__ */
-#else
-#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
-/* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */
-#include <mbarrier.h>
-#define SDL_MemoryBarrierRelease()  __machine_rel_barrier()
-#define SDL_MemoryBarrierAcquire()  __machine_acq_barrier()
-#else
-/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
-#define SDL_MemoryBarrierRelease()  SDL_CompilerBarrier()
-#define SDL_MemoryBarrierAcquire()  SDL_CompilerBarrier()
-#endif
-#endif
-
-/**
- * \brief A type representing an atomic integer value.  It is a struct
- *        so people don't accidentally use numeric operations on it.
- */
-typedef struct { int value; } SDL_atomic_t;
-
-/**
- * Set an atomic variable to a new value if it is currently an old value.
- *
- * ***Note: If you don't know what this function is for, you shouldn't use
- * it!***
- *
- * \param a a pointer to an SDL_atomic_t variable to be modified
- * \param oldval the old value
- * \param newval the new value
- * \returns SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AtomicCASPtr
- * \sa SDL_AtomicGet
- * \sa SDL_AtomicSet
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
-
-/**
- * Set an atomic variable to a value.
- *
- * This function also acts as a full memory barrier.
- *
- * ***Note: If you don't know what this function is for, you shouldn't use
- * it!***
- *
- * \param a a pointer to an SDL_atomic_t variable to be modified
- * \param v the desired value
- * \returns the previous value of the atomic variable.
- *
- * \since This function is available since SDL 2.0.2.
- *
- * \sa SDL_AtomicGet
- */
-extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
-
-/**
- * Get the value of an atomic variable.
- *
- * ***Note: If you don't know what this function is for, you shouldn't use
- * it!***
- *
- * \param a a pointer to an SDL_atomic_t variable
- * \returns the current value of an atomic variable.
- *
- * \since This function is available since SDL 2.0.2.
- *
- * \sa SDL_AtomicSet
- */
-extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
-
-/**
- * Add to an atomic variable.
- *
- * This function also acts as a full memory barrier.
- *
- * ***Note: If you don't know what this function is for, you shouldn't use
- * it!***
- *
- * \param a a pointer to an SDL_atomic_t variable to be modified
- * \param v the desired value to add
- * \returns the previous value of the atomic variable.
- *
- * \since This function is available since SDL 2.0.2.
- *
- * \sa SDL_AtomicDecRef
- * \sa SDL_AtomicIncRef
- */
-extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
-
-/**
- * \brief Increment an atomic variable used as a reference count.
- */
-#ifndef SDL_AtomicIncRef
-#define SDL_AtomicIncRef(a)    SDL_AtomicAdd(a, 1)
-#endif
-
-/**
- * \brief Decrement an atomic variable used as a reference count.
- *
- * \return SDL_TRUE if the variable reached zero after decrementing,
- *         SDL_FALSE otherwise
- */
-#ifndef SDL_AtomicDecRef
-#define SDL_AtomicDecRef(a)    (SDL_AtomicAdd(a, -1) == 1)
-#endif
-
-/**
- * Set a pointer to a new value if it is currently an old value.
- *
- * ***Note: If you don't know what this function is for, you shouldn't use
- * it!***
- *
- * \param a a pointer to a pointer
- * \param oldval the old pointer value
- * \param newval the new pointer value
- * \returns SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AtomicCAS
- * \sa SDL_AtomicGetPtr
- * \sa SDL_AtomicSetPtr
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
-
-/**
- * Set a pointer to a value atomically.
- *
- * ***Note: If you don't know what this function is for, you shouldn't use
- * it!***
- *
- * \param a a pointer to a pointer
- * \param v the desired pointer value
- * \returns the previous value of the pointer.
- *
- * \since This function is available since SDL 2.0.2.
- *
- * \sa SDL_AtomicCASPtr
- * \sa SDL_AtomicGetPtr
- */
-extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
-
-/**
- * Get the value of a pointer atomically.
- *
- * ***Note: If you don't know what this function is for, you shouldn't use
- * it!***
- *
- * \param a a pointer to a pointer
- * \returns the current value of a pointer.
- *
- * \since This function is available since SDL 2.0.2.
- *
- * \sa SDL_AtomicCASPtr
- * \sa SDL_AtomicSetPtr
- */
-extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-
-#include "close_code.h"
-
-#endif /* SDL_atomic_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_audio.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_audio.h
deleted file mode 100644 (file)
index ab25ec9..0000000
+++ /dev/null
@@ -1,1462 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/* !!! FIXME: several functions in here need Doxygen comments. */
-
-/**
- *  \file SDL_audio.h
- *
- *  Access to the raw audio mixing buffer for the SDL library.
- */
-
-#ifndef SDL_audio_h_
-#define SDL_audio_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-#include "SDL_endian.h"
-#include "SDL_mutex.h"
-#include "SDL_thread.h"
-#include "SDL_rwops.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \brief Audio format flags.
- *
- *  These are what the 16 bits in SDL_AudioFormat currently mean...
- *  (Unspecified bits are always zero).
- *
- *  \verbatim
-    ++-----------------------sample is signed if set
-    ||
-    ||       ++-----------sample is bigendian if set
-    ||       ||
-    ||       ||          ++---sample is float if set
-    ||       ||          ||
-    ||       ||          || +---sample bit size---+
-    ||       ||          || |                     |
-    15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
-    \endverbatim
- *
- *  There are macros in SDL 2.0 and later to query these bits.
- */
-typedef Uint16 SDL_AudioFormat;
-
-/**
- *  \name Audio flags
- */
-/* @{ */
-
-#define SDL_AUDIO_MASK_BITSIZE       (0xFF)
-#define SDL_AUDIO_MASK_DATATYPE      (1<<8)
-#define SDL_AUDIO_MASK_ENDIAN        (1<<12)
-#define SDL_AUDIO_MASK_SIGNED        (1<<15)
-#define SDL_AUDIO_BITSIZE(x)         (x & SDL_AUDIO_MASK_BITSIZE)
-#define SDL_AUDIO_ISFLOAT(x)         (x & SDL_AUDIO_MASK_DATATYPE)
-#define SDL_AUDIO_ISBIGENDIAN(x)     (x & SDL_AUDIO_MASK_ENDIAN)
-#define SDL_AUDIO_ISSIGNED(x)        (x & SDL_AUDIO_MASK_SIGNED)
-#define SDL_AUDIO_ISINT(x)           (!SDL_AUDIO_ISFLOAT(x))
-#define SDL_AUDIO_ISLITTLEENDIAN(x)  (!SDL_AUDIO_ISBIGENDIAN(x))
-#define SDL_AUDIO_ISUNSIGNED(x)      (!SDL_AUDIO_ISSIGNED(x))
-
-/**
- *  \name Audio format flags
- *
- *  Defaults to LSB byte order.
- */
-/* @{ */
-#define AUDIO_U8        0x0008  /**< Unsigned 8-bit samples */
-#define AUDIO_S8        0x8008  /**< Signed 8-bit samples */
-#define AUDIO_U16LSB    0x0010  /**< Unsigned 16-bit samples */
-#define AUDIO_S16LSB    0x8010  /**< Signed 16-bit samples */
-#define AUDIO_U16MSB    0x1010  /**< As above, but big-endian byte order */
-#define AUDIO_S16MSB    0x9010  /**< As above, but big-endian byte order */
-#define AUDIO_U16       AUDIO_U16LSB
-#define AUDIO_S16       AUDIO_S16LSB
-/* @} */
-
-/**
- *  \name int32 support
- */
-/* @{ */
-#define AUDIO_S32LSB    0x8020  /**< 32-bit integer samples */
-#define AUDIO_S32MSB    0x9020  /**< As above, but big-endian byte order */
-#define AUDIO_S32       AUDIO_S32LSB
-/* @} */
-
-/**
- *  \name float32 support
- */
-/* @{ */
-#define AUDIO_F32LSB    0x8120  /**< 32-bit floating point samples */
-#define AUDIO_F32MSB    0x9120  /**< As above, but big-endian byte order */
-#define AUDIO_F32       AUDIO_F32LSB
-/* @} */
-
-/**
- *  \name Native audio byte ordering
- */
-/* @{ */
-#if SDL_BYTEORDER == SDL_LIL_ENDIAN
-#define AUDIO_U16SYS    AUDIO_U16LSB
-#define AUDIO_S16SYS    AUDIO_S16LSB
-#define AUDIO_S32SYS    AUDIO_S32LSB
-#define AUDIO_F32SYS    AUDIO_F32LSB
-#else
-#define AUDIO_U16SYS    AUDIO_U16MSB
-#define AUDIO_S16SYS    AUDIO_S16MSB
-#define AUDIO_S32SYS    AUDIO_S32MSB
-#define AUDIO_F32SYS    AUDIO_F32MSB
-#endif
-/* @} */
-
-/**
- *  \name Allow change flags
- *
- *  Which audio format changes are allowed when opening a device.
- */
-/* @{ */
-#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE    0x00000001
-#define SDL_AUDIO_ALLOW_FORMAT_CHANGE       0x00000002
-#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE     0x00000004
-#define SDL_AUDIO_ALLOW_SAMPLES_CHANGE      0x00000008
-#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)
-/* @} */
-
-/* @} *//* Audio flags */
-
-/**
- *  This function is called when the audio device needs more data.
- *
- *  \param userdata An application-specific parameter saved in
- *                  the SDL_AudioSpec structure
- *  \param stream A pointer to the audio data buffer.
- *  \param len    The length of that buffer in bytes.
- *
- *  Once the callback returns, the buffer will no longer be valid.
- *  Stereo samples are stored in a LRLRLR ordering.
- *
- *  You can choose to avoid callbacks and use SDL_QueueAudio() instead, if
- *  you like. Just open your audio device with a NULL callback.
- */
-typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
-                                            int len);
-
-/**
- *  The calculated values in this structure are calculated by SDL_OpenAudio().
- *
- *  For multi-channel audio, the default SDL channel mapping is:
- *  2:  FL FR                       (stereo)
- *  3:  FL FR LFE                   (2.1 surround)
- *  4:  FL FR BL BR                 (quad)
- *  5:  FL FR FC BL BR              (quad + center)
- *  6:  FL FR FC LFE SL SR          (5.1 surround - last two can also be BL BR)
- *  7:  FL FR FC LFE BC SL SR       (6.1 surround)
- *  8:  FL FR FC LFE BL BR SL SR    (7.1 surround)
- */
-typedef struct SDL_AudioSpec
-{
-    int freq;                   /**< DSP frequency -- samples per second */
-    SDL_AudioFormat format;     /**< Audio data format */
-    Uint8 channels;             /**< Number of channels: 1 mono, 2 stereo */
-    Uint8 silence;              /**< Audio buffer silence value (calculated) */
-    Uint16 samples;             /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */
-    Uint16 padding;             /**< Necessary for some compile environments */
-    Uint32 size;                /**< Audio buffer size in bytes (calculated) */
-    SDL_AudioCallback callback; /**< Callback that feeds the audio device (NULL to use SDL_QueueAudio()). */
-    void *userdata;             /**< Userdata passed to callback (ignored for NULL callbacks). */
-} SDL_AudioSpec;
-
-
-struct SDL_AudioCVT;
-typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
-                                          SDL_AudioFormat format);
-
-/**
- *  \brief Upper limit of filters in SDL_AudioCVT
- *
- *  The maximum number of SDL_AudioFilter functions in SDL_AudioCVT is
- *  currently limited to 9. The SDL_AudioCVT.filters array has 10 pointers,
- *  one of which is the terminating NULL pointer.
- */
-#define SDL_AUDIOCVT_MAX_FILTERS 9
-
-/**
- *  \struct SDL_AudioCVT
- *  \brief A structure to hold a set of audio conversion filters and buffers.
- *
- *  Note that various parts of the conversion pipeline can take advantage
- *  of SIMD operations (like SSE2, for example). SDL_AudioCVT doesn't require
- *  you to pass it aligned data, but can possibly run much faster if you
- *  set both its (buf) field to a pointer that is aligned to 16 bytes, and its
- *  (len) field to something that's a multiple of 16, if possible.
- */
-#if defined(__GNUC__) && !defined(__CHERI_PURE_CAPABILITY__)
-/* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't
-   pad it out to 88 bytes to guarantee ABI compatibility between compilers.
-   This is not a concern on CHERI architectures, where pointers must be stored
-   at aligned locations otherwise they will become invalid, and thus structs
-   containing pointers cannot be packed without giving a warning or error.
-   vvv
-   The next time we rev the ABI, make sure to size the ints and add padding.
-*/
-#define SDL_AUDIOCVT_PACKED __attribute__((packed))
-#else
-#define SDL_AUDIOCVT_PACKED
-#endif
-/* */
-typedef struct SDL_AudioCVT
-{
-    int needed;                 /**< Set to 1 if conversion possible */
-    SDL_AudioFormat src_format; /**< Source audio format */
-    SDL_AudioFormat dst_format; /**< Target audio format */
-    double rate_incr;           /**< Rate conversion increment */
-    Uint8 *buf;                 /**< Buffer to hold entire audio data */
-    int len;                    /**< Length of original audio buffer */
-    int len_cvt;                /**< Length of converted audio buffer */
-    int len_mult;               /**< buffer must be len*len_mult big */
-    double len_ratio;           /**< Given len, final size is len*len_ratio */
-    SDL_AudioFilter filters[SDL_AUDIOCVT_MAX_FILTERS + 1]; /**< NULL-terminated list of filter functions */
-    int filter_index;           /**< Current audio conversion function */
-} SDL_AUDIOCVT_PACKED SDL_AudioCVT;
-
-
-/* Function prototypes */
-
-/**
- *  \name Driver discovery functions
- *
- *  These functions return the list of built in audio drivers, in the
- *  order that they are normally initialized by default.
- */
-/* @{ */
-
-/**
- * Use this function to get the number of built-in audio drivers.
- *
- * This function returns a hardcoded number. This never returns a negative
- * value; if there are no drivers compiled into this build of SDL, this
- * function returns zero. The presence of a driver in this list does not mean
- * it will function, it just means SDL is capable of interacting with that
- * interface. For example, a build of SDL might have esound support, but if
- * there's no esound server available, SDL's esound driver would fail if used.
- *
- * By default, SDL tries all drivers, in its preferred order, until one is
- * found to be usable.
- *
- * \returns the number of built-in audio drivers.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetAudioDriver
- */
-extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
-
-/**
- * Use this function to get the name of a built in audio driver.
- *
- * The list of audio drivers is given in the order that they are normally
- * initialized by default; the drivers that seem more reasonable to choose
- * first (as far as the SDL developers believe) are earlier in the list.
- *
- * The names of drivers are all simple, low-ASCII identifiers, like "alsa",
- * "coreaudio" or "xaudio2". These never have Unicode characters, and are not
- * meant to be proper names.
- *
- * \param index the index of the audio driver; the value ranges from 0 to
- *              SDL_GetNumAudioDrivers() - 1
- * \returns the name of the audio driver at the requested index, or NULL if an
- *          invalid index was specified.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetNumAudioDrivers
- */
-extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);
-/* @} */
-
-/**
- *  \name Initialization and cleanup
- *
- *  \internal These functions are used internally, and should not be used unless
- *            you have a specific need to specify the audio driver you want to
- *            use.  You should normally use SDL_Init() or SDL_InitSubSystem().
- */
-/* @{ */
-
-/**
- * Use this function to initialize a particular audio driver.
- *
- * This function is used internally, and should not be used unless you have a
- * specific need to designate the audio driver you want to use. You should
- * normally use SDL_Init() or SDL_InitSubSystem().
- *
- * \param driver_name the name of the desired audio driver
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AudioQuit
- */
-extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
-
-/**
- * Use this function to shut down audio if you initialized it with
- * SDL_AudioInit().
- *
- * This function is used internally, and should not be used unless you have a
- * specific need to specify the audio driver you want to use. You should
- * normally use SDL_Quit() or SDL_QuitSubSystem().
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AudioInit
- */
-extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
-/* @} */
-
-/**
- * Get the name of the current audio driver.
- *
- * The returned string points to internal static memory and thus never becomes
- * invalid, even if you quit the audio subsystem and initialize a new driver
- * (although such a case would return a different static string from another
- * call to this function, of course). As such, you should not modify or free
- * the returned string.
- *
- * \returns the name of the current audio driver or NULL if no driver has been
- *          initialized.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AudioInit
- */
-extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
-
-/**
- * This function is a legacy means of opening the audio device.
- *
- * This function remains for compatibility with SDL 1.2, but also because it's
- * slightly easier to use than the new functions in SDL 2.0. The new, more
- * powerful, and preferred way to do this is SDL_OpenAudioDevice().
- *
- * This function is roughly equivalent to:
- *
- * ```c
- * SDL_OpenAudioDevice(NULL, 0, desired, obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);
- * ```
- *
- * With two notable exceptions:
- *
- * - If `obtained` is NULL, we use `desired` (and allow no changes), which
- *   means desired will be modified to have the correct values for silence,
- *   etc, and SDL will convert any differences between your app's specific
- *   request and the hardware behind the scenes.
- * - The return value is always success or failure, and not a device ID, which
- *   means you can only have one device open at a time with this function.
- *
- * \param desired an SDL_AudioSpec structure representing the desired output
- *                format. Please refer to the SDL_OpenAudioDevice
- *                documentation for details on how to prepare this structure.
- * \param obtained an SDL_AudioSpec structure filled in with the actual
- *                 parameters, or NULL.
- * \returns 0 if successful, placing the actual hardware parameters in the
- *          structure pointed to by `obtained`.
- *
- *          If `obtained` is NULL, the audio data passed to the callback
- *          function will be guaranteed to be in the requested format, and
- *          will be automatically converted to the actual hardware audio
- *          format if necessary. If `obtained` is NULL, `desired` will have
- *          fields modified.
- *
- *          This function returns a negative error code on failure to open the
- *          audio device or failure to set up the audio thread; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CloseAudio
- * \sa SDL_LockAudio
- * \sa SDL_PauseAudio
- * \sa SDL_UnlockAudio
- */
-extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,
-                                          SDL_AudioSpec * obtained);
-
-/**
- *  SDL Audio Device IDs.
- *
- *  A successful call to SDL_OpenAudio() is always device id 1, and legacy
- *  SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls
- *  always returns devices >= 2 on success. The legacy calls are good both
- *  for backwards compatibility and when you don't care about multiple,
- *  specific, or capture devices.
- */
-typedef Uint32 SDL_AudioDeviceID;
-
-/**
- * Get the number of built-in audio devices.
- *
- * This function is only valid after successfully initializing the audio
- * subsystem.
- *
- * Note that audio capture support is not implemented as of SDL 2.0.4, so the
- * `iscapture` parameter is for future expansion and should always be zero for
- * now.
- *
- * This function will return -1 if an explicit list of devices can't be
- * determined. Returning -1 is not an error. For example, if SDL is set up to
- * talk to a remote audio server, it can't list every one available on the
- * Internet, but it will still allow a specific host to be specified in
- * SDL_OpenAudioDevice().
- *
- * In many common cases, when this function returns a value <= 0, it can still
- * successfully open the default device (NULL for first argument of
- * SDL_OpenAudioDevice()).
- *
- * This function may trigger a complete redetect of available hardware. It
- * should not be called for each iteration of a loop, but rather once at the
- * start of a loop:
- *
- * ```c
- * // Don't do this:
- * for (int i = 0; i < SDL_GetNumAudioDevices(0); i++)
- *
- * // do this instead:
- * const int count = SDL_GetNumAudioDevices(0);
- * for (int i = 0; i < count; ++i) { do_something_here(); }
- * ```
- *
- * \param iscapture zero to request playback devices, non-zero to request
- *                  recording devices
- * \returns the number of available devices exposed by the current driver or
- *          -1 if an explicit list of devices can't be determined. A return
- *          value of -1 does not necessarily mean an error condition.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetAudioDeviceName
- * \sa SDL_OpenAudioDevice
- */
-extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);
-
-/**
- * Get the human-readable name of a specific audio device.
- *
- * This function is only valid after successfully initializing the audio
- * subsystem. The values returned by this function reflect the latest call to
- * SDL_GetNumAudioDevices(); re-call that function to redetect available
- * hardware.
- *
- * The string returned by this function is UTF-8 encoded, read-only, and
- * managed internally. You are not to free it. If you need to keep the string
- * for any length of time, you should make your own copy of it, as it will be
- * invalid next time any of several other SDL functions are called.
- *
- * \param index the index of the audio device; valid values range from 0 to
- *              SDL_GetNumAudioDevices() - 1
- * \param iscapture non-zero to query the list of recording devices, zero to
- *                  query the list of output devices.
- * \returns the name of the audio device at the requested index, or NULL on
- *          error.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetNumAudioDevices
- */
-extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
-                                                           int iscapture);
-
-/**
- * Get the preferred audio format of a specific audio device.
- *
- * This function is only valid after a successfully initializing the audio
- * subsystem. The values returned by this function reflect the latest call to
- * SDL_GetNumAudioDevices(); re-call that function to redetect available
- * hardware.
- *
- * `spec` will be filled with the sample rate, sample format, and channel
- * count.
- *
- * \param index the index of the audio device; valid values range from 0 to
- *              SDL_GetNumAudioDevices() - 1
- * \param iscapture non-zero to query the list of recording devices, zero to
- *                  query the list of output devices.
- * \param spec The SDL_AudioSpec to be initialized by this function.
- * \returns 0 on success, nonzero on error
- *
- * \since This function is available since SDL 2.0.16.
- *
- * \sa SDL_GetNumAudioDevices
- */
-extern DECLSPEC int SDLCALL SDL_GetAudioDeviceSpec(int index,
-                                                   int iscapture,
-                                                   SDL_AudioSpec *spec);
-
-
-/**
- * Open a specific audio device.
- *
- * SDL_OpenAudio(), unlike this function, always acts on device ID 1. As such,
- * this function will never return a 1 so as not to conflict with the legacy
- * function.
- *
- * Please note that SDL 2.0 before 2.0.5 did not support recording; as such,
- * this function would fail if `iscapture` was not zero. Starting with SDL
- * 2.0.5, recording is implemented and this value can be non-zero.
- *
- * Passing in a `device` name of NULL requests the most reasonable default
- * (and is equivalent to what SDL_OpenAudio() does to choose a device). The
- * `device` name is a UTF-8 string reported by SDL_GetAudioDeviceName(), but
- * some drivers allow arbitrary and driver-specific strings, such as a
- * hostname/IP address for a remote audio server, or a filename in the
- * diskaudio driver.
- *
- * An opened audio device starts out paused, and should be enabled for playing
- * by calling SDL_PauseAudioDevice(devid, 0) when you are ready for your audio
- * callback function to be called. Since the audio driver may modify the
- * requested size of the audio buffer, you should allocate any local mixing
- * buffers after you open the audio device.
- *
- * The audio callback runs in a separate thread in most cases; you can prevent
- * race conditions between your callback and other threads without fully
- * pausing playback with SDL_LockAudioDevice(). For more information about the
- * callback, see SDL_AudioSpec.
- *
- * Managing the audio spec via 'desired' and 'obtained':
- *
- * When filling in the desired audio spec structure:
- *
- * - `desired->freq` should be the frequency in sample-frames-per-second (Hz).
- * - `desired->format` should be the audio format (`AUDIO_S16SYS`, etc).
- * - `desired->samples` is the desired size of the audio buffer, in _sample
- *   frames_ (with stereo output, two samples--left and right--would make a
- *   single sample frame). This number should be a power of two, and may be
- *   adjusted by the audio driver to a value more suitable for the hardware.
- *   Good values seem to range between 512 and 8096 inclusive, depending on
- *   the application and CPU speed. Smaller values reduce latency, but can
- *   lead to underflow if the application is doing heavy processing and cannot
- *   fill the audio buffer in time. Note that the number of sample frames is
- *   directly related to time by the following formula: `ms =
- *   (sampleframes*1000)/freq`
- * - `desired->size` is the size in _bytes_ of the audio buffer, and is
- *   calculated by SDL_OpenAudioDevice(). You don't initialize this.
- * - `desired->silence` is the value used to set the buffer to silence, and is
- *   calculated by SDL_OpenAudioDevice(). You don't initialize this.
- * - `desired->callback` should be set to a function that will be called when
- *   the audio device is ready for more data. It is passed a pointer to the
- *   audio buffer, and the length in bytes of the audio buffer. This function
- *   usually runs in a separate thread, and so you should protect data
- *   structures that it accesses by calling SDL_LockAudioDevice() and
- *   SDL_UnlockAudioDevice() in your code. Alternately, you may pass a NULL
- *   pointer here, and call SDL_QueueAudio() with some frequency, to queue
- *   more audio samples to be played (or for capture devices, call
- *   SDL_DequeueAudio() with some frequency, to obtain audio samples).
- * - `desired->userdata` is passed as the first parameter to your callback
- *   function. If you passed a NULL callback, this value is ignored.
- *
- * `allowed_changes` can have the following flags OR'd together:
- *
- * - `SDL_AUDIO_ALLOW_FREQUENCY_CHANGE`
- * - `SDL_AUDIO_ALLOW_FORMAT_CHANGE`
- * - `SDL_AUDIO_ALLOW_CHANNELS_CHANGE`
- * - `SDL_AUDIO_ALLOW_ANY_CHANGE`
- *
- * These flags specify how SDL should behave when a device cannot offer a
- * specific feature. If the application requests a feature that the hardware
- * doesn't offer, SDL will always try to get the closest equivalent.
- *
- * For example, if you ask for float32 audio format, but the sound card only
- * supports int16, SDL will set the hardware to int16. If you had set
- * SDL_AUDIO_ALLOW_FORMAT_CHANGE, SDL will change the format in the `obtained`
- * structure. If that flag was *not* set, SDL will prepare to convert your
- * callback's float32 audio to int16 before feeding it to the hardware and
- * will keep the originally requested format in the `obtained` structure.
- *
- * The resulting audio specs, varying depending on hardware and on what
- * changes were allowed, will then be written back to `obtained`.
- *
- * If your application can only handle one specific data format, pass a zero
- * for `allowed_changes` and let SDL transparently handle any differences.
- *
- * \param device a UTF-8 string reported by SDL_GetAudioDeviceName() or a
- *               driver-specific name as appropriate. NULL requests the most
- *               reasonable default device.
- * \param iscapture non-zero to specify a device should be opened for
- *                  recording, not playback
- * \param desired an SDL_AudioSpec structure representing the desired output
- *                format; see SDL_OpenAudio() for more information
- * \param obtained an SDL_AudioSpec structure filled in with the actual output
- *                 format; see SDL_OpenAudio() for more information
- * \param allowed_changes 0, or one or more flags OR'd together
- * \returns a valid device ID that is > 0 on success or 0 on failure; call
- *          SDL_GetError() for more information.
- *
- *          For compatibility with SDL 1.2, this will never return 1, since
- *          SDL reserves that ID for the legacy SDL_OpenAudio() function.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CloseAudioDevice
- * \sa SDL_GetAudioDeviceName
- * \sa SDL_LockAudioDevice
- * \sa SDL_OpenAudio
- * \sa SDL_PauseAudioDevice
- * \sa SDL_UnlockAudioDevice
- */
-extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(
-                                                  const char *device,
-                                                  int iscapture,
-                                                  const SDL_AudioSpec *desired,
-                                                  SDL_AudioSpec *obtained,
-                                                  int allowed_changes);
-
-
-
-/**
- *  \name Audio state
- *
- *  Get the current audio state.
- */
-/* @{ */
-typedef enum
-{
-    SDL_AUDIO_STOPPED = 0,
-    SDL_AUDIO_PLAYING,
-    SDL_AUDIO_PAUSED
-} SDL_AudioStatus;
-
-/**
- * This function is a legacy means of querying the audio device.
- *
- * New programs might want to use SDL_GetAudioDeviceStatus() instead. This
- * function is equivalent to calling...
- *
- * ```c
- * SDL_GetAudioDeviceStatus(1);
- * ```
- *
- * ...and is only useful if you used the legacy SDL_OpenAudio() function.
- *
- * \returns the SDL_AudioStatus of the audio device opened by SDL_OpenAudio().
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetAudioDeviceStatus
- */
-extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void);
-
-/**
- * Use this function to get the current audio state of an audio device.
- *
- * \param dev the ID of an audio device previously opened with
- *            SDL_OpenAudioDevice()
- * \returns the SDL_AudioStatus of the specified audio device.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_PauseAudioDevice
- */
-extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
-/* @} *//* Audio State */
-
-/**
- *  \name Pause audio functions
- *
- *  These functions pause and unpause the audio callback processing.
- *  They should be called with a parameter of 0 after opening the audio
- *  device to start playing sound.  This is so you can safely initialize
- *  data for your callback function after opening the audio device.
- *  Silence will be written to the audio device during the pause.
- */
-/* @{ */
-
-/**
- * This function is a legacy means of pausing the audio device.
- *
- * New programs might want to use SDL_PauseAudioDevice() instead. This
- * function is equivalent to calling...
- *
- * ```c
- * SDL_PauseAudioDevice(1, pause_on);
- * ```
- *
- * ...and is only useful if you used the legacy SDL_OpenAudio() function.
- *
- * \param pause_on non-zero to pause, 0 to unpause
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetAudioStatus
- * \sa SDL_PauseAudioDevice
- */
-extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);
-
-/**
- * Use this function to pause and unpause audio playback on a specified
- * device.
- *
- * This function pauses and unpauses the audio callback processing for a given
- * device. Newly-opened audio devices start in the paused state, so you must
- * call this function with **pause_on**=0 after opening the specified audio
- * device to start playing sound. This allows you to safely initialize data
- * for your callback function after opening the audio device. Silence will be
- * written to the audio device while paused, and the audio callback is
- * guaranteed to not be called. Pausing one device does not prevent other
- * unpaused devices from running their callbacks.
- *
- * Pausing state does not stack; even if you pause a device several times, a
- * single unpause will start the device playing again, and vice versa. This is
- * different from how SDL_LockAudioDevice() works.
- *
- * If you just need to protect a few variables from race conditions vs your
- * callback, you shouldn't pause the audio device, as it will lead to dropouts
- * in the audio playback. Instead, you should use SDL_LockAudioDevice().
- *
- * \param dev a device opened by SDL_OpenAudioDevice()
- * \param pause_on non-zero to pause, 0 to unpause
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LockAudioDevice
- */
-extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
-                                                  int pause_on);
-/* @} *//* Pause audio functions */
-
-/**
- * Load the audio data of a WAVE file into memory.
- *
- * Loading a WAVE file requires `src`, `spec`, `audio_buf` and `audio_len` to
- * be valid pointers. The entire data portion of the file is then loaded into
- * memory and decoded if necessary.
- *
- * If `freesrc` is non-zero, the data source gets automatically closed and
- * freed before the function returns.
- *
- * Supported formats are RIFF WAVE files with the formats PCM (8, 16, 24, and
- * 32 bits), IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and
- * A-law and mu-law (8 bits). Other formats are currently unsupported and
- * cause an error.
- *
- * If this function succeeds, the pointer returned by it is equal to `spec`
- * and the pointer to the audio data allocated by the function is written to
- * `audio_buf` and its length in bytes to `audio_len`. The SDL_AudioSpec
- * members `freq`, `channels`, and `format` are set to the values of the audio
- * data in the buffer. The `samples` member is set to a sane default and all
- * others are set to zero.
- *
- * It's necessary to use SDL_FreeWAV() to free the audio data returned in
- * `audio_buf` when it is no longer used.
- *
- * Because of the underspecification of the .WAV format, there are many
- * problematic files in the wild that cause issues with strict decoders. To
- * provide compatibility with these files, this decoder is lenient in regards
- * to the truncation of the file, the fact chunk, and the size of the RIFF
- * chunk. The hints `SDL_HINT_WAVE_RIFF_CHUNK_SIZE`,
- * `SDL_HINT_WAVE_TRUNCATION`, and `SDL_HINT_WAVE_FACT_CHUNK` can be used to
- * tune the behavior of the loading process.
- *
- * Any file that is invalid (due to truncation, corruption, or wrong values in
- * the headers), too big, or unsupported causes an error. Additionally, any
- * critical I/O error from the data source will terminate the loading process
- * with an error. The function returns NULL on error and in all cases (with
- * the exception of `src` being NULL), an appropriate error message will be
- * set.
- *
- * It is required that the data source supports seeking.
- *
- * Example:
- *
- * ```c
- * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, &spec, &buf, &len);
- * ```
- *
- * Note that the SDL_LoadWAV macro does this same thing for you, but in a less
- * messy way:
- *
- * ```c
- * SDL_LoadWAV("sample.wav", &spec, &buf, &len);
- * ```
- *
- * \param src The data source for the WAVE data
- * \param freesrc If non-zero, SDL will _always_ free the data source
- * \param spec An SDL_AudioSpec that will be filled in with the wave file's
- *             format details
- * \param audio_buf A pointer filled with the audio data, allocated by the
- *                  function.
- * \param audio_len A pointer filled with the length of the audio data buffer
- *                  in bytes
- * \returns This function, if successfully called, returns `spec`, which will
- *          be filled with the audio data format of the wave source data.
- *          `audio_buf` will be filled with a pointer to an allocated buffer
- *          containing the audio data, and `audio_len` is filled with the
- *          length of that audio buffer in bytes.
- *
- *          This function returns NULL if the .WAV file cannot be opened, uses
- *          an unknown data format, or is corrupt; call SDL_GetError() for
- *          more information.
- *
- *          When the application is done with the data returned in
- *          `audio_buf`, it should call SDL_FreeWAV() to dispose of it.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_FreeWAV
- * \sa SDL_LoadWAV
- */
-extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
-                                                      int freesrc,
-                                                      SDL_AudioSpec * spec,
-                                                      Uint8 ** audio_buf,
-                                                      Uint32 * audio_len);
-
-/**
- *  Loads a WAV from a file.
- *  Compatibility convenience function.
- */
-#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
-    SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)
-
-/**
- * Free data previously allocated with SDL_LoadWAV() or SDL_LoadWAV_RW().
- *
- * After a WAVE file has been opened with SDL_LoadWAV() or SDL_LoadWAV_RW()
- * its data can eventually be freed with SDL_FreeWAV(). It is safe to call
- * this function with a NULL pointer.
- *
- * \param audio_buf a pointer to the buffer created by SDL_LoadWAV() or
- *                  SDL_LoadWAV_RW()
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LoadWAV
- * \sa SDL_LoadWAV_RW
- */
-extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
-
-/**
- * Initialize an SDL_AudioCVT structure for conversion.
- *
- * Before an SDL_AudioCVT structure can be used to convert audio data it must
- * be initialized with source and destination information.
- *
- * This function will zero out every field of the SDL_AudioCVT, so it must be
- * called before the application fills in the final buffer information.
- *
- * Once this function has returned successfully, and reported that a
- * conversion is necessary, the application fills in the rest of the fields in
- * SDL_AudioCVT, now that it knows how large a buffer it needs to allocate,
- * and then can call SDL_ConvertAudio() to complete the conversion.
- *
- * \param cvt an SDL_AudioCVT structure filled in with audio conversion
- *            information
- * \param src_format the source format of the audio data; for more info see
- *                   SDL_AudioFormat
- * \param src_channels the number of channels in the source
- * \param src_rate the frequency (sample-frames-per-second) of the source
- * \param dst_format the destination format of the audio data; for more info
- *                   see SDL_AudioFormat
- * \param dst_channels the number of channels in the destination
- * \param dst_rate the frequency (sample-frames-per-second) of the destination
- * \returns 1 if the audio filter is prepared, 0 if no conversion is needed,
- *          or a negative error code on failure; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ConvertAudio
- */
-extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
-                                              SDL_AudioFormat src_format,
-                                              Uint8 src_channels,
-                                              int src_rate,
-                                              SDL_AudioFormat dst_format,
-                                              Uint8 dst_channels,
-                                              int dst_rate);
-
-/**
- * Convert audio data to a desired audio format.
- *
- * This function does the actual audio data conversion, after the application
- * has called SDL_BuildAudioCVT() to prepare the conversion information and
- * then filled in the buffer details.
- *
- * Once the application has initialized the `cvt` structure using
- * SDL_BuildAudioCVT(), allocated an audio buffer and filled it with audio
- * data in the source format, this function will convert the buffer, in-place,
- * to the desired format.
- *
- * The data conversion may go through several passes; any given pass may
- * possibly temporarily increase the size of the data. For example, SDL might
- * expand 16-bit data to 32 bits before resampling to a lower frequency,
- * shrinking the data size after having grown it briefly. Since the supplied
- * buffer will be both the source and destination, converting as necessary
- * in-place, the application must allocate a buffer that will fully contain
- * the data during its largest conversion pass. After SDL_BuildAudioCVT()
- * returns, the application should set the `cvt->len` field to the size, in
- * bytes, of the source data, and allocate a buffer that is `cvt->len *
- * cvt->len_mult` bytes long for the `buf` field.
- *
- * The source data should be copied into this buffer before the call to
- * SDL_ConvertAudio(). Upon successful return, this buffer will contain the
- * converted audio, and `cvt->len_cvt` will be the size of the converted data,
- * in bytes. Any bytes in the buffer past `cvt->len_cvt` are undefined once
- * this function returns.
- *
- * \param cvt an SDL_AudioCVT structure that was previously set up by
- *            SDL_BuildAudioCVT().
- * \returns 0 if the conversion was completed successfully or a negative error
- *          code on failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_BuildAudioCVT
- */
-extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
-
-/* SDL_AudioStream is a new audio conversion interface.
-   The benefits vs SDL_AudioCVT:
-    - it can handle resampling data in chunks without generating
-      artifacts, when it doesn't have the complete buffer available.
-    - it can handle incoming data in any variable size.
-    - You push data as you have it, and pull it when you need it
- */
-/* this is opaque to the outside world. */
-struct _SDL_AudioStream;
-typedef struct _SDL_AudioStream SDL_AudioStream;
-
-/**
- * Create a new audio stream.
- *
- * \param src_format The format of the source audio
- * \param src_channels The number of channels of the source audio
- * \param src_rate The sampling rate of the source audio
- * \param dst_format The format of the desired audio output
- * \param dst_channels The number of channels of the desired audio output
- * \param dst_rate The sampling rate of the desired audio output
- * \returns 0 on success, or -1 on error.
- *
- * \since This function is available since SDL 2.0.7.
- *
- * \sa SDL_AudioStreamPut
- * \sa SDL_AudioStreamGet
- * \sa SDL_AudioStreamAvailable
- * \sa SDL_AudioStreamFlush
- * \sa SDL_AudioStreamClear
- * \sa SDL_FreeAudioStream
- */
-extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioFormat src_format,
-                                           const Uint8 src_channels,
-                                           const int src_rate,
-                                           const SDL_AudioFormat dst_format,
-                                           const Uint8 dst_channels,
-                                           const int dst_rate);
-
-/**
- * Add data to be converted/resampled to the stream.
- *
- * \param stream The stream the audio data is being added to
- * \param buf A pointer to the audio data to add
- * \param len The number of bytes to write to the stream
- * \returns 0 on success, or -1 on error.
- *
- * \since This function is available since SDL 2.0.7.
- *
- * \sa SDL_NewAudioStream
- * \sa SDL_AudioStreamGet
- * \sa SDL_AudioStreamAvailable
- * \sa SDL_AudioStreamFlush
- * \sa SDL_AudioStreamClear
- * \sa SDL_FreeAudioStream
- */
-extern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len);
-
-/**
- * Get converted/resampled data from the stream
- *
- * \param stream The stream the audio is being requested from
- * \param buf A buffer to fill with audio data
- * \param len The maximum number of bytes to fill
- * \returns the number of bytes read from the stream, or -1 on error
- *
- * \since This function is available since SDL 2.0.7.
- *
- * \sa SDL_NewAudioStream
- * \sa SDL_AudioStreamPut
- * \sa SDL_AudioStreamAvailable
- * \sa SDL_AudioStreamFlush
- * \sa SDL_AudioStreamClear
- * \sa SDL_FreeAudioStream
- */
-extern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len);
-
-/**
- * Get the number of converted/resampled bytes available.
- *
- * The stream may be buffering data behind the scenes until it has enough to
- * resample correctly, so this number might be lower than what you expect, or
- * even be zero. Add more data or flush the stream if you need the data now.
- *
- * \since This function is available since SDL 2.0.7.
- *
- * \sa SDL_NewAudioStream
- * \sa SDL_AudioStreamPut
- * \sa SDL_AudioStreamGet
- * \sa SDL_AudioStreamFlush
- * \sa SDL_AudioStreamClear
- * \sa SDL_FreeAudioStream
- */
-extern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream);
-
-/**
- * Tell the stream that you're done sending data, and anything being buffered
- * should be converted/resampled and made available immediately.
- *
- * It is legal to add more data to a stream after flushing, but there will be
- * audio gaps in the output. Generally this is intended to signal the end of
- * input, so the complete output becomes available.
- *
- * \since This function is available since SDL 2.0.7.
- *
- * \sa SDL_NewAudioStream
- * \sa SDL_AudioStreamPut
- * \sa SDL_AudioStreamGet
- * \sa SDL_AudioStreamAvailable
- * \sa SDL_AudioStreamClear
- * \sa SDL_FreeAudioStream
- */
-extern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream);
-
-/**
- * Clear any pending data in the stream without converting it
- *
- * \since This function is available since SDL 2.0.7.
- *
- * \sa SDL_NewAudioStream
- * \sa SDL_AudioStreamPut
- * \sa SDL_AudioStreamGet
- * \sa SDL_AudioStreamAvailable
- * \sa SDL_AudioStreamFlush
- * \sa SDL_FreeAudioStream
- */
-extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream);
-
-/**
- * Free an audio stream
- *
- * \since This function is available since SDL 2.0.7.
- *
- * \sa SDL_NewAudioStream
- * \sa SDL_AudioStreamPut
- * \sa SDL_AudioStreamGet
- * \sa SDL_AudioStreamAvailable
- * \sa SDL_AudioStreamFlush
- * \sa SDL_AudioStreamClear
- */
-extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream);
-
-#define SDL_MIX_MAXVOLUME 128
-
-/**
- * This function is a legacy means of mixing audio.
- *
- * This function is equivalent to calling...
- *
- * ```c
- * SDL_MixAudioFormat(dst, src, format, len, volume);
- * ```
- *
- * ...where `format` is the obtained format of the audio device from the
- * legacy SDL_OpenAudio() function.
- *
- * \param dst the destination for the mixed audio
- * \param src the source audio buffer to be mixed
- * \param len the length of the audio buffer in bytes
- * \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME
- *               for full audio volume
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_MixAudioFormat
- */
-extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
-                                          Uint32 len, int volume);
-
-/**
- * Mix audio data in a specified format.
- *
- * This takes an audio buffer `src` of `len` bytes of `format` data and mixes
- * it into `dst`, performing addition, volume adjustment, and overflow
- * clipping. The buffer pointed to by `dst` must also be `len` bytes of
- * `format` data.
- *
- * This is provided for convenience -- you can mix your own audio data.
- *
- * Do not use this function for mixing together more than two streams of
- * sample data. The output from repeated application of this function may be
- * distorted by clipping, because there is no accumulator with greater range
- * than the input (not to mention this being an inefficient way of doing it).
- *
- * It is a common misconception that this function is required to write audio
- * data to an output stream in an audio callback. While you can do that,
- * SDL_MixAudioFormat() is really only needed when you're mixing a single
- * audio stream with a volume adjustment.
- *
- * \param dst the destination for the mixed audio
- * \param src the source audio buffer to be mixed
- * \param format the SDL_AudioFormat structure representing the desired audio
- *               format
- * \param len the length of the audio buffer in bytes
- * \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME
- *               for full audio volume
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
-                                                const Uint8 * src,
-                                                SDL_AudioFormat format,
-                                                Uint32 len, int volume);
-
-/**
- * Queue more audio on non-callback devices.
- *
- * If you are looking to retrieve queued audio from a non-callback capture
- * device, you want SDL_DequeueAudio() instead. SDL_QueueAudio() will return
- * -1 to signify an error if you use it with capture devices.
- *
- * SDL offers two ways to feed audio to the device: you can either supply a
- * callback that SDL triggers with some frequency to obtain more audio (pull
- * method), or you can supply no callback, and then SDL will expect you to
- * supply data at regular intervals (push method) with this function.
- *
- * There are no limits on the amount of data you can queue, short of
- * exhaustion of address space. Queued data will drain to the device as
- * necessary without further intervention from you. If the device needs audio
- * but there is not enough queued, it will play silence to make up the
- * difference. This means you will have skips in your audio playback if you
- * aren't routinely queueing sufficient data.
- *
- * This function copies the supplied data, so you are safe to free it when the
- * function returns. This function is thread-safe, but queueing to the same
- * device from two threads at once does not promise which buffer will be
- * queued first.
- *
- * You may not queue audio on a device that is using an application-supplied
- * callback; doing so returns an error. You have to use the audio callback or
- * queue audio with this function, but not both.
- *
- * You should not call SDL_LockAudio() on the device before queueing; SDL
- * handles locking internally for this function.
- *
- * Note that SDL2 does not support planar audio. You will need to resample
- * from planar audio formats into a non-planar one (see SDL_AudioFormat)
- * before queuing audio.
- *
- * \param dev the device ID to which we will queue audio
- * \param data the data to queue to the device for later playback
- * \param len the number of bytes (not samples!) to which `data` points
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.4.
- *
- * \sa SDL_ClearQueuedAudio
- * \sa SDL_GetQueuedAudioSize
- */
-extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
-
-/**
- * Dequeue more audio on non-callback devices.
- *
- * If you are looking to queue audio for output on a non-callback playback
- * device, you want SDL_QueueAudio() instead. SDL_DequeueAudio() will always
- * return 0 if you use it with playback devices.
- *
- * SDL offers two ways to retrieve audio from a capture device: you can either
- * supply a callback that SDL triggers with some frequency as the device
- * records more audio data, (push method), or you can supply no callback, and
- * then SDL will expect you to retrieve data at regular intervals (pull
- * method) with this function.
- *
- * There are no limits on the amount of data you can queue, short of
- * exhaustion of address space. Data from the device will keep queuing as
- * necessary without further intervention from you. This means you will
- * eventually run out of memory if you aren't routinely dequeueing data.
- *
- * Capture devices will not queue data when paused; if you are expecting to
- * not need captured audio for some length of time, use SDL_PauseAudioDevice()
- * to stop the capture device from queueing more data. This can be useful
- * during, say, level loading times. When unpaused, capture devices will start
- * queueing data from that point, having flushed any capturable data available
- * while paused.
- *
- * This function is thread-safe, but dequeueing from the same device from two
- * threads at once does not promise which thread will dequeue data first.
- *
- * You may not dequeue audio from a device that is using an
- * application-supplied callback; doing so returns an error. You have to use
- * the audio callback, or dequeue audio with this function, but not both.
- *
- * You should not call SDL_LockAudio() on the device before dequeueing; SDL
- * handles locking internally for this function.
- *
- * \param dev the device ID from which we will dequeue audio
- * \param data a pointer into where audio data should be copied
- * \param len the number of bytes (not samples!) to which (data) points
- * \returns the number of bytes dequeued, which could be less than requested;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.5.
- *
- * \sa SDL_ClearQueuedAudio
- * \sa SDL_GetQueuedAudioSize
- */
-extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, void *data, Uint32 len);
-
-/**
- * Get the number of bytes of still-queued audio.
- *
- * For playback devices: this is the number of bytes that have been queued for
- * playback with SDL_QueueAudio(), but have not yet been sent to the hardware.
- *
- * Once we've sent it to the hardware, this function can not decide the exact
- * byte boundary of what has been played. It's possible that we just gave the
- * hardware several kilobytes right before you called this function, but it
- * hasn't played any of it yet, or maybe half of it, etc.
- *
- * For capture devices, this is the number of bytes that have been captured by
- * the device and are waiting for you to dequeue. This number may grow at any
- * time, so this only informs of the lower-bound of available data.
- *
- * You may not queue or dequeue audio on a device that is using an
- * application-supplied callback; calling this function on such a device
- * always returns 0. You have to use the audio callback or queue audio, but
- * not both.
- *
- * You should not call SDL_LockAudio() on the device before querying; SDL
- * handles locking internally for this function.
- *
- * \param dev the device ID of which we will query queued audio size
- * \returns the number of bytes (not samples!) of queued audio.
- *
- * \since This function is available since SDL 2.0.4.
- *
- * \sa SDL_ClearQueuedAudio
- * \sa SDL_QueueAudio
- * \sa SDL_DequeueAudio
- */
-extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
-
-/**
- * Drop any queued audio data waiting to be sent to the hardware.
- *
- * Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For
- * output devices, the hardware will start playing silence if more audio isn't
- * queued. For capture devices, the hardware will start filling the empty
- * queue with new data if the capture device isn't paused.
- *
- * This will not prevent playback of queued audio that's already been sent to
- * the hardware, as we can not undo that, so expect there to be some fraction
- * of a second of audio that might still be heard. This can be useful if you
- * want to, say, drop any pending music or any unprocessed microphone input
- * during a level change in your game.
- *
- * You may not queue or dequeue audio on a device that is using an
- * application-supplied callback; calling this function on such a device
- * always returns 0. You have to use the audio callback or queue audio, but
- * not both.
- *
- * You should not call SDL_LockAudio() on the device before clearing the
- * queue; SDL handles locking internally for this function.
- *
- * This function always succeeds and thus returns void.
- *
- * \param dev the device ID of which to clear the audio queue
- *
- * \since This function is available since SDL 2.0.4.
- *
- * \sa SDL_GetQueuedAudioSize
- * \sa SDL_QueueAudio
- * \sa SDL_DequeueAudio
- */
-extern DECLSPEC void SDLCALL SDL_ClearQueuedAudio(SDL_AudioDeviceID dev);
-
-
-/**
- *  \name Audio lock functions
- *
- *  The lock manipulated by these functions protects the callback function.
- *  During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that
- *  the callback function is not running.  Do not call these from the callback
- *  function or you will cause deadlock.
- */
-/* @{ */
-
-/**
- * This function is a legacy means of locking the audio device.
- *
- * New programs might want to use SDL_LockAudioDevice() instead. This function
- * is equivalent to calling...
- *
- * ```c
- * SDL_LockAudioDevice(1);
- * ```
- *
- * ...and is only useful if you used the legacy SDL_OpenAudio() function.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LockAudioDevice
- * \sa SDL_UnlockAudio
- * \sa SDL_UnlockAudioDevice
- */
-extern DECLSPEC void SDLCALL SDL_LockAudio(void);
-
-/**
- * Use this function to lock out the audio callback function for a specified
- * device.
- *
- * The lock manipulated by these functions protects the audio callback
- * function specified in SDL_OpenAudioDevice(). During a
- * SDL_LockAudioDevice()/SDL_UnlockAudioDevice() pair, you can be guaranteed
- * that the callback function for that device is not running, even if the
- * device is not paused. While a device is locked, any other unpaused,
- * unlocked devices may still run their callbacks.
- *
- * Calling this function from inside your audio callback is unnecessary. SDL
- * obtains this lock before calling your function, and releases it when the
- * function returns.
- *
- * You should not hold the lock longer than absolutely necessary. If you hold
- * it too long, you'll experience dropouts in your audio playback. Ideally,
- * your application locks the device, sets a few variables and unlocks again.
- * Do not do heavy work while holding the lock for a device.
- *
- * It is safe to lock the audio device multiple times, as long as you unlock
- * it an equivalent number of times. The callback will not run until the
- * device has been unlocked completely in this way. If your application fails
- * to unlock the device appropriately, your callback will never run, you might
- * hear repeating bursts of audio, and SDL_CloseAudioDevice() will probably
- * deadlock.
- *
- * Internally, the audio device lock is a mutex; if you lock from two threads
- * at once, not only will you block the audio callback, you'll block the other
- * thread.
- *
- * \param dev the ID of the device to be locked
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_UnlockAudioDevice
- */
-extern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev);
-
-/**
- * This function is a legacy means of unlocking the audio device.
- *
- * New programs might want to use SDL_UnlockAudioDevice() instead. This
- * function is equivalent to calling...
- *
- * ```c
- * SDL_UnlockAudioDevice(1);
- * ```
- *
- * ...and is only useful if you used the legacy SDL_OpenAudio() function.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LockAudio
- * \sa SDL_UnlockAudioDevice
- */
-extern DECLSPEC void SDLCALL SDL_UnlockAudio(void);
-
-/**
- * Use this function to unlock the audio callback function for a specified
- * device.
- *
- * This function should be paired with a previous SDL_LockAudioDevice() call.
- *
- * \param dev the ID of the device to be unlocked
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LockAudioDevice
- */
-extern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev);
-/* @} *//* Audio lock functions */
-
-/**
- * This function is a legacy means of closing the audio device.
- *
- * This function is equivalent to calling...
- *
- * ```c
- * SDL_CloseAudioDevice(1);
- * ```
- *
- * ...and is only useful if you used the legacy SDL_OpenAudio() function.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_OpenAudio
- */
-extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
-
-/**
- * Use this function to shut down audio processing and close the audio device.
- *
- * The application should close open audio devices once they are no longer
- * needed. Calling this function will wait until the device's audio callback
- * is not running, release the audio hardware and then clean up internal
- * state. No further audio will play from this device once this function
- * returns.
- *
- * This function may block briefly while pending audio data is played by the
- * hardware, so that applications don't drop the last buffer of data they
- * supplied.
- *
- * The device ID is invalid as soon as the device is closed, and is eligible
- * for reuse in a new SDL_OpenAudioDevice() call immediately.
- *
- * \param dev an audio device previously opened with SDL_OpenAudioDevice()
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_OpenAudioDevice
- */
-extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_audio_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_bits.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_bits.h
deleted file mode 100644 (file)
index 22cb853..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_bits.h
- *
- *  Functions for fiddling with bits and bitmasks.
- */
-
-#ifndef SDL_bits_h_
-#define SDL_bits_h_
-
-#include "SDL_stdinc.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \file SDL_bits.h
- */
-
-/**
- *  Get the index of the most significant bit. Result is undefined when called
- *  with 0. This operation can also be stated as "count leading zeroes" and
- *  "log base 2".
- *
- *  \return the index of the most significant bit, or -1 if the value is 0.
- */
-#if defined(__WATCOMC__) && defined(__386__)
-extern __inline int _SDL_bsr_watcom(Uint32);
-#pragma aux _SDL_bsr_watcom = \
-    "bsr eax, eax" \
-    parm [eax] nomemory \
-    value [eax] \
-    modify exact [eax] nomemory;
-#endif
-
-SDL_FORCE_INLINE int
-SDL_MostSignificantBitIndex32(Uint32 x)
-{
-#if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-    /* Count Leading Zeroes builtin in GCC.
-     * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
-     */
-    if (x == 0) {
-        return -1;
-    }
-    return 31 - __builtin_clz(x);
-#elif defined(__WATCOMC__) && defined(__386__)
-    if (x == 0) {
-        return -1;
-    }
-    return _SDL_bsr_watcom(x);
-#elif defined(_MSC_VER)
-    unsigned long index;
-    if (_BitScanReverse(&index, x)) {
-        return index;
-    }
-    return -1;
-#else
-    /* Based off of Bit Twiddling Hacks by Sean Eron Anderson
-     * <seander@cs.stanford.edu>, released in the public domain.
-     * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog
-     */
-    const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
-    const int    S[] = {1, 2, 4, 8, 16};
-
-    int msbIndex = 0;
-    int i;
-
-    if (x == 0) {
-        return -1;
-    }
-
-    for (i = 4; i >= 0; i--)
-    {
-        if (x & b[i])
-        {
-            x >>= S[i];
-            msbIndex |= S[i];
-        }
-    }
-
-    return msbIndex;
-#endif
-}
-
-SDL_FORCE_INLINE SDL_bool
-SDL_HasExactlyOneBitSet32(Uint32 x)
-{
-    if (x && !(x & (x - 1))) {
-        return SDL_TRUE;
-    }
-    return SDL_FALSE;
-}
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_bits_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_blendmode.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_blendmode.h
deleted file mode 100644 (file)
index 08c9f9d..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_blendmode.h
- *
- *  Header file declaring the SDL_BlendMode enumeration
- */
-
-#ifndef SDL_blendmode_h_
-#define SDL_blendmode_h_
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \brief The blend mode used in SDL_RenderCopy() and drawing operations.
- */
-typedef enum
-{
-    SDL_BLENDMODE_NONE = 0x00000000,     /**< no blending
-                                              dstRGBA = srcRGBA */
-    SDL_BLENDMODE_BLEND = 0x00000001,    /**< alpha blending
-                                              dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
-                                              dstA = srcA + (dstA * (1-srcA)) */
-    SDL_BLENDMODE_ADD = 0x00000002,      /**< additive blending
-                                              dstRGB = (srcRGB * srcA) + dstRGB
-                                              dstA = dstA */
-    SDL_BLENDMODE_MOD = 0x00000004,      /**< color modulate
-                                              dstRGB = srcRGB * dstRGB
-                                              dstA = dstA */
-    SDL_BLENDMODE_MUL = 0x00000008,      /**< color multiply
-                                              dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
-                                              dstA = (srcA * dstA) + (dstA * (1-srcA)) */
-    SDL_BLENDMODE_INVALID = 0x7FFFFFFF
-
-    /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
-
-} SDL_BlendMode;
-
-/**
- *  \brief The blend operation used when combining source and destination pixel components
- */
-typedef enum
-{
-    SDL_BLENDOPERATION_ADD              = 0x1,  /**< dst + src: supported by all renderers */
-    SDL_BLENDOPERATION_SUBTRACT         = 0x2,  /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
-    SDL_BLENDOPERATION_REV_SUBTRACT     = 0x3,  /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
-    SDL_BLENDOPERATION_MINIMUM          = 0x4,  /**< min(dst, src) : supported by D3D9, D3D11 */
-    SDL_BLENDOPERATION_MAXIMUM          = 0x5   /**< max(dst, src) : supported by D3D9, D3D11 */
-} SDL_BlendOperation;
-
-/**
- *  \brief The normalized factor used to multiply pixel components
- */
-typedef enum
-{
-    SDL_BLENDFACTOR_ZERO                = 0x1,  /**< 0, 0, 0, 0 */
-    SDL_BLENDFACTOR_ONE                 = 0x2,  /**< 1, 1, 1, 1 */
-    SDL_BLENDFACTOR_SRC_COLOR           = 0x3,  /**< srcR, srcG, srcB, srcA */
-    SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4,  /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */
-    SDL_BLENDFACTOR_SRC_ALPHA           = 0x5,  /**< srcA, srcA, srcA, srcA */
-    SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6,  /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */
-    SDL_BLENDFACTOR_DST_COLOR           = 0x7,  /**< dstR, dstG, dstB, dstA */
-    SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8,  /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
-    SDL_BLENDFACTOR_DST_ALPHA           = 0x9,  /**< dstA, dstA, dstA, dstA */
-    SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA   /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
-} SDL_BlendFactor;
-
-/**
- * Compose a custom blend mode for renderers.
- *
- * The functions SDL_SetRenderDrawBlendMode and SDL_SetTextureBlendMode accept
- * the SDL_BlendMode returned by this function if the renderer supports it.
- *
- * A blend mode controls how the pixels from a drawing operation (source) get
- * combined with the pixels from the render target (destination). First, the
- * components of the source and destination pixels get multiplied with their
- * blend factors. Then, the blend operation takes the two products and
- * calculates the result that will get stored in the render target.
- *
- * Expressed in pseudocode, it would look like this:
- *
- * ```c
- * dstRGB = colorOperation(srcRGB * srcColorFactor, dstRGB * dstColorFactor);
- * dstA = alphaOperation(srcA * srcAlphaFactor, dstA * dstAlphaFactor);
- * ```
- *
- * Where the functions `colorOperation(src, dst)` and `alphaOperation(src,
- * dst)` can return one of the following:
- *
- * - `src + dst`
- * - `src - dst`
- * - `dst - src`
- * - `min(src, dst)`
- * - `max(src, dst)`
- *
- * The red, green, and blue components are always multiplied with the first,
- * second, and third components of the SDL_BlendFactor, respectively. The
- * fourth component is not used.
- *
- * The alpha component is always multiplied with the fourth component of the
- * SDL_BlendFactor. The other components are not used in the alpha
- * calculation.
- *
- * Support for these blend modes varies for each renderer. To check if a
- * specific SDL_BlendMode is supported, create a renderer and pass it to
- * either SDL_SetRenderDrawBlendMode or SDL_SetTextureBlendMode. They will
- * return with an error if the blend mode is not supported.
- *
- * This list describes the support of custom blend modes for each renderer in
- * SDL 2.0.6. All renderers support the four blend modes listed in the
- * SDL_BlendMode enumeration.
- *
- * - **direct3d**: Supports all operations with all factors. However, some
- *   factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
- *   `SDL_BLENDOPERATION_MAXIMUM`.
- * - **direct3d11**: Same as Direct3D 9.
- * - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
- *   factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
- *   2.0.6.
- * - **opengles**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
- *   factors. Color and alpha factors need to be the same. OpenGL ES 1
- *   implementation specific: May also support `SDL_BLENDOPERATION_SUBTRACT`
- *   and `SDL_BLENDOPERATION_REV_SUBTRACT`. May support color and alpha
- *   operations being different from each other. May support color and alpha
- *   factors being different from each other.
- * - **opengles2**: Supports the `SDL_BLENDOPERATION_ADD`,
- *   `SDL_BLENDOPERATION_SUBTRACT`, `SDL_BLENDOPERATION_REV_SUBTRACT`
- *   operations with all factors.
- * - **psp**: No custom blend mode support.
- * - **software**: No custom blend mode support.
- *
- * Some renderers do not provide an alpha component for the default render
- * target. The `SDL_BLENDFACTOR_DST_ALPHA` and
- * `SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA` factors do not have an effect in this
- * case.
- *
- * \param srcColorFactor the SDL_BlendFactor applied to the red, green, and
- *                       blue components of the source pixels
- * \param dstColorFactor the SDL_BlendFactor applied to the red, green, and
- *                       blue components of the destination pixels
- * \param colorOperation the SDL_BlendOperation used to combine the red,
- *                       green, and blue components of the source and
- *                       destination pixels
- * \param srcAlphaFactor the SDL_BlendFactor applied to the alpha component of
- *                       the source pixels
- * \param dstAlphaFactor the SDL_BlendFactor applied to the alpha component of
- *                       the destination pixels
- * \param alphaOperation the SDL_BlendOperation used to combine the alpha
- *                       component of the source and destination pixels
- * \returns an SDL_BlendMode that represents the chosen factors and
- *          operations.
- *
- * \since This function is available since SDL 2.0.6.
- *
- * \sa SDL_SetRenderDrawBlendMode
- * \sa SDL_GetRenderDrawBlendMode
- * \sa SDL_SetTextureBlendMode
- * \sa SDL_GetTextureBlendMode
- */
-extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,
-                                                                 SDL_BlendFactor dstColorFactor,
-                                                                 SDL_BlendOperation colorOperation,
-                                                                 SDL_BlendFactor srcAlphaFactor,
-                                                                 SDL_BlendFactor dstAlphaFactor,
-                                                                 SDL_BlendOperation alphaOperation);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_blendmode_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_clipboard.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_clipboard.h
deleted file mode 100644 (file)
index 9351363..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- * \file SDL_clipboard.h
- *
- * Include file for SDL clipboard handling
- */
-
-#ifndef SDL_clipboard_h_
-#define SDL_clipboard_h_
-
-#include "SDL_stdinc.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Function prototypes */
-
-/**
- * Put UTF-8 text into the clipboard.
- *
- * \param text the text to store in the clipboard
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetClipboardText
- * \sa SDL_HasClipboardText
- */
-extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
-
-/**
- * Get UTF-8 text from the clipboard, which must be freed with SDL_free().
- *
- * This functions returns empty string if there was not enough memory left for
- * a copy of the clipboard's content.
- *
- * \returns the clipboard text on success or an empty string on failure; call
- *          SDL_GetError() for more information. Caller must call SDL_free()
- *          on the returned pointer when done with it (even if there was an
- *          error).
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HasClipboardText
- * \sa SDL_SetClipboardText
- */
-extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
-
-/**
- * Query whether the clipboard exists and contains a non-empty text string.
- *
- * \returns SDL_TRUE if the clipboard has text, or SDL_FALSE if it does not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetClipboardText
- * \sa SDL_SetClipboardText
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_clipboard_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config.h
deleted file mode 100644 (file)
index 770b190..0000000
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_config_windows_h_
-#define SDL_config_windows_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/* winsdkver.h defines _WIN32_MAXVER for SDK version detection. It is present since at least the Windows 7 SDK,
- * but out of caution we'll only use it if the compiler supports __has_include() to confirm its presence.
- * If your compiler doesn't support __has_include() but you have winsdkver.h, define HAVE_WINSDKVER_H.  */
-#if !defined(HAVE_WINSDKVER_H) && defined(__has_include)
-#if __has_include(<winsdkver.h>)
-#define HAVE_WINSDKVER_H 1
-#endif
-#endif
-
-#ifdef HAVE_WINSDKVER_H
-#include <winsdkver.h>
-#endif
-
-/* This is a set of defines to configure the SDL features */
-
-#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
-#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__clang__) || defined(__BORLANDC__) || defined(__CODEGEARC__)
-#define HAVE_STDINT_H   1
-#elif defined(_MSC_VER)
-typedef signed __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef signed __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef signed __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-#ifndef _UINTPTR_T_DEFINED
-#ifdef  _WIN64
-typedef unsigned __int64 uintptr_t;
-#else
-typedef unsigned int uintptr_t;
-#endif
-#define _UINTPTR_T_DEFINED
-#endif
-/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
-#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
-#define DWORD_PTR DWORD
-#endif
-#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
-#define LONG_PTR LONG
-#endif
-#else /* !__GNUC__ && !_MSC_VER */
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-#ifndef _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED_
-typedef unsigned int size_t;
-#endif
-typedef unsigned int uintptr_t;
-#endif /* __GNUC__ || _MSC_VER */
-#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
-
-#ifdef _WIN64
-# define SIZEOF_VOIDP 8
-#else
-# define SIZEOF_VOIDP 4
-#endif
-
-#ifdef __clang__
-# define HAVE_GCC_ATOMICS 1
-#endif
-
-#define HAVE_DDRAW_H 1
-#define HAVE_DINPUT_H 1
-#define HAVE_DSOUND_H 1
-#define HAVE_DXGI_H 1
-#define HAVE_XINPUT_H 1
-#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0A00  /* Windows 10 SDK */
-#define HAVE_WINDOWS_GAMING_INPUT_H 1
-#endif
-#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0602  /* Windows 8 SDK */
-#define HAVE_D3D11_H 1
-#define HAVE_ROAPI_H 1
-#endif
-#define HAVE_MMDEVICEAPI_H 1
-#define HAVE_AUDIOCLIENT_H 1
-#define HAVE_TPCSHRD_H 1
-#define HAVE_SENSORSAPI_H 1
-#if (defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)) && (defined(_MSC_VER) && _MSC_VER >= 1600)
-#define HAVE_IMMINTRIN_H 1
-#elif defined(__has_include) && (defined(__i386__) || defined(__x86_64))
-# if __has_include(<immintrin.h>)
-#   define HAVE_IMMINTRIN_H 1
-# endif
-#endif
-
-/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
-#ifdef HAVE_LIBC
-/* Useful headers */
-#define STDC_HEADERS 1
-#define HAVE_CTYPE_H 1
-#define HAVE_FLOAT_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_MATH_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_STDIO_H 1
-#define HAVE_STRING_H 1
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MEMCMP 1
-#define HAVE_STRLEN 1
-#define HAVE__STRREV 1
-/* These functions have security warnings, so we won't use them */
-/* #undef HAVE__STRUPR */
-/* #undef HAVE__STRLWR */
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-/* #undef HAVE_STRTOK_R */
-/* These functions have security warnings, so we won't use them */
-/* #undef HAVE__LTOA */
-/* #undef HAVE__ULTOA */
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-#define HAVE__STRICMP 1
-#define HAVE__STRNICMP 1
-#define HAVE__WCSICMP 1
-#define HAVE__WCSNICMP 1
-#define HAVE__WCSDUP 1
-#define HAVE_ACOS   1
-#define HAVE_ACOSF  1
-#define HAVE_ASIN   1
-#define HAVE_ASINF  1
-#define HAVE_ATAN   1
-#define HAVE_ATANF  1
-#define HAVE_ATAN2  1
-#define HAVE_ATAN2F 1
-#define HAVE_CEILF  1
-#define HAVE__COPYSIGN 1
-#define HAVE_COS    1
-#define HAVE_COSF   1
-#define HAVE_EXP    1
-#define HAVE_EXPF   1
-#define HAVE_FABS   1
-#define HAVE_FABSF  1
-#define HAVE_FLOOR  1
-#define HAVE_FLOORF 1
-#define HAVE_FMOD   1
-#define HAVE_FMODF  1
-#define HAVE_LOG    1
-#define HAVE_LOGF   1
-#define HAVE_LOG10  1
-#define HAVE_LOG10F 1
-#define HAVE_POW    1
-#define HAVE_POWF   1
-#define HAVE_SIN    1
-#define HAVE_SINF   1
-#define HAVE_SQRT   1
-#define HAVE_SQRTF  1
-#define HAVE_TAN    1
-#define HAVE_TANF   1
-#if defined(_MSC_VER)
-/* These functions were added with the VC++ 2013 C runtime library */
-#if _MSC_VER >= 1800
-#define HAVE_STRTOLL 1
-#define HAVE_STRTOULL 1
-#define HAVE_VSSCANF 1
-#define HAVE_LROUND 1
-#define HAVE_LROUNDF 1
-#define HAVE_ROUND 1
-#define HAVE_ROUNDF 1
-#define HAVE_SCALBN 1
-#define HAVE_SCALBNF 1
-#define HAVE_TRUNC  1
-#define HAVE_TRUNCF 1
-#endif
-/* This function is available with at least the VC++ 2008 C runtime library */
-#if _MSC_VER >= 1400
-#define HAVE__FSEEKI64 1
-#endif
-#endif
-#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
-#define HAVE_M_PI 1
-#endif
-#else
-#define HAVE_STDARG_H   1
-#define HAVE_STDDEF_H   1
-#endif
-
-/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_WASAPI 1
-#define SDL_AUDIO_DRIVER_DSOUND 1
-#define SDL_AUDIO_DRIVER_WINMM  1
-#define SDL_AUDIO_DRIVER_DISK   1
-#define SDL_AUDIO_DRIVER_DUMMY  1
-
-/* Enable various input drivers */
-#define SDL_JOYSTICK_DINPUT 1
-#define SDL_JOYSTICK_HIDAPI 1
-#ifndef __WINRT__
-#define SDL_JOYSTICK_RAWINPUT   1
-#endif
-#define SDL_JOYSTICK_VIRTUAL    1
-#ifdef HAVE_WINDOWS_GAMING_INPUT_H
-#define SDL_JOYSTICK_WGI    1
-#endif
-#define SDL_JOYSTICK_XINPUT 1
-#define SDL_HAPTIC_DINPUT   1
-#define SDL_HAPTIC_XINPUT   1
-
-/* Enable the sensor driver */
-#define SDL_SENSOR_WINDOWS  1
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_WINDOWS  1
-
-/* Enable various threading systems */
-#define SDL_THREAD_GENERIC_COND_SUFFIX 1
-#define SDL_THREAD_WINDOWS  1
-
-/* Enable various timer systems */
-#define SDL_TIMER_WINDOWS   1
-
-/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_DUMMY  1
-#define SDL_VIDEO_DRIVER_WINDOWS    1
-
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D    1
-#endif
-#if !defined(SDL_VIDEO_RENDER_D3D11) && defined(HAVE_D3D11_H)
-#define SDL_VIDEO_RENDER_D3D11  1
-#endif
-
-/* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL    1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL    1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL    1
-#endif
-
-/* Enable Vulkan support */
-#define SDL_VIDEO_VULKAN 1
-
-/* Enable system power support */
-#define SDL_POWER_WINDOWS 1
-
-/* Enable filesystem support */
-#define SDL_FILESYSTEM_WINDOWS  1
-
-/* Enable assembly routines (Win64 doesn't have inline asm) */
-#ifndef _WIN64
-#define SDL_ASSEMBLY_ROUTINES   1
-#endif
-
-#endif /* SDL_config_windows_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_android.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_android.h
deleted file mode 100644 (file)
index 361bad8..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_config_android_h_
-#define SDL_config_android_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/**
- *  \file SDL_config_android.h
- *
- *  This is a configuration that can be used to build SDL for Android
- */
-
-#include <stdarg.h>
-
-#define HAVE_GCC_ATOMICS    1
-
-#define HAVE_ALLOCA_H       1
-#define HAVE_SYS_TYPES_H    1
-#define HAVE_STDIO_H    1
-#define STDC_HEADERS    1
-#define HAVE_STRING_H   1
-#define HAVE_INTTYPES_H 1
-#define HAVE_STDINT_H   1
-#define HAVE_CTYPE_H    1
-#define HAVE_MATH_H 1
-#define HAVE_SIGNAL_H 1
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC    1
-#define HAVE_FREE   1
-#define HAVE_ALLOCA 1
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_SETENV 1
-#define HAVE_UNSETENV   1
-#define HAVE_QSORT  1
-#define HAVE_ABS    1
-#define HAVE_BCOPY  1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE    1
-#define HAVE_MEMCMP 1
-#define HAVE_STRLEN 1
-#define HAVE_STRLCPY    1
-#define HAVE_STRLCAT    1
-#define HAVE_STRDUP 1
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR    1
-#define HAVE_STRSTR 1
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL    1
-#define HAVE_STRTOLL    1
-#define HAVE_STRTOULL   1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI   1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP    1
-#define HAVE_STRCASECMP 1
-#define HAVE_STRNCASECMP 1
-#define HAVE_VSSCANF 1
-#define HAVE_VSNPRINTF  1
-#define HAVE_M_PI   1
-#define HAVE_ATAN   1
-#define HAVE_ATAN2  1
-#define HAVE_ACOS  1
-#define HAVE_ASIN  1
-#define HAVE_CEIL   1
-#define HAVE_COPYSIGN   1
-#define HAVE_COS    1
-#define HAVE_COSF   1
-#define HAVE_FABS   1
-#define HAVE_FLOOR  1
-#define HAVE_LOG    1
-#define HAVE_POW    1
-#define HAVE_SCALBN 1
-#define HAVE_SIN    1
-#define HAVE_SINF   1
-#define HAVE_SQRT   1
-#define HAVE_SQRTF  1
-#define HAVE_TAN    1
-#define HAVE_TANF   1
-#define HAVE_SIGACTION 1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP  1
-#define HAVE_SYSCONF    1
-#define HAVE_CLOCK_GETTIME     1
-
-#define SIZEOF_VOIDP 4
-
-/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_ANDROID    1
-#define SDL_AUDIO_DRIVER_DUMMY  1
-
-/* Enable various input drivers */
-#define SDL_JOYSTICK_ANDROID    1
-#define SDL_HAPTIC_ANDROID    1
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_DLOPEN   1
-
-/* Enable various threading systems */
-#define SDL_THREAD_PTHREAD  1
-#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX  1
-
-/* Enable various timer systems */
-#define SDL_TIMER_UNIX  1
-
-/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_ANDROID 1
-
-/* Enable OpenGL ES */
-#define SDL_VIDEO_OPENGL_ES 1
-#define SDL_VIDEO_OPENGL_ES2 1
-#define SDL_VIDEO_OPENGL_EGL 1
-#define SDL_VIDEO_RENDER_OGL_ES 1
-#define SDL_VIDEO_RENDER_OGL_ES2    1
-
-/* Enable Vulkan support */
-/* Android does not support Vulkan in native code using the "armeabi" ABI. */
-#if defined(__ARM_ARCH) && __ARM_ARCH < 7
-#define SDL_VIDEO_VULKAN 0
-#else
-#define SDL_VIDEO_VULKAN 1
-#endif
-
-/* Enable system power support */
-#define SDL_POWER_ANDROID 1
-
-/* Enable the filesystem driver */
-#define SDL_FILESYSTEM_ANDROID   1
-
-#endif /* SDL_config_android_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_iphoneos.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_iphoneos.h
deleted file mode 100644 (file)
index deea030..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_config_iphoneos_h_
-#define SDL_config_iphoneos_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-#ifdef __LP64__
-#define SIZEOF_VOIDP 8
-#else
-#define SIZEOF_VOIDP 4
-#endif
-
-#define HAVE_GCC_ATOMICS    1
-
-#define HAVE_ALLOCA_H       1
-#define HAVE_SYS_TYPES_H    1
-#define HAVE_STDIO_H    1
-#define STDC_HEADERS    1
-#define HAVE_STRING_H   1
-#define HAVE_INTTYPES_H 1
-#define HAVE_STDINT_H   1
-#define HAVE_CTYPE_H    1
-#define HAVE_MATH_H 1
-#define HAVE_SIGNAL_H   1
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC    1
-#define HAVE_FREE   1
-#define HAVE_ALLOCA 1
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_SETENV 1
-#define HAVE_UNSETENV   1
-#define HAVE_QSORT  1
-#define HAVE_ABS    1
-#define HAVE_BCOPY  1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE    1
-#define HAVE_MEMCMP 1
-#define HAVE_STRLEN 1
-#define HAVE_STRLCPY    1
-#define HAVE_STRLCAT    1
-#define HAVE_STRDUP 1
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR    1
-#define HAVE_STRSTR 1
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL    1
-#define HAVE_STRTOLL    1
-#define HAVE_STRTOULL   1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI   1
-#define HAVE_ATOF   1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP    1
-#define HAVE_STRCASECMP 1
-#define HAVE_STRNCASECMP 1
-#define HAVE_VSSCANF 1
-#define HAVE_VSNPRINTF  1
-#define HAVE_M_PI   1
-#define HAVE_ATAN   1
-#define HAVE_ATAN2  1
-#define HAVE_ACOS  1
-#define HAVE_ASIN  1
-#define HAVE_CEIL   1
-#define HAVE_COPYSIGN   1
-#define HAVE_COS    1
-#define HAVE_COSF   1
-#define HAVE_FABS   1
-#define HAVE_FLOOR  1
-#define HAVE_LOG    1
-#define HAVE_POW    1
-#define HAVE_SCALBN 1
-#define HAVE_SIN    1
-#define HAVE_SINF   1
-#define HAVE_SQRT   1
-#define HAVE_SQRTF  1
-#define HAVE_TAN    1
-#define HAVE_TANF   1
-#define HAVE_SIGACTION  1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP  1
-#define HAVE_SYSCONF    1
-#define HAVE_SYSCTLBYNAME 1
-
-/* enable iPhone version of Core Audio driver */
-#define SDL_AUDIO_DRIVER_COREAUDIO 1
-/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
-#define SDL_AUDIO_DRIVER_DUMMY  1
-
-/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
-#define SDL_HAPTIC_DUMMY 1
-
-/* Enable MFi joystick support */
-#define SDL_JOYSTICK_MFI 1
-
-/* Enable Unix style SO loading */
-#define SDL_LOADSO_DLOPEN 1
-
-/* Enable various threading systems */
-#define SDL_THREAD_PTHREAD  1
-#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX  1
-
-/* Enable various timer systems */
-#define SDL_TIMER_UNIX  1
-
-/* Supported video drivers */
-#define SDL_VIDEO_DRIVER_UIKIT  1
-#define SDL_VIDEO_DRIVER_DUMMY  1
-
-/* enable OpenGL ES */
-#define SDL_VIDEO_OPENGL_ES2 1
-#define SDL_VIDEO_OPENGL_ES 1
-#define SDL_VIDEO_RENDER_OGL_ES 1
-#define SDL_VIDEO_RENDER_OGL_ES2    1
-
-/* Enable Vulkan support */
-#if !TARGET_OS_SIMULATOR && !TARGET_CPU_ARM // Only 64-bit devices have Metal
-#define SDL_VIDEO_VULKAN 1
-#else
-#define SDL_VIDEO_VULKAN 0
-#endif
-
-/* Enable system power support */
-#define SDL_POWER_UIKIT 1
-
-/* enable iPhone keyboard support */
-#define SDL_IPHONE_KEYBOARD 1
-
-/* enable iOS extended launch screen */
-#define SDL_IPHONE_LAUNCHSCREEN 1
-
-/* Set max recognized G-force from accelerometer
-   See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
- */
-#define SDL_IPHONE_MAX_GFORCE 5.0
-
-/* enable filesystem support */
-#define SDL_FILESYSTEM_COCOA   1
-
-#endif /* SDL_config_iphoneos_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_macosx.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_macosx.h
deleted file mode 100644 (file)
index 9b09899..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_config_macosx_h_
-#define SDL_config_macosx_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
-#include <AvailabilityMacros.h>
-
-/* This is a set of defines to configure the SDL features */
-
-#ifdef __LP64__
-    #define SIZEOF_VOIDP 8
-#else
-    #define SIZEOF_VOIDP 4
-#endif
-
-/* Useful headers */
-#define HAVE_ALLOCA_H       1
-#define HAVE_SYS_TYPES_H    1
-#define HAVE_STDIO_H    1
-#define STDC_HEADERS    1
-#define HAVE_STRING_H   1
-#define HAVE_INTTYPES_H 1
-#define HAVE_STDINT_H   1
-#define HAVE_CTYPE_H    1
-#define HAVE_MATH_H 1
-#define HAVE_SIGNAL_H   1
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC    1
-#define HAVE_FREE   1
-#define HAVE_ALLOCA 1
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_UNSETENV   1
-#define HAVE_QSORT  1
-#define HAVE_ABS    1
-#define HAVE_BCOPY  1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE    1
-#define HAVE_MEMCMP 1
-#define HAVE_STRLEN 1
-#define HAVE_STRLCPY    1
-#define HAVE_STRLCAT    1
-#define HAVE_STRDUP 1
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR    1
-#define HAVE_STRSTR 1
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL    1
-#define HAVE_STRTOLL    1
-#define HAVE_STRTOULL   1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI   1
-#define HAVE_ATOF   1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP    1
-#define HAVE_STRCASECMP 1
-#define HAVE_STRNCASECMP 1
-#define HAVE_VSSCANF 1
-#define HAVE_VSNPRINTF  1
-#define HAVE_CEIL   1
-#define HAVE_COPYSIGN   1
-#define HAVE_COS    1
-#define HAVE_COSF   1
-#define HAVE_FABS   1
-#define HAVE_FLOOR  1
-#define HAVE_LOG    1
-#define HAVE_POW    1
-#define HAVE_SCALBN 1
-#define HAVE_SIN    1
-#define HAVE_SINF   1
-#define HAVE_SQRT   1
-#define HAVE_SQRTF  1
-#define HAVE_TAN    1
-#define HAVE_TANF   1
-#define HAVE_SIGACTION  1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP  1
-#define HAVE_SYSCONF    1
-#define HAVE_SYSCTLBYNAME 1
-#define HAVE_ATAN 1
-#define HAVE_ATAN2 1
-#define HAVE_ACOS 1
-#define HAVE_ASIN 1
-
-/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_COREAUDIO  1
-#define SDL_AUDIO_DRIVER_DISK   1
-#define SDL_AUDIO_DRIVER_DUMMY  1
-
-/* Enable various input drivers */
-#define SDL_JOYSTICK_IOKIT  1
-#define SDL_HAPTIC_IOKIT    1
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_DLOPEN   1
-
-/* Enable various threading systems */
-#define SDL_THREAD_PTHREAD  1
-#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX  1
-
-/* Enable various timer systems */
-#define SDL_TIMER_UNIX  1
-
-/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_COCOA  1
-#define SDL_VIDEO_DRIVER_DUMMY  1
-#undef SDL_VIDEO_DRIVER_X11
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
-#define SDL_VIDEO_DRIVER_X11_XDBE 1
-#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
-#define SDL_VIDEO_DRIVER_X11_XRANDR 1
-#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
-#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
-#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
-#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
-
-#ifdef MAC_OS_X_VERSION_10_8
-/*
- * No matter the versions targeted, this is the 10.8 or later SDK, so you have
- *  to use the external Xquartz, which is a more modern Xlib. Previous SDKs
- *  used an older Xlib.
- */
-#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
-#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
-#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
-#endif
-
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL    1
-#endif
-
-/* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_CGL
-#define SDL_VIDEO_OPENGL_CGL    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_GLX
-#define SDL_VIDEO_OPENGL_GLX    1
-#endif
-
-/* Enable Vulkan support */
-/* Metal/MoltenVK/Vulkan only supported on 64-bit architectures with 10.11+ */
-#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
-#define SDL_VIDEO_VULKAN 1
-#else
-#define  SDL_VIDEO_VULKAN 0
-#endif
-
-/* Enable system power support */
-#define SDL_POWER_MACOSX 1
-
-/* enable filesystem support */
-#define SDL_FILESYSTEM_COCOA   1
-
-/* Enable assembly routines */
-#define SDL_ASSEMBLY_ROUTINES   1
-#ifdef __ppc__
-#define SDL_ALTIVEC_BLITTERS    1
-#endif
-
-#endif /* SDL_config_macosx_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_minimal.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_minimal.h
deleted file mode 100644 (file)
index 3112700..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_config_minimal_h_
-#define SDL_config_minimal_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/**
- *  \file SDL_config_minimal.h
- *
- *  This is the minimal configuration that can be used to build SDL.
- */
-
-#define HAVE_STDARG_H   1
-#define HAVE_STDDEF_H   1
-
-/* Most everything except Visual Studio 2008 and earlier has stdint.h now */
-#if defined(_MSC_VER) && (_MSC_VER < 1600)
-/* Here are some reasonable defaults */
-typedef unsigned int size_t;
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-typedef unsigned long uintptr_t;
-#else
-#define HAVE_STDINT_H 1
-#endif /* Visual Studio 2008 */
-
-#ifdef __GNUC__
-#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
-#endif
-
-/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
-#define SDL_AUDIO_DRIVER_DUMMY  1
-
-/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
-#define SDL_JOYSTICK_DISABLED   1
-
-/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
-#define SDL_HAPTIC_DISABLED 1
-
-/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
-#define SDL_LOADSO_DISABLED 1
-
-/* Enable the stub thread support (src/thread/generic/\*.c) */
-#define SDL_THREADS_DISABLED    1
-
-/* Enable the stub timer support (src/timer/dummy/\*.c) */
-#define SDL_TIMERS_DISABLED 1
-
-/* Enable the dummy video driver (src/video/dummy/\*.c) */
-#define SDL_VIDEO_DRIVER_DUMMY  1
-
-/* Enable the dummy filesystem driver (src/filesystem/dummy/\*.c) */
-#define SDL_FILESYSTEM_DUMMY  1
-
-#endif /* SDL_config_minimal_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_pandora.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_pandora.h
deleted file mode 100644 (file)
index ea62fe5..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_config_pandora_h_
-#define SDL_config_pandora_h_
-#define SDL_config_h_
-
-/* This is a set of defines to configure the SDL features */
-
-/* General platform specific identifiers */
-#include "SDL_platform.h"
-
-#ifdef __LP64__
-#define SIZEOF_VOIDP 8
-#else
-#define SIZEOF_VOIDP 4
-#endif
-
-#define SDL_BYTEORDER 1234
-
-#define HAVE_ALLOCA_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_STDIO_H 1
-#define STDC_HEADERS 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STDARG_H 1
-#define HAVE_MALLOC_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_STRING_H 1
-#define HAVE_STRINGS_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_CTYPE_H 1
-#define HAVE_MATH_H 1
-#define HAVE_ICONV_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_UNSETENV 1
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_BCOPY 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_STRLEN 1
-#define HAVE_STRDUP 1
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-#define HAVE_STRTOLL 1
-#define HAVE_STRTOULL 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-#define HAVE_STRCASECMP 1
-#define HAVE_STRNCASECMP 1
-#define HAVE_VSSCANF 1
-#define HAVE_VSNPRINTF 1
-#define HAVE_M_PI 1
-#define HAVE_CEIL 1
-#define HAVE_COPYSIGN 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_FABS 1
-#define HAVE_FLOOR 1
-#define HAVE_LOG 1
-#define HAVE_SCALBN 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-#define HAVE_SIGACTION 1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP 1
-
-#define SDL_AUDIO_DRIVER_DUMMY 1
-#define SDL_AUDIO_DRIVER_OSS 1
-
-#define SDL_INPUT_LINUXEV 1
-#define SDL_INPUT_TSLIB 1
-#define SDL_JOYSTICK_LINUX 1
-#define SDL_HAPTIC_LINUX 1
-
-#define SDL_LOADSO_DLOPEN 1
-
-#define SDL_THREAD_PTHREAD 1
-#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
-
-#define SDL_TIMER_UNIX 1
-#define SDL_FILESYSTEM_UNIX 1
-
-#define SDL_VIDEO_DRIVER_DUMMY 1
-#define SDL_VIDEO_DRIVER_X11 1
-#define SDL_VIDEO_DRIVER_PANDORA 1
-#define SDL_VIDEO_RENDER_OGL_ES 1
-#define SDL_VIDEO_OPENGL_ES 1
-
-#endif /* SDL_config_pandora_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_psp.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_psp.h
deleted file mode 100644 (file)
index 28efb4c..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_config_psp_h_
-#define SDL_config_psp_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-
-
-#ifdef __GNUC__
-#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
-#endif
-
-#define HAVE_GCC_ATOMICS    1
-
-#define HAVE_ALLOCA_H       1
-#define HAVE_SYS_TYPES_H    1
-#define HAVE_STDIO_H    1
-#define STDC_HEADERS    1
-#define HAVE_STRING_H   1
-#define HAVE_INTTYPES_H 1
-#define HAVE_STDINT_H   1
-#define HAVE_CTYPE_H    1
-#define HAVE_MATH_H 1
-#define HAVE_SIGNAL_H   1
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC    1
-#define HAVE_FREE   1
-#define HAVE_ALLOCA 1
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_SETENV 1
-#define HAVE_UNSETENV   1
-#define HAVE_QSORT  1
-#define HAVE_ABS    1
-#define HAVE_BCOPY  1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE    1
-#define HAVE_MEMCMP 1
-#define HAVE_STRLEN 1
-#define HAVE_STRLCPY    1
-#define HAVE_STRLCAT    1
-#define HAVE_STRDUP 1
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR    1
-#define HAVE_STRSTR 1
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL    1
-#define HAVE_STRTOLL    1
-#define HAVE_STRTOULL   1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI   1
-#define HAVE_ATOF   1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP    1
-#define HAVE_STRCASECMP 1
-#define HAVE_STRNCASECMP 1
-#define HAVE_VSSCANF 1
-#define HAVE_VSNPRINTF  1
-#define HAVE_M_PI   1
-#define HAVE_ATAN   1
-#define HAVE_ATAN2  1
-#define HAVE_ACOS  1
-#define HAVE_ASIN  1
-#define HAVE_CEIL   1
-#define HAVE_COPYSIGN   1
-#define HAVE_COS    1
-#define HAVE_COSF   1
-#define HAVE_FABS   1
-#define HAVE_FLOOR  1
-#define HAVE_LOG    1
-#define HAVE_POW    1
-#define HAVE_SCALBN 1
-#define HAVE_SIN    1
-#define HAVE_SINF   1
-#define HAVE_SQRT   1
-#define HAVE_SQRTF  1
-#define HAVE_TAN    1
-#define HAVE_TANF   1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP  1
-/* #define HAVE_SYSCONF  1 */
-/* #define HAVE_SIGACTION    1 */
-
-
-/* PSP isn't that sophisticated */
-#define LACKS_SYS_MMAN_H 1
-
-/* Enable the stub thread support (src/thread/psp/\*.c) */
-#define SDL_THREAD_PSP  1
-
-/* Enable the stub timer support (src/timer/psp/\*.c) */
-#define SDL_TIMERS_PSP  1
-
-/* Enable the stub joystick driver (src/joystick/psp/\*.c) */
-#define SDL_JOYSTICK_PSP        1
-
-/* Enable the stub audio driver (src/audio/psp/\*.c) */
-#define SDL_AUDIO_DRIVER_PSP    1
-
-/* PSP video dirver */
-#define SDL_VIDEO_DRIVER_PSP   1
-
-/* PSP render dirver */
-#define SDL_VIDEO_RENDER_PSP   1
-
-#define SDL_POWER_PSP          1
-
-/* !!! FIXME: what does PSP do for filesystem stuff? */
-#define SDL_FILESYSTEM_DUMMY   1
-
-/* PSP doesn't have haptic device (src/haptic/dummy/\*.c) */
-#define SDL_HAPTIC_DISABLED    1
-
-/* PSP can't load shared object (src/loadso/dummy/\*.c) */
-#define SDL_LOADSO_DISABLED    1
-
-
-#endif /* SDL_config_psp_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_windows.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_windows.h
deleted file mode 100644 (file)
index 2456c84..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_config_windows_h_
-#define SDL_config_windows_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/* This is a set of defines to configure the SDL features */
-
-#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
-#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
-#define HAVE_STDINT_H   1
-#elif defined(_MSC_VER)
-typedef signed __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef signed __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef signed __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-#ifndef _UINTPTR_T_DEFINED
-#ifdef  _WIN64
-typedef unsigned __int64 uintptr_t;
-#else
-typedef unsigned int uintptr_t;
-#endif
-#define _UINTPTR_T_DEFINED
-#endif
-/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
-#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
-#define DWORD_PTR DWORD
-#endif
-#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
-#define LONG_PTR LONG
-#endif
-#else /* !__GNUC__ && !_MSC_VER */
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-#ifndef _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED_
-typedef unsigned int size_t;
-#endif
-typedef unsigned int uintptr_t;
-#endif /* __GNUC__ || _MSC_VER */
-#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
-
-#ifdef _WIN64
-# define SIZEOF_VOIDP 8
-#else
-# define SIZEOF_VOIDP 4
-#endif
-
-#define HAVE_DDRAW_H 1
-#define HAVE_DINPUT_H 1
-#define HAVE_DSOUND_H 1
-#define HAVE_DXGI_H 1
-#define HAVE_XINPUT_H 1
-
-/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
-#ifdef HAVE_LIBC
-/* Useful headers */
-#define HAVE_STDIO_H 1
-#define STDC_HEADERS 1
-#define HAVE_STRING_H 1
-#define HAVE_CTYPE_H 1
-#define HAVE_MATH_H 1
-#define HAVE_SIGNAL_H 1
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MEMCMP 1
-#define HAVE_STRLEN 1
-#define HAVE__STRREV 1
-#define HAVE__STRUPR 1
-#define HAVE__STRLWR 1
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-#define HAVE__LTOA 1
-#define HAVE__ULTOA 1
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-#define HAVE__STRICMP 1
-#define HAVE__STRNICMP 1
-#define HAVE_ATAN 1
-#define HAVE_ATAN2 1
-#define HAVE_ACOS  1
-#define HAVE_ASIN  1
-#define HAVE_CEIL 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_FABS 1
-#define HAVE_FLOOR 1
-#define HAVE_LOG 1
-#define HAVE_POW 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-#if _MSC_VER >= 1800
-#define HAVE_STRTOLL 1
-#define HAVE_VSSCANF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_SCALBN 1
-#endif
-#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
-#define HAVE_M_PI 1
-#endif
-#else
-#define HAVE_STDARG_H   1
-#define HAVE_STDDEF_H   1
-#endif
-
-/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_WASAPI 1
-#define SDL_AUDIO_DRIVER_DSOUND 1
-#define SDL_AUDIO_DRIVER_XAUDIO2    0
-#define SDL_AUDIO_DRIVER_WINMM  1
-#define SDL_AUDIO_DRIVER_DISK   1
-#define SDL_AUDIO_DRIVER_DUMMY  1
-
-/* Enable various input drivers */
-#define SDL_JOYSTICK_DINPUT 1
-#define SDL_JOYSTICK_XINPUT 1
-#define SDL_HAPTIC_DINPUT   1
-#define SDL_HAPTIC_XINPUT   1
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_WINDOWS  1
-
-/* Enable various threading systems */
-#define SDL_THREAD_WINDOWS  1
-
-/* Enable various timer systems */
-#define SDL_TIMER_WINDOWS   1
-
-/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_DUMMY  1
-#define SDL_VIDEO_DRIVER_WINDOWS    1
-
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D    1
-#endif
-#ifndef SDL_VIDEO_RENDER_D3D11
-#define SDL_VIDEO_RENDER_D3D11 0
-#endif
-
-/* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL    1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL    1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL    1
-#endif
-
-/* Enable Vulkan support */
-#define SDL_VIDEO_VULKAN 1
-
-/* Enable system power support */
-#define SDL_POWER_WINDOWS 1
-
-/* Enable filesystem support */
-#define SDL_FILESYSTEM_WINDOWS  1
-
-/* Enable assembly routines (Win64 doesn't have inline asm) */
-#ifndef _WIN64
-#define SDL_ASSEMBLY_ROUTINES   1
-#endif
-
-#endif /* SDL_config_windows_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_winrt.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_winrt.h
deleted file mode 100644 (file)
index 24f9e17..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_config_winrt_h_
-#define SDL_config_winrt_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/* Make sure the Windows SDK's NTDDI_VERSION macro gets defined.  This is used
-   by SDL to determine which version of the Windows SDK is being used.
-*/
-#include <sdkddkver.h>
-
-/* Define possibly-undefined NTDDI values (used when compiling SDL against
-   older versions of the Windows SDK.
-*/
-#ifndef NTDDI_WINBLUE
-#define NTDDI_WINBLUE 0x06030000
-#endif
-#ifndef NTDDI_WIN10
-#define NTDDI_WIN10 0x0A000000
-#endif
-
-/* This is a set of defines to configure the SDL features */
-
-#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
-#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
-#define HAVE_STDINT_H  1
-#elif defined(_MSC_VER)
-typedef signed __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef signed __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef signed __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-#ifndef _UINTPTR_T_DEFINED
-#ifdef  _WIN64
-typedef unsigned __int64 uintptr_t;
-#else
-typedef unsigned int uintptr_t;
-#endif
-#define _UINTPTR_T_DEFINED
-#endif
-/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
-#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
-#define DWORD_PTR DWORD
-#endif
-#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
-#define LONG_PTR LONG
-#endif
-#else /* !__GNUC__ && !_MSC_VER */
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-#ifndef _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED_
-typedef unsigned int size_t;
-#endif
-typedef unsigned int uintptr_t;
-#endif /* __GNUC__ || _MSC_VER */
-#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
-
-#ifdef _WIN64
-# define SIZEOF_VOIDP 8
-#else
-# define SIZEOF_VOIDP 4
-#endif
-
-/* Useful headers */
-#define HAVE_DXGI_H 1
-#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
-#define HAVE_XINPUT_H 1
-#endif
-#define HAVE_LIBC 1
-#define HAVE_STDIO_H 1
-#define STDC_HEADERS 1
-#define HAVE_STRING_H 1
-#define HAVE_CTYPE_H 1
-#define HAVE_MATH_H 1
-#define HAVE_FLOAT_H 1
-#define HAVE_SIGNAL_H 1
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MEMCMP 1
-#define HAVE_STRLEN 1
-#define HAVE__STRREV 1
-#define HAVE__STRUPR 1
-//#define HAVE__STRLWR 1       // TODO, WinRT: consider using _strlwr_s instead
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-//#define HAVE_ITOA 1   // TODO, WinRT: consider using _itoa_s instead
-//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
-//#define HAVE__ULTOA 1        // TODO, WinRT: consider using _ultoa_s instead
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-//#define HAVE_STRTOLL 1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-#define HAVE__STRICMP 1
-#define HAVE__STRNICMP 1
-#define HAVE_VSNPRINTF 1
-//#define HAVE_SSCANF 1        // TODO, WinRT: consider using sscanf_s instead
-#define HAVE_M_PI 1
-#define HAVE_ATAN 1
-#define HAVE_ATAN2 1
-#define HAVE_CEIL 1
-#define HAVE__COPYSIGN 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_FABS 1
-#define HAVE_FLOOR 1
-#define HAVE_LOG 1
-#define HAVE_POW 1
-//#define HAVE_SCALBN 1
-#define HAVE__SCALB 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-#define HAVE__FSEEKI64 1
-
-/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_XAUDIO2       1
-#define SDL_AUDIO_DRIVER_DISK  1
-#define SDL_AUDIO_DRIVER_DUMMY 1
-
-/* Enable various input drivers */
-#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
-#define SDL_JOYSTICK_DISABLED 1
-#define SDL_HAPTIC_DISABLED    1
-#else
-#define SDL_JOYSTICK_XINPUT 1
-#define SDL_HAPTIC_XINPUT   1
-#endif
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_WINDOWS     1
-
-/* Enable various threading systems */
-#if (NTDDI_VERSION >= NTDDI_WINBLUE)
-#define SDL_THREAD_WINDOWS  1
-#else
-/* WinRT on Windows 8.0 and Windows Phone 8.0 don't support CreateThread() */
-#define SDL_THREAD_STDCPP   1
-#endif
-
-/* Enable various timer systems */
-#define SDL_TIMER_WINDOWS      1
-
-/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_WINRT 1
-#define SDL_VIDEO_DRIVER_DUMMY  1
-
-/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */
-#define SDL_VIDEO_OPENGL_ES2 1
-#define SDL_VIDEO_OPENGL_EGL 1
-
-/* Enable appropriate renderer(s) */
-#define SDL_VIDEO_RENDER_D3D11  1
-
-#if SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2 1
-#endif
-
-/* Enable system power support */
-#define SDL_POWER_WINRT 1
-
-/* Enable assembly routines (Win64 doesn't have inline asm) */
-#ifndef _WIN64
-#define SDL_ASSEMBLY_ROUTINES  1
-#endif
-
-#endif /* SDL_config_winrt_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_wiz.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_config_wiz.h
deleted file mode 100644 (file)
index 5bb845a..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_config_wiz_h_
-#define SDL_config_wiz_h_
-#define SDL_config_h_
-
-/* This is a set of defines to configure the SDL features */
-
-/* General platform specific identifiers */
-#include "SDL_platform.h"
-
-#define SDL_BYTEORDER 1234
-
-#define HAVE_ALLOCA_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_STDIO_H 1
-#define STDC_HEADERS 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STDARG_H 1
-#define HAVE_MALLOC_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_STRING_H 1
-#define HAVE_STRINGS_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_CTYPE_H 1
-#define HAVE_MATH_H 1
-#define HAVE_ICONV_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_UNSETENV 1
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_BCOPY 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_STRLEN 1
-#define HAVE_STRDUP 1
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-#define HAVE_STRTOLL 1
-#define HAVE_STRTOULL 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-#define HAVE_STRCASECMP 1
-#define HAVE_STRNCASECMP 1
-#define HAVE_VSSCANF 1
-#define HAVE_VSNPRINTF 1
-#define HAVE_M_PI 1
-#define HAVE_CEIL 1
-#define HAVE_COPYSIGN 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_FABS 1
-#define HAVE_FLOOR 1
-#define HAVE_LOG 1
-#define HAVE_SCALBN 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-#define HAVE_SIGACTION 1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP 1
-#define HAVE_POW 1
-
-#define SDL_AUDIO_DRIVER_DUMMY 1
-#define SDL_AUDIO_DRIVER_OSS 1
-
-#define SDL_INPUT_LINUXEV 1
-#define SDL_INPUT_TSLIB 1
-#define SDL_JOYSTICK_LINUX 1
-#define SDL_HAPTIC_LINUX 1
-
-#define SDL_LOADSO_DLOPEN 1
-
-#define SDL_THREAD_PTHREAD 1
-#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
-
-#define SDL_TIMER_UNIX 1
-
-#define SDL_VIDEO_DRIVER_DUMMY 1
-#define SDL_VIDEO_DRIVER_PANDORA 1
-#define SDL_VIDEO_RENDER_OGL_ES 1
-#define SDL_VIDEO_OPENGL_ES 1
-
-#endif /* SDL_config_wiz_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_copying.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_copying.h
deleted file mode 100644 (file)
index 8f60af6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_cpuinfo.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_cpuinfo.h
deleted file mode 100644 (file)
index 1fc4099..0000000
+++ /dev/null
@@ -1,559 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_cpuinfo.h
- *
- *  CPU feature detection for SDL.
- */
-
-#ifndef SDL_cpuinfo_h_
-#define SDL_cpuinfo_h_
-
-#include "SDL_stdinc.h"
-
-/* Need to do this here because intrin.h has C++ code in it */
-/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
-#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
-#ifdef __clang__
-/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
-   so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
-
-#ifndef __PRFCHWINTRIN_H
-#define __PRFCHWINTRIN_H
-
-static __inline__ void __attribute__((__always_inline__, __nodebug__))
-_m_prefetch(void *__P)
-{
-  __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
-}
-
-#endif /* __PRFCHWINTRIN_H */
-#endif /* __clang__ */
-#include <intrin.h>
-#ifndef _WIN64
-#ifndef __MMX__
-#define __MMX__
-#endif
-#ifndef __3dNOW__
-#define __3dNOW__
-#endif
-#endif
-#ifndef __SSE__
-#define __SSE__
-#endif
-#ifndef __SSE2__
-#define __SSE2__
-#endif
-#ifndef __SSE3__
-#define __SSE3__
-#endif
-#elif defined(__MINGW64_VERSION_MAJOR)
-#include <intrin.h>
-#if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON)
-#  include <arm_neon.h>
-#endif
-#else
-/* 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. */
-#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
-#include <altivec.h>
-#endif
-#if !defined(SDL_DISABLE_ARM_NEON_H)
-#  if defined(__ARM_NEON)
-#    include <arm_neon.h>
-#  elif defined(__WINDOWS__) || defined(__WINRT__)
-/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
-#    if defined(_M_ARM)
-#      include <armintr.h>
-#      include <arm_neon.h>
-#      define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
-#    endif
-#    if defined (_M_ARM64)
-#      include <arm64intr.h>
-#      include <arm64_neon.h>
-#      define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
-#    endif
-#  endif
-#endif
-#endif /* compiler version */
-
-#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
-#include <mm3dnow.h>
-#endif
-#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
-#include <immintrin.h>
-#else
-#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
-#include <mmintrin.h>
-#endif
-#if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H)
-#include <xmmintrin.h>
-#endif
-#if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)
-#include <emmintrin.h>
-#endif
-#if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)
-#include <pmmintrin.h>
-#endif
-#endif /* HAVE_IMMINTRIN_H */
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* This is a guess for the cacheline size used for padding.
- * Most x86 processors have a 64 byte cache line.
- * The 64-bit PowerPC processors have a 128 byte cache line.
- * We'll use the larger value to be generally safe.
- */
-#define SDL_CACHELINE_SIZE  128
-
-/**
- * Get the number of CPU cores available.
- *
- * \returns the total number of logical CPU cores. On CPUs that include
- *          technologies such as hyperthreading, the number of logical cores
- *          may be more than the number of physical cores.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
-
-/**
- * Determine the L1 cache line size of the CPU.
- *
- * This is useful for determining multi-threaded structure padding or SIMD
- * prefetch sizes.
- *
- * \returns the L1 cache line size of the CPU, in bytes.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
-
-/**
- * Determine whether the CPU has the RDTSC instruction.
- *
- * This always returns false on CPUs that aren't using Intel instruction sets.
- *
- * \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Has3DNow
- * \sa SDL_HasAltiVec
- * \sa SDL_HasAVX
- * \sa SDL_HasAVX2
- * \sa SDL_HasMMX
- * \sa SDL_HasSSE
- * \sa SDL_HasSSE2
- * \sa SDL_HasSSE3
- * \sa SDL_HasSSE41
- * \sa SDL_HasSSE42
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
-
-/**
- * Determine whether the CPU has AltiVec features.
- *
- * This always returns false on CPUs that aren't using PowerPC instruction
- * sets.
- *
- * \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Has3DNow
- * \sa SDL_HasAVX
- * \sa SDL_HasAVX2
- * \sa SDL_HasMMX
- * \sa SDL_HasRDTSC
- * \sa SDL_HasSSE
- * \sa SDL_HasSSE2
- * \sa SDL_HasSSE3
- * \sa SDL_HasSSE41
- * \sa SDL_HasSSE42
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
-
-/**
- * Determine whether the CPU has MMX features.
- *
- * This always returns false on CPUs that aren't using Intel instruction sets.
- *
- * \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Has3DNow
- * \sa SDL_HasAltiVec
- * \sa SDL_HasAVX
- * \sa SDL_HasAVX2
- * \sa SDL_HasRDTSC
- * \sa SDL_HasSSE
- * \sa SDL_HasSSE2
- * \sa SDL_HasSSE3
- * \sa SDL_HasSSE41
- * \sa SDL_HasSSE42
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
-
-/**
- * Determine whether the CPU has 3DNow! features.
- *
- * This always returns false on CPUs that aren't using AMD instruction sets.
- *
- * \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HasAltiVec
- * \sa SDL_HasAVX
- * \sa SDL_HasAVX2
- * \sa SDL_HasMMX
- * \sa SDL_HasRDTSC
- * \sa SDL_HasSSE
- * \sa SDL_HasSSE2
- * \sa SDL_HasSSE3
- * \sa SDL_HasSSE41
- * \sa SDL_HasSSE42
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
-
-/**
- * Determine whether the CPU has SSE features.
- *
- * This always returns false on CPUs that aren't using Intel instruction sets.
- *
- * \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Has3DNow
- * \sa SDL_HasAltiVec
- * \sa SDL_HasAVX
- * \sa SDL_HasAVX2
- * \sa SDL_HasMMX
- * \sa SDL_HasRDTSC
- * \sa SDL_HasSSE2
- * \sa SDL_HasSSE3
- * \sa SDL_HasSSE41
- * \sa SDL_HasSSE42
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
-
-/**
- * Determine whether the CPU has SSE2 features.
- *
- * This always returns false on CPUs that aren't using Intel instruction sets.
- *
- * \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Has3DNow
- * \sa SDL_HasAltiVec
- * \sa SDL_HasAVX
- * \sa SDL_HasAVX2
- * \sa SDL_HasMMX
- * \sa SDL_HasRDTSC
- * \sa SDL_HasSSE
- * \sa SDL_HasSSE3
- * \sa SDL_HasSSE41
- * \sa SDL_HasSSE42
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
-
-/**
- * Determine whether the CPU has SSE3 features.
- *
- * This always returns false on CPUs that aren't using Intel instruction sets.
- *
- * \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Has3DNow
- * \sa SDL_HasAltiVec
- * \sa SDL_HasAVX
- * \sa SDL_HasAVX2
- * \sa SDL_HasMMX
- * \sa SDL_HasRDTSC
- * \sa SDL_HasSSE
- * \sa SDL_HasSSE2
- * \sa SDL_HasSSE41
- * \sa SDL_HasSSE42
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
-
-/**
- * Determine whether the CPU has SSE4.1 features.
- *
- * This always returns false on CPUs that aren't using Intel instruction sets.
- *
- * \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Has3DNow
- * \sa SDL_HasAltiVec
- * \sa SDL_HasAVX
- * \sa SDL_HasAVX2
- * \sa SDL_HasMMX
- * \sa SDL_HasRDTSC
- * \sa SDL_HasSSE
- * \sa SDL_HasSSE2
- * \sa SDL_HasSSE3
- * \sa SDL_HasSSE42
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
-
-/**
- * Determine whether the CPU has SSE4.2 features.
- *
- * This always returns false on CPUs that aren't using Intel instruction sets.
- *
- * \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Has3DNow
- * \sa SDL_HasAltiVec
- * \sa SDL_HasAVX
- * \sa SDL_HasAVX2
- * \sa SDL_HasMMX
- * \sa SDL_HasRDTSC
- * \sa SDL_HasSSE
- * \sa SDL_HasSSE2
- * \sa SDL_HasSSE3
- * \sa SDL_HasSSE41
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
-
-/**
- * Determine whether the CPU has AVX features.
- *
- * This always returns false on CPUs that aren't using Intel instruction sets.
- *
- * \returns SDL_TRUE if the CPU has AVX features or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.2.
- *
- * \sa SDL_Has3DNow
- * \sa SDL_HasAltiVec
- * \sa SDL_HasAVX2
- * \sa SDL_HasMMX
- * \sa SDL_HasRDTSC
- * \sa SDL_HasSSE
- * \sa SDL_HasSSE2
- * \sa SDL_HasSSE3
- * \sa SDL_HasSSE41
- * \sa SDL_HasSSE42
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
-
-/**
- * Determine whether the CPU has AVX2 features.
- *
- * This always returns false on CPUs that aren't using Intel instruction sets.
- *
- * \returns SDL_TRUE if the CPU has AVX2 features or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.4.
- *
- * \sa SDL_Has3DNow
- * \sa SDL_HasAltiVec
- * \sa SDL_HasAVX
- * \sa SDL_HasMMX
- * \sa SDL_HasRDTSC
- * \sa SDL_HasSSE
- * \sa SDL_HasSSE2
- * \sa SDL_HasSSE3
- * \sa SDL_HasSSE41
- * \sa SDL_HasSSE42
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
-
-/**
- * Determine whether the CPU has AVX-512F (foundation) features.
- *
- * This always returns false on CPUs that aren't using Intel instruction sets.
- *
- * \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.9.
- *
- * \sa SDL_HasAVX
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
-
-/**
- * Determine whether the CPU has ARM SIMD (ARMv6) features.
- *
- * This is different from ARM NEON, which is a different instruction set.
- *
- * This always returns false on CPUs that aren't using ARM instruction sets.
- *
- * \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.12.
- *
- * \sa SDL_HasNEON
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
-
-/**
- * Determine whether the CPU has NEON (ARM SIMD) features.
- *
- * This always returns false on CPUs that aren't using ARM instruction sets.
- *
- * \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
-
-/**
- * Get the amount of RAM configured in the system.
- *
- * \returns the amount of RAM configured in the system in MB.
- *
- * \since This function is available since SDL 2.0.1.
- */
-extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
-
-/**
- * Report the alignment this system needs for SIMD allocations.
- *
- * This will return the minimum number of bytes to which a pointer must be
- * aligned to be compatible with SIMD instructions on the current machine. For
- * example, if the machine supports SSE only, it will return 16, but if it
- * supports AVX-512F, it'll return 64 (etc). This only reports values for
- * instruction sets SDL knows about, so if your SDL build doesn't have
- * SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
- * not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
- * Plan accordingly.
- *
- * \returns the alignment in bytes needed for available, known SIMD
- *          instructions.
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
-
-/**
- * Allocate memory in a SIMD-friendly way.
- *
- * This will allocate a block of memory that is suitable for use with SIMD
- * instructions. Specifically, it will be properly aligned and padded for the
- * system's supported vector instructions.
- *
- * The memory returned will be padded such that it is safe to read or write an
- * incomplete vector at the end of the memory block. This can be useful so you
- * don't have to drop back to a scalar fallback at the end of your SIMD
- * processing loop to deal with the final elements without overflowing the
- * allocated buffer.
- *
- * You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() or
- * delete[], etc.
- *
- * Note that SDL will only deal with SIMD instruction sets it is aware of; for
- * example, SDL 2.0.8 knows that SSE wants 16-byte vectors (SDL_HasSSE()), and
- * AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't know that AVX-512 wants
- * 64. To be clear: if you can't decide to use an instruction set with an
- * SDL_Has*() function, don't use that instruction set with memory allocated
- * through here.
- *
- * SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
- * out of memory, but you are not allowed to dereference it (because you only
- * own zero bytes of that buffer).
- *
- * \param len The length, in bytes, of the block to allocate. The actual
- *            allocated block might be larger due to padding, etc.
- * \returns a pointer to the newly-allocated block, NULL if out of memory.
- *
- * \since This function is available since SDL 2.0.10.
- *
- * \sa SDL_SIMDAlignment
- * \sa SDL_SIMDRealloc
- * \sa SDL_SIMDFree
- */
-extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
-
-/**
- * Reallocate memory obtained from SDL_SIMDAlloc
- *
- * It is not valid to use this function on a pointer from anything but
- * SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
- * SDL_malloc, memalign, new[], etc.
- *
- * \param mem The pointer obtained from SDL_SIMDAlloc. This function also
- *            accepts NULL, at which point this function is the same as
- *            calling SDL_SIMDAlloc with a NULL pointer.
- * \param len The length, in bytes, of the block to allocated. The actual
- *            allocated block might be larger due to padding, etc. Passing 0
- *            will return a non-NULL pointer, assuming the system isn't out of
- *            memory.
- * \returns a pointer to the newly-reallocated block, NULL if out of memory.
- *
- * \since This function is available since SDL 2.0.14.
- *
- * \sa SDL_SIMDAlignment
- * \sa SDL_SIMDAlloc
- * \sa SDL_SIMDFree
- */
-extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
-
-/**
- * Deallocate memory obtained from SDL_SIMDAlloc
- *
- * It is not valid to use this function on a pointer from anything but
- * SDL_SIMDAlloc() or SDL_SIMDRealloc(). It can't be used on pointers from
- * malloc, realloc, SDL_malloc, memalign, new[], etc.
- *
- * However, SDL_SIMDFree(NULL) is a legal no-op.
- *
- * The memory pointed to by `ptr` is no longer valid for access upon return,
- * and may be returned to the system or reused by a future allocation. The
- * pointer passed to this function is no longer safe to dereference once this
- * function returns, and should be discarded.
- *
- * \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to
- *            deallocate. NULL is a legal no-op.
- *
- * \since This function is available since SDL 2.0.10.
- *
- * \sa SDL_SIMDAlloc
- * \sa SDL_SIMDRealloc
- */
-extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_cpuinfo_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_egl.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_egl.h
deleted file mode 100644 (file)
index f90e27b..0000000
+++ /dev/null
@@ -1,2302 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_egl.h
- *
- *  This is a simple file to encapsulate the EGL API headers.
- */
-#if !defined(_MSC_VER) && !defined(__ANDROID__) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
-
-#if defined(__vita__) || defined(__psp2__)
-#include <psp2/types.h>
-#endif
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
-#else /* _MSC_VER */
-
-/* EGL headers for Visual Studio */
-
-#ifndef __khrplatform_h_
-#define __khrplatform_h_
-
-/*
-** Copyright (c) 2008-2018 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-
-/* Khronos platform-specific types and definitions.
- *
- * The master copy of khrplatform.h is maintained in the Khronos EGL
- * Registry repository at https://github.com/KhronosGroup/EGL-Registry
- * The last semantic modification to khrplatform.h was at commit ID:
- *      67a3e0864c2d75ea5287b9f3d2eb74a745936692
- *
- * Adopters may modify this file to suit their platform. Adopters are
- * encouraged to submit platform specific modifications to the Khronos
- * group so that they can be included in future versions of this file.
- * Please submit changes by filing pull requests or issues on
- * the EGL Registry repository linked above.
- *
- *
- * See the Implementer's Guidelines for information about where this file
- * should be located on your system and for more details of its use:
- *    http://www.khronos.org/registry/implementers_guide.pdf
- *
- * This file should be included as
- *        #include <KHR/khrplatform.h>
- * by Khronos client API header files that use its types and defines.
- *
- * The types in khrplatform.h should only be used to define API-specific types.
- *
- * Types defined in khrplatform.h:
- *    khronos_int8_t              signed   8  bit
- *    khronos_uint8_t             unsigned 8  bit
- *    khronos_int16_t             signed   16 bit
- *    khronos_uint16_t            unsigned 16 bit
- *    khronos_int32_t             signed   32 bit
- *    khronos_uint32_t            unsigned 32 bit
- *    khronos_int64_t             signed   64 bit
- *    khronos_uint64_t            unsigned 64 bit
- *    khronos_intptr_t            signed   same number of bits as a pointer
- *    khronos_uintptr_t           unsigned same number of bits as a pointer
- *    khronos_ssize_t             signed   size
- *    khronos_usize_t             unsigned size
- *    khronos_float_t             signed   32 bit floating point
- *    khronos_time_ns_t           unsigned 64 bit time in nanoseconds
- *    khronos_utime_nanoseconds_t unsigned time interval or absolute time in
- *                                         nanoseconds
- *    khronos_stime_nanoseconds_t signed time interval in nanoseconds
- *    khronos_boolean_enum_t      enumerated boolean type. This should
- *      only be used as a base type when a client API's boolean type is
- *      an enum. Client APIs which use an integer or other type for
- *      booleans cannot use this as the base type for their boolean.
- *
- * Tokens defined in khrplatform.h:
- *
- *    KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
- *
- *    KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
- *    KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
- *
- * Calling convention macros defined in this file:
- *    KHRONOS_APICALL
- *    KHRONOS_APIENTRY
- *    KHRONOS_APIATTRIBUTES
- *
- * These may be used in function prototypes as:
- *
- *      KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
- *                                  int arg1,
- *                                  int arg2) KHRONOS_APIATTRIBUTES;
- */
-
-#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
-#   define KHRONOS_STATIC 1
-#endif
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APICALL
- *-------------------------------------------------------------------------
- * This precedes the return type of the function in the function prototype.
- */
-#if defined(KHRONOS_STATIC)
-    /* If the preprocessor constant KHRONOS_STATIC is defined, make the
-     * header compatible with static linking. */
-#   define KHRONOS_APICALL
-#elif defined(_WIN32)
-#   define KHRONOS_APICALL __declspec(dllimport)
-#elif defined (__SYMBIAN32__)
-#   define KHRONOS_APICALL IMPORT_C
-#elif defined(__ANDROID__)
-#   define KHRONOS_APICALL __attribute__((visibility("default")))
-#else
-#   define KHRONOS_APICALL
-#endif
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APIENTRY
- *-------------------------------------------------------------------------
- * This follows the return type of the function  and precedes the function
- * name in the function prototype.
- */
-#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
-    /* Win32 but not WinCE */
-#   define KHRONOS_APIENTRY __stdcall
-#else
-#   define KHRONOS_APIENTRY
-#endif
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APIATTRIBUTES
- *-------------------------------------------------------------------------
- * This follows the closing parenthesis of the function prototype arguments.
- */
-#if defined (__ARMCC_2__)
-#define KHRONOS_APIATTRIBUTES __softfp
-#else
-#define KHRONOS_APIATTRIBUTES
-#endif
-
-/*-------------------------------------------------------------------------
- * basic type definitions
- *-----------------------------------------------------------------------*/
-#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
-
-
-/*
- * Using <stdint.h>
- */
-#include <stdint.h>
-typedef int32_t                 khronos_int32_t;
-typedef uint32_t                khronos_uint32_t;
-typedef int64_t                 khronos_int64_t;
-typedef uint64_t                khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#elif defined(__VMS ) || defined(__sgi)
-
-/*
- * Using <inttypes.h>
- */
-#include <inttypes.h>
-typedef int32_t                 khronos_int32_t;
-typedef uint32_t                khronos_uint32_t;
-typedef int64_t                 khronos_int64_t;
-typedef uint64_t                khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
-
-/*
- * Win32
- */
-typedef __int32                 khronos_int32_t;
-typedef unsigned __int32        khronos_uint32_t;
-typedef __int64                 khronos_int64_t;
-typedef unsigned __int64        khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#elif defined(__sun__) || defined(__digital__)
-
-/*
- * Sun or Digital
- */
-typedef int                     khronos_int32_t;
-typedef unsigned int            khronos_uint32_t;
-#if defined(__arch64__) || defined(_LP64)
-typedef long int                khronos_int64_t;
-typedef unsigned long int       khronos_uint64_t;
-#else
-typedef long long int           khronos_int64_t;
-typedef unsigned long long int  khronos_uint64_t;
-#endif /* __arch64__ */
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#elif 0
-
-/*
- * Hypothetical platform with no float or int64 support
- */
-typedef int                     khronos_int32_t;
-typedef unsigned int            khronos_uint32_t;
-#define KHRONOS_SUPPORT_INT64   0
-#define KHRONOS_SUPPORT_FLOAT   0
-
-#else
-
-/*
- * Generic fallback
- */
-#include <stdint.h>
-typedef int32_t                 khronos_int32_t;
-typedef uint32_t                khronos_uint32_t;
-typedef int64_t                 khronos_int64_t;
-typedef uint64_t                khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#endif
-
-
-/*
- * Types that are (so far) the same on all platforms
- */
-typedef signed   char          khronos_int8_t;
-typedef unsigned char          khronos_uint8_t;
-typedef signed   short int     khronos_int16_t;
-typedef unsigned short int     khronos_uint16_t;
-
-/*
- * Types that differ between LLP64 and LP64 architectures - in LLP64,
- * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
- * to be the only LLP64 architecture in current use.
- */
-#ifdef _WIN64
-typedef signed   long long int khronos_intptr_t;
-typedef unsigned long long int khronos_uintptr_t;
-typedef signed   long long int khronos_ssize_t;
-typedef unsigned long long int khronos_usize_t;
-#else
-typedef signed   long  int     khronos_intptr_t;
-typedef unsigned long  int     khronos_uintptr_t;
-typedef signed   long  int     khronos_ssize_t;
-typedef unsigned long  int     khronos_usize_t;
-#endif
-
-#if KHRONOS_SUPPORT_FLOAT
-/*
- * Float type
- */
-typedef          float         khronos_float_t;
-#endif
-
-#if KHRONOS_SUPPORT_INT64
-/* Time types
- *
- * These types can be used to represent a time interval in nanoseconds or
- * an absolute Unadjusted System Time.  Unadjusted System Time is the number
- * of nanoseconds since some arbitrary system event (e.g. since the last
- * time the system booted).  The Unadjusted System Time is an unsigned
- * 64 bit value that wraps back to 0 every 584 years.  Time intervals
- * may be either signed or unsigned.
- */
-typedef khronos_uint64_t       khronos_utime_nanoseconds_t;
-typedef khronos_int64_t        khronos_stime_nanoseconds_t;
-#endif
-
-/*
- * Dummy value used to pad enum types to 32 bits.
- */
-#ifndef KHRONOS_MAX_ENUM
-#define KHRONOS_MAX_ENUM 0x7FFFFFFF
-#endif
-
-/*
- * Enumerated boolean type
- *
- * Values other than zero should be considered to be true.  Therefore
- * comparisons should not be made against KHRONOS_TRUE.
- */
-typedef enum {
-    KHRONOS_FALSE = 0,
-    KHRONOS_TRUE  = 1,
-    KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
-} khronos_boolean_enum_t;
-
-#endif /* __khrplatform_h_ */
-
-
-#ifndef __eglplatform_h_
-#define __eglplatform_h_
-
-/*
-** Copyright 2007-2020 The Khronos Group Inc.
-** SPDX-License-Identifier: Apache-2.0
-*/
-
-/* Platform-specific types and definitions for egl.h
- *
- * Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file.  Please submit changes
- * by filing an issue or pull request on the public Khronos EGL Registry, at
- * https://www.github.com/KhronosGroup/EGL-Registry/
- */
-
-/*#include <KHR/khrplatform.h>*/
-
-/* Macros used in EGL function prototype declarations.
- *
- * EGL functions should be prototyped as:
- *
- * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
- * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
- *
- * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
- */
-
-#ifndef EGLAPI
-#define EGLAPI KHRONOS_APICALL
-#endif
-
-#ifndef EGLAPIENTRY
-#define EGLAPIENTRY  KHRONOS_APIENTRY
-#endif
-#define EGLAPIENTRYP EGLAPIENTRY*
-
-/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
- * are aliases of window-system-dependent types, such as X Display * or
- * Windows Device Context. They must be defined in platform-specific
- * code below. The EGL-prefixed versions of Native*Type are the same
- * types, renamed in EGL 1.3 so all types in the API start with "EGL".
- *
- * Khronos STRONGLY RECOMMENDS that you use the default definitions
- * provided below, since these changes affect both binary and source
- * portability of applications using EGL running on different EGL
- * implementations.
- */
-
-#if defined(EGL_NO_PLATFORM_SPECIFIC_TYPES)
-
-typedef void *EGLNativeDisplayType;
-typedef void *EGLNativePixmapType;
-typedef void *EGLNativeWindowType;
-
-#elif defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN 1
-#endif
-#include <windows.h>
-
-typedef HDC     EGLNativeDisplayType;
-typedef HBITMAP EGLNativePixmapType;
-typedef HWND    EGLNativeWindowType;
-
-#elif defined(__EMSCRIPTEN__)
-
-typedef int EGLNativeDisplayType;
-typedef int EGLNativePixmapType;
-typedef int EGLNativeWindowType;
-
-#elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */
-
-typedef int   EGLNativeDisplayType;
-typedef void *EGLNativePixmapType;
-typedef void *EGLNativeWindowType;
-
-#elif defined(WL_EGL_PLATFORM)
-
-typedef struct wl_display     *EGLNativeDisplayType;
-typedef struct wl_egl_pixmap  *EGLNativePixmapType;
-typedef struct wl_egl_window  *EGLNativeWindowType;
-
-#elif defined(__GBM__)
-
-typedef struct gbm_device  *EGLNativeDisplayType;
-typedef struct gbm_bo      *EGLNativePixmapType;
-typedef void               *EGLNativeWindowType;
-
-#elif defined(__ANDROID__) || defined(ANDROID)
-
-struct ANativeWindow;
-struct egl_native_pixmap_t;
-
-typedef void*                           EGLNativeDisplayType;
-typedef struct egl_native_pixmap_t*     EGLNativePixmapType;
-typedef struct ANativeWindow*           EGLNativeWindowType;
-
-#elif defined(USE_OZONE)
-
-typedef intptr_t EGLNativeDisplayType;
-typedef intptr_t EGLNativePixmapType;
-typedef intptr_t EGLNativeWindowType;
-
-#elif defined(USE_X11)
-
-/* X11 (tentative)  */
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-typedef Display *EGLNativeDisplayType;
-typedef Pixmap   EGLNativePixmapType;
-typedef Window   EGLNativeWindowType;
-
-#elif defined(__unix__)
-
-typedef void             *EGLNativeDisplayType;
-typedef khronos_uintptr_t EGLNativePixmapType;
-typedef khronos_uintptr_t EGLNativeWindowType;
-
-#elif defined(__APPLE__)
-
-typedef int   EGLNativeDisplayType;
-typedef void *EGLNativePixmapType;
-typedef void *EGLNativeWindowType;
-
-#elif defined(__HAIKU__)
-
-#include <kernel/image.h>
-
-typedef void              *EGLNativeDisplayType;
-typedef khronos_uintptr_t  EGLNativePixmapType;
-typedef khronos_uintptr_t  EGLNativeWindowType;
-
-#elif defined(__Fuchsia__)
-
-typedef void              *EGLNativeDisplayType;
-typedef khronos_uintptr_t  EGLNativePixmapType;
-typedef khronos_uintptr_t  EGLNativeWindowType;
-
-#else
-#error "Platform not recognized"
-#endif
-
-/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
-typedef EGLNativeDisplayType NativeDisplayType;
-typedef EGLNativePixmapType  NativePixmapType;
-typedef EGLNativeWindowType  NativeWindowType;
-
-
-/* Define EGLint. This must be a signed integral type large enough to contain
- * all legal attribute names and values passed into and out of EGL, whether
- * their type is boolean, bitmask, enumerant (symbolic constant), integer,
- * handle, or other.  While in general a 32-bit integer will suffice, if
- * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
- * integer type.
- */
-typedef khronos_int32_t EGLint;
-
-
-/* C++ / C typecast macros for special EGL handle values */
-#if defined(__cplusplus)
-#define EGL_CAST(type, value) (static_cast<type>(value))
-#else
-#define EGL_CAST(type, value) ((type) (value))
-#endif
-
-#endif /* __eglplatform_h */
-
-
-#ifndef __egl_h_
-#define __egl_h_ 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright 2013-2020 The Khronos Group Inc.
-** SPDX-License-Identifier: Apache-2.0
-**
-** This header is generated from the Khronos EGL XML API Registry.
-** The current version of the Registry, generator scripts
-** used to make the header, and the header can be found at
-**   http://www.khronos.org/registry/egl
-**
-** Khronos $Git commit SHA1: b35e89ca9a $ on $Git commit date: 2021-09-01 09:34:00 +0530 $
-*/
-
-/*#include <EGL/eglplatform.h>*/
-
-#ifndef EGL_EGL_PROTOTYPES
-#define EGL_EGL_PROTOTYPES 1
-#endif
-
-/* Generated on date 20210901 */
-
-/* Generated C header for:
- * API: egl
- * Versions considered: .*
- * Versions emitted: .*
- * Default extensions included: None
- * Additional extensions included: _nomatch_^
- * Extensions removed: _nomatch_^
- */
-
-#ifndef EGL_VERSION_1_0
-#define EGL_VERSION_1_0 1
-typedef unsigned int EGLBoolean;
-typedef void *EGLDisplay;
-/*#include <KHR/khrplatform.h>*/
-/*#include <EGL/eglplatform.h>*/
-typedef void *EGLConfig;
-typedef void *EGLSurface;
-typedef void *EGLContext;
-typedef void (*__eglMustCastToProperFunctionPointerType)(void);
-#define EGL_ALPHA_SIZE                    0x3021
-#define EGL_BAD_ACCESS                    0x3002
-#define EGL_BAD_ALLOC                     0x3003
-#define EGL_BAD_ATTRIBUTE                 0x3004
-#define EGL_BAD_CONFIG                    0x3005
-#define EGL_BAD_CONTEXT                   0x3006
-#define EGL_BAD_CURRENT_SURFACE           0x3007
-#define EGL_BAD_DISPLAY                   0x3008
-#define EGL_BAD_MATCH                     0x3009
-#define EGL_BAD_NATIVE_PIXMAP             0x300A
-#define EGL_BAD_NATIVE_WINDOW             0x300B
-#define EGL_BAD_PARAMETER                 0x300C
-#define EGL_BAD_SURFACE                   0x300D
-#define EGL_BLUE_SIZE                     0x3022
-#define EGL_BUFFER_SIZE                   0x3020
-#define EGL_CONFIG_CAVEAT                 0x3027
-#define EGL_CONFIG_ID                     0x3028
-#define EGL_CORE_NATIVE_ENGINE            0x305B
-#define EGL_DEPTH_SIZE                    0x3025
-#define EGL_DONT_CARE                     EGL_CAST(EGLint,-1)
-#define EGL_DRAW                          0x3059
-#define EGL_EXTENSIONS                    0x3055
-#define EGL_FALSE                         0
-#define EGL_GREEN_SIZE                    0x3023
-#define EGL_HEIGHT                        0x3056
-#define EGL_LARGEST_PBUFFER               0x3058
-#define EGL_LEVEL                         0x3029
-#define EGL_MAX_PBUFFER_HEIGHT            0x302A
-#define EGL_MAX_PBUFFER_PIXELS            0x302B
-#define EGL_MAX_PBUFFER_WIDTH             0x302C
-#define EGL_NATIVE_RENDERABLE             0x302D
-#define EGL_NATIVE_VISUAL_ID              0x302E
-#define EGL_NATIVE_VISUAL_TYPE            0x302F
-#define EGL_NONE                          0x3038
-#define EGL_NON_CONFORMANT_CONFIG         0x3051
-#define EGL_NOT_INITIALIZED               0x3001
-#define EGL_NO_CONTEXT                    EGL_CAST(EGLContext,0)
-#define EGL_NO_DISPLAY                    EGL_CAST(EGLDisplay,0)
-#define EGL_NO_SURFACE                    EGL_CAST(EGLSurface,0)
-#define EGL_PBUFFER_BIT                   0x0001
-#define EGL_PIXMAP_BIT                    0x0002
-#define EGL_READ                          0x305A
-#define EGL_RED_SIZE                      0x3024
-#define EGL_SAMPLES                       0x3031
-#define EGL_SAMPLE_BUFFERS                0x3032
-#define EGL_SLOW_CONFIG                   0x3050
-#define EGL_STENCIL_SIZE                  0x3026
-#define EGL_SUCCESS                       0x3000
-#define EGL_SURFACE_TYPE                  0x3033
-#define EGL_TRANSPARENT_BLUE_VALUE        0x3035
-#define EGL_TRANSPARENT_GREEN_VALUE       0x3036
-#define EGL_TRANSPARENT_RED_VALUE         0x3037
-#define EGL_TRANSPARENT_RGB               0x3052
-#define EGL_TRANSPARENT_TYPE              0x3034
-#define EGL_TRUE                          1
-#define EGL_VENDOR                        0x3053
-#define EGL_VERSION                       0x3054
-#define EGL_WIDTH                         0x3057
-#define EGL_WINDOW_BIT                    0x0004
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLCHOOSECONFIGPROC) (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYBUFFERSPROC) (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
-typedef EGLContext (EGLAPIENTRYP PFNEGLCREATECONTEXTPROC) (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPBUFFERSURFACEPROC) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEPROC) (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEWINDOWSURFACEPROC) (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYCONTEXTPROC) (EGLDisplay dpy, EGLContext ctx);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSURFACEPROC) (EGLDisplay dpy, EGLSurface surface);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCONFIGATTRIBPROC) (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCONFIGSPROC) (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETCURRENTDISPLAYPROC) (void);
-typedef EGLSurface (EGLAPIENTRYP PFNEGLGETCURRENTSURFACEPROC) (EGLint readdraw);
-typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDISPLAYPROC) (EGLNativeDisplayType display_id);
-typedef EGLint (EGLAPIENTRYP PFNEGLGETERRORPROC) (void);
-typedef __eglMustCastToProperFunctionPointerType (EGLAPIENTRYP PFNEGLGETPROCADDRESSPROC) (const char *procname);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLINITIALIZEPROC) (EGLDisplay dpy, EGLint *major, EGLint *minor);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLMAKECURRENTPROC) (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYCONTEXTPROC) (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
-typedef const char *(EGLAPIENTRYP PFNEGLQUERYSTRINGPROC) (EGLDisplay dpy, EGLint name);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSPROC) (EGLDisplay dpy, EGLSurface surface);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLTERMINATEPROC) (EGLDisplay dpy);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITGLPROC) (void);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITNATIVEPROC) (EGLint engine);
-#if EGL_EGL_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
-EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void);
-EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw);
-EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id);
-EGLAPI EGLint EGLAPIENTRY eglGetError (void);
-EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname);
-EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);
-EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
-EGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name);
-EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface);
-EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy);
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void);
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);
-#endif
-#endif /* EGL_VERSION_1_0 */
-
-#ifndef EGL_VERSION_1_1
-#define EGL_VERSION_1_1 1
-#define EGL_BACK_BUFFER                   0x3084
-#define EGL_BIND_TO_TEXTURE_RGB           0x3039
-#define EGL_BIND_TO_TEXTURE_RGBA          0x303A
-#define EGL_CONTEXT_LOST                  0x300E
-#define EGL_MIN_SWAP_INTERVAL             0x303B
-#define EGL_MAX_SWAP_INTERVAL             0x303C
-#define EGL_MIPMAP_TEXTURE                0x3082
-#define EGL_MIPMAP_LEVEL                  0x3083
-#define EGL_NO_TEXTURE                    0x305C
-#define EGL_TEXTURE_2D                    0x305F
-#define EGL_TEXTURE_FORMAT                0x3080
-#define EGL_TEXTURE_RGB                   0x305D
-#define EGL_TEXTURE_RGBA                  0x305E
-#define EGL_TEXTURE_TARGET                0x3081
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDTEXIMAGEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLRELEASETEXIMAGEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSURFACEATTRIBPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPINTERVALPROC) (EGLDisplay dpy, EGLint interval);
-#if EGL_EGL_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
-EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
-EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval);
-#endif
-#endif /* EGL_VERSION_1_1 */
-
-#ifndef EGL_VERSION_1_2
-#define EGL_VERSION_1_2 1
-typedef unsigned int EGLenum;
-typedef void *EGLClientBuffer;
-#define EGL_ALPHA_FORMAT                  0x3088
-#define EGL_ALPHA_FORMAT_NONPRE           0x308B
-#define EGL_ALPHA_FORMAT_PRE              0x308C
-#define EGL_ALPHA_MASK_SIZE               0x303E
-#define EGL_BUFFER_PRESERVED              0x3094
-#define EGL_BUFFER_DESTROYED              0x3095
-#define EGL_CLIENT_APIS                   0x308D
-#define EGL_COLORSPACE                    0x3087
-#define EGL_COLORSPACE_sRGB               0x3089
-#define EGL_COLORSPACE_LINEAR             0x308A
-#define EGL_COLOR_BUFFER_TYPE             0x303F
-#define EGL_CONTEXT_CLIENT_TYPE           0x3097
-#define EGL_DISPLAY_SCALING               10000
-#define EGL_HORIZONTAL_RESOLUTION         0x3090
-#define EGL_LUMINANCE_BUFFER              0x308F
-#define EGL_LUMINANCE_SIZE                0x303D
-#define EGL_OPENGL_ES_BIT                 0x0001
-#define EGL_OPENVG_BIT                    0x0002
-#define EGL_OPENGL_ES_API                 0x30A0
-#define EGL_OPENVG_API                    0x30A1
-#define EGL_OPENVG_IMAGE                  0x3096
-#define EGL_PIXEL_ASPECT_RATIO            0x3092
-#define EGL_RENDERABLE_TYPE               0x3040
-#define EGL_RENDER_BUFFER                 0x3086
-#define EGL_RGB_BUFFER                    0x308E
-#define EGL_SINGLE_BUFFER                 0x3085
-#define EGL_SWAP_BEHAVIOR                 0x3093
-#define EGL_UNKNOWN                       EGL_CAST(EGLint,-1)
-#define EGL_VERTICAL_RESOLUTION           0x3091
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDAPIPROC) (EGLenum api);
-typedef EGLenum (EGLAPIENTRYP PFNEGLQUERYAPIPROC) (void);
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC) (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLRELEASETHREADPROC) (void);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITCLIENTPROC) (void);
-#if EGL_EGL_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api);
-EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void);
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void);
-#endif
-#endif /* EGL_VERSION_1_2 */
-
-#ifndef EGL_VERSION_1_3
-#define EGL_VERSION_1_3 1
-#define EGL_CONFORMANT                    0x3042
-#define EGL_CONTEXT_CLIENT_VERSION        0x3098
-#define EGL_MATCH_NATIVE_PIXMAP           0x3041
-#define EGL_OPENGL_ES2_BIT                0x0004
-#define EGL_VG_ALPHA_FORMAT               0x3088
-#define EGL_VG_ALPHA_FORMAT_NONPRE        0x308B
-#define EGL_VG_ALPHA_FORMAT_PRE           0x308C
-#define EGL_VG_ALPHA_FORMAT_PRE_BIT       0x0040
-#define EGL_VG_COLORSPACE                 0x3087
-#define EGL_VG_COLORSPACE_sRGB            0x3089
-#define EGL_VG_COLORSPACE_LINEAR          0x308A
-#define EGL_VG_COLORSPACE_LINEAR_BIT      0x0020
-#endif /* EGL_VERSION_1_3 */
-
-#ifndef EGL_VERSION_1_4
-#define EGL_VERSION_1_4 1
-#define EGL_DEFAULT_DISPLAY               EGL_CAST(EGLNativeDisplayType,0)
-#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT   0x0200
-#define EGL_MULTISAMPLE_RESOLVE           0x3099
-#define EGL_MULTISAMPLE_RESOLVE_DEFAULT   0x309A
-#define EGL_MULTISAMPLE_RESOLVE_BOX       0x309B
-#define EGL_OPENGL_API                    0x30A2
-#define EGL_OPENGL_BIT                    0x0008
-#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT   0x0400
-typedef EGLContext (EGLAPIENTRYP PFNEGLGETCURRENTCONTEXTPROC) (void);
-#if EGL_EGL_PROTOTYPES
-EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void);
-#endif
-#endif /* EGL_VERSION_1_4 */
-
-#ifndef EGL_VERSION_1_5
-#define EGL_VERSION_1_5 1
-typedef void *EGLSync;
-typedef intptr_t EGLAttrib;
-typedef khronos_utime_nanoseconds_t EGLTime;
-typedef void *EGLImage;
-#define EGL_CONTEXT_MAJOR_VERSION         0x3098
-#define EGL_CONTEXT_MINOR_VERSION         0x30FB
-#define EGL_CONTEXT_OPENGL_PROFILE_MASK   0x30FD
-#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
-#define EGL_NO_RESET_NOTIFICATION         0x31BE
-#define EGL_LOSE_CONTEXT_ON_RESET         0x31BF
-#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001
-#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002
-#define EGL_CONTEXT_OPENGL_DEBUG          0x31B0
-#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1
-#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS  0x31B2
-#define EGL_OPENGL_ES3_BIT                0x00000040
-#define EGL_CL_EVENT_HANDLE               0x309C
-#define EGL_SYNC_CL_EVENT                 0x30FE
-#define EGL_SYNC_CL_EVENT_COMPLETE        0x30FF
-#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE  0x30F0
-#define EGL_SYNC_TYPE                     0x30F7
-#define EGL_SYNC_STATUS                   0x30F1
-#define EGL_SYNC_CONDITION                0x30F8
-#define EGL_SIGNALED                      0x30F2
-#define EGL_UNSIGNALED                    0x30F3
-#define EGL_SYNC_FLUSH_COMMANDS_BIT       0x0001
-#define EGL_FOREVER                       0xFFFFFFFFFFFFFFFFull
-#define EGL_TIMEOUT_EXPIRED               0x30F5
-#define EGL_CONDITION_SATISFIED           0x30F6
-#define EGL_NO_SYNC                       EGL_CAST(EGLSync,0)
-#define EGL_SYNC_FENCE                    0x30F9
-#define EGL_GL_COLORSPACE                 0x309D
-#define EGL_GL_COLORSPACE_SRGB            0x3089
-#define EGL_GL_COLORSPACE_LINEAR          0x308A
-#define EGL_GL_RENDERBUFFER               0x30B9
-#define EGL_GL_TEXTURE_2D                 0x30B1
-#define EGL_GL_TEXTURE_LEVEL              0x30BC
-#define EGL_GL_TEXTURE_3D                 0x30B2
-#define EGL_GL_TEXTURE_ZOFFSET            0x30BD
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
-#define EGL_IMAGE_PRESERVED               0x30D2
-#define EGL_NO_IMAGE                      EGL_CAST(EGLImage,0)
-typedef EGLSync (EGLAPIENTRYP PFNEGLCREATESYNCPROC) (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCPROC) (EGLDisplay dpy, EGLSync sync);
-typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCPROC) (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBPROC) (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value);
-typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEPROC) (EGLDisplay dpy, EGLImage image);
-typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYPROC) (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITSYNCPROC) (EGLDisplay dpy, EGLSync sync, EGLint flags);
-#if EGL_EGL_PROTOTYPES
-EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync);
-EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value);
-EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image);
-EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags);
-#endif
-#endif /* EGL_VERSION_1_5 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __egl_h_ */
-
-
-#ifndef __eglext_h_
-#define __eglext_h_ 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright 2013-2020 The Khronos Group Inc.
-** SPDX-License-Identifier: Apache-2.0
-**
-** This header is generated from the Khronos EGL XML API Registry.
-** The current version of the Registry, generator scripts
-** used to make the header, and the header can be found at
-**   http://www.khronos.org/registry/egl
-**
-** Khronos $Git commit SHA1: b35e89ca9a $ on $Git commit date: 2021-09-01 09:34:00 +0530 $
-*/
-
-/*#include <EGL/eglplatform.h>*/
-
-#define EGL_EGLEXT_VERSION 20210901
-
-/* Generated C header for:
- * API: egl
- * Versions considered: .*
- * Versions emitted: _nomatch_^
- * Default extensions included: egl
- * Additional extensions included: _nomatch_^
- * Extensions removed: _nomatch_^
- */
-
-#ifndef EGL_KHR_cl_event
-#define EGL_KHR_cl_event 1
-#define EGL_CL_EVENT_HANDLE_KHR           0x309C
-#define EGL_SYNC_CL_EVENT_KHR             0x30FE
-#define EGL_SYNC_CL_EVENT_COMPLETE_KHR    0x30FF
-#endif /* EGL_KHR_cl_event */
-
-#ifndef EGL_KHR_cl_event2
-#define EGL_KHR_cl_event2 1
-typedef void *EGLSyncKHR;
-typedef intptr_t EGLAttribKHR;
-typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);
-#endif
-#endif /* EGL_KHR_cl_event2 */
-
-#ifndef EGL_KHR_client_get_all_proc_addresses
-#define EGL_KHR_client_get_all_proc_addresses 1
-#endif /* EGL_KHR_client_get_all_proc_addresses */
-
-#ifndef EGL_KHR_config_attribs
-#define EGL_KHR_config_attribs 1
-#define EGL_CONFORMANT_KHR                0x3042
-#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR  0x0020
-#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR   0x0040
-#endif /* EGL_KHR_config_attribs */
-
-#ifndef EGL_KHR_context_flush_control
-#define EGL_KHR_context_flush_control 1
-#define EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR 0
-#define EGL_CONTEXT_RELEASE_BEHAVIOR_KHR  0x2097
-#define EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x2098
-#endif /* EGL_KHR_context_flush_control */
-
-#ifndef EGL_KHR_create_context
-#define EGL_KHR_create_context 1
-#define EGL_CONTEXT_MAJOR_VERSION_KHR     0x3098
-#define EGL_CONTEXT_MINOR_VERSION_KHR     0x30FB
-#define EGL_CONTEXT_FLAGS_KHR             0x30FC
-#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD
-#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD
-#define EGL_NO_RESET_NOTIFICATION_KHR     0x31BE
-#define EGL_LOSE_CONTEXT_ON_RESET_KHR     0x31BF
-#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR  0x00000001
-#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
-#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
-#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
-#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
-#define EGL_OPENGL_ES3_BIT_KHR            0x00000040
-#endif /* EGL_KHR_create_context */
-
-#ifndef EGL_KHR_create_context_no_error
-#define EGL_KHR_create_context_no_error 1
-#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR   0x31B3
-#endif /* EGL_KHR_create_context_no_error */
-
-#ifndef EGL_KHR_debug
-#define EGL_KHR_debug 1
-typedef void *EGLLabelKHR;
-typedef void *EGLObjectKHR;
-typedef void (EGLAPIENTRY  *EGLDEBUGPROCKHR)(EGLenum error,const char *command,EGLint messageType,EGLLabelKHR threadLabel,EGLLabelKHR objectLabel,const char* message);
-#define EGL_OBJECT_THREAD_KHR             0x33B0
-#define EGL_OBJECT_DISPLAY_KHR            0x33B1
-#define EGL_OBJECT_CONTEXT_KHR            0x33B2
-#define EGL_OBJECT_SURFACE_KHR            0x33B3
-#define EGL_OBJECT_IMAGE_KHR              0x33B4
-#define EGL_OBJECT_SYNC_KHR               0x33B5
-#define EGL_OBJECT_STREAM_KHR             0x33B6
-#define EGL_DEBUG_MSG_CRITICAL_KHR        0x33B9
-#define EGL_DEBUG_MSG_ERROR_KHR           0x33BA
-#define EGL_DEBUG_MSG_WARN_KHR            0x33BB
-#define EGL_DEBUG_MSG_INFO_KHR            0x33BC
-#define EGL_DEBUG_CALLBACK_KHR            0x33B8
-typedef EGLint (EGLAPIENTRYP PFNEGLDEBUGMESSAGECONTROLKHRPROC) (EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEBUGKHRPROC) (EGLint attribute, EGLAttrib *value);
-typedef EGLint (EGLAPIENTRYP PFNEGLLABELOBJECTKHRPROC) (EGLDisplay display, EGLenum objectType, EGLObjectKHR object, EGLLabelKHR label);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLint EGLAPIENTRY eglDebugMessageControlKHR (EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryDebugKHR (EGLint attribute, EGLAttrib *value);
-EGLAPI EGLint EGLAPIENTRY eglLabelObjectKHR (EGLDisplay display, EGLenum objectType, EGLObjectKHR object, EGLLabelKHR label);
-#endif
-#endif /* EGL_KHR_debug */
-
-#ifndef EGL_KHR_display_reference
-#define EGL_KHR_display_reference 1
-#define EGL_TRACK_REFERENCES_KHR          0x3352
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBKHRPROC) (EGLDisplay dpy, EGLint name, EGLAttrib *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribKHR (EGLDisplay dpy, EGLint name, EGLAttrib *value);
-#endif
-#endif /* EGL_KHR_display_reference */
-
-#ifndef EGL_KHR_fence_sync
-#define EGL_KHR_fence_sync 1
-typedef khronos_utime_nanoseconds_t EGLTimeKHR;
-#ifdef KHRONOS_SUPPORT_INT64
-#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
-#define EGL_SYNC_CONDITION_KHR            0x30F8
-#define EGL_SYNC_FENCE_KHR                0x30F9
-typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
-typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync);
-EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
-#endif
-#endif /* KHRONOS_SUPPORT_INT64 */
-#endif /* EGL_KHR_fence_sync */
-
-#ifndef EGL_KHR_get_all_proc_addresses
-#define EGL_KHR_get_all_proc_addresses 1
-#endif /* EGL_KHR_get_all_proc_addresses */
-
-#ifndef EGL_KHR_gl_colorspace
-#define EGL_KHR_gl_colorspace 1
-#define EGL_GL_COLORSPACE_KHR             0x309D
-#define EGL_GL_COLORSPACE_SRGB_KHR        0x3089
-#define EGL_GL_COLORSPACE_LINEAR_KHR      0x308A
-#endif /* EGL_KHR_gl_colorspace */
-
-#ifndef EGL_KHR_gl_renderbuffer_image
-#define EGL_KHR_gl_renderbuffer_image 1
-#define EGL_GL_RENDERBUFFER_KHR           0x30B9
-#endif /* EGL_KHR_gl_renderbuffer_image */
-
-#ifndef EGL_KHR_gl_texture_2D_image
-#define EGL_KHR_gl_texture_2D_image 1
-#define EGL_GL_TEXTURE_2D_KHR             0x30B1
-#define EGL_GL_TEXTURE_LEVEL_KHR          0x30BC
-#endif /* EGL_KHR_gl_texture_2D_image */
-
-#ifndef EGL_KHR_gl_texture_3D_image
-#define EGL_KHR_gl_texture_3D_image 1
-#define EGL_GL_TEXTURE_3D_KHR             0x30B2
-#define EGL_GL_TEXTURE_ZOFFSET_KHR        0x30BD
-#endif /* EGL_KHR_gl_texture_3D_image */
-
-#ifndef EGL_KHR_gl_texture_cubemap_image
-#define EGL_KHR_gl_texture_cubemap_image 1
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8
-#endif /* EGL_KHR_gl_texture_cubemap_image */
-
-#ifndef EGL_KHR_image
-#define EGL_KHR_image 1
-typedef void *EGLImageKHR;
-#define EGL_NATIVE_PIXMAP_KHR             0x30B0
-#define EGL_NO_IMAGE_KHR                  EGL_CAST(EGLImageKHR,0)
-typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
-#endif
-#endif /* EGL_KHR_image */
-
-#ifndef EGL_KHR_image_base
-#define EGL_KHR_image_base 1
-#define EGL_IMAGE_PRESERVED_KHR           0x30D2
-#endif /* EGL_KHR_image_base */
-
-#ifndef EGL_KHR_image_pixmap
-#define EGL_KHR_image_pixmap 1
-#endif /* EGL_KHR_image_pixmap */
-
-#ifndef EGL_KHR_lock_surface
-#define EGL_KHR_lock_surface 1
-#define EGL_READ_SURFACE_BIT_KHR          0x0001
-#define EGL_WRITE_SURFACE_BIT_KHR         0x0002
-#define EGL_LOCK_SURFACE_BIT_KHR          0x0080
-#define EGL_OPTIMAL_FORMAT_BIT_KHR        0x0100
-#define EGL_MATCH_FORMAT_KHR              0x3043
-#define EGL_FORMAT_RGB_565_EXACT_KHR      0x30C0
-#define EGL_FORMAT_RGB_565_KHR            0x30C1
-#define EGL_FORMAT_RGBA_8888_EXACT_KHR    0x30C2
-#define EGL_FORMAT_RGBA_8888_KHR          0x30C3
-#define EGL_MAP_PRESERVE_PIXELS_KHR       0x30C4
-#define EGL_LOCK_USAGE_HINT_KHR           0x30C5
-#define EGL_BITMAP_POINTER_KHR            0x30C6
-#define EGL_BITMAP_PITCH_KHR              0x30C7
-#define EGL_BITMAP_ORIGIN_KHR             0x30C8
-#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR   0x30C9
-#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA
-#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR  0x30CB
-#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC
-#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD
-#define EGL_LOWER_LEFT_KHR                0x30CE
-#define EGL_UPPER_LEFT_KHR                0x30CF
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface);
-#endif
-#endif /* EGL_KHR_lock_surface */
-
-#ifndef EGL_KHR_lock_surface2
-#define EGL_KHR_lock_surface2 1
-#define EGL_BITMAP_PIXEL_SIZE_KHR         0x3110
-#endif /* EGL_KHR_lock_surface2 */
-
-#ifndef EGL_KHR_lock_surface3
-#define EGL_KHR_lock_surface3 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);
-#endif
-#endif /* EGL_KHR_lock_surface3 */
-
-#ifndef EGL_KHR_mutable_render_buffer
-#define EGL_KHR_mutable_render_buffer 1
-#define EGL_MUTABLE_RENDER_BUFFER_BIT_KHR 0x1000
-#endif /* EGL_KHR_mutable_render_buffer */
-
-#ifndef EGL_KHR_no_config_context
-#define EGL_KHR_no_config_context 1
-#define EGL_NO_CONFIG_KHR                 EGL_CAST(EGLConfig,0)
-#endif /* EGL_KHR_no_config_context */
-
-#ifndef EGL_KHR_partial_update
-#define EGL_KHR_partial_update 1
-#define EGL_BUFFER_AGE_KHR                0x313D
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglSetDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
-#endif
-#endif /* EGL_KHR_partial_update */
-
-#ifndef EGL_KHR_platform_android
-#define EGL_KHR_platform_android 1
-#define EGL_PLATFORM_ANDROID_KHR          0x3141
-#endif /* EGL_KHR_platform_android */
-
-#ifndef EGL_KHR_platform_gbm
-#define EGL_KHR_platform_gbm 1
-#define EGL_PLATFORM_GBM_KHR              0x31D7
-#endif /* EGL_KHR_platform_gbm */
-
-#ifndef EGL_KHR_platform_wayland
-#define EGL_KHR_platform_wayland 1
-#define EGL_PLATFORM_WAYLAND_KHR          0x31D8
-#endif /* EGL_KHR_platform_wayland */
-
-#ifndef EGL_KHR_platform_x11
-#define EGL_KHR_platform_x11 1
-#define EGL_PLATFORM_X11_KHR              0x31D5
-#define EGL_PLATFORM_X11_SCREEN_KHR       0x31D6
-#endif /* EGL_KHR_platform_x11 */
-
-#ifndef EGL_KHR_reusable_sync
-#define EGL_KHR_reusable_sync 1
-#ifdef KHRONOS_SUPPORT_INT64
-#define EGL_SYNC_STATUS_KHR               0x30F1
-#define EGL_SIGNALED_KHR                  0x30F2
-#define EGL_UNSIGNALED_KHR                0x30F3
-#define EGL_TIMEOUT_EXPIRED_KHR           0x30F5
-#define EGL_CONDITION_SATISFIED_KHR       0x30F6
-#define EGL_SYNC_TYPE_KHR                 0x30F7
-#define EGL_SYNC_REUSABLE_KHR             0x30FA
-#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR   0x0001
-#define EGL_FOREVER_KHR                   0xFFFFFFFFFFFFFFFFull
-#define EGL_NO_SYNC_KHR                   EGL_CAST(EGLSyncKHR,0)
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
-#endif
-#endif /* KHRONOS_SUPPORT_INT64 */
-#endif /* EGL_KHR_reusable_sync */
-
-#ifndef EGL_KHR_stream
-#define EGL_KHR_stream 1
-typedef void *EGLStreamKHR;
-typedef khronos_uint64_t EGLuint64KHR;
-#ifdef KHRONOS_SUPPORT_INT64
-#define EGL_NO_STREAM_KHR                 EGL_CAST(EGLStreamKHR,0)
-#define EGL_CONSUMER_LATENCY_USEC_KHR     0x3210
-#define EGL_PRODUCER_FRAME_KHR            0x3212
-#define EGL_CONSUMER_FRAME_KHR            0x3213
-#define EGL_STREAM_STATE_KHR              0x3214
-#define EGL_STREAM_STATE_CREATED_KHR      0x3215
-#define EGL_STREAM_STATE_CONNECTING_KHR   0x3216
-#define EGL_STREAM_STATE_EMPTY_KHR        0x3217
-#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218
-#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219
-#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A
-#define EGL_BAD_STREAM_KHR                0x321B
-#define EGL_BAD_STATE_KHR                 0x321C
-typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR (EGLDisplay dpy, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR (EGLDisplay dpy, EGLStreamKHR stream);
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
-#endif
-#endif /* KHRONOS_SUPPORT_INT64 */
-#endif /* EGL_KHR_stream */
-
-#ifndef EGL_KHR_stream_attrib
-#define EGL_KHR_stream_attrib 1
-#ifdef KHRONOS_SUPPORT_INT64
-typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMATTRIBKHRPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamAttribKHR (EGLDisplay dpy, const EGLAttrib *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglSetStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value);
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
-#endif
-#endif /* KHRONOS_SUPPORT_INT64 */
-#endif /* EGL_KHR_stream_attrib */
-
-#ifndef EGL_KHR_stream_consumer_gltexture
-#define EGL_KHR_stream_consumer_gltexture 1
-#ifdef EGL_KHR_stream
-#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR (EGLDisplay dpy, EGLStreamKHR stream);
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR (EGLDisplay dpy, EGLStreamKHR stream);
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, EGLStreamKHR stream);
-#endif
-#endif /* EGL_KHR_stream */
-#endif /* EGL_KHR_stream_consumer_gltexture */
-
-#ifndef EGL_KHR_stream_cross_process_fd
-#define EGL_KHR_stream_cross_process_fd 1
-typedef int EGLNativeFileDescriptorKHR;
-#ifdef EGL_KHR_stream
-#define EGL_NO_FILE_DESCRIPTOR_KHR        EGL_CAST(EGLNativeFileDescriptorKHR,-1)
-typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR (EGLDisplay dpy, EGLStreamKHR stream);
-EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
-#endif
-#endif /* EGL_KHR_stream */
-#endif /* EGL_KHR_stream_cross_process_fd */
-
-#ifndef EGL_KHR_stream_fifo
-#define EGL_KHR_stream_fifo 1
-#ifdef EGL_KHR_stream
-#define EGL_STREAM_FIFO_LENGTH_KHR        0x31FC
-#define EGL_STREAM_TIME_NOW_KHR           0x31FD
-#define EGL_STREAM_TIME_CONSUMER_KHR      0x31FE
-#define EGL_STREAM_TIME_PRODUCER_KHR      0x31FF
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
-#endif
-#endif /* EGL_KHR_stream */
-#endif /* EGL_KHR_stream_fifo */
-
-#ifndef EGL_KHR_stream_producer_aldatalocator
-#define EGL_KHR_stream_producer_aldatalocator 1
-#ifdef EGL_KHR_stream
-#endif /* EGL_KHR_stream */
-#endif /* EGL_KHR_stream_producer_aldatalocator */
-
-#ifndef EGL_KHR_stream_producer_eglsurface
-#define EGL_KHR_stream_producer_eglsurface 1
-#ifdef EGL_KHR_stream
-#define EGL_STREAM_BIT_KHR                0x0800
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
-#endif
-#endif /* EGL_KHR_stream */
-#endif /* EGL_KHR_stream_producer_eglsurface */
-
-#ifndef EGL_KHR_surfaceless_context
-#define EGL_KHR_surfaceless_context 1
-#endif /* EGL_KHR_surfaceless_context */
-
-#ifndef EGL_KHR_swap_buffers_with_damage
-#define EGL_KHR_swap_buffers_with_damage 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
-#endif
-#endif /* EGL_KHR_swap_buffers_with_damage */
-
-#ifndef EGL_KHR_vg_parent_image
-#define EGL_KHR_vg_parent_image 1
-#define EGL_VG_PARENT_IMAGE_KHR           0x30BA
-#endif /* EGL_KHR_vg_parent_image */
-
-#ifndef EGL_KHR_wait_sync
-#define EGL_KHR_wait_sync 1
-typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
-#endif
-#endif /* EGL_KHR_wait_sync */
-
-#ifndef EGL_ANDROID_GLES_layers
-#define EGL_ANDROID_GLES_layers 1
-#endif /* EGL_ANDROID_GLES_layers */
-
-#ifndef EGL_ANDROID_blob_cache
-#define EGL_ANDROID_blob_cache 1
-typedef khronos_ssize_t EGLsizeiANDROID;
-typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);
-typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);
-typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
-#endif
-#endif /* EGL_ANDROID_blob_cache */
-
-#ifndef EGL_ANDROID_create_native_client_buffer
-#define EGL_ANDROID_create_native_client_buffer 1
-#define EGL_NATIVE_BUFFER_USAGE_ANDROID   0x3143
-#define EGL_NATIVE_BUFFER_USAGE_PROTECTED_BIT_ANDROID 0x00000001
-#define EGL_NATIVE_BUFFER_USAGE_RENDERBUFFER_BIT_ANDROID 0x00000002
-#define EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID 0x00000004
-typedef EGLClientBuffer (EGLAPIENTRYP PFNEGLCREATENATIVECLIENTBUFFERANDROIDPROC) (const EGLint *attrib_list);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLClientBuffer EGLAPIENTRY eglCreateNativeClientBufferANDROID (const EGLint *attrib_list);
-#endif
-#endif /* EGL_ANDROID_create_native_client_buffer */
-
-#ifndef EGL_ANDROID_framebuffer_target
-#define EGL_ANDROID_framebuffer_target 1
-#define EGL_FRAMEBUFFER_TARGET_ANDROID    0x3147
-#endif /* EGL_ANDROID_framebuffer_target */
-
-#ifndef EGL_ANDROID_front_buffer_auto_refresh
-#define EGL_ANDROID_front_buffer_auto_refresh 1
-#define EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID 0x314C
-#endif /* EGL_ANDROID_front_buffer_auto_refresh */
-
-#ifndef EGL_ANDROID_get_frame_timestamps
-#define EGL_ANDROID_get_frame_timestamps 1
-typedef khronos_stime_nanoseconds_t EGLnsecsANDROID;
-#define EGL_TIMESTAMP_PENDING_ANDROID     EGL_CAST(EGLnsecsANDROID,-2)
-#define EGL_TIMESTAMP_INVALID_ANDROID     EGL_CAST(EGLnsecsANDROID,-1)
-#define EGL_TIMESTAMPS_ANDROID            0x3430
-#define EGL_COMPOSITE_DEADLINE_ANDROID    0x3431
-#define EGL_COMPOSITE_INTERVAL_ANDROID    0x3432
-#define EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID 0x3433
-#define EGL_REQUESTED_PRESENT_TIME_ANDROID 0x3434
-#define EGL_RENDERING_COMPLETE_TIME_ANDROID 0x3435
-#define EGL_COMPOSITION_LATCH_TIME_ANDROID 0x3436
-#define EGL_FIRST_COMPOSITION_START_TIME_ANDROID 0x3437
-#define EGL_LAST_COMPOSITION_START_TIME_ANDROID 0x3438
-#define EGL_FIRST_COMPOSITION_GPU_FINISHED_TIME_ANDROID 0x3439
-#define EGL_DISPLAY_PRESENT_TIME_ANDROID  0x343A
-#define EGL_DEQUEUE_READY_TIME_ANDROID    0x343B
-#define EGL_READS_DONE_TIME_ANDROID       0x343C
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCOMPOSITORTIMINGSUPPORTEDANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLint name);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCOMPOSITORTIMINGANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numTimestamps,  const EGLint *names, EGLnsecsANDROID *values);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETNEXTFRAMEIDANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLuint64KHR *frameId);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETFRAMETIMESTAMPSUPPORTEDANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLint timestamp);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETFRAMETIMESTAMPSANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLuint64KHR frameId, EGLint numTimestamps,  const EGLint *timestamps, EGLnsecsANDROID *values);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglGetCompositorTimingSupportedANDROID (EGLDisplay dpy, EGLSurface surface, EGLint name);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetCompositorTimingANDROID (EGLDisplay dpy, EGLSurface surface, EGLint numTimestamps,  const EGLint *names, EGLnsecsANDROID *values);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetNextFrameIdANDROID (EGLDisplay dpy, EGLSurface surface, EGLuint64KHR *frameId);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetFrameTimestampSupportedANDROID (EGLDisplay dpy, EGLSurface surface, EGLint timestamp);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetFrameTimestampsANDROID (EGLDisplay dpy, EGLSurface surface, EGLuint64KHR frameId, EGLint numTimestamps,  const EGLint *timestamps, EGLnsecsANDROID *values);
-#endif
-#endif /* EGL_ANDROID_get_frame_timestamps */
-
-#ifndef EGL_ANDROID_get_native_client_buffer
-#define EGL_ANDROID_get_native_client_buffer 1
-struct AHardwareBuffer;
-typedef EGLClientBuffer (EGLAPIENTRYP PFNEGLGETNATIVECLIENTBUFFERANDROIDPROC) (const struct AHardwareBuffer *buffer);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLClientBuffer EGLAPIENTRY eglGetNativeClientBufferANDROID (const struct AHardwareBuffer *buffer);
-#endif
-#endif /* EGL_ANDROID_get_native_client_buffer */
-
-#ifndef EGL_ANDROID_image_native_buffer
-#define EGL_ANDROID_image_native_buffer 1
-#define EGL_NATIVE_BUFFER_ANDROID         0x3140
-#endif /* EGL_ANDROID_image_native_buffer */
-
-#ifndef EGL_ANDROID_native_fence_sync
-#define EGL_ANDROID_native_fence_sync 1
-#define EGL_SYNC_NATIVE_FENCE_ANDROID     0x3144
-#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID  0x3145
-#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146
-#define EGL_NO_NATIVE_FENCE_FD_ANDROID    -1
-typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync);
-#endif
-#endif /* EGL_ANDROID_native_fence_sync */
-
-#ifndef EGL_ANDROID_presentation_time
-#define EGL_ANDROID_presentation_time 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLPRESENTATIONTIMEANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLnsecsANDROID time);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglPresentationTimeANDROID (EGLDisplay dpy, EGLSurface surface, EGLnsecsANDROID time);
-#endif
-#endif /* EGL_ANDROID_presentation_time */
-
-#ifndef EGL_ANDROID_recordable
-#define EGL_ANDROID_recordable 1
-#define EGL_RECORDABLE_ANDROID            0x3142
-#endif /* EGL_ANDROID_recordable */
-
-#ifndef EGL_ANGLE_d3d_share_handle_client_buffer
-#define EGL_ANGLE_d3d_share_handle_client_buffer 1
-#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200
-#endif /* EGL_ANGLE_d3d_share_handle_client_buffer */
-
-#ifndef EGL_ANGLE_device_d3d
-#define EGL_ANGLE_device_d3d 1
-#define EGL_D3D9_DEVICE_ANGLE             0x33A0
-#define EGL_D3D11_DEVICE_ANGLE            0x33A1
-#endif /* EGL_ANGLE_device_d3d */
-
-#ifndef EGL_ANGLE_query_surface_pointer
-#define EGL_ANGLE_query_surface_pointer 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
-#endif
-#endif /* EGL_ANGLE_query_surface_pointer */
-
-#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
-#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
-#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */
-
-#ifndef EGL_ANGLE_sync_control_rate
-#define EGL_ANGLE_sync_control_rate 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETMSCRATEANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *numerator, EGLint *denominator);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglGetMscRateANGLE (EGLDisplay dpy, EGLSurface surface, EGLint *numerator, EGLint *denominator);
-#endif
-#endif /* EGL_ANGLE_sync_control_rate */
-
-#ifndef EGL_ANGLE_window_fixed_size
-#define EGL_ANGLE_window_fixed_size 1
-#define EGL_FIXED_SIZE_ANGLE              0x3201
-#endif /* EGL_ANGLE_window_fixed_size */
-
-#ifndef EGL_ARM_image_format
-#define EGL_ARM_image_format 1
-#define EGL_COLOR_COMPONENT_TYPE_UNSIGNED_INTEGER_ARM 0x3287
-#define EGL_COLOR_COMPONENT_TYPE_INTEGER_ARM 0x3288
-#endif /* EGL_ARM_image_format */
-
-#ifndef EGL_ARM_implicit_external_sync
-#define EGL_ARM_implicit_external_sync 1
-#define EGL_SYNC_PRIOR_COMMANDS_IMPLICIT_EXTERNAL_ARM 0x328A
-#endif /* EGL_ARM_implicit_external_sync */
-
-#ifndef EGL_ARM_pixmap_multisample_discard
-#define EGL_ARM_pixmap_multisample_discard 1
-#define EGL_DISCARD_SAMPLES_ARM           0x3286
-#endif /* EGL_ARM_pixmap_multisample_discard */
-
-#ifndef EGL_EXT_bind_to_front
-#define EGL_EXT_bind_to_front 1
-#define EGL_FRONT_BUFFER_EXT              0x3464
-#endif /* EGL_EXT_bind_to_front */
-
-#ifndef EGL_EXT_buffer_age
-#define EGL_EXT_buffer_age 1
-#define EGL_BUFFER_AGE_EXT                0x313D
-#endif /* EGL_EXT_buffer_age */
-
-#ifndef EGL_EXT_client_extensions
-#define EGL_EXT_client_extensions 1
-#endif /* EGL_EXT_client_extensions */
-
-#ifndef EGL_EXT_client_sync
-#define EGL_EXT_client_sync 1
-#define EGL_SYNC_CLIENT_EXT               0x3364
-#define EGL_SYNC_CLIENT_SIGNAL_EXT        0x3365
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLCLIENTSIGNALSYNCEXTPROC) (EGLDisplay dpy, EGLSync sync, const EGLAttrib *attrib_list);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglClientSignalSyncEXT (EGLDisplay dpy, EGLSync sync, const EGLAttrib *attrib_list);
-#endif
-#endif /* EGL_EXT_client_sync */
-
-#ifndef EGL_EXT_compositor
-#define EGL_EXT_compositor 1
-#define EGL_PRIMARY_COMPOSITOR_CONTEXT_EXT 0x3460
-#define EGL_EXTERNAL_REF_ID_EXT           0x3461
-#define EGL_COMPOSITOR_DROP_NEWEST_FRAME_EXT 0x3462
-#define EGL_COMPOSITOR_KEEP_NEWEST_FRAME_EXT 0x3463
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETCONTEXTLISTEXTPROC) (const EGLint *external_ref_ids, EGLint num_entries);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETCONTEXTATTRIBUTESEXTPROC) (EGLint external_ref_id, const EGLint *context_attributes, EGLint num_entries);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETWINDOWLISTEXTPROC) (EGLint external_ref_id, const EGLint *external_win_ids, EGLint num_entries);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETWINDOWATTRIBUTESEXTPROC) (EGLint external_win_id, const EGLint *window_attributes, EGLint num_entries);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORBINDTEXWINDOWEXTPROC) (EGLint external_win_id);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETSIZEEXTPROC) (EGLint external_win_id, EGLint width, EGLint height);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSWAPPOLICYEXTPROC) (EGLint external_win_id, EGLint policy);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetContextListEXT (const EGLint *external_ref_ids, EGLint num_entries);
-EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetContextAttributesEXT (EGLint external_ref_id, const EGLint *context_attributes, EGLint num_entries);
-EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetWindowListEXT (EGLint external_ref_id, const EGLint *external_win_ids, EGLint num_entries);
-EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetWindowAttributesEXT (EGLint external_win_id, const EGLint *window_attributes, EGLint num_entries);
-EGLAPI EGLBoolean EGLAPIENTRY eglCompositorBindTexWindowEXT (EGLint external_win_id);
-EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetSizeEXT (EGLint external_win_id, EGLint width, EGLint height);
-EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSwapPolicyEXT (EGLint external_win_id, EGLint policy);
-#endif
-#endif /* EGL_EXT_compositor */
-
-#ifndef EGL_EXT_config_select_group
-#define EGL_EXT_config_select_group 1
-#define EGL_CONFIG_SELECT_GROUP_EXT       0x34C0
-#endif /* EGL_EXT_config_select_group */
-
-#ifndef EGL_EXT_create_context_robustness
-#define EGL_EXT_create_context_robustness 1
-#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF
-#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
-#define EGL_NO_RESET_NOTIFICATION_EXT     0x31BE
-#define EGL_LOSE_CONTEXT_ON_RESET_EXT     0x31BF
-#endif /* EGL_EXT_create_context_robustness */
-
-#ifndef EGL_EXT_device_base
-#define EGL_EXT_device_base 1
-typedef void *EGLDeviceEXT;
-#define EGL_NO_DEVICE_EXT                 EGL_CAST(EGLDeviceEXT,0)
-#define EGL_BAD_DEVICE_EXT                0x322B
-#define EGL_DEVICE_EXT                    0x322C
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);
-typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);
-EGLAPI const char *EGLAPIENTRY eglQueryDeviceStringEXT (EGLDeviceEXT device, EGLint name);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
-#endif
-#endif /* EGL_EXT_device_base */
-
-#ifndef EGL_EXT_device_drm
-#define EGL_EXT_device_drm 1
-#define EGL_DRM_DEVICE_FILE_EXT           0x3233
-#define EGL_DRM_MASTER_FD_EXT             0x333C
-#endif /* EGL_EXT_device_drm */
-
-#ifndef EGL_EXT_device_drm_render_node
-#define EGL_EXT_device_drm_render_node 1
-#define EGL_DRM_RENDER_NODE_FILE_EXT      0x3377
-#endif /* EGL_EXT_device_drm_render_node */
-
-#ifndef EGL_EXT_device_enumeration
-#define EGL_EXT_device_enumeration 1
-#endif /* EGL_EXT_device_enumeration */
-
-#ifndef EGL_EXT_device_openwf
-#define EGL_EXT_device_openwf 1
-#define EGL_OPENWF_DEVICE_ID_EXT          0x3237
-#define EGL_OPENWF_DEVICE_EXT             0x333D
-#endif /* EGL_EXT_device_openwf */
-
-#ifndef EGL_EXT_device_persistent_id
-#define EGL_EXT_device_persistent_id 1
-#define EGL_DEVICE_UUID_EXT               0x335C
-#define EGL_DRIVER_UUID_EXT               0x335D
-#define EGL_DRIVER_NAME_EXT               0x335E
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEBINARYEXTPROC) (EGLDeviceEXT device, EGLint name, EGLint max_size, void *value, EGLint *size);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceBinaryEXT (EGLDeviceEXT device, EGLint name, EGLint max_size, void *value, EGLint *size);
-#endif
-#endif /* EGL_EXT_device_persistent_id */
-
-#ifndef EGL_EXT_device_query
-#define EGL_EXT_device_query 1
-#endif /* EGL_EXT_device_query */
-
-#ifndef EGL_EXT_device_query_name
-#define EGL_EXT_device_query_name 1
-#define EGL_RENDERER_EXT                  0x335F
-#endif /* EGL_EXT_device_query_name */
-
-#ifndef EGL_EXT_gl_colorspace_bt2020_linear
-#define EGL_EXT_gl_colorspace_bt2020_linear 1
-#define EGL_GL_COLORSPACE_BT2020_LINEAR_EXT 0x333F
-#endif /* EGL_EXT_gl_colorspace_bt2020_linear */
-
-#ifndef EGL_EXT_gl_colorspace_bt2020_pq
-#define EGL_EXT_gl_colorspace_bt2020_pq 1
-#define EGL_GL_COLORSPACE_BT2020_PQ_EXT   0x3340
-#endif /* EGL_EXT_gl_colorspace_bt2020_pq */
-
-#ifndef EGL_EXT_gl_colorspace_display_p3
-#define EGL_EXT_gl_colorspace_display_p3 1
-#define EGL_GL_COLORSPACE_DISPLAY_P3_EXT  0x3363
-#endif /* EGL_EXT_gl_colorspace_display_p3 */
-
-#ifndef EGL_EXT_gl_colorspace_display_p3_linear
-#define EGL_EXT_gl_colorspace_display_p3_linear 1
-#define EGL_GL_COLORSPACE_DISPLAY_P3_LINEAR_EXT 0x3362
-#endif /* EGL_EXT_gl_colorspace_display_p3_linear */
-
-#ifndef EGL_EXT_gl_colorspace_display_p3_passthrough
-#define EGL_EXT_gl_colorspace_display_p3_passthrough 1
-#define EGL_GL_COLORSPACE_DISPLAY_P3_PASSTHROUGH_EXT 0x3490
-#endif /* EGL_EXT_gl_colorspace_display_p3_passthrough */
-
-#ifndef EGL_EXT_gl_colorspace_scrgb
-#define EGL_EXT_gl_colorspace_scrgb 1
-#define EGL_GL_COLORSPACE_SCRGB_EXT       0x3351
-#endif /* EGL_EXT_gl_colorspace_scrgb */
-
-#ifndef EGL_EXT_gl_colorspace_scrgb_linear
-#define EGL_EXT_gl_colorspace_scrgb_linear 1
-#define EGL_GL_COLORSPACE_SCRGB_LINEAR_EXT 0x3350
-#endif /* EGL_EXT_gl_colorspace_scrgb_linear */
-
-#ifndef EGL_EXT_image_dma_buf_import
-#define EGL_EXT_image_dma_buf_import 1
-#define EGL_LINUX_DMA_BUF_EXT             0x3270
-#define EGL_LINUX_DRM_FOURCC_EXT          0x3271
-#define EGL_DMA_BUF_PLANE0_FD_EXT         0x3272
-#define EGL_DMA_BUF_PLANE0_OFFSET_EXT     0x3273
-#define EGL_DMA_BUF_PLANE0_PITCH_EXT      0x3274
-#define EGL_DMA_BUF_PLANE1_FD_EXT         0x3275
-#define EGL_DMA_BUF_PLANE1_OFFSET_EXT     0x3276
-#define EGL_DMA_BUF_PLANE1_PITCH_EXT      0x3277
-#define EGL_DMA_BUF_PLANE2_FD_EXT         0x3278
-#define EGL_DMA_BUF_PLANE2_OFFSET_EXT     0x3279
-#define EGL_DMA_BUF_PLANE2_PITCH_EXT      0x327A
-#define EGL_YUV_COLOR_SPACE_HINT_EXT      0x327B
-#define EGL_SAMPLE_RANGE_HINT_EXT         0x327C
-#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
-#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
-#define EGL_ITU_REC601_EXT                0x327F
-#define EGL_ITU_REC709_EXT                0x3280
-#define EGL_ITU_REC2020_EXT               0x3281
-#define EGL_YUV_FULL_RANGE_EXT            0x3282
-#define EGL_YUV_NARROW_RANGE_EXT          0x3283
-#define EGL_YUV_CHROMA_SITING_0_EXT       0x3284
-#define EGL_YUV_CHROMA_SITING_0_5_EXT     0x3285
-#endif /* EGL_EXT_image_dma_buf_import */
-
-#ifndef EGL_EXT_image_dma_buf_import_modifiers
-#define EGL_EXT_image_dma_buf_import_modifiers 1
-#define EGL_DMA_BUF_PLANE3_FD_EXT         0x3440
-#define EGL_DMA_BUF_PLANE3_OFFSET_EXT     0x3441
-#define EGL_DMA_BUF_PLANE3_PITCH_EXT      0x3442
-#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443
-#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444
-#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445
-#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446
-#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447
-#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448
-#define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449
-#define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFFORMATSEXTPROC) (EGLDisplay dpy, EGLint max_formats, EGLint *formats, EGLint *num_formats);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFMODIFIERSEXTPROC) (EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR *modifiers, EGLBoolean *external_only, EGLint *num_modifiers);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryDmaBufFormatsEXT (EGLDisplay dpy, EGLint max_formats, EGLint *formats, EGLint *num_formats);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryDmaBufModifiersEXT (EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR *modifiers, EGLBoolean *external_only, EGLint *num_modifiers);
-#endif
-#endif /* EGL_EXT_image_dma_buf_import_modifiers */
-
-#ifndef EGL_EXT_image_gl_colorspace
-#define EGL_EXT_image_gl_colorspace 1
-#define EGL_GL_COLORSPACE_DEFAULT_EXT     0x314D
-#endif /* EGL_EXT_image_gl_colorspace */
-
-#ifndef EGL_EXT_image_implicit_sync_control
-#define EGL_EXT_image_implicit_sync_control 1
-#define EGL_IMPORT_SYNC_TYPE_EXT          0x3470
-#define EGL_IMPORT_IMPLICIT_SYNC_EXT      0x3471
-#define EGL_IMPORT_EXPLICIT_SYNC_EXT      0x3472
-#endif /* EGL_EXT_image_implicit_sync_control */
-
-#ifndef EGL_EXT_multiview_window
-#define EGL_EXT_multiview_window 1
-#define EGL_MULTIVIEW_VIEW_COUNT_EXT      0x3134
-#endif /* EGL_EXT_multiview_window */
-
-#ifndef EGL_EXT_output_base
-#define EGL_EXT_output_base 1
-typedef void *EGLOutputLayerEXT;
-typedef void *EGLOutputPortEXT;
-#define EGL_NO_OUTPUT_LAYER_EXT           EGL_CAST(EGLOutputLayerEXT,0)
-#define EGL_NO_OUTPUT_PORT_EXT            EGL_CAST(EGLOutputPortEXT,0)
-#define EGL_BAD_OUTPUT_LAYER_EXT          0x322D
-#define EGL_BAD_OUTPUT_PORT_EXT           0x322E
-#define EGL_SWAP_INTERVAL_EXT             0x322F
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);
-typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);
-typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputLayersEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputPortsEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);
-EGLAPI EGLBoolean EGLAPIENTRY eglOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);
-EGLAPI const char *EGLAPIENTRY eglQueryOutputLayerStringEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);
-EGLAPI EGLBoolean EGLAPIENTRY eglOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);
-EGLAPI const char *EGLAPIENTRY eglQueryOutputPortStringEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);
-#endif
-#endif /* EGL_EXT_output_base */
-
-#ifndef EGL_EXT_output_drm
-#define EGL_EXT_output_drm 1
-#define EGL_DRM_CRTC_EXT                  0x3234
-#define EGL_DRM_PLANE_EXT                 0x3235
-#define EGL_DRM_CONNECTOR_EXT             0x3236
-#endif /* EGL_EXT_output_drm */
-
-#ifndef EGL_EXT_output_openwf
-#define EGL_EXT_output_openwf 1
-#define EGL_OPENWF_PIPELINE_ID_EXT        0x3238
-#define EGL_OPENWF_PORT_ID_EXT            0x3239
-#endif /* EGL_EXT_output_openwf */
-
-#ifndef EGL_EXT_pixel_format_float
-#define EGL_EXT_pixel_format_float 1
-#define EGL_COLOR_COMPONENT_TYPE_EXT      0x3339
-#define EGL_COLOR_COMPONENT_TYPE_FIXED_EXT 0x333A
-#define EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT 0x333B
-#endif /* EGL_EXT_pixel_format_float */
-
-#ifndef EGL_EXT_platform_base
-#define EGL_EXT_platform_base 1
-typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list);
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);
-#endif
-#endif /* EGL_EXT_platform_base */
-
-#ifndef EGL_EXT_platform_device
-#define EGL_EXT_platform_device 1
-#define EGL_PLATFORM_DEVICE_EXT           0x313F
-#endif /* EGL_EXT_platform_device */
-
-#ifndef EGL_EXT_platform_wayland
-#define EGL_EXT_platform_wayland 1
-#define EGL_PLATFORM_WAYLAND_EXT          0x31D8
-#endif /* EGL_EXT_platform_wayland */
-
-#ifndef EGL_EXT_platform_x11
-#define EGL_EXT_platform_x11 1
-#define EGL_PLATFORM_X11_EXT              0x31D5
-#define EGL_PLATFORM_X11_SCREEN_EXT       0x31D6
-#endif /* EGL_EXT_platform_x11 */
-
-#ifndef EGL_EXT_platform_xcb
-#define EGL_EXT_platform_xcb 1
-#define EGL_PLATFORM_XCB_EXT              0x31DC
-#define EGL_PLATFORM_XCB_SCREEN_EXT       0x31DE
-#endif /* EGL_EXT_platform_xcb */
-
-#ifndef EGL_EXT_present_opaque
-#define EGL_EXT_present_opaque 1
-#define EGL_PRESENT_OPAQUE_EXT            0x31DF
-#endif /* EGL_EXT_present_opaque */
-
-#ifndef EGL_EXT_protected_content
-#define EGL_EXT_protected_content 1
-#define EGL_PROTECTED_CONTENT_EXT         0x32C0
-#endif /* EGL_EXT_protected_content */
-
-#ifndef EGL_EXT_protected_surface
-#define EGL_EXT_protected_surface 1
-#endif /* EGL_EXT_protected_surface */
-
-#ifndef EGL_EXT_stream_consumer_egloutput
-#define EGL_EXT_stream_consumer_egloutput 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerOutputEXT (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);
-#endif
-#endif /* EGL_EXT_stream_consumer_egloutput */
-
-#ifndef EGL_EXT_surface_CTA861_3_metadata
-#define EGL_EXT_surface_CTA861_3_metadata 1
-#define EGL_CTA861_3_MAX_CONTENT_LIGHT_LEVEL_EXT 0x3360
-#define EGL_CTA861_3_MAX_FRAME_AVERAGE_LEVEL_EXT 0x3361
-#endif /* EGL_EXT_surface_CTA861_3_metadata */
-
-#ifndef EGL_EXT_surface_SMPTE2086_metadata
-#define EGL_EXT_surface_SMPTE2086_metadata 1
-#define EGL_SMPTE2086_DISPLAY_PRIMARY_RX_EXT 0x3341
-#define EGL_SMPTE2086_DISPLAY_PRIMARY_RY_EXT 0x3342
-#define EGL_SMPTE2086_DISPLAY_PRIMARY_GX_EXT 0x3343
-#define EGL_SMPTE2086_DISPLAY_PRIMARY_GY_EXT 0x3344
-#define EGL_SMPTE2086_DISPLAY_PRIMARY_BX_EXT 0x3345
-#define EGL_SMPTE2086_DISPLAY_PRIMARY_BY_EXT 0x3346
-#define EGL_SMPTE2086_WHITE_POINT_X_EXT   0x3347
-#define EGL_SMPTE2086_WHITE_POINT_Y_EXT   0x3348
-#define EGL_SMPTE2086_MAX_LUMINANCE_EXT   0x3349
-#define EGL_SMPTE2086_MIN_LUMINANCE_EXT   0x334A
-#define EGL_METADATA_SCALING_EXT          50000
-#endif /* EGL_EXT_surface_SMPTE2086_metadata */
-
-#ifndef EGL_EXT_swap_buffers_with_damage
-#define EGL_EXT_swap_buffers_with_damage 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
-#endif
-#endif /* EGL_EXT_swap_buffers_with_damage */
-
-#ifndef EGL_EXT_sync_reuse
-#define EGL_EXT_sync_reuse 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNSIGNALSYNCEXTPROC) (EGLDisplay dpy, EGLSync sync, const EGLAttrib *attrib_list);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglUnsignalSyncEXT (EGLDisplay dpy, EGLSync sync, const EGLAttrib *attrib_list);
-#endif
-#endif /* EGL_EXT_sync_reuse */
-
-#ifndef EGL_EXT_yuv_surface
-#define EGL_EXT_yuv_surface 1
-#define EGL_YUV_ORDER_EXT                 0x3301
-#define EGL_YUV_NUMBER_OF_PLANES_EXT      0x3311
-#define EGL_YUV_SUBSAMPLE_EXT             0x3312
-#define EGL_YUV_DEPTH_RANGE_EXT           0x3317
-#define EGL_YUV_CSC_STANDARD_EXT          0x330A
-#define EGL_YUV_PLANE_BPP_EXT             0x331A
-#define EGL_YUV_BUFFER_EXT                0x3300
-#define EGL_YUV_ORDER_YUV_EXT             0x3302
-#define EGL_YUV_ORDER_YVU_EXT             0x3303
-#define EGL_YUV_ORDER_YUYV_EXT            0x3304
-#define EGL_YUV_ORDER_UYVY_EXT            0x3305
-#define EGL_YUV_ORDER_YVYU_EXT            0x3306
-#define EGL_YUV_ORDER_VYUY_EXT            0x3307
-#define EGL_YUV_ORDER_AYUV_EXT            0x3308
-#define EGL_YUV_SUBSAMPLE_4_2_0_EXT       0x3313
-#define EGL_YUV_SUBSAMPLE_4_2_2_EXT       0x3314
-#define EGL_YUV_SUBSAMPLE_4_4_4_EXT       0x3315
-#define EGL_YUV_DEPTH_RANGE_LIMITED_EXT   0x3318
-#define EGL_YUV_DEPTH_RANGE_FULL_EXT      0x3319
-#define EGL_YUV_CSC_STANDARD_601_EXT      0x330B
-#define EGL_YUV_CSC_STANDARD_709_EXT      0x330C
-#define EGL_YUV_CSC_STANDARD_2020_EXT     0x330D
-#define EGL_YUV_PLANE_BPP_0_EXT           0x331B
-#define EGL_YUV_PLANE_BPP_8_EXT           0x331C
-#define EGL_YUV_PLANE_BPP_10_EXT          0x331D
-#endif /* EGL_EXT_yuv_surface */
-
-#ifndef EGL_HI_clientpixmap
-#define EGL_HI_clientpixmap 1
-struct EGLClientPixmapHI {
-    void  *pData;
-    EGLint iWidth;
-    EGLint iHeight;
-    EGLint iStride;
-};
-#define EGL_CLIENT_PIXMAP_POINTER_HI      0x8F74
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);
-#endif
-#endif /* EGL_HI_clientpixmap */
-
-#ifndef EGL_HI_colorformats
-#define EGL_HI_colorformats 1
-#define EGL_COLOR_FORMAT_HI               0x8F70
-#define EGL_COLOR_RGB_HI                  0x8F71
-#define EGL_COLOR_RGBA_HI                 0x8F72
-#define EGL_COLOR_ARGB_HI                 0x8F73
-#endif /* EGL_HI_colorformats */
-
-#ifndef EGL_IMG_context_priority
-#define EGL_IMG_context_priority 1
-#define EGL_CONTEXT_PRIORITY_LEVEL_IMG    0x3100
-#define EGL_CONTEXT_PRIORITY_HIGH_IMG     0x3101
-#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG   0x3102
-#define EGL_CONTEXT_PRIORITY_LOW_IMG      0x3103
-#endif /* EGL_IMG_context_priority */
-
-#ifndef EGL_IMG_image_plane_attribs
-#define EGL_IMG_image_plane_attribs 1
-#define EGL_NATIVE_BUFFER_MULTIPLANE_SEPARATE_IMG 0x3105
-#define EGL_NATIVE_BUFFER_PLANE_OFFSET_IMG 0x3106
-#endif /* EGL_IMG_image_plane_attribs */
-
-#ifndef EGL_MESA_drm_image
-#define EGL_MESA_drm_image 1
-#define EGL_DRM_BUFFER_FORMAT_MESA        0x31D0
-#define EGL_DRM_BUFFER_USE_MESA           0x31D1
-#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2
-#define EGL_DRM_BUFFER_MESA               0x31D3
-#define EGL_DRM_BUFFER_STRIDE_MESA        0x31D4
-#define EGL_DRM_BUFFER_USE_SCANOUT_MESA   0x00000001
-#define EGL_DRM_BUFFER_USE_SHARE_MESA     0x00000002
-#define EGL_DRM_BUFFER_USE_CURSOR_MESA    0x00000004
-typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
-#endif
-#endif /* EGL_MESA_drm_image */
-
-#ifndef EGL_MESA_image_dma_buf_export
-#define EGL_MESA_image_dma_buf_export 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageQueryMESA (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);
-EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageMESA (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);
-#endif
-#endif /* EGL_MESA_image_dma_buf_export */
-
-#ifndef EGL_MESA_platform_gbm
-#define EGL_MESA_platform_gbm 1
-#define EGL_PLATFORM_GBM_MESA             0x31D7
-#endif /* EGL_MESA_platform_gbm */
-
-#ifndef EGL_MESA_platform_surfaceless
-#define EGL_MESA_platform_surfaceless 1
-#define EGL_PLATFORM_SURFACELESS_MESA     0x31DD
-#endif /* EGL_MESA_platform_surfaceless */
-
-#ifndef EGL_MESA_query_driver
-#define EGL_MESA_query_driver 1
-typedef char *(EGLAPIENTRYP PFNEGLGETDISPLAYDRIVERCONFIGPROC) (EGLDisplay dpy);
-typedef const char *(EGLAPIENTRYP PFNEGLGETDISPLAYDRIVERNAMEPROC) (EGLDisplay dpy);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI char *EGLAPIENTRY eglGetDisplayDriverConfig (EGLDisplay dpy);
-EGLAPI const char *EGLAPIENTRY eglGetDisplayDriverName (EGLDisplay dpy);
-#endif
-#endif /* EGL_MESA_query_driver */
-
-#ifndef EGL_NOK_swap_region
-#define EGL_NOK_swap_region 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
-#endif
-#endif /* EGL_NOK_swap_region */
-
-#ifndef EGL_NOK_swap_region2
-#define EGL_NOK_swap_region2 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
-#endif
-#endif /* EGL_NOK_swap_region2 */
-
-#ifndef EGL_NOK_texture_from_pixmap
-#define EGL_NOK_texture_from_pixmap 1
-#define EGL_Y_INVERTED_NOK                0x307F
-#endif /* EGL_NOK_texture_from_pixmap */
-
-#ifndef EGL_NV_3dvision_surface
-#define EGL_NV_3dvision_surface 1
-#define EGL_AUTO_STEREO_NV                0x3136
-#endif /* EGL_NV_3dvision_surface */
-
-#ifndef EGL_NV_context_priority_realtime
-#define EGL_NV_context_priority_realtime 1
-#define EGL_CONTEXT_PRIORITY_REALTIME_NV  0x3357
-#endif /* EGL_NV_context_priority_realtime */
-
-#ifndef EGL_NV_coverage_sample
-#define EGL_NV_coverage_sample 1
-#define EGL_COVERAGE_BUFFERS_NV           0x30E0
-#define EGL_COVERAGE_SAMPLES_NV           0x30E1
-#endif /* EGL_NV_coverage_sample */
-
-#ifndef EGL_NV_coverage_sample_resolve
-#define EGL_NV_coverage_sample_resolve 1
-#define EGL_COVERAGE_SAMPLE_RESOLVE_NV    0x3131
-#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132
-#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133
-#endif /* EGL_NV_coverage_sample_resolve */
-
-#ifndef EGL_NV_cuda_event
-#define EGL_NV_cuda_event 1
-#define EGL_CUDA_EVENT_HANDLE_NV          0x323B
-#define EGL_SYNC_CUDA_EVENT_NV            0x323C
-#define EGL_SYNC_CUDA_EVENT_COMPLETE_NV   0x323D
-#endif /* EGL_NV_cuda_event */
-
-#ifndef EGL_NV_depth_nonlinear
-#define EGL_NV_depth_nonlinear 1
-#define EGL_DEPTH_ENCODING_NV             0x30E2
-#define EGL_DEPTH_ENCODING_NONE_NV        0
-#define EGL_DEPTH_ENCODING_NONLINEAR_NV   0x30E3
-#endif /* EGL_NV_depth_nonlinear */
-
-#ifndef EGL_NV_device_cuda
-#define EGL_NV_device_cuda 1
-#define EGL_CUDA_DEVICE_NV                0x323A
-#endif /* EGL_NV_device_cuda */
-
-#ifndef EGL_NV_native_query
-#define EGL_NV_native_query 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV (EGLDisplay dpy, EGLNativeDisplayType *display_id);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
-#endif
-#endif /* EGL_NV_native_query */
-
-#ifndef EGL_NV_post_convert_rounding
-#define EGL_NV_post_convert_rounding 1
-#endif /* EGL_NV_post_convert_rounding */
-
-#ifndef EGL_NV_post_sub_buffer
-#define EGL_NV_post_sub_buffer 1
-#define EGL_POST_SUB_BUFFER_SUPPORTED_NV  0x30BE
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
-#endif
-#endif /* EGL_NV_post_sub_buffer */
-
-#ifndef EGL_NV_quadruple_buffer
-#define EGL_NV_quadruple_buffer 1
-#define EGL_QUADRUPLE_BUFFER_NV           0x3231
-#endif /* EGL_NV_quadruple_buffer */
-
-#ifndef EGL_NV_robustness_video_memory_purge
-#define EGL_NV_robustness_video_memory_purge 1
-#define EGL_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x334C
-#endif /* EGL_NV_robustness_video_memory_purge */
-
-#ifndef EGL_NV_stream_consumer_eglimage
-#define EGL_NV_stream_consumer_eglimage 1
-#define EGL_STREAM_CONSUMER_IMAGE_NV      0x3373
-#define EGL_STREAM_IMAGE_ADD_NV           0x3374
-#define EGL_STREAM_IMAGE_REMOVE_NV        0x3375
-#define EGL_STREAM_IMAGE_AVAILABLE_NV     0x3376
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMIMAGECONSUMERCONNECTNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, EGLuint64KHR *modifiers, EGLAttrib *attrib_list);
-typedef EGLint (EGLAPIENTRYP PFNEGLQUERYSTREAMCONSUMEREVENTNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLTime timeout, EGLenum *event, EGLAttrib *aux);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMACQUIREIMAGENVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLImage *pImage, EGLSync sync);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMRELEASEIMAGENVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLImage image, EGLSync sync);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamImageConsumerConnectNV (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, EGLuint64KHR *modifiers, EGLAttrib *attrib_list);
-EGLAPI EGLint EGLAPIENTRY eglQueryStreamConsumerEventNV (EGLDisplay dpy, EGLStreamKHR stream, EGLTime timeout, EGLenum *event, EGLAttrib *aux);
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamAcquireImageNV (EGLDisplay dpy, EGLStreamKHR stream, EGLImage *pImage, EGLSync sync);
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamReleaseImageNV (EGLDisplay dpy, EGLStreamKHR stream, EGLImage image, EGLSync sync);
-#endif
-#endif /* EGL_NV_stream_consumer_eglimage */
-
-#ifndef EGL_NV_stream_consumer_gltexture_yuv
-#define EGL_NV_stream_consumer_gltexture_yuv 1
-#define EGL_YUV_PLANE0_TEXTURE_UNIT_NV    0x332C
-#define EGL_YUV_PLANE1_TEXTURE_UNIT_NV    0x332D
-#define EGL_YUV_PLANE2_TEXTURE_UNIT_NV    0x332E
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALATTRIBSNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalAttribsNV (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
-#endif
-#endif /* EGL_NV_stream_consumer_gltexture_yuv */
-
-#ifndef EGL_NV_stream_cross_display
-#define EGL_NV_stream_cross_display 1
-#define EGL_STREAM_CROSS_DISPLAY_NV       0x334E
-#endif /* EGL_NV_stream_cross_display */
-
-#ifndef EGL_NV_stream_cross_object
-#define EGL_NV_stream_cross_object 1
-#define EGL_STREAM_CROSS_OBJECT_NV        0x334D
-#endif /* EGL_NV_stream_cross_object */
-
-#ifndef EGL_NV_stream_cross_partition
-#define EGL_NV_stream_cross_partition 1
-#define EGL_STREAM_CROSS_PARTITION_NV     0x323F
-#endif /* EGL_NV_stream_cross_partition */
-
-#ifndef EGL_NV_stream_cross_process
-#define EGL_NV_stream_cross_process 1
-#define EGL_STREAM_CROSS_PROCESS_NV       0x3245
-#endif /* EGL_NV_stream_cross_process */
-
-#ifndef EGL_NV_stream_cross_system
-#define EGL_NV_stream_cross_system 1
-#define EGL_STREAM_CROSS_SYSTEM_NV        0x334F
-#endif /* EGL_NV_stream_cross_system */
-
-#ifndef EGL_NV_stream_dma
-#define EGL_NV_stream_dma 1
-#define EGL_STREAM_DMA_NV                 0x3371
-#define EGL_STREAM_DMA_SERVER_NV          0x3372
-#endif /* EGL_NV_stream_dma */
-
-#ifndef EGL_NV_stream_fifo_next
-#define EGL_NV_stream_fifo_next 1
-#define EGL_PENDING_FRAME_NV              0x3329
-#define EGL_STREAM_TIME_PENDING_NV        0x332A
-#endif /* EGL_NV_stream_fifo_next */
-
-#ifndef EGL_NV_stream_fifo_synchronous
-#define EGL_NV_stream_fifo_synchronous 1
-#define EGL_STREAM_FIFO_SYNCHRONOUS_NV    0x3336
-#endif /* EGL_NV_stream_fifo_synchronous */
-
-#ifndef EGL_NV_stream_flush
-#define EGL_NV_stream_flush 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMFLUSHNVPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamFlushNV (EGLDisplay dpy, EGLStreamKHR stream);
-#endif
-#endif /* EGL_NV_stream_flush */
-
-#ifndef EGL_NV_stream_frame_limits
-#define EGL_NV_stream_frame_limits 1
-#define EGL_PRODUCER_MAX_FRAME_HINT_NV    0x3337
-#define EGL_CONSUMER_MAX_FRAME_HINT_NV    0x3338
-#endif /* EGL_NV_stream_frame_limits */
-
-#ifndef EGL_NV_stream_metadata
-#define EGL_NV_stream_metadata 1
-#define EGL_MAX_STREAM_METADATA_BLOCKS_NV 0x3250
-#define EGL_MAX_STREAM_METADATA_BLOCK_SIZE_NV 0x3251
-#define EGL_MAX_STREAM_METADATA_TOTAL_SIZE_NV 0x3252
-#define EGL_PRODUCER_METADATA_NV          0x3253
-#define EGL_CONSUMER_METADATA_NV          0x3254
-#define EGL_PENDING_METADATA_NV           0x3328
-#define EGL_METADATA0_SIZE_NV             0x3255
-#define EGL_METADATA1_SIZE_NV             0x3256
-#define EGL_METADATA2_SIZE_NV             0x3257
-#define EGL_METADATA3_SIZE_NV             0x3258
-#define EGL_METADATA0_TYPE_NV             0x3259
-#define EGL_METADATA1_TYPE_NV             0x325A
-#define EGL_METADATA2_TYPE_NV             0x325B
-#define EGL_METADATA3_TYPE_NV             0x325C
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBNVPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSTREAMMETADATANVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLint n, EGLint offset, EGLint size, const void *data);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMMETADATANVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum name, EGLint n, EGLint offset, EGLint size, void *data);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribNV (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
-EGLAPI EGLBoolean EGLAPIENTRY eglSetStreamMetadataNV (EGLDisplay dpy, EGLStreamKHR stream, EGLint n, EGLint offset, EGLint size, const void *data);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamMetadataNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum name, EGLint n, EGLint offset, EGLint size, void *data);
-#endif
-#endif /* EGL_NV_stream_metadata */
-
-#ifndef EGL_NV_stream_origin
-#define EGL_NV_stream_origin 1
-#define EGL_STREAM_FRAME_ORIGIN_X_NV      0x3366
-#define EGL_STREAM_FRAME_ORIGIN_Y_NV      0x3367
-#define EGL_STREAM_FRAME_MAJOR_AXIS_NV    0x3368
-#define EGL_CONSUMER_AUTO_ORIENTATION_NV  0x3369
-#define EGL_PRODUCER_AUTO_ORIENTATION_NV  0x336A
-#define EGL_LEFT_NV                       0x336B
-#define EGL_RIGHT_NV                      0x336C
-#define EGL_TOP_NV                        0x336D
-#define EGL_BOTTOM_NV                     0x336E
-#define EGL_X_AXIS_NV                     0x336F
-#define EGL_Y_AXIS_NV                     0x3370
-#endif /* EGL_NV_stream_origin */
-
-#ifndef EGL_NV_stream_remote
-#define EGL_NV_stream_remote 1
-#define EGL_STREAM_STATE_INITIALIZING_NV  0x3240
-#define EGL_STREAM_TYPE_NV                0x3241
-#define EGL_STREAM_PROTOCOL_NV            0x3242
-#define EGL_STREAM_ENDPOINT_NV            0x3243
-#define EGL_STREAM_LOCAL_NV               0x3244
-#define EGL_STREAM_PRODUCER_NV            0x3247
-#define EGL_STREAM_CONSUMER_NV            0x3248
-#define EGL_STREAM_PROTOCOL_FD_NV         0x3246
-#endif /* EGL_NV_stream_remote */
-
-#ifndef EGL_NV_stream_reset
-#define EGL_NV_stream_reset 1
-#define EGL_SUPPORT_RESET_NV              0x3334
-#define EGL_SUPPORT_REUSE_NV              0x3335
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLRESETSTREAMNVPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglResetStreamNV (EGLDisplay dpy, EGLStreamKHR stream);
-#endif
-#endif /* EGL_NV_stream_reset */
-
-#ifndef EGL_NV_stream_socket
-#define EGL_NV_stream_socket 1
-#define EGL_STREAM_PROTOCOL_SOCKET_NV     0x324B
-#define EGL_SOCKET_HANDLE_NV              0x324C
-#define EGL_SOCKET_TYPE_NV                0x324D
-#endif /* EGL_NV_stream_socket */
-
-#ifndef EGL_NV_stream_socket_inet
-#define EGL_NV_stream_socket_inet 1
-#define EGL_SOCKET_TYPE_INET_NV           0x324F
-#endif /* EGL_NV_stream_socket_inet */
-
-#ifndef EGL_NV_stream_socket_unix
-#define EGL_NV_stream_socket_unix 1
-#define EGL_SOCKET_TYPE_UNIX_NV           0x324E
-#endif /* EGL_NV_stream_socket_unix */
-
-#ifndef EGL_NV_stream_sync
-#define EGL_NV_stream_sync 1
-#define EGL_SYNC_NEW_FRAME_NV             0x321F
-typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);
-#endif
-#endif /* EGL_NV_stream_sync */
-
-#ifndef EGL_NV_sync
-#define EGL_NV_sync 1
-typedef void *EGLSyncNV;
-typedef khronos_utime_nanoseconds_t EGLTimeNV;
-#ifdef KHRONOS_SUPPORT_INT64
-#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
-#define EGL_SYNC_STATUS_NV                0x30E7
-#define EGL_SIGNALED_NV                   0x30E8
-#define EGL_UNSIGNALED_NV                 0x30E9
-#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV    0x0001
-#define EGL_FOREVER_NV                    0xFFFFFFFFFFFFFFFFull
-#define EGL_ALREADY_SIGNALED_NV           0x30EA
-#define EGL_TIMEOUT_EXPIRED_NV            0x30EB
-#define EGL_CONDITION_SATISFIED_NV        0x30EC
-#define EGL_SYNC_TYPE_NV                  0x30ED
-#define EGL_SYNC_CONDITION_NV             0x30EE
-#define EGL_SYNC_FENCE_NV                 0x30EF
-#define EGL_NO_SYNC_NV                    EGL_CAST(EGLSyncNV,0)
-typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
-typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync);
-EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync);
-EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
-EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
-#endif
-#endif /* KHRONOS_SUPPORT_INT64 */
-#endif /* EGL_NV_sync */
-
-#ifndef EGL_NV_system_time
-#define EGL_NV_system_time 1
-typedef khronos_utime_nanoseconds_t EGLuint64NV;
-#ifdef KHRONOS_SUPPORT_INT64
-typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);
-typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV (void);
-EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void);
-#endif
-#endif /* KHRONOS_SUPPORT_INT64 */
-#endif /* EGL_NV_system_time */
-
-#ifndef EGL_NV_triple_buffer
-#define EGL_NV_triple_buffer 1
-#define EGL_TRIPLE_BUFFER_NV              0x3230
-#endif /* EGL_NV_triple_buffer */
-
-#ifndef EGL_TIZEN_image_native_buffer
-#define EGL_TIZEN_image_native_buffer 1
-#define EGL_NATIVE_BUFFER_TIZEN           0x32A0
-#endif /* EGL_TIZEN_image_native_buffer */
-
-#ifndef EGL_TIZEN_image_native_surface
-#define EGL_TIZEN_image_native_surface 1
-#define EGL_NATIVE_SURFACE_TIZEN          0x32A1
-#endif /* EGL_TIZEN_image_native_surface */
-
-#ifndef EGL_WL_bind_wayland_display
-#define EGL_WL_bind_wayland_display 1
-#define PFNEGLBINDWAYLANDDISPLAYWL PFNEGLBINDWAYLANDDISPLAYWLPROC
-#define PFNEGLUNBINDWAYLANDDISPLAYWL PFNEGLUNBINDWAYLANDDISPLAYWLPROC
-#define PFNEGLQUERYWAYLANDBUFFERWL PFNEGLQUERYWAYLANDBUFFERWLPROC
-struct wl_display;
-struct wl_resource;
-#define EGL_WAYLAND_BUFFER_WL             0x31D5
-#define EGL_WAYLAND_PLANE_WL              0x31D6
-#define EGL_TEXTURE_Y_U_V_WL              0x31D7
-#define EGL_TEXTURE_Y_UV_WL               0x31D8
-#define EGL_TEXTURE_Y_XUXV_WL             0x31D9
-#define EGL_TEXTURE_EXTERNAL_WL           0x31DA
-#define EGL_WAYLAND_Y_INVERTED_WL         0x31DB
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWLPROC) (EGLDisplay dpy, struct wl_display *display);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWLPROC) (EGLDisplay dpy, struct wl_display *display);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWLPROC) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL (EGLDisplay dpy, struct wl_display *display);
-EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL (EGLDisplay dpy, struct wl_display *display);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
-#endif
-#endif /* EGL_WL_bind_wayland_display */
-
-#ifndef EGL_WL_create_wayland_buffer_from_image
-#define EGL_WL_create_wayland_buffer_from_image 1
-#define PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWLPROC
-struct wl_buffer;
-typedef struct wl_buffer *(EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWLPROC) (EGLDisplay dpy, EGLImageKHR image);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI struct wl_buffer *EGLAPIENTRY eglCreateWaylandBufferFromImageWL (EGLDisplay dpy, EGLImageKHR image);
-#endif
-#endif /* EGL_WL_create_wayland_buffer_from_image */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __eglext_h_ */
-
-#endif /* _MSC_VER */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_endian.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_endian.h
deleted file mode 100644 (file)
index 2866f4b..0000000
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_endian.h
- *
- *  Functions for reading and writing endian-specific values
- */
-
-#ifndef SDL_endian_h_
-#define SDL_endian_h_
-
-#include "SDL_stdinc.h"
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1400)
-/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
-   so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
-#ifdef __clang__
-#ifndef __PRFCHWINTRIN_H
-#define __PRFCHWINTRIN_H
-static __inline__ void __attribute__((__always_inline__, __nodebug__))
-_m_prefetch(void *__P)
-{
-  __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
-}
-#endif /* __PRFCHWINTRIN_H */
-#endif /* __clang__ */
-
-#include <intrin.h>
-#endif
-
-/**
- *  \name The two types of endianness
- */
-/* @{ */
-#define SDL_LIL_ENDIAN  1234
-#define SDL_BIG_ENDIAN  4321
-/* @} */
-
-#ifndef SDL_BYTEORDER           /* Not defined in SDL_config.h? */
-#ifdef __linux__
-#include <endian.h>
-#define SDL_BYTEORDER  __BYTE_ORDER
-#elif defined(__OpenBSD__)
-#include <endian.h>
-#define SDL_BYTEORDER  BYTE_ORDER
-#elif defined(__FreeBSD__) || defined(__NetBSD__)
-#include <sys/endian.h>
-#define SDL_BYTEORDER  BYTE_ORDER
-/* predefs from newer gcc and clang versions: */
-#elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__)
-#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
-#define SDL_BYTEORDER   SDL_LIL_ENDIAN
-#elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
-#define SDL_BYTEORDER   SDL_BIG_ENDIAN
-#else
-#error Unsupported endianness
-#endif /**/
-#else
-#if defined(__hppa__) || \
-    defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
-    (defined(__MIPS__) && defined(__MIPSEB__)) || \
-    defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
-    defined(__sparc__)
-#define SDL_BYTEORDER   SDL_BIG_ENDIAN
-#else
-#define SDL_BYTEORDER   SDL_LIL_ENDIAN
-#endif
-#endif /* __linux__ */
-#endif /* !SDL_BYTEORDER */
-
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \file SDL_endian.h
- */
-
-/* various modern compilers may have builtin swap */
-#if defined(__GNUC__) || defined(__clang__)
-#   define HAS_BUILTIN_BSWAP16 (_SDL_HAS_BUILTIN(__builtin_bswap16)) || \
-        (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
-#   define HAS_BUILTIN_BSWAP32 (_SDL_HAS_BUILTIN(__builtin_bswap32)) || \
-        (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
-#   define HAS_BUILTIN_BSWAP64 (_SDL_HAS_BUILTIN(__builtin_bswap64)) || \
-        (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
-
-    /* this one is broken */
-#   define HAS_BROKEN_BSWAP (__GNUC__ == 2 && __GNUC_MINOR__ <= 95)
-#else
-#   define HAS_BUILTIN_BSWAP16 0
-#   define HAS_BUILTIN_BSWAP32 0
-#   define HAS_BUILTIN_BSWAP64 0
-#   define HAS_BROKEN_BSWAP 0
-#endif
-
-#if HAS_BUILTIN_BSWAP16
-#define SDL_Swap16(x) __builtin_bswap16(x)
-#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
-#pragma intrinsic(_byteswap_ushort)
-#define SDL_Swap16(x) _byteswap_ushort(x)
-#elif defined(__i386__) && !HAS_BROKEN_BSWAP
-SDL_FORCE_INLINE Uint16
-SDL_Swap16(Uint16 x)
-{
-  __asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
-    return x;
-}
-#elif defined(__x86_64__)
-SDL_FORCE_INLINE Uint16
-SDL_Swap16(Uint16 x)
-{
-  __asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
-    return x;
-}
-#elif (defined(__powerpc__) || defined(__ppc__))
-SDL_FORCE_INLINE Uint16
-SDL_Swap16(Uint16 x)
-{
-    int result;
-
-  __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
-    return (Uint16)result;
-}
-#elif (defined(__m68k__) && !defined(__mcoldfire__))
-SDL_FORCE_INLINE Uint16
-SDL_Swap16(Uint16 x)
-{
-  __asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
-    return x;
-}
-#elif defined(__WATCOMC__) && defined(__386__)
-extern __inline Uint16 SDL_Swap16(Uint16);
-#pragma aux SDL_Swap16 = \
-  "xchg al, ah" \
-  parm   [ax]   \
-  modify [ax];
-#else
-SDL_FORCE_INLINE Uint16
-SDL_Swap16(Uint16 x)
-{
-    return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));
-}
-#endif
-
-#if HAS_BUILTIN_BSWAP32
-#define SDL_Swap32(x) __builtin_bswap32(x)
-#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
-#pragma intrinsic(_byteswap_ulong)
-#define SDL_Swap32(x) _byteswap_ulong(x)
-#elif defined(__i386__) && !HAS_BROKEN_BSWAP
-SDL_FORCE_INLINE Uint32
-SDL_Swap32(Uint32 x)
-{
-  __asm__("bswap %0": "=r"(x):"0"(x));
-    return x;
-}
-#elif defined(__x86_64__)
-SDL_FORCE_INLINE Uint32
-SDL_Swap32(Uint32 x)
-{
-  __asm__("bswapl %0": "=r"(x):"0"(x));
-    return x;
-}
-#elif (defined(__powerpc__) || defined(__ppc__))
-SDL_FORCE_INLINE Uint32
-SDL_Swap32(Uint32 x)
-{
-    Uint32 result;
-
-  __asm__("rlwimi %0,%2,24,16,23": "=&r"(result): "0" (x>>24),  "r"(x));
-  __asm__("rlwimi %0,%2,8,8,15"  : "=&r"(result): "0" (result), "r"(x));
-  __asm__("rlwimi %0,%2,24,0,7"  : "=&r"(result): "0" (result), "r"(x));
-    return result;
-}
-#elif (defined(__m68k__) && !defined(__mcoldfire__))
-SDL_FORCE_INLINE Uint32
-SDL_Swap32(Uint32 x)
-{
-  __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
-    return x;
-}
-#elif defined(__WATCOMC__) && defined(__386__)
-extern __inline Uint32 SDL_Swap32(Uint32);
-#pragma aux SDL_Swap32 = \
-  "bswap eax"  \
-  parm   [eax] \
-  modify [eax];
-#else
-SDL_FORCE_INLINE Uint32
-SDL_Swap32(Uint32 x)
-{
-    return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |
-                                    ((x >> 8) & 0x0000FF00) | (x >> 24)));
-}
-#endif
-
-#if HAS_BUILTIN_BSWAP64
-#define SDL_Swap64(x) __builtin_bswap64(x)
-#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
-#pragma intrinsic(_byteswap_uint64)
-#define SDL_Swap64(x) _byteswap_uint64(x)
-#elif defined(__i386__) && !HAS_BROKEN_BSWAP
-SDL_FORCE_INLINE Uint64
-SDL_Swap64(Uint64 x)
-{
-    union {
-        struct {
-            Uint32 a, b;
-        } s;
-        Uint64 u;
-    } v;
-    v.u = x;
-  __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
-          : "=r"(v.s.a), "=r"(v.s.b)
-          : "0" (v.s.a),  "1"(v.s.b));
-    return v.u;
-}
-#elif defined(__x86_64__)
-SDL_FORCE_INLINE Uint64
-SDL_Swap64(Uint64 x)
-{
-  __asm__("bswapq %0": "=r"(x):"0"(x));
-    return x;
-}
-#elif defined(__WATCOMC__) && defined(__386__)
-extern __inline Uint64 SDL_Swap64(Uint64);
-#pragma aux SDL_Swap64 = \
-  "bswap eax"     \
-  "bswap edx"     \
-  "xchg eax,edx"  \
-  parm [eax edx]  \
-  modify [eax edx];
-#else
-SDL_FORCE_INLINE Uint64
-SDL_Swap64(Uint64 x)
-{
-    Uint32 hi, lo;
-
-    /* Separate into high and low 32-bit values and swap them */
-    lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
-    x >>= 32;
-    hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
-    x = SDL_Swap32(lo);
-    x <<= 32;
-    x |= SDL_Swap32(hi);
-    return (x);
-}
-#endif
-
-
-SDL_FORCE_INLINE float
-SDL_SwapFloat(float x)
-{
-    union {
-        float f;
-        Uint32 ui32;
-    } swapper;
-    swapper.f = x;
-    swapper.ui32 = SDL_Swap32(swapper.ui32);
-    return swapper.f;
-}
-
-/* remove extra macros */
-#undef HAS_BROKEN_BSWAP
-#undef HAS_BUILTIN_BSWAP16
-#undef HAS_BUILTIN_BSWAP32
-#undef HAS_BUILTIN_BSWAP64
-
-/**
- *  \name Swap to native
- *  Byteswap item from the specified endianness to the native endianness.
- */
-/* @{ */
-#if SDL_BYTEORDER == SDL_LIL_ENDIAN
-#define SDL_SwapLE16(X)     (X)
-#define SDL_SwapLE32(X)     (X)
-#define SDL_SwapLE64(X)     (X)
-#define SDL_SwapFloatLE(X)  (X)
-#define SDL_SwapBE16(X)     SDL_Swap16(X)
-#define SDL_SwapBE32(X)     SDL_Swap32(X)
-#define SDL_SwapBE64(X)     SDL_Swap64(X)
-#define SDL_SwapFloatBE(X)  SDL_SwapFloat(X)
-#else
-#define SDL_SwapLE16(X)     SDL_Swap16(X)
-#define SDL_SwapLE32(X)     SDL_Swap32(X)
-#define SDL_SwapLE64(X)     SDL_Swap64(X)
-#define SDL_SwapFloatLE(X)  SDL_SwapFloat(X)
-#define SDL_SwapBE16(X)     (X)
-#define SDL_SwapBE32(X)     (X)
-#define SDL_SwapBE64(X)     (X)
-#define SDL_SwapFloatBE(X)  (X)
-#endif
-/* @} *//* Swap to native */
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_endian_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_error.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_error.h
deleted file mode 100644 (file)
index 5c961e4..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_error.h
- *
- *  Simple error message routines for SDL.
- */
-
-#ifndef SDL_error_h_
-#define SDL_error_h_
-
-#include "SDL_stdinc.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Public functions */
-
-
-/**
- * Set the SDL error message for the current thread.
- *
- * Calling this function will replace any previous error message that was set.
- *
- * This function always returns -1, since SDL frequently uses -1 to signify an
- * failing result, leading to this idiom:
- *
- * ```c
- * if (error_code) {
- *     return SDL_SetError("This operation has failed: %d", error_code);
- * }
- * ```
- *
- * \param fmt a printf()-style message format string
- * \param ... additional parameters matching % tokens in the `fmt` string, if
- *            any
- * \returns always -1.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ClearError
- * \sa SDL_GetError
- */
-extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
-
-/**
- * Retrieve a message about the last error that occurred on the current
- * thread.
- *
- * It is possible for multiple errors to occur before calling SDL_GetError().
- * Only the last error is returned.
- *
- * The message is only applicable when an SDL function has signaled an error.
- * You must check the return values of SDL function calls to determine when to
- * appropriately call SDL_GetError(). You should *not* use the results of
- * SDL_GetError() to decide if an error has occurred! Sometimes SDL will set
- * an error string even when reporting success.
- *
- * SDL will *not* clear the error string for successful API calls. You *must*
- * check return values for failure cases before you can assume the error
- * string applies.
- *
- * Error strings are set per-thread, so an error set in a different thread
- * will not interfere with the current thread's operation.
- *
- * The returned string is internally allocated and must not be freed by the
- * application.
- *
- * \returns a message with information about the specific error that occurred,
- *          or an empty string if there hasn't been an error message set since
- *          the last call to SDL_ClearError(). The message is only applicable
- *          when an SDL function has signaled an error. You must check the
- *          return values of SDL function calls to determine when to
- *          appropriately call SDL_GetError().
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ClearError
- * \sa SDL_SetError
- */
-extern DECLSPEC const char *SDLCALL SDL_GetError(void);
-
-/**
- * Get the last error message that was set for the current thread.
- *
- * This allows the caller to copy the error string into a provided buffer, but
- * otherwise operates exactly the same as SDL_GetError().
- *
- * \param errstr A buffer to fill with the last error message that was set for
- *               the current thread
- * \param maxlen The size of the buffer pointed to by the errstr parameter
- * \returns the pointer passed in as the `errstr` parameter.
- *
- * \since This function is available since SDL 2.0.14.
- *
- * \sa SDL_GetError
- */
-extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
-
-/**
- * Clear any previous error message for this thread.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetError
- * \sa SDL_SetError
- */
-extern DECLSPEC void SDLCALL SDL_ClearError(void);
-
-/**
- *  \name Internal error functions
- *
- *  \internal
- *  Private error reporting function - used internally.
- */
-/* @{ */
-#define SDL_OutOfMemory()   SDL_Error(SDL_ENOMEM)
-#define SDL_Unsupported()   SDL_Error(SDL_UNSUPPORTED)
-#define SDL_InvalidParamError(param)    SDL_SetError("Parameter '%s' is invalid", (param))
-typedef enum
-{
-    SDL_ENOMEM,
-    SDL_EFREAD,
-    SDL_EFWRITE,
-    SDL_EFSEEK,
-    SDL_UNSUPPORTED,
-    SDL_LASTERROR
-} SDL_errorcode;
-/* SDL_Error() unconditionally returns -1. */
-extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);
-/* @} *//* Internal error functions */
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_error_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_events.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_events.h
deleted file mode 100644 (file)
index 7e46907..0000000
+++ /dev/null
@@ -1,1150 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_events.h
- *
- *  Include file for SDL event handling.
- */
-
-#ifndef SDL_events_h_
-#define SDL_events_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-#include "SDL_video.h"
-#include "SDL_keyboard.h"
-#include "SDL_mouse.h"
-#include "SDL_joystick.h"
-#include "SDL_gamecontroller.h"
-#include "SDL_quit.h"
-#include "SDL_gesture.h"
-#include "SDL_touch.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* General keyboard/mouse state definitions */
-#define SDL_RELEASED    0
-#define SDL_PRESSED 1
-
-/**
- * The types of events that can be delivered.
- */
-typedef enum
-{
-    SDL_FIRSTEVENT     = 0,     /**< Unused (do not remove) */
-
-    /* Application events */
-    SDL_QUIT           = 0x100, /**< User-requested quit */
-
-    /* These application events have special meaning on iOS, see README-ios.md for details */
-    SDL_APP_TERMINATING,        /**< The application is being terminated by the OS
-                                     Called on iOS in applicationWillTerminate()
-                                     Called on Android in onDestroy()
-                                */
-    SDL_APP_LOWMEMORY,          /**< The application is low on memory, free memory if possible.
-                                     Called on iOS in applicationDidReceiveMemoryWarning()
-                                     Called on Android in onLowMemory()
-                                */
-    SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background
-                                     Called on iOS in applicationWillResignActive()
-                                     Called on Android in onPause()
-                                */
-    SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time
-                                     Called on iOS in applicationDidEnterBackground()
-                                     Called on Android in onPause()
-                                */
-    SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground
-                                     Called on iOS in applicationWillEnterForeground()
-                                     Called on Android in onResume()
-                                */
-    SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive
-                                     Called on iOS in applicationDidBecomeActive()
-                                     Called on Android in onResume()
-                                */
-
-    SDL_LOCALECHANGED,  /**< The user's locale preferences have changed. */
-
-    /* Display events */
-    SDL_DISPLAYEVENT   = 0x150,  /**< Display state change */
-
-    /* Window events */
-    SDL_WINDOWEVENT    = 0x200, /**< Window state change */
-    SDL_SYSWMEVENT,             /**< System specific event */
-
-    /* Keyboard events */
-    SDL_KEYDOWN        = 0x300, /**< Key pressed */
-    SDL_KEYUP,                  /**< Key released */
-    SDL_TEXTEDITING,            /**< Keyboard text editing (composition) */
-    SDL_TEXTINPUT,              /**< Keyboard text input */
-    SDL_KEYMAPCHANGED,          /**< Keymap changed due to a system event such as an
-                                     input language or keyboard layout change.
-                                */
-    SDL_TEXTEDITING_EXT,       /**< Extended keyboard text editing (composition) */
-
-    /* Mouse events */
-    SDL_MOUSEMOTION    = 0x400, /**< Mouse moved */
-    SDL_MOUSEBUTTONDOWN,        /**< Mouse button pressed */
-    SDL_MOUSEBUTTONUP,          /**< Mouse button released */
-    SDL_MOUSEWHEEL,             /**< Mouse wheel motion */
-
-    /* Joystick events */
-    SDL_JOYAXISMOTION  = 0x600, /**< Joystick axis motion */
-    SDL_JOYBALLMOTION,          /**< Joystick trackball motion */
-    SDL_JOYHATMOTION,           /**< Joystick hat position change */
-    SDL_JOYBUTTONDOWN,          /**< Joystick button pressed */
-    SDL_JOYBUTTONUP,            /**< Joystick button released */
-    SDL_JOYDEVICEADDED,         /**< A new joystick has been inserted into the system */
-    SDL_JOYDEVICEREMOVED,       /**< An opened joystick has been removed */
-
-    /* Game controller events */
-    SDL_CONTROLLERAXISMOTION  = 0x650, /**< Game controller axis motion */
-    SDL_CONTROLLERBUTTONDOWN,          /**< Game controller button pressed */
-    SDL_CONTROLLERBUTTONUP,            /**< Game controller button released */
-    SDL_CONTROLLERDEVICEADDED,         /**< A new Game controller has been inserted into the system */
-    SDL_CONTROLLERDEVICEREMOVED,       /**< An opened Game controller has been removed */
-    SDL_CONTROLLERDEVICEREMAPPED,      /**< The controller mapping was updated */
-    SDL_CONTROLLERTOUCHPADDOWN,        /**< Game controller touchpad was touched */
-    SDL_CONTROLLERTOUCHPADMOTION,      /**< Game controller touchpad finger was moved */
-    SDL_CONTROLLERTOUCHPADUP,          /**< Game controller touchpad finger was lifted */
-    SDL_CONTROLLERSENSORUPDATE,        /**< Game controller sensor was updated */
-
-    /* Touch events */
-    SDL_FINGERDOWN      = 0x700,
-    SDL_FINGERUP,
-    SDL_FINGERMOTION,
-
-    /* Gesture events */
-    SDL_DOLLARGESTURE   = 0x800,
-    SDL_DOLLARRECORD,
-    SDL_MULTIGESTURE,
-
-    /* Clipboard events */
-    SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */
-
-    /* Drag and drop events */
-    SDL_DROPFILE        = 0x1000, /**< The system requests a file open */
-    SDL_DROPTEXT,                 /**< text/plain drag-and-drop event */
-    SDL_DROPBEGIN,                /**< A new set of drops is beginning (NULL filename) */
-    SDL_DROPCOMPLETE,             /**< Current set of drops is now complete (NULL filename) */
-
-    /* Audio hotplug events */
-    SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
-    SDL_AUDIODEVICEREMOVED,        /**< An audio device has been removed. */
-
-    /* Sensor events */
-    SDL_SENSORUPDATE = 0x1200,     /**< A sensor was updated */
-
-    /* Render events */
-    SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
-    SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
-
-    /* Internal events */
-    SDL_POLLSENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */
-
-    /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
-     *  and should be allocated with SDL_RegisterEvents()
-     */
-    SDL_USEREVENT    = 0x8000,
-
-    /**
-     *  This last event is only for bounding internal arrays
-     */
-    SDL_LASTEVENT    = 0xFFFF
-} SDL_EventType;
-
-/**
- *  \brief Fields shared by every event
- */
-typedef struct SDL_CommonEvent
-{
-    Uint32 type;
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-} SDL_CommonEvent;
-
-/**
- *  \brief Display state change event data (event.display.*)
- */
-typedef struct SDL_DisplayEvent
-{
-    Uint32 type;        /**< ::SDL_DISPLAYEVENT */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    Uint32 display;     /**< The associated display index */
-    Uint8 event;        /**< ::SDL_DisplayEventID */
-    Uint8 padding1;
-    Uint8 padding2;
-    Uint8 padding3;
-    Sint32 data1;       /**< event dependent data */
-} SDL_DisplayEvent;
-
-/**
- *  \brief Window state change event data (event.window.*)
- */
-typedef struct SDL_WindowEvent
-{
-    Uint32 type;        /**< ::SDL_WINDOWEVENT */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    Uint32 windowID;    /**< The associated window */
-    Uint8 event;        /**< ::SDL_WindowEventID */
-    Uint8 padding1;
-    Uint8 padding2;
-    Uint8 padding3;
-    Sint32 data1;       /**< event dependent data */
-    Sint32 data2;       /**< event dependent data */
-} SDL_WindowEvent;
-
-/**
- *  \brief Keyboard button event structure (event.key.*)
- */
-typedef struct SDL_KeyboardEvent
-{
-    Uint32 type;        /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    Uint32 windowID;    /**< The window with keyboard focus, if any */
-    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
-    Uint8 repeat;       /**< Non-zero if this is a key repeat */
-    Uint8 padding2;
-    Uint8 padding3;
-    SDL_Keysym keysym;  /**< The key that was pressed or released */
-} SDL_KeyboardEvent;
-
-#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
-/**
- *  \brief Keyboard text editing event structure (event.edit.*)
- */
-typedef struct SDL_TextEditingEvent
-{
-    Uint32 type;                                /**< ::SDL_TEXTEDITING */
-    Uint32 timestamp;                           /**< In milliseconds, populated using SDL_GetTicks() */
-    Uint32 windowID;                            /**< The window with keyboard focus, if any */
-    char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE];  /**< The editing text */
-    Sint32 start;                               /**< The start cursor of selected editing text */
-    Sint32 length;                              /**< The length of selected editing text */
-} SDL_TextEditingEvent;
-
-/**
- *  \brief Extended keyboard text editing event structure (event.editExt.*) when text would be
- *  truncated if stored in the text buffer SDL_TextEditingEvent
- */
-typedef struct SDL_TextEditingExtEvent
-{
-    Uint32 type;                                /**< ::SDL_TEXTEDITING_EXT */
-    Uint32 timestamp;                           /**< In milliseconds, populated using SDL_GetTicks() */
-    Uint32 windowID;                            /**< The window with keyboard focus, if any */
-    char* text;                                 /**< The editing text, which should be freed with SDL_free(), and will not be NULL */
-    Sint32 start;                               /**< The start cursor of selected editing text */
-    Sint32 length;                              /**< The length of selected editing text */
-} SDL_TextEditingExtEvent;
-
-#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
-/**
- *  \brief Keyboard text input event structure (event.text.*)
- */
-typedef struct SDL_TextInputEvent
-{
-    Uint32 type;                              /**< ::SDL_TEXTINPUT */
-    Uint32 timestamp;                         /**< In milliseconds, populated using SDL_GetTicks() */
-    Uint32 windowID;                          /**< The window with keyboard focus, if any */
-    char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];  /**< The input text */
-} SDL_TextInputEvent;
-
-/**
- *  \brief Mouse motion event structure (event.motion.*)
- */
-typedef struct SDL_MouseMotionEvent
-{
-    Uint32 type;        /**< ::SDL_MOUSEMOTION */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    Uint32 windowID;    /**< The window with mouse focus, if any */
-    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
-    Uint32 state;       /**< The current button state */
-    Sint32 x;           /**< X coordinate, relative to window */
-    Sint32 y;           /**< Y coordinate, relative to window */
-    Sint32 xrel;        /**< The relative motion in the X direction */
-    Sint32 yrel;        /**< The relative motion in the Y direction */
-} SDL_MouseMotionEvent;
-
-/**
- *  \brief Mouse button event structure (event.button.*)
- */
-typedef struct SDL_MouseButtonEvent
-{
-    Uint32 type;        /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    Uint32 windowID;    /**< The window with mouse focus, if any */
-    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
-    Uint8 button;       /**< The mouse button index */
-    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
-    Uint8 clicks;       /**< 1 for single-click, 2 for double-click, etc. */
-    Uint8 padding1;
-    Sint32 x;           /**< X coordinate, relative to window */
-    Sint32 y;           /**< Y coordinate, relative to window */
-} SDL_MouseButtonEvent;
-
-/**
- *  \brief Mouse wheel event structure (event.wheel.*)
- */
-typedef struct SDL_MouseWheelEvent
-{
-    Uint32 type;        /**< ::SDL_MOUSEWHEEL */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    Uint32 windowID;    /**< The window with mouse focus, if any */
-    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
-    Sint32 x;           /**< The amount scrolled horizontally, positive to the right and negative to the left */
-    Sint32 y;           /**< The amount scrolled vertically, positive away from the user and negative toward the user */
-    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 */
-    float preciseX;     /**< The amount scrolled horizontally, positive to the right and negative to the left, with float precision (added in 2.0.18) */
-    float preciseY;     /**< The amount scrolled vertically, positive away from the user and negative toward the user, with float precision (added in 2.0.18) */
-} SDL_MouseWheelEvent;
-
-/**
- *  \brief Joystick axis motion event structure (event.jaxis.*)
- */
-typedef struct SDL_JoyAxisEvent
-{
-    Uint32 type;        /**< ::SDL_JOYAXISMOTION */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    SDL_JoystickID which; /**< The joystick instance id */
-    Uint8 axis;         /**< The joystick axis index */
-    Uint8 padding1;
-    Uint8 padding2;
-    Uint8 padding3;
-    Sint16 value;       /**< The axis value (range: -32768 to 32767) */
-    Uint16 padding4;
-} SDL_JoyAxisEvent;
-
-/**
- *  \brief Joystick trackball motion event structure (event.jball.*)
- */
-typedef struct SDL_JoyBallEvent
-{
-    Uint32 type;        /**< ::SDL_JOYBALLMOTION */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    SDL_JoystickID which; /**< The joystick instance id */
-    Uint8 ball;         /**< The joystick trackball index */
-    Uint8 padding1;
-    Uint8 padding2;
-    Uint8 padding3;
-    Sint16 xrel;        /**< The relative motion in the X direction */
-    Sint16 yrel;        /**< The relative motion in the Y direction */
-} SDL_JoyBallEvent;
-
-/**
- *  \brief Joystick hat position change event structure (event.jhat.*)
- */
-typedef struct SDL_JoyHatEvent
-{
-    Uint32 type;        /**< ::SDL_JOYHATMOTION */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    SDL_JoystickID which; /**< The joystick instance id */
-    Uint8 hat;          /**< The joystick hat index */
-    Uint8 value;        /**< The hat position value.
-                         *   \sa ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP
-                         *   \sa ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT
-                         *   \sa ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN
-                         *
-                         *   Note that zero means the POV is centered.
-                         */
-    Uint8 padding1;
-    Uint8 padding2;
-} SDL_JoyHatEvent;
-
-/**
- *  \brief Joystick button event structure (event.jbutton.*)
- */
-typedef struct SDL_JoyButtonEvent
-{
-    Uint32 type;        /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    SDL_JoystickID which; /**< The joystick instance id */
-    Uint8 button;       /**< The joystick button index */
-    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
-    Uint8 padding1;
-    Uint8 padding2;
-} SDL_JoyButtonEvent;
-
-/**
- *  \brief Joystick device event structure (event.jdevice.*)
- */
-typedef struct SDL_JoyDeviceEvent
-{
-    Uint32 type;        /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    Sint32 which;       /**< The joystick device index for the ADDED event, instance id for the REMOVED event */
-} SDL_JoyDeviceEvent;
-
-
-/**
- *  \brief Game controller axis motion event structure (event.caxis.*)
- */
-typedef struct SDL_ControllerAxisEvent
-{
-    Uint32 type;        /**< ::SDL_CONTROLLERAXISMOTION */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    SDL_JoystickID which; /**< The joystick instance id */
-    Uint8 axis;         /**< The controller axis (SDL_GameControllerAxis) */
-    Uint8 padding1;
-    Uint8 padding2;
-    Uint8 padding3;
-    Sint16 value;       /**< The axis value (range: -32768 to 32767) */
-    Uint16 padding4;
-} SDL_ControllerAxisEvent;
-
-
-/**
- *  \brief Game controller button event structure (event.cbutton.*)
- */
-typedef struct SDL_ControllerButtonEvent
-{
-    Uint32 type;        /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    SDL_JoystickID which; /**< The joystick instance id */
-    Uint8 button;       /**< The controller button (SDL_GameControllerButton) */
-    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
-    Uint8 padding1;
-    Uint8 padding2;
-} SDL_ControllerButtonEvent;
-
-
-/**
- *  \brief Controller device event structure (event.cdevice.*)
- */
-typedef struct SDL_ControllerDeviceEvent
-{
-    Uint32 type;        /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    Sint32 which;       /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
-} SDL_ControllerDeviceEvent;
-
-/**
- *  \brief Game controller touchpad event structure (event.ctouchpad.*)
- */
-typedef struct SDL_ControllerTouchpadEvent
-{
-    Uint32 type;        /**< ::SDL_CONTROLLERTOUCHPADDOWN or ::SDL_CONTROLLERTOUCHPADMOTION or ::SDL_CONTROLLERTOUCHPADUP */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    SDL_JoystickID which; /**< The joystick instance id */
-    Sint32 touchpad;    /**< The index of the touchpad */
-    Sint32 finger;      /**< The index of the finger on the touchpad */
-    float x;            /**< Normalized in the range 0...1 with 0 being on the left */
-    float y;            /**< Normalized in the range 0...1 with 0 being at the top */
-    float pressure;     /**< Normalized in the range 0...1 */
-} SDL_ControllerTouchpadEvent;
-
-/**
- *  \brief Game controller sensor event structure (event.csensor.*)
- */
-typedef struct SDL_ControllerSensorEvent
-{
-    Uint32 type;        /**< ::SDL_CONTROLLERSENSORUPDATE */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    SDL_JoystickID which; /**< The joystick instance id */
-    Sint32 sensor;      /**< The type of the sensor, one of the values of ::SDL_SensorType */
-    float data[3];      /**< Up to 3 values from the sensor, as defined in SDL_sensor.h */
-} SDL_ControllerSensorEvent;
-
-/**
- *  \brief Audio device event structure (event.adevice.*)
- */
-typedef struct SDL_AudioDeviceEvent
-{
-    Uint32 type;        /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    Uint32 which;       /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */
-    Uint8 iscapture;    /**< zero if an output device, non-zero if a capture device. */
-    Uint8 padding1;
-    Uint8 padding2;
-    Uint8 padding3;
-} SDL_AudioDeviceEvent;
-
-
-/**
- *  \brief Touch finger event structure (event.tfinger.*)
- */
-typedef struct SDL_TouchFingerEvent
-{
-    Uint32 type;        /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    SDL_TouchID touchId; /**< The touch device id */
-    SDL_FingerID fingerId;
-    float x;            /**< Normalized in the range 0...1 */
-    float y;            /**< Normalized in the range 0...1 */
-    float dx;           /**< Normalized in the range -1...1 */
-    float dy;           /**< Normalized in the range -1...1 */
-    float pressure;     /**< Normalized in the range 0...1 */
-    Uint32 windowID;    /**< The window underneath the finger, if any */
-} SDL_TouchFingerEvent;
-
-
-/**
- *  \brief Multiple Finger Gesture Event (event.mgesture.*)
- */
-typedef struct SDL_MultiGestureEvent
-{
-    Uint32 type;        /**< ::SDL_MULTIGESTURE */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    SDL_TouchID touchId; /**< The touch device id */
-    float dTheta;
-    float dDist;
-    float x;
-    float y;
-    Uint16 numFingers;
-    Uint16 padding;
-} SDL_MultiGestureEvent;
-
-
-/**
- * \brief Dollar Gesture Event (event.dgesture.*)
- */
-typedef struct SDL_DollarGestureEvent
-{
-    Uint32 type;        /**< ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    SDL_TouchID touchId; /**< The touch device id */
-    SDL_GestureID gestureId;
-    Uint32 numFingers;
-    float error;
-    float x;            /**< Normalized center of gesture */
-    float y;            /**< Normalized center of gesture */
-} SDL_DollarGestureEvent;
-
-
-/**
- *  \brief An event used to request a file open by the system (event.drop.*)
- *         This event is enabled by default, you can disable it with SDL_EventState().
- *  \note If this event is enabled, you must free the filename in the event.
- */
-typedef struct SDL_DropEvent
-{
-    Uint32 type;        /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    char *file;         /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
-    Uint32 windowID;    /**< The window that was dropped on, if any */
-} SDL_DropEvent;
-
-
-/**
- *  \brief Sensor event structure (event.sensor.*)
- */
-typedef struct SDL_SensorEvent
-{
-    Uint32 type;        /**< ::SDL_SENSORUPDATE */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    Sint32 which;       /**< The instance ID of the sensor */
-    float data[6];      /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
-} SDL_SensorEvent;
-
-/**
- *  \brief The "quit requested" event
- */
-typedef struct SDL_QuitEvent
-{
-    Uint32 type;        /**< ::SDL_QUIT */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-} SDL_QuitEvent;
-
-/**
- *  \brief OS Specific event
- */
-typedef struct SDL_OSEvent
-{
-    Uint32 type;        /**< ::SDL_QUIT */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-} SDL_OSEvent;
-
-/**
- *  \brief A user-defined event type (event.user.*)
- */
-typedef struct SDL_UserEvent
-{
-    Uint32 type;        /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    Uint32 windowID;    /**< The associated window if any */
-    Sint32 code;        /**< User defined event code */
-    void *data1;        /**< User defined data pointer */
-    void *data2;        /**< User defined data pointer */
-} SDL_UserEvent;
-
-
-struct SDL_SysWMmsg;
-typedef struct SDL_SysWMmsg SDL_SysWMmsg;
-
-/**
- *  \brief A video driver dependent system event (event.syswm.*)
- *         This event is disabled by default, you can enable it with SDL_EventState()
- *
- *  \note If you want to use this event, you should include SDL_syswm.h.
- */
-typedef struct SDL_SysWMEvent
-{
-    Uint32 type;        /**< ::SDL_SYSWMEVENT */
-    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
-    SDL_SysWMmsg *msg;  /**< driver dependent data, defined in SDL_syswm.h */
-} SDL_SysWMEvent;
-
-/**
- *  \brief General event structure
- */
-typedef union SDL_Event
-{
-    Uint32 type;                            /**< Event type, shared with all events */
-    SDL_CommonEvent common;                 /**< Common event data */
-    SDL_DisplayEvent display;               /**< Display event data */
-    SDL_WindowEvent window;                 /**< Window event data */
-    SDL_KeyboardEvent key;                  /**< Keyboard event data */
-    SDL_TextEditingEvent edit;              /**< Text editing event data */
-    SDL_TextEditingExtEvent editExt;        /**< Extended text editing event data */
-    SDL_TextInputEvent text;                /**< Text input event data */
-    SDL_MouseMotionEvent motion;            /**< Mouse motion event data */
-    SDL_MouseButtonEvent button;            /**< Mouse button event data */
-    SDL_MouseWheelEvent wheel;              /**< Mouse wheel event data */
-    SDL_JoyAxisEvent jaxis;                 /**< Joystick axis event data */
-    SDL_JoyBallEvent jball;                 /**< Joystick ball event data */
-    SDL_JoyHatEvent jhat;                   /**< Joystick hat event data */
-    SDL_JoyButtonEvent jbutton;             /**< Joystick button event data */
-    SDL_JoyDeviceEvent jdevice;             /**< Joystick device change event data */
-    SDL_ControllerAxisEvent caxis;          /**< Game Controller axis event data */
-    SDL_ControllerButtonEvent cbutton;      /**< Game Controller button event data */
-    SDL_ControllerDeviceEvent cdevice;      /**< Game Controller device event data */
-    SDL_ControllerTouchpadEvent ctouchpad;  /**< Game Controller touchpad event data */
-    SDL_ControllerSensorEvent csensor;      /**< Game Controller sensor event data */
-    SDL_AudioDeviceEvent adevice;           /**< Audio device event data */
-    SDL_SensorEvent sensor;                 /**< Sensor event data */
-    SDL_QuitEvent quit;                     /**< Quit request event data */
-    SDL_UserEvent user;                     /**< Custom event data */
-    SDL_SysWMEvent syswm;                   /**< System dependent window event data */
-    SDL_TouchFingerEvent tfinger;           /**< Touch finger event data */
-    SDL_MultiGestureEvent mgesture;         /**< Gesture event data */
-    SDL_DollarGestureEvent dgesture;        /**< Gesture event data */
-    SDL_DropEvent drop;                     /**< Drag and drop event data */
-
-    /* This is necessary for ABI compatibility between Visual C++ and GCC.
-       Visual C++ will respect the push pack pragma and use 52 bytes (size of
-       SDL_TextEditingEvent, the largest structure for 32-bit and 64-bit
-       architectures) for this union, and GCC will use the alignment of the
-       largest datatype within the union, which is 8 bytes on 64-bit
-       architectures.
-
-       So... we'll add padding to force the size to be 56 bytes for both.
-
-       On architectures where pointers are 16 bytes, this needs rounding up to
-       the next multiple of 16, 64, and on architectures where pointers are
-       even larger the size of SDL_UserEvent will dominate as being 3 pointers.
-    */
-    Uint8 padding[sizeof(void *) <= 8 ? 56 : sizeof(void *) == 16 ? 64 : 3 * sizeof(void *)];
-} SDL_Event;
-
-/* Make sure we haven't broken binary compatibility */
-SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NULL)->padding));
-
-
-/* Function prototypes */
-
-/**
- * Pump the event loop, gathering events from the input devices.
- *
- * This function updates the event queue and internal input device state.
- *
- * **WARNING**: This should only be run in the thread that initialized the
- * video subsystem, and for extra safety, you should consider only doing those
- * things on the main thread in any case.
- *
- * SDL_PumpEvents() gathers all the pending input information from devices and
- * places it in the event queue. Without calls to SDL_PumpEvents() no events
- * would ever be placed on the queue. Often the need for calls to
- * SDL_PumpEvents() is hidden from the user since SDL_PollEvent() and
- * SDL_WaitEvent() implicitly call SDL_PumpEvents(). However, if you are not
- * polling or waiting for events (e.g. you are filtering them), then you must
- * call SDL_PumpEvents() to force an event queue update.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_PollEvent
- * \sa SDL_WaitEvent
- */
-extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
-
-/* @{ */
-typedef enum
-{
-    SDL_ADDEVENT,
-    SDL_PEEKEVENT,
-    SDL_GETEVENT
-} SDL_eventaction;
-
-/**
- * Check the event queue for messages and optionally return them.
- *
- * `action` may be any of the following:
- *
- * - `SDL_ADDEVENT`: up to `numevents` events will be added to the back of the
- *   event queue.
- * - `SDL_PEEKEVENT`: `numevents` events at the front of the event queue,
- *   within the specified minimum and maximum type, will be returned to the
- *   caller and will _not_ be removed from the queue.
- * - `SDL_GETEVENT`: up to `numevents` events at the front of the event queue,
- *   within the specified minimum and maximum type, will be returned to the
- *   caller and will be removed from the queue.
- *
- * You may have to call SDL_PumpEvents() before calling this function.
- * Otherwise, the events may not be ready to be filtered when you call
- * SDL_PeepEvents().
- *
- * This function is thread-safe.
- *
- * \param events destination buffer for the retrieved events
- * \param numevents if action is SDL_ADDEVENT, the number of events to add
- *                  back to the event queue; if action is SDL_PEEKEVENT or
- *                  SDL_GETEVENT, the maximum number of events to retrieve
- * \param action action to take; see [[#action|Remarks]] for details
- * \param minType minimum value of the event type to be considered;
- *                SDL_FIRSTEVENT is a safe choice
- * \param maxType maximum value of the event type to be considered;
- *                SDL_LASTEVENT is a safe choice
- * \returns the number of events actually stored or a negative error code on
- *          failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_PollEvent
- * \sa SDL_PumpEvents
- * \sa SDL_PushEvent
- */
-extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
-                                           SDL_eventaction action,
-                                           Uint32 minType, Uint32 maxType);
-/* @} */
-
-/**
- * Check for the existence of a certain event type in the event queue.
- *
- * If you need to check for a range of event types, use SDL_HasEvents()
- * instead.
- *
- * \param type the type of event to be queried; see SDL_EventType for details
- * \returns SDL_TRUE if events matching `type` are present, or SDL_FALSE if
- *          events matching `type` are not present.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HasEvents
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
-
-
-/**
- * Check for the existence of certain event types in the event queue.
- *
- * If you need to check for a single event type, use SDL_HasEvent() instead.
- *
- * \param minType the low end of event type to be queried, inclusive; see
- *                SDL_EventType for details
- * \param maxType the high end of event type to be queried, inclusive; see
- *                SDL_EventType for details
- * \returns SDL_TRUE if events with type >= `minType` and <= `maxType` are
- *          present, or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HasEvents
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
-
-/**
- * Clear events of a specific type from the event queue.
- *
- * This will unconditionally remove any events from the queue that match
- * `type`. If you need to remove a range of event types, use SDL_FlushEvents()
- * instead.
- *
- * It's also normal to just ignore events you don't care about in your event
- * loop without calling this function.
- *
- * This function only affects currently queued events. If you want to make
- * sure that all pending OS events are flushed, you can call SDL_PumpEvents()
- * on the main thread immediately before the flush call.
- *
- * \param type the type of event to be cleared; see SDL_EventType for details
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_FlushEvents
- */
-extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
-
-/**
- * Clear events of a range of types from the event queue.
- *
- * This will unconditionally remove any events from the queue that are in the
- * range of `minType` to `maxType`, inclusive. If you need to remove a single
- * event type, use SDL_FlushEvent() instead.
- *
- * It's also normal to just ignore events you don't care about in your event
- * loop without calling this function.
- *
- * This function only affects currently queued events. If you want to make
- * sure that all pending OS events are flushed, you can call SDL_PumpEvents()
- * on the main thread immediately before the flush call.
- *
- * \param minType the low end of event type to be cleared, inclusive; see
- *                SDL_EventType for details
- * \param maxType the high end of event type to be cleared, inclusive; see
- *                SDL_EventType for details
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_FlushEvent
- */
-extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
-
-/**
- * Poll for currently pending events.
- *
- * If `event` is not NULL, the next event is removed from the queue and stored
- * in the SDL_Event structure pointed to by `event`. The 1 returned refers to
- * this event, immediately stored in the SDL Event structure -- not an event
- * to follow.
- *
- * If `event` is NULL, it simply returns 1 if there is an event in the queue,
- * but will not remove it from the queue.
- *
- * As this function may implicitly call SDL_PumpEvents(), you can only call
- * this function in the thread that set the video mode.
- *
- * SDL_PollEvent() is the favored way of receiving system events since it can
- * be done from the main loop and does not suspend the main loop while waiting
- * on an event to be posted.
- *
- * The common practice is to fully process the event queue once every frame,
- * usually as a first step before updating the game's state:
- *
- * ```c
- * while (game_is_still_running) {
- *     SDL_Event event;
- *     while (SDL_PollEvent(&event)) {  // poll until all events are handled!
- *         // decide what to do with this event.
- *     }
- *
- *     // update game state, draw the current frame
- * }
- * ```
- *
- * \param event the SDL_Event structure to be filled with the next event from
- *              the queue, or NULL
- * \returns 1 if there is a pending event or 0 if there are none available.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetEventFilter
- * \sa SDL_PeepEvents
- * \sa SDL_PushEvent
- * \sa SDL_SetEventFilter
- * \sa SDL_WaitEvent
- * \sa SDL_WaitEventTimeout
- */
-extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
-
-/**
- * Wait indefinitely for the next available event.
- *
- * If `event` is not NULL, the next event is removed from the queue and stored
- * in the SDL_Event structure pointed to by `event`.
- *
- * As this function may implicitly call SDL_PumpEvents(), you can only call
- * this function in the thread that initialized the video subsystem.
- *
- * \param event the SDL_Event structure to be filled in with the next event
- *              from the queue, or NULL
- * \returns 1 on success or 0 if there was an error while waiting for events;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_PollEvent
- * \sa SDL_PumpEvents
- * \sa SDL_WaitEventTimeout
- */
-extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
-
-/**
- * Wait until the specified timeout (in milliseconds) for the next available
- * event.
- *
- * If `event` is not NULL, the next event is removed from the queue and stored
- * in the SDL_Event structure pointed to by `event`.
- *
- * As this function may implicitly call SDL_PumpEvents(), you can only call
- * this function in the thread that initialized the video subsystem.
- *
- * \param event the SDL_Event structure to be filled in with the next event
- *              from the queue, or NULL
- * \param timeout the maximum number of milliseconds to wait for the next
- *                available event
- * \returns 1 on success or 0 if there was an error while waiting for events;
- *          call SDL_GetError() for more information. This also returns 0 if
- *          the timeout elapsed without an event arriving.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_PollEvent
- * \sa SDL_PumpEvents
- * \sa SDL_WaitEvent
- */
-extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
-                                                 int timeout);
-
-/**
- * Add an event to the event queue.
- *
- * The event queue can actually be used as a two way communication channel.
- * Not only can events be read from the queue, but the user can also push
- * their own events onto it. `event` is a pointer to the event structure you
- * wish to push onto the queue. The event is copied into the queue, and the
- * caller may dispose of the memory pointed to after SDL_PushEvent() returns.
- *
- * Note: Pushing device input events onto the queue doesn't modify the state
- * of the device within SDL.
- *
- * This function is thread-safe, and can be called from other threads safely.
- *
- * Note: Events pushed onto the queue with SDL_PushEvent() get passed through
- * the event filter but events added with SDL_PeepEvents() do not.
- *
- * For pushing application-specific events, please use SDL_RegisterEvents() to
- * get an event type that does not conflict with other code that also wants
- * its own custom event types.
- *
- * \param event the SDL_Event to be added to the queue
- * \returns 1 on success, 0 if the event was filtered, or a negative error
- *          code on failure; call SDL_GetError() for more information. A
- *          common reason for error is the event queue being full.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_PeepEvents
- * \sa SDL_PollEvent
- * \sa SDL_RegisterEvents
- */
-extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
-
-/**
- * A function pointer used for callbacks that watch the event queue.
- *
- * \param userdata what was passed as `userdata` to SDL_SetEventFilter()
- *        or SDL_AddEventWatch, etc
- * \param event the event that triggered the callback
- * \returns 1 to permit event to be added to the queue, and 0 to disallow
- *          it. When used with SDL_AddEventWatch, the return value is ignored.
- *
- * \sa SDL_SetEventFilter
- * \sa SDL_AddEventWatch
- */
-typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
-
-/**
- * Set up a filter to process all events before they change internal state and
- * are posted to the internal event queue.
- *
- * If the filter function returns 1 when called, then the event will be added
- * to the internal queue. If it returns 0, then the event will be dropped from
- * the queue, but the internal state will still be updated. This allows
- * selective filtering of dynamically arriving events.
- *
- * **WARNING**: Be very careful of what you do in the event filter function,
- * as it may run in a different thread!
- *
- * On platforms that support it, if the quit event is generated by an
- * interrupt signal (e.g. pressing Ctrl-C), it will be delivered to the
- * application at the next event poll.
- *
- * There is one caveat when dealing with the ::SDL_QuitEvent event type. The
- * event filter is only called when the window manager desires to close the
- * application window. If the event filter returns 1, then the window will be
- * closed, otherwise the window will remain open if possible.
- *
- * Note: Disabled events never make it to the event filter function; see
- * SDL_EventState().
- *
- * Note: If you just want to inspect events without filtering, you should use
- * SDL_AddEventWatch() instead.
- *
- * Note: Events pushed onto the queue with SDL_PushEvent() get passed through
- * the event filter, but events pushed onto the queue with SDL_PeepEvents() do
- * not.
- *
- * \param filter An SDL_EventFilter function to call when an event happens
- * \param userdata a pointer that is passed to `filter`
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AddEventWatch
- * \sa SDL_EventState
- * \sa SDL_GetEventFilter
- * \sa SDL_PeepEvents
- * \sa SDL_PushEvent
- */
-extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
-                                                void *userdata);
-
-/**
- * Query the current event filter.
- *
- * This function can be used to "chain" filters, by saving the existing filter
- * before replacing it with a function that will call that saved filter.
- *
- * \param filter the current callback function will be stored here
- * \param userdata the pointer that is passed to the current event filter will
- *                 be stored here
- * \returns SDL_TRUE on success or SDL_FALSE if there is no event filter set.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetEventFilter
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
-                                                    void **userdata);
-
-/**
- * Add a callback to be triggered when an event is added to the event queue.
- *
- * `filter` will be called when an event happens, and its return value is
- * ignored.
- *
- * **WARNING**: Be very careful of what you do in the event filter function,
- * as it may run in a different thread!
- *
- * If the quit event is generated by a signal (e.g. SIGINT), it will bypass
- * the internal queue and be delivered to the watch callback immediately, and
- * arrive at the next event poll.
- *
- * Note: the callback is called for events posted by the user through
- * SDL_PushEvent(), but not for disabled events, nor for events by a filter
- * callback set with SDL_SetEventFilter(), nor for events posted by the user
- * through SDL_PeepEvents().
- *
- * \param filter an SDL_EventFilter function to call when an event happens.
- * \param userdata a pointer that is passed to `filter`
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_DelEventWatch
- * \sa SDL_SetEventFilter
- */
-extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
-                                               void *userdata);
-
-/**
- * Remove an event watch callback added with SDL_AddEventWatch().
- *
- * This function takes the same input as SDL_AddEventWatch() to identify and
- * delete the corresponding callback.
- *
- * \param filter the function originally passed to SDL_AddEventWatch()
- * \param userdata the pointer originally passed to SDL_AddEventWatch()
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AddEventWatch
- */
-extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
-                                               void *userdata);
-
-/**
- * Run a specific filter function on the current event queue, removing any
- * events for which the filter returns 0.
- *
- * See SDL_SetEventFilter() for more information. Unlike SDL_SetEventFilter(),
- * this function does not change the filter permanently, it only uses the
- * supplied filter until this function returns.
- *
- * \param filter the SDL_EventFilter function to call when an event happens
- * \param userdata a pointer that is passed to `filter`
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetEventFilter
- * \sa SDL_SetEventFilter
- */
-extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
-                                              void *userdata);
-
-/* @{ */
-#define SDL_QUERY   -1
-#define SDL_IGNORE   0
-#define SDL_DISABLE  0
-#define SDL_ENABLE   1
-
-/**
- * Set the state of processing events by type.
- *
- * `state` may be any of the following:
- *
- * - `SDL_QUERY`: returns the current processing state of the specified event
- * - `SDL_IGNORE` (aka `SDL_DISABLE`): the event will automatically be dropped
- *   from the event queue and will not be filtered
- * - `SDL_ENABLE`: the event will be processed normally
- *
- * \param type the type of event; see SDL_EventType for details
- * \param state how to process the event
- * \returns `SDL_DISABLE` or `SDL_ENABLE`, representing the processing state
- *          of the event before this function makes any changes to it.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetEventState
- */
-extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
-/* @} */
-#define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
-
-/**
- * Allocate a set of user-defined events, and return the beginning event
- * number for that set of events.
- *
- * Calling this function with `numevents` <= 0 is an error and will return
- * (Uint32)-1.
- *
- * Note, (Uint32)-1 means the maximum unsigned 32-bit integer value (or
- * 0xFFFFFFFF), but is clearer to write.
- *
- * \param numevents the number of events to be allocated
- * \returns the beginning event number, or (Uint32)-1 if there are not enough
- *          user-defined events left.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_PushEvent
- */
-extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_events_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_filesystem.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_filesystem.h
deleted file mode 100644 (file)
index 16f02e2..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_filesystem.h
- *
- *  \brief Include file for filesystem SDL API functions
- */
-
-#ifndef SDL_filesystem_h_
-#define SDL_filesystem_h_
-
-#include "SDL_stdinc.h"
-
-#include "begin_code.h"
-
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Get the directory where the application was run from.
- *
- * This is not necessarily a fast call, so you should call this once near
- * startup and save the string if you need it.
- *
- * **Mac OS X and iOS Specific Functionality**: If the application is in a
- * ".app" bundle, this function returns the Resource directory (e.g.
- * MyApp.app/Contents/Resources/). This behaviour can be overridden by adding
- * a property to the Info.plist file. Adding a string key with the name
- * SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the
- * behaviour.
- *
- * Supported values for the SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an
- * application in /Applications/SDLApp/MyApp.app):
- *
- * - `resource`: bundle resource directory (the default). For example:
- *   `/Applications/SDLApp/MyApp.app/Contents/Resources`
- * - `bundle`: the Bundle directory. For example:
- *   `/Applications/SDLApp/MyApp.app/`
- * - `parent`: the containing directory of the bundle. For example:
- *   `/Applications/SDLApp/`
- *
- * The returned path is guaranteed to end with a path separator ('\' on
- * Windows, '/' on most other platforms).
- *
- * The pointer returned is owned by the caller. Please call SDL_free() on the
- * pointer when done with it.
- *
- * \returns an absolute path in UTF-8 encoding to the application data
- *          directory. NULL will be returned on error or when the platform
- *          doesn't implement this functionality, call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.1.
- *
- * \sa SDL_GetPrefPath
- */
-extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
-
-/**
- * Get the user-and-app-specific path where files can be written.
- *
- * Get the "pref dir". This is meant to be where users can write personal
- * files (preferences and save games, etc) that are specific to your
- * application. This directory is unique per user, per application.
- *
- * This function will decide the appropriate location in the native
- * filesystem, create the directory if necessary, and return a string of the
- * absolute path to the directory in UTF-8 encoding.
- *
- * On Windows, the string might look like:
- *
- * `C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\`
- *
- * On Linux, the string might look like"
- *
- * `/home/bob/.local/share/My Program Name/`
- *
- * On Mac OS X, the string might look like:
- *
- * `/Users/bob/Library/Application Support/My Program Name/`
- *
- * You should assume the path returned by this function is the only safe place
- * to write files (and that SDL_GetBasePath(), while it might be writable, or
- * even the parent of the returned path, isn't where you should be writing
- * things).
- *
- * Both the org and app strings may become part of a directory name, so please
- * follow these rules:
- *
- * - Try to use the same org string (_including case-sensitivity_) for all
- *   your applications that use this function.
- * - Always use a unique app string for each one, and make sure it never
- *   changes for an app once you've decided on it.
- * - Unicode characters are legal, as long as it's UTF-8 encoded, but...
- * - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
- *   Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
- *
- * The returned path is guaranteed to end with a path separator ('\' on
- * Windows, '/' on most other platforms).
- *
- * The pointer returned is owned by the caller. Please call SDL_free() on the
- * pointer when done with it.
- *
- * \param org the name of your organization
- * \param app the name of your application
- * \returns a UTF-8 string of the user directory in platform-dependent
- *          notation. NULL if there's a problem (creating directory failed,
- *          etc.).
- *
- * \since This function is available since SDL 2.0.1.
- *
- * \sa SDL_GetBasePath
- */
-extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_filesystem_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_gamecontroller.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_gamecontroller.h
deleted file mode 100644 (file)
index 5488610..0000000
+++ /dev/null
@@ -1,1002 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_gamecontroller.h
- *
- *  Include file for SDL game controller event handling
- */
-
-#ifndef SDL_gamecontroller_h_
-#define SDL_gamecontroller_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-#include "SDL_rwops.h"
-#include "SDL_sensor.h"
-#include "SDL_joystick.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \file SDL_gamecontroller.h
- *
- *  In order to use these functions, SDL_Init() must have been called
- *  with the ::SDL_INIT_GAMECONTROLLER flag.  This causes SDL to scan the system
- *  for game controllers, and load appropriate drivers.
- *
- *  If you would like to receive controller updates while the application
- *  is in the background, you should set the following hint before calling
- *  SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
- */
-
-/**
- * The gamecontroller structure used to identify an SDL game controller
- */
-struct _SDL_GameController;
-typedef struct _SDL_GameController SDL_GameController;
-
-typedef enum
-{
-    SDL_CONTROLLER_TYPE_UNKNOWN = 0,
-    SDL_CONTROLLER_TYPE_XBOX360,
-    SDL_CONTROLLER_TYPE_XBOXONE,
-    SDL_CONTROLLER_TYPE_PS3,
-    SDL_CONTROLLER_TYPE_PS4,
-    SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO,
-    SDL_CONTROLLER_TYPE_VIRTUAL,
-    SDL_CONTROLLER_TYPE_PS5,
-    SDL_CONTROLLER_TYPE_AMAZON_LUNA,
-    SDL_CONTROLLER_TYPE_GOOGLE_STADIA
-} SDL_GameControllerType;
-
-typedef enum
-{
-    SDL_CONTROLLER_BINDTYPE_NONE = 0,
-    SDL_CONTROLLER_BINDTYPE_BUTTON,
-    SDL_CONTROLLER_BINDTYPE_AXIS,
-    SDL_CONTROLLER_BINDTYPE_HAT
-} SDL_GameControllerBindType;
-
-/**
- *  Get the SDL joystick layer binding for this controller button/axis mapping
- */
-typedef struct SDL_GameControllerButtonBind
-{
-    SDL_GameControllerBindType bindType;
-    union
-    {
-        int button;
-        int axis;
-        struct {
-            int hat;
-            int hat_mask;
-        } hat;
-    } value;
-
-} SDL_GameControllerButtonBind;
-
-
-/**
- *  To count the number of game controllers in the system for the following:
- *
- *  ```c
- *  int nJoysticks = SDL_NumJoysticks();
- *  int nGameControllers = 0;
- *  for (int i = 0; i < nJoysticks; i++) {
- *      if (SDL_IsGameController(i)) {
- *          nGameControllers++;
- *      }
- *  }
- *  ```
- *
- *  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:
- *  guid,name,mappings
- *
- *  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.
- *  Under Windows there is a reserved GUID of "xinput" that covers any XInput devices.
- *  The mapping format for joystick is:
- *      bX - a joystick button, index X
- *      hX.Y - hat X with value Y
- *      aX - axis X of the joystick
- *  Buttons can be used as a controller axis and vice versa.
- *
- *  This string shows an example of a valid mapping for a controller
- *
- * ```c
- * "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",
- * ```
- */
-
-/**
- * Load a set of Game Controller mappings from a seekable SDL data stream.
- *
- * You can call this function several times, if needed, to load different
- * database files.
- *
- * If a new mapping is loaded for an already known controller GUID, the later
- * version will overwrite the one currently loaded.
- *
- * Mappings not belonging to the current platform or with no platform field
- * specified will be ignored (i.e. mappings for Linux will be ignored in
- * Windows, etc).
- *
- * This function will load the text database entirely in memory before
- * processing it, so take this into consideration if you are in a memory
- * constrained environment.
- *
- * \param rw the data stream for the mappings to be added
- * \param freerw non-zero to close the stream after being read
- * \returns the number of mappings added or -1 on error; call SDL_GetError()
- *          for more information.
- *
- * \since This function is available since SDL 2.0.2.
- *
- * \sa SDL_GameControllerAddMapping
- * \sa SDL_GameControllerAddMappingsFromFile
- * \sa SDL_GameControllerMappingForGUID
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw);
-
-/**
- *  Load a set of mappings from a file, filtered by the current SDL_GetPlatform()
- *
- *  Convenience macro.
- */
-#define SDL_GameControllerAddMappingsFromFile(file)   SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1)
-
-/**
- * Add support for controllers that SDL is unaware of or to cause an existing
- * controller to have a different binding.
- *
- * The mapping string has the format "GUID,name,mapping", 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. Under Windows there is a reserved GUID of "xinput" that covers all
- * XInput devices. The mapping format for joystick is: {| |bX |a joystick
- * button, index X |- |hX.Y |hat X with value Y |- |aX |axis X of the joystick
- * |} Buttons can be used as a controller axes and vice versa.
- *
- * This string shows an example of a valid mapping for a controller:
- *
- * ```c
- * "341a3608000000000000504944564944,Afterglow 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"
- * ```
- *
- * \param mappingString the mapping string
- * \returns 1 if a new mapping is added, 0 if an existing mapping is updated,
- *          -1 on error; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerMapping
- * \sa SDL_GameControllerMappingForGUID
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingString);
-
-/**
- * Get the number of mappings installed.
- *
- * \returns the number of mappings.
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void);
-
-/**
- * Get the mapping at a particular index.
- *
- * \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
- *          the index is out of range.
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index);
-
-/**
- * Get the game controller mapping string for a given GUID.
- *
- * The returned string must be freed with SDL_free().
- *
- * \param guid a structure containing the GUID for which a mapping is desired
- * \returns a mapping string or NULL on error; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickGetDeviceGUID
- * \sa SDL_JoystickGetGUID
- */
-extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid);
-
-/**
- * Get the current mapping of a Game Controller.
- *
- * The returned string must be freed with SDL_free().
- *
- * Details about mappings are discussed with SDL_GameControllerAddMapping().
- *
- * \param gamecontroller the game controller you want to get the current
- *                       mapping for
- * \returns a string that has the controller's mapping or NULL if no mapping
- *          is available; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerAddMapping
- * \sa SDL_GameControllerMappingForGUID
- */
-extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController *gamecontroller);
-
-/**
- * Check if the given joystick is supported by the game controller interface.
- *
- * `joystick_index` is the same as the `device_index` passed to
- * SDL_JoystickOpen().
- *
- * \param joystick_index the device_index of a device, up to
- *                       SDL_NumJoysticks()
- * \returns SDL_TRUE if the given joystick is supported by the game controller
- *          interface, SDL_FALSE if it isn't or it's an invalid index.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerNameForIndex
- * \sa SDL_GameControllerOpen
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
-
-/**
- * Get the implementation dependent name for the game controller.
- *
- * This function can be called before any controllers are opened.
- *
- * `joystick_index` is the same as the `device_index` passed to
- * SDL_JoystickOpen().
- *
- * \param joystick_index the device_index of a device, from zero to
- *                       SDL_NumJoysticks()-1
- * \returns the implementation-dependent name for the game controller, or NULL
- *          if there is no name or the index is invalid.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerName
- * \sa SDL_GameControllerOpen
- * \sa SDL_IsGameController
- */
-extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
-
-/**
- * Get the type of a game controller.
- *
- * This can be called before any controllers are opened.
- *
- * \param joystick_index the device_index of a device, from zero to
- *                       SDL_NumJoysticks()-1
- * \returns the controller type.
- *
- * \since This function is available since SDL 2.0.12.
- */
-extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index);
-
-/**
- * Get the mapping of a game controller.
- *
- * This can be called before any controllers are opened.
- *
- * \param joystick_index the device_index of a device, from zero to
- *                       SDL_NumJoysticks()-1
- * \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
- *          no mapping is available.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
-
-/**
- * Open a game controller for use.
- *
- * `joystick_index` is the same as the `device_index` passed to
- * SDL_JoystickOpen().
- *
- * The index passed as an argument refers to the N'th game controller on the
- * system. This index is not the value which will identify this controller in
- * future controller events. The joystick's instance id (SDL_JoystickID) will
- * be used there instead.
- *
- * \param joystick_index the device_index of a device, up to
- *                       SDL_NumJoysticks()
- * \returns a gamecontroller identifier or NULL if an error occurred; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerClose
- * \sa SDL_GameControllerNameForIndex
- * \sa SDL_IsGameController
- */
-extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);
-
-/**
- * Get the SDL_GameController associated with an instance id.
- *
- * \param joyid the instance id to get the SDL_GameController for
- * \returns an SDL_GameController on success or NULL on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.4.
- */
-extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);
-
-/**
- * Get the SDL_GameController associated with a player index.
- *
- * Please note that the player index is _not_ the device index, nor is it the
- * instance id!
- *
- * \param player_index the player index, which is not the device index or the
- *                     instance id!
- * \returns the SDL_GameController associated with a player index.
- *
- * \since This function is available since SDL 2.0.12.
- *
- * \sa SDL_GameControllerGetPlayerIndex
- * \sa SDL_GameControllerSetPlayerIndex
- */
-extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(int player_index);
-
-/**
- * Get the implementation-dependent name for an opened game controller.
- *
- * This is the same name as returned by SDL_GameControllerNameForIndex(), but
- * it takes a controller identifier instead of the (unstable) device index.
- *
- * \param gamecontroller a game controller identifier previously returned by
- *                       SDL_GameControllerOpen()
- * \returns the implementation dependent name for the game controller, or NULL
- *          if there is no name or the identifier passed is invalid.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerNameForIndex
- * \sa SDL_GameControllerOpen
- */
-extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
-
-/**
- * Get the type of this currently opened controller
- *
- * This is the same name as returned by SDL_GameControllerTypeForIndex(), but
- * it takes a controller identifier instead of the (unstable) device index.
- *
- * \param gamecontroller the game controller object to query.
- * \returns the controller type.
- *
- * \since This function is available since SDL 2.0.12.
- */
-extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller);
-
-/**
- * Get the player index of an opened game controller.
- *
- * For XInput controllers this returns the XInput user index.
- *
- * \param gamecontroller the game controller object to query.
- * \returns the player index for controller, or -1 if it's not available.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
-
-/**
- * Set the player index of an opened game controller.
- *
- * \param gamecontroller the game controller object to adjust.
- * \param player_index Player index to assign to this controller.
- *
- * \since This function is available since SDL 2.0.12.
- */
-extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index);
-
-/**
- * Get the USB vendor ID of an opened controller, if available.
- *
- * If the vendor ID isn't available this function returns 0.
- *
- * \param gamecontroller the game controller object to query.
- * \return the USB vendor ID, or zero if unavailable.
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller);
-
-/**
- * Get the USB product ID of an opened controller, if available.
- *
- * If the product ID isn't available this function returns 0.
- *
- * \param gamecontroller the game controller object to query.
- * \return the USB product ID, or zero if unavailable.
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *gamecontroller);
-
-/**
- * Get the product version of an opened controller, if available.
- *
- * If the product version isn't available this function returns 0.
- *
- * \param gamecontroller the game controller object to query.
- * \return the USB product version, or zero if unavailable.
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller);
-
-/**
- * Get the serial number of an opened controller, if available.
- *
- * Returns the serial number of the controller, or NULL if it is not
- * available.
- *
- * \param gamecontroller the game controller object to query.
- * \return the serial number, or NULL if unavailable.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller);
-
-/**
- * Check if a controller has been opened and is currently connected.
- *
- * \param gamecontroller a game controller identifier previously returned by
- *                       SDL_GameControllerOpen()
- * \returns SDL_TRUE if the controller has been opened and is currently
- *          connected, or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerClose
- * \sa SDL_GameControllerOpen
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller);
-
-/**
- * Get the Joystick ID from a Game Controller.
- *
- * This function will give you a SDL_Joystick object, which allows you to use
- * the SDL_Joystick functions with a SDL_GameController object. This would be
- * useful for getting a joystick's position at any given time, even if it
- * hasn't moved (moving it would produce an event, which would have the axis'
- * value).
- *
- * The pointer returned is owned by the SDL_GameController. You should not
- * call SDL_JoystickClose() on it, for example, since doing so will likely
- * cause SDL to crash.
- *
- * \param gamecontroller the game controller object that you want to get a
- *                       joystick from
- * \returns a SDL_Joystick object; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller);
-
-/**
- * Query or change current state of Game Controller events.
- *
- * If controller events are disabled, you must call SDL_GameControllerUpdate()
- * yourself and check the state of the controller when you want controller
- * information.
- *
- * Any number can be passed to SDL_GameControllerEventState(), but only -1, 0,
- * and 1 will have any effect. Other numbers will just be returned.
- *
- * \param state can be one of `SDL_QUERY`, `SDL_IGNORE`, or `SDL_ENABLE`
- * \returns the same value passed to the function, with exception to -1
- *          (SDL_QUERY), which will return the current state.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickEventState
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);
-
-/**
- * Manually pump game controller updates if not using the loop.
- *
- * This function is called automatically by the event loop if events are
- * enabled. Under such circumstances, it will not be necessary to call this
- * function.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);
-
-
-/**
- *  The list of axes available from a controller
- *
- *  Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to SDL_JOYSTICK_AXIS_MAX,
- *  and are centered within ~8000 of zero, though advanced UI will allow users to set
- *  or autodetect the dead zone, which varies between controllers.
- *
- *  Trigger axis values range from 0 to SDL_JOYSTICK_AXIS_MAX.
- */
-typedef enum
-{
-    SDL_CONTROLLER_AXIS_INVALID = -1,
-    SDL_CONTROLLER_AXIS_LEFTX,
-    SDL_CONTROLLER_AXIS_LEFTY,
-    SDL_CONTROLLER_AXIS_RIGHTX,
-    SDL_CONTROLLER_AXIS_RIGHTY,
-    SDL_CONTROLLER_AXIS_TRIGGERLEFT,
-    SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
-    SDL_CONTROLLER_AXIS_MAX
-} SDL_GameControllerAxis;
-
-/**
- * Convert a string into SDL_GameControllerAxis enum.
- *
- * This function is called internally to translate SDL_GameController mapping
- * strings for the underlying joystick device into the consistent
- * SDL_GameController mapping. You do not normally need to call this function
- * unless you are parsing SDL_GameController mappings in your own code.
- *
- * Note specially that "righttrigger" and "lefttrigger" map to
- * `SDL_CONTROLLER_AXIS_TRIGGERRIGHT` and `SDL_CONTROLLER_AXIS_TRIGGERLEFT`,
- * respectively.
- *
- * \param str string representing a SDL_GameController axis
- * \returns the SDL_GameControllerAxis enum corresponding to the input string,
- *          or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerGetStringForAxis
- */
-extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *str);
-
-/**
- * Convert from an SDL_GameControllerAxis enum to a string.
- *
- * The caller should not SDL_free() the returned string.
- *
- * \param axis an enum value for a given SDL_GameControllerAxis
- * \returns a string for the given axis, or NULL if an invalid axis is
- *          specified. The string returned is of the format used by
- *          SDL_GameController mapping strings.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerGetAxisFromString
- */
-extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis);
-
-/**
- * Get the SDL joystick layer binding for a controller axis mapping.
- *
- * \param gamecontroller a game controller
- * \param axis an axis enum value (one of the SDL_GameControllerAxis values)
- * \returns a SDL_GameControllerButtonBind describing the bind. On failure
- *          (like the given Controller axis doesn't exist on the device), its
- *          `.bindType` will be `SDL_CONTROLLER_BINDTYPE_NONE`.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerGetBindForButton
- */
-extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
-SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
-                                 SDL_GameControllerAxis axis);
-
-/**
- * Query whether a game controller has a given axis.
- *
- * This merely reports whether the controller's mapping defined this axis, as
- * that is all the information SDL has about the physical device.
- *
- * \param gamecontroller a game controller
- * \param axis an axis enum value (an SDL_GameControllerAxis value)
- * \returns SDL_TRUE if the controller has this axis, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC SDL_bool SDLCALL
-SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
-
-/**
- * Get the current state of an axis control on a game controller.
- *
- * The axis indices start at index 0.
- *
- * The state is a value ranging from -32768 to 32767. Triggers, however, range
- * from 0 to 32767 (they never return a negative value).
- *
- * \param gamecontroller a game controller
- * \param axis an axis index (one of the SDL_GameControllerAxis values)
- * \returns axis state (including 0) on success or 0 (also) on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerGetButton
- */
-extern DECLSPEC Sint16 SDLCALL
-SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
-
-/**
- *  The list of buttons available from a controller
- */
-typedef enum
-{
-    SDL_CONTROLLER_BUTTON_INVALID = -1,
-    SDL_CONTROLLER_BUTTON_A,
-    SDL_CONTROLLER_BUTTON_B,
-    SDL_CONTROLLER_BUTTON_X,
-    SDL_CONTROLLER_BUTTON_Y,
-    SDL_CONTROLLER_BUTTON_BACK,
-    SDL_CONTROLLER_BUTTON_GUIDE,
-    SDL_CONTROLLER_BUTTON_START,
-    SDL_CONTROLLER_BUTTON_LEFTSTICK,
-    SDL_CONTROLLER_BUTTON_RIGHTSTICK,
-    SDL_CONTROLLER_BUTTON_LEFTSHOULDER,
-    SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,
-    SDL_CONTROLLER_BUTTON_DPAD_UP,
-    SDL_CONTROLLER_BUTTON_DPAD_DOWN,
-    SDL_CONTROLLER_BUTTON_DPAD_LEFT,
-    SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
-    SDL_CONTROLLER_BUTTON_MISC1,    /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */
-    SDL_CONTROLLER_BUTTON_PADDLE1,  /* Xbox Elite paddle P1 */
-    SDL_CONTROLLER_BUTTON_PADDLE2,  /* Xbox Elite paddle P3 */
-    SDL_CONTROLLER_BUTTON_PADDLE3,  /* Xbox Elite paddle P2 */
-    SDL_CONTROLLER_BUTTON_PADDLE4,  /* Xbox Elite paddle P4 */
-    SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */
-    SDL_CONTROLLER_BUTTON_MAX
-} SDL_GameControllerButton;
-
-/**
- * Convert a string into an SDL_GameControllerButton enum.
- *
- * This function is called internally to translate SDL_GameController mapping
- * strings for the underlying joystick device into the consistent
- * SDL_GameController mapping. You do not normally need to call this function
- * unless you are parsing SDL_GameController mappings in your own code.
- *
- * \param str string representing a SDL_GameController axis
- * \returns the SDL_GameControllerButton enum corresponding to the input
- *          string, or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *str);
-
-/**
- * Convert from an SDL_GameControllerButton enum to a string.
- *
- * The caller should not SDL_free() the returned string.
- *
- * \param button an enum value for a given SDL_GameControllerButton
- * \returns a string for the given button, or NULL if an invalid axis is
- *          specified. The string returned is of the format used by
- *          SDL_GameController mapping strings.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerGetButtonFromString
- */
-extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button);
-
-/**
- * Get the SDL joystick layer binding for a controller button mapping.
- *
- * \param gamecontroller a game controller
- * \param button an button enum value (an SDL_GameControllerButton value)
- * \returns a SDL_GameControllerButtonBind describing the bind. On failure
- *          (like the given Controller button doesn't exist on the device),
- *          its `.bindType` will be `SDL_CONTROLLER_BINDTYPE_NONE`.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerGetBindForAxis
- */
-extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
-SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
-                                   SDL_GameControllerButton button);
-
-/**
- * Query whether a game controller has a given button.
- *
- * This merely reports whether the controller's mapping defined this button,
- * as that is all the information SDL has about the physical device.
- *
- * \param gamecontroller a game controller
- * \param button a button enum value (an SDL_GameControllerButton value)
- * \returns SDL_TRUE if the controller has this button, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasButton(SDL_GameController *gamecontroller,
-                                                             SDL_GameControllerButton button);
-
-/**
- * Get the current state of a button on a game controller.
- *
- * \param gamecontroller a game controller
- * \param button a button index (one of the SDL_GameControllerButton values)
- * \returns 1 for pressed state or 0 for not pressed state or error; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerGetAxis
- */
-extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
-                                                          SDL_GameControllerButton button);
-
-/**
- * Get the number of touchpads on a game controller.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller);
-
-/**
- * Get the number of supported simultaneous fingers on a touchpad on a game
- * controller.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad);
-
-/**
- * Get the current state of a finger on a touchpad on a game controller.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure);
-
-/**
- * Return whether a game controller has a particular sensor.
- *
- * \param gamecontroller The controller to query
- * \param type The type of sensor to query
- * \returns SDL_TRUE if the sensor exists, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type);
-
-/**
- * Set whether data reporting for a game controller sensor is enabled.
- *
- * \param gamecontroller The controller to update
- * \param type The type of sensor to enable/disable
- * \param enabled Whether data reporting should be enabled
- * \returns 0 or -1 if an error occurred.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled);
-
-/**
- * Query whether sensor data reporting is enabled for a game controller.
- *
- * \param gamecontroller The controller to query
- * \param type The type of sensor to query
- * \returns SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type);
-
-/**
- * Get the data rate (number of events per second) of a game controller
- * sensor.
- *
- * \param gamecontroller The controller to query
- * \param type The type of sensor to query
- * \return the data rate, or 0.0f if the data rate is not available.
- *
- * \since This function is available since SDL 2.0.16.
- */
-extern DECLSPEC float SDLCALL SDL_GameControllerGetSensorDataRate(SDL_GameController *gamecontroller, SDL_SensorType type);
-
-/**
- * Get the current state of a game controller sensor.
- *
- * The number of values and interpretation of the data is sensor dependent.
- * See SDL_sensor.h for the details for each type of sensor.
- *
- * \param gamecontroller The controller to query
- * \param type The type of sensor to query
- * \param data A pointer filled with the current sensor state
- * \param num_values The number of values to write to data
- * \return 0 or -1 if an error occurred.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values);
-
-/**
- * Start a rumble effect on a game controller.
- *
- * Each call to this function cancels any previous rumble effect, and calling
- * it with 0 intensity stops any rumbling.
- *
- * \param gamecontroller The controller to vibrate
- * \param low_frequency_rumble The intensity of the low frequency (left)
- *                             rumble motor, from 0 to 0xFFFF
- * \param high_frequency_rumble The intensity of the high frequency (right)
- *                              rumble motor, from 0 to 0xFFFF
- * \param duration_ms The duration of the rumble effect, in milliseconds
- * \returns 0, or -1 if rumble isn't supported on this controller
- *
- * \since This function is available since SDL 2.0.9.
- *
- * \sa SDL_GameControllerHasRumble
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
-
-/**
- * Start a rumble effect in the game controller's triggers.
- *
- * Each call to this function cancels any previous trigger rumble effect, and
- * calling it with 0 intensity stops any rumbling.
- *
- * Note that this is rumbling of the _triggers_ and not the game controller as
- * a whole. This is currently only supported on Xbox One controllers. If you
- * want the (more common) whole-controller rumble, use
- * SDL_GameControllerRumble() instead.
- *
- * \param gamecontroller The controller to vibrate
- * \param left_rumble The intensity of the left trigger rumble motor, from 0
- *                    to 0xFFFF
- * \param right_rumble The intensity of the right trigger rumble motor, from 0
- *                     to 0xFFFF
- * \param duration_ms The duration of the rumble effect, in milliseconds
- * \returns 0, or -1 if trigger rumble isn't supported on this controller
- *
- * \since This function is available since SDL 2.0.14.
- *
- * \sa SDL_GameControllerHasRumbleTriggers
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
-
-/**
- * Query whether a game controller has an LED.
- *
- * \param gamecontroller The controller to query
- * \returns SDL_TRUE, or SDL_FALSE if this controller does not have a
- *          modifiable LED
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *gamecontroller);
-
-/**
- * Query whether a game controller has rumble support.
- *
- * \param gamecontroller The controller to query
- * \returns SDL_TRUE, or SDL_FALSE if this controller does not have rumble
- *          support
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_GameControllerRumble
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasRumble(SDL_GameController *gamecontroller);
-
-/**
- * Query whether a game controller has rumble support on triggers.
- *
- * \param gamecontroller The controller to query
- * \returns SDL_TRUE, or SDL_FALSE if this controller does not have trigger
- *          rumble support
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_GameControllerRumbleTriggers
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasRumbleTriggers(SDL_GameController *gamecontroller);
-
-/**
- * Update a game controller's LED color.
- *
- * \param gamecontroller The controller to update
- * \param red The intensity of the red LED
- * \param green The intensity of the green LED
- * \param blue The intensity of the blue LED
- * \returns 0, or -1 if this controller does not have a modifiable LED
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue);
-
-/**
- * Send a controller specific effect packet
- *
- * \param gamecontroller The controller to affect
- * \param data The data to send to the controller
- * \param size The size of the data to send to the controller
- * \returns 0, or -1 if this controller or driver doesn't support effect
- *          packets
- *
- * \since This function is available since SDL 2.0.16.
- */
-extern DECLSPEC int SDLCALL SDL_GameControllerSendEffect(SDL_GameController *gamecontroller, const void *data, int size);
-
-/**
- * Close a game controller previously opened with SDL_GameControllerOpen().
- *
- * \param gamecontroller a game controller identifier previously returned by
- *                       SDL_GameControllerOpen()
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerOpen
- */
-extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller);
-
-/**
- * Return the sfSymbolsName for a given button on a game controller on Apple
- * platforms.
- *
- * \param gamecontroller the controller to query
- * \param button a button on the game controller
- * \returns the sfSymbolsName or NULL if the name can't be found
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_GameControllerGetAppleSFSymbolsNameForAxis
- */
-extern DECLSPEC const char* SDLCALL SDL_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button);
-
-/**
- * Return the sfSymbolsName for a given axis on a game controller on Apple
- * platforms.
- *
- * \param gamecontroller the controller to query
- * \param axis an axis on the game controller
- * \returns the sfSymbolsName or NULL if the name can't be found
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_GameControllerGetAppleSFSymbolsNameForButton
- */
-extern DECLSPEC const char* SDLCALL SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_gamecontroller_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_gesture.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_gesture.h
deleted file mode 100644 (file)
index e2caea2..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_gesture.h
- *
- *  Include file for SDL gesture event handling.
- */
-
-#ifndef SDL_gesture_h_
-#define SDL_gesture_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-#include "SDL_video.h"
-
-#include "SDL_touch.h"
-
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef Sint64 SDL_GestureID;
-
-/* Function prototypes */
-
-/**
- * Begin recording a gesture on a specified touch device or all touch devices.
- *
- * If the parameter `touchId` is -1 (i.e., all devices), this function will
- * always return 1, regardless of whether there actually are any devices.
- *
- * \param touchId the touch device id, or -1 for all touch devices
- * \returns 1 on success or 0 if the specified device could not be found.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetTouchDevice
- */
-extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId);
-
-
-/**
- * Save all currently loaded Dollar Gesture templates.
- *
- * \param dst a SDL_RWops to save to
- * \returns the number of saved templates on success or 0 on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LoadDollarTemplates
- * \sa SDL_SaveDollarTemplate
- */
-extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst);
-
-/**
- * Save a currently loaded Dollar Gesture template.
- *
- * \param gestureId a gesture id
- * \param dst a SDL_RWops to save to
- * \returns 1 on success or 0 on failure; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LoadDollarTemplates
- * \sa SDL_SaveAllDollarTemplates
- */
-extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst);
-
-
-/**
- * Load Dollar Gesture templates from a file.
- *
- * \param touchId a touch id
- * \param src a SDL_RWops to load from
- * \returns the number of loaded templates on success or a negative error code
- *          (or 0) on failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SaveAllDollarTemplates
- * \sa SDL_SaveDollarTemplate
- */
-extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_gesture_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_haptic.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_haptic.h
deleted file mode 100644 (file)
index f240ae9..0000000
+++ /dev/null
@@ -1,1341 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_haptic.h
- *
- *  \brief The SDL haptic subsystem allows you to control haptic (force feedback)
- *         devices.
- *
- *  The basic usage is as follows:
- *   - Initialize the subsystem (::SDL_INIT_HAPTIC).
- *   - Open a haptic device.
- *    - SDL_HapticOpen() to open from index.
- *    - SDL_HapticOpenFromJoystick() to open from an existing joystick.
- *   - Create an effect (::SDL_HapticEffect).
- *   - Upload the effect with SDL_HapticNewEffect().
- *   - Run the effect with SDL_HapticRunEffect().
- *   - (optional) Free the effect with SDL_HapticDestroyEffect().
- *   - Close the haptic device with SDL_HapticClose().
- *
- * \par Simple rumble example:
- * \code
- *    SDL_Haptic *haptic;
- *
- *    // Open the device
- *    haptic = SDL_HapticOpen( 0 );
- *    if (haptic == NULL)
- *       return -1;
- *
- *    // Initialize simple rumble
- *    if (SDL_HapticRumbleInit( haptic ) != 0)
- *       return -1;
- *
- *    // Play effect at 50% strength for 2 seconds
- *    if (SDL_HapticRumblePlay( haptic, 0.5, 2000 ) != 0)
- *       return -1;
- *    SDL_Delay( 2000 );
- *
- *    // Clean up
- *    SDL_HapticClose( haptic );
- * \endcode
- *
- * \par Complete example:
- * \code
- * int test_haptic( SDL_Joystick * joystick ) {
- *    SDL_Haptic *haptic;
- *    SDL_HapticEffect effect;
- *    int effect_id;
- *
- *    // Open the device
- *    haptic = SDL_HapticOpenFromJoystick( joystick );
- *    if (haptic == NULL) return -1; // Most likely joystick isn't haptic
- *
- *    // See if it can do sine waves
- *    if ((SDL_HapticQuery(haptic) & SDL_HAPTIC_SINE)==0) {
- *       SDL_HapticClose(haptic); // No sine effect
- *       return -1;
- *    }
- *
- *    // Create the effect
- *    SDL_memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
- *    effect.type = SDL_HAPTIC_SINE;
- *    effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
- *    effect.periodic.direction.dir[0] = 18000; // Force comes from south
- *    effect.periodic.period = 1000; // 1000 ms
- *    effect.periodic.magnitude = 20000; // 20000/32767 strength
- *    effect.periodic.length = 5000; // 5 seconds long
- *    effect.periodic.attack_length = 1000; // Takes 1 second to get max strength
- *    effect.periodic.fade_length = 1000; // Takes 1 second to fade away
- *
- *    // Upload the effect
- *    effect_id = SDL_HapticNewEffect( haptic, &effect );
- *
- *    // Test the effect
- *    SDL_HapticRunEffect( haptic, effect_id, 1 );
- *    SDL_Delay( 5000); // Wait for the effect to finish
- *
- *    // We destroy the effect, although closing the device also does this
- *    SDL_HapticDestroyEffect( haptic, effect_id );
- *
- *    // Close the device
- *    SDL_HapticClose(haptic);
- *
- *    return 0; // Success
- * }
- * \endcode
- */
-
-#ifndef SDL_haptic_h_
-#define SDL_haptic_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-#include "SDL_joystick.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF).
- *
- * At the moment the magnitude variables are mixed between signed/unsigned, and
- * it is also not made clear that ALL of those variables expect a max of 0x7FFF.
- *
- * Some platforms may have higher precision than that (Linux FF, Windows XInput)
- * so we should fix the inconsistency in favor of higher possible precision,
- * adjusting for platforms that use different scales.
- * -flibit
- */
-
-/**
- *  \typedef SDL_Haptic
- *
- *  \brief The haptic structure used to identify an SDL haptic.
- *
- *  \sa SDL_HapticOpen
- *  \sa SDL_HapticOpenFromJoystick
- *  \sa SDL_HapticClose
- */
-struct _SDL_Haptic;
-typedef struct _SDL_Haptic SDL_Haptic;
-
-
-/**
- *  \name Haptic features
- *
- *  Different haptic features a device can have.
- */
-/* @{ */
-
-/**
- *  \name Haptic effects
- */
-/* @{ */
-
-/**
- *  \brief Constant effect supported.
- *
- *  Constant haptic effect.
- *
- *  \sa SDL_HapticCondition
- */
-#define SDL_HAPTIC_CONSTANT   (1u<<0)
-
-/**
- *  \brief Sine wave effect supported.
- *
- *  Periodic haptic effect that simulates sine waves.
- *
- *  \sa SDL_HapticPeriodic
- */
-#define SDL_HAPTIC_SINE       (1u<<1)
-
-/**
- *  \brief Left/Right effect supported.
- *
- *  Haptic effect for direct control over high/low frequency motors.
- *
- *  \sa SDL_HapticLeftRight
- * \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,
- *          we ran out of bits, and this is important for XInput devices.
- */
-#define SDL_HAPTIC_LEFTRIGHT     (1u<<2)
-
-/* !!! FIXME: put this back when we have more bits in 2.1 */
-/* #define SDL_HAPTIC_SQUARE     (1<<2) */
-
-/**
- *  \brief Triangle wave effect supported.
- *
- *  Periodic haptic effect that simulates triangular waves.
- *
- *  \sa SDL_HapticPeriodic
- */
-#define SDL_HAPTIC_TRIANGLE   (1u<<3)
-
-/**
- *  \brief Sawtoothup wave effect supported.
- *
- *  Periodic haptic effect that simulates saw tooth up waves.
- *
- *  \sa SDL_HapticPeriodic
- */
-#define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
-
-/**
- *  \brief Sawtoothdown wave effect supported.
- *
- *  Periodic haptic effect that simulates saw tooth down waves.
- *
- *  \sa SDL_HapticPeriodic
- */
-#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
-
-/**
- *  \brief Ramp effect supported.
- *
- *  Ramp haptic effect.
- *
- *  \sa SDL_HapticRamp
- */
-#define SDL_HAPTIC_RAMP       (1u<<6)
-
-/**
- *  \brief Spring effect supported - uses axes position.
- *
- *  Condition haptic effect that simulates a spring.  Effect is based on the
- *  axes position.
- *
- *  \sa SDL_HapticCondition
- */
-#define SDL_HAPTIC_SPRING     (1u<<7)
-
-/**
- *  \brief Damper effect supported - uses axes velocity.
- *
- *  Condition haptic effect that simulates dampening.  Effect is based on the
- *  axes velocity.
- *
- *  \sa SDL_HapticCondition
- */
-#define SDL_HAPTIC_DAMPER     (1u<<8)
-
-/**
- *  \brief Inertia effect supported - uses axes acceleration.
- *
- *  Condition haptic effect that simulates inertia.  Effect is based on the axes
- *  acceleration.
- *
- *  \sa SDL_HapticCondition
- */
-#define SDL_HAPTIC_INERTIA    (1u<<9)
-
-/**
- *  \brief Friction effect supported - uses axes movement.
- *
- *  Condition haptic effect that simulates friction.  Effect is based on the
- *  axes movement.
- *
- *  \sa SDL_HapticCondition
- */
-#define SDL_HAPTIC_FRICTION   (1u<<10)
-
-/**
- *  \brief Custom effect is supported.
- *
- *  User defined custom haptic effect.
- */
-#define SDL_HAPTIC_CUSTOM     (1u<<11)
-
-/* @} *//* Haptic effects */
-
-/* These last few are features the device has, not effects */
-
-/**
- *  \brief Device can set global gain.
- *
- *  Device supports setting the global gain.
- *
- *  \sa SDL_HapticSetGain
- */
-#define SDL_HAPTIC_GAIN       (1u<<12)
-
-/**
- *  \brief Device can set autocenter.
- *
- *  Device supports setting autocenter.
- *
- *  \sa SDL_HapticSetAutocenter
- */
-#define SDL_HAPTIC_AUTOCENTER (1u<<13)
-
-/**
- *  \brief Device can be queried for effect status.
- *
- *  Device supports querying effect status.
- *
- *  \sa SDL_HapticGetEffectStatus
- */
-#define SDL_HAPTIC_STATUS     (1u<<14)
-
-/**
- *  \brief Device can be paused.
- *
- *  Devices supports being paused.
- *
- *  \sa SDL_HapticPause
- *  \sa SDL_HapticUnpause
- */
-#define SDL_HAPTIC_PAUSE      (1u<<15)
-
-
-/**
- * \name Direction encodings
- */
-/* @{ */
-
-/**
- *  \brief Uses polar coordinates for the direction.
- *
- *  \sa SDL_HapticDirection
- */
-#define SDL_HAPTIC_POLAR      0
-
-/**
- *  \brief Uses cartesian coordinates for the direction.
- *
- *  \sa SDL_HapticDirection
- */
-#define SDL_HAPTIC_CARTESIAN  1
-
-/**
- *  \brief Uses spherical coordinates for the direction.
- *
- *  \sa SDL_HapticDirection
- */
-#define SDL_HAPTIC_SPHERICAL  2
-
-/**
- *  \brief Use this value to play an effect on the steering wheel axis. This 
- *  provides better compatibility across platforms and devices as SDL will guess 
- *  the correct axis.
- *  \sa SDL_HapticDirection
- */
-#define SDL_HAPTIC_STEERING_AXIS 3
-
-/* @} *//* Direction encodings */
-
-/* @} *//* Haptic features */
-
-/*
- * Misc defines.
- */
-
-/**
- * \brief Used to play a device an infinite number of times.
- *
- * \sa SDL_HapticRunEffect
- */
-#define SDL_HAPTIC_INFINITY   4294967295U
-
-
-/**
- *  \brief Structure that represents a haptic direction.
- *
- *  This is the direction where the force comes from,
- *  instead of the direction in which the force is exerted.
- *
- *  Directions can be specified by:
- *   - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.
- *   - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
- *   - ::SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates.
- *
- *  Cardinal directions of the haptic device are relative to the positioning
- *  of the device.  North is considered to be away from the user.
- *
- *  The following diagram represents the cardinal directions:
- *  \verbatim
-                 .--.
-                 |__| .-------.
-                 |=.| |.-----.|
-                 |--| ||     ||
-                 |  | |'-----'|
-                 |__|~')_____('
-                   [ COMPUTER ]
-
-
-                     North (0,-1)
-                         ^
-                         |
-                         |
-   (-1,0)  West <----[ HAPTIC ]----> East (1,0)
-                         |
-                         |
-                         v
-                      South (0,1)
-
-
-                      [ USER ]
-                        \|||/
-                        (o o)
-                  ---ooO-(_)-Ooo---
-    \endverbatim
- *
- *  If type is ::SDL_HAPTIC_POLAR, direction is encoded by hundredths of a
- *  degree starting north and turning clockwise.  ::SDL_HAPTIC_POLAR only uses
- *  the first \c dir parameter.  The cardinal directions would be:
- *   - North: 0 (0 degrees)
- *   - East: 9000 (90 degrees)
- *   - South: 18000 (180 degrees)
- *   - West: 27000 (270 degrees)
- *
- *  If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions
- *  (X axis, Y axis and Z axis (with 3 axes)).  ::SDL_HAPTIC_CARTESIAN uses
- *  the first three \c dir parameters.  The cardinal directions would be:
- *   - North:  0,-1, 0
- *   - East:   1, 0, 0
- *   - South:  0, 1, 0
- *   - West:  -1, 0, 0
- *
- *  The Z axis represents the height of the effect if supported, otherwise
- *  it's unused.  In cartesian encoding (1, 2) would be the same as (2, 4), you
- *  can use any multiple you want, only the direction matters.
- *
- *  If type is ::SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations.
- *  The first two \c dir parameters are used.  The \c dir parameters are as
- *  follows (all values are in hundredths of degrees):
- *   - Degrees from (1, 0) rotated towards (0, 1).
- *   - Degrees towards (0, 0, 1) (device needs at least 3 axes).
- *
- *
- *  Example of force coming from the south with all encodings (force coming
- *  from the south means the user will have to pull the stick to counteract):
- *  \code
- *  SDL_HapticDirection direction;
- *
- *  // Cartesian directions
- *  direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding.
- *  direction.dir[0] = 0; // X position
- *  direction.dir[1] = 1; // Y position
- *  // Assuming the device has 2 axes, we don't need to specify third parameter.
- *
- *  // Polar directions
- *  direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding.
- *  direction.dir[0] = 18000; // Polar only uses first parameter
- *
- *  // Spherical coordinates
- *  direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding
- *  direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters.
- *  \endcode
- *
- *  \sa SDL_HAPTIC_POLAR
- *  \sa SDL_HAPTIC_CARTESIAN
- *  \sa SDL_HAPTIC_SPHERICAL
- *  \sa SDL_HAPTIC_STEERING_AXIS
- *  \sa SDL_HapticEffect
- *  \sa SDL_HapticNumAxes
- */
-typedef struct SDL_HapticDirection
-{
-    Uint8 type;         /**< The type of encoding. */
-    Sint32 dir[3];      /**< The encoded direction. */
-} SDL_HapticDirection;
-
-
-/**
- *  \brief A structure containing a template for a Constant effect.
- *
- *  This struct is exclusively for the ::SDL_HAPTIC_CONSTANT effect.
- *
- *  A constant effect applies a constant force in the specified direction
- *  to the joystick.
- *
- *  \sa SDL_HAPTIC_CONSTANT
- *  \sa SDL_HapticEffect
- */
-typedef struct SDL_HapticConstant
-{
-    /* Header */
-    Uint16 type;            /**< ::SDL_HAPTIC_CONSTANT */
-    SDL_HapticDirection direction;  /**< Direction of the effect. */
-
-    /* Replay */
-    Uint32 length;          /**< Duration of the effect. */
-    Uint16 delay;           /**< Delay before starting the effect. */
-
-    /* Trigger */
-    Uint16 button;          /**< Button that triggers the effect. */
-    Uint16 interval;        /**< How soon it can be triggered again after button. */
-
-    /* Constant */
-    Sint16 level;           /**< Strength of the constant effect. */
-
-    /* Envelope */
-    Uint16 attack_length;   /**< Duration of the attack. */
-    Uint16 attack_level;    /**< Level at the start of the attack. */
-    Uint16 fade_length;     /**< Duration of the fade. */
-    Uint16 fade_level;      /**< Level at the end of the fade. */
-} SDL_HapticConstant;
-
-/**
- *  \brief A structure containing a template for a Periodic effect.
- *
- *  The struct handles the following effects:
- *   - ::SDL_HAPTIC_SINE
- *   - ::SDL_HAPTIC_LEFTRIGHT
- *   - ::SDL_HAPTIC_TRIANGLE
- *   - ::SDL_HAPTIC_SAWTOOTHUP
- *   - ::SDL_HAPTIC_SAWTOOTHDOWN
- *
- *  A periodic effect consists in a wave-shaped effect that repeats itself
- *  over time.  The type determines the shape of the wave and the parameters
- *  determine the dimensions of the wave.
- *
- *  Phase is given by hundredth of a degree meaning that giving the phase a value
- *  of 9000 will displace it 25% of its period.  Here are sample values:
- *   -     0: No phase displacement.
- *   -  9000: Displaced 25% of its period.
- *   - 18000: Displaced 50% of its period.
- *   - 27000: Displaced 75% of its period.
- *   - 36000: Displaced 100% of its period, same as 0, but 0 is preferred.
- *
- *  Examples:
- *  \verbatim
-    SDL_HAPTIC_SINE
-      __      __      __      __
-     /  \    /  \    /  \    /
-    /    \__/    \__/    \__/
-
-    SDL_HAPTIC_SQUARE
-     __    __    __    __    __
-    |  |  |  |  |  |  |  |  |  |
-    |  |__|  |__|  |__|  |__|  |
-
-    SDL_HAPTIC_TRIANGLE
-      /\    /\    /\    /\    /\
-     /  \  /  \  /  \  /  \  /
-    /    \/    \/    \/    \/
-
-    SDL_HAPTIC_SAWTOOTHUP
-      /|  /|  /|  /|  /|  /|  /|
-     / | / | / | / | / | / | / |
-    /  |/  |/  |/  |/  |/  |/  |
-
-    SDL_HAPTIC_SAWTOOTHDOWN
-    \  |\  |\  |\  |\  |\  |\  |
-     \ | \ | \ | \ | \ | \ | \ |
-      \|  \|  \|  \|  \|  \|  \|
-    \endverbatim
- *
- *  \sa SDL_HAPTIC_SINE
- *  \sa SDL_HAPTIC_LEFTRIGHT
- *  \sa SDL_HAPTIC_TRIANGLE
- *  \sa SDL_HAPTIC_SAWTOOTHUP
- *  \sa SDL_HAPTIC_SAWTOOTHDOWN
- *  \sa SDL_HapticEffect
- */
-typedef struct SDL_HapticPeriodic
-{
-    /* Header */
-    Uint16 type;        /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT,
-                             ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or
-                             ::SDL_HAPTIC_SAWTOOTHDOWN */
-    SDL_HapticDirection direction;  /**< Direction of the effect. */
-
-    /* Replay */
-    Uint32 length;      /**< Duration of the effect. */
-    Uint16 delay;       /**< Delay before starting the effect. */
-
-    /* Trigger */
-    Uint16 button;      /**< Button that triggers the effect. */
-    Uint16 interval;    /**< How soon it can be triggered again after button. */
-
-    /* Periodic */
-    Uint16 period;      /**< Period of the wave. */
-    Sint16 magnitude;   /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */
-    Sint16 offset;      /**< Mean value of the wave. */
-    Uint16 phase;       /**< Positive phase shift given by hundredth of a degree. */
-
-    /* Envelope */
-    Uint16 attack_length;   /**< Duration of the attack. */
-    Uint16 attack_level;    /**< Level at the start of the attack. */
-    Uint16 fade_length; /**< Duration of the fade. */
-    Uint16 fade_level;  /**< Level at the end of the fade. */
-} SDL_HapticPeriodic;
-
-/**
- *  \brief A structure containing a template for a Condition effect.
- *
- *  The struct handles the following effects:
- *   - ::SDL_HAPTIC_SPRING: Effect based on axes position.
- *   - ::SDL_HAPTIC_DAMPER: Effect based on axes velocity.
- *   - ::SDL_HAPTIC_INERTIA: Effect based on axes acceleration.
- *   - ::SDL_HAPTIC_FRICTION: Effect based on axes movement.
- *
- *  Direction is handled by condition internals instead of a direction member.
- *  The condition effect specific members have three parameters.  The first
- *  refers to the X axis, the second refers to the Y axis and the third
- *  refers to the Z axis.  The right terms refer to the positive side of the
- *  axis and the left terms refer to the negative side of the axis.  Please
- *  refer to the ::SDL_HapticDirection diagram for which side is positive and
- *  which is negative.
- *
- *  \sa SDL_HapticDirection
- *  \sa SDL_HAPTIC_SPRING
- *  \sa SDL_HAPTIC_DAMPER
- *  \sa SDL_HAPTIC_INERTIA
- *  \sa SDL_HAPTIC_FRICTION
- *  \sa SDL_HapticEffect
- */
-typedef struct SDL_HapticCondition
-{
-    /* Header */
-    Uint16 type;            /**< ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER,
-                                 ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION */
-    SDL_HapticDirection direction;  /**< Direction of the effect - Not used ATM. */
-
-    /* Replay */
-    Uint32 length;          /**< Duration of the effect. */
-    Uint16 delay;           /**< Delay before starting the effect. */
-
-    /* Trigger */
-    Uint16 button;          /**< Button that triggers the effect. */
-    Uint16 interval;        /**< How soon it can be triggered again after button. */
-
-    /* Condition */
-    Uint16 right_sat[3];    /**< Level when joystick is to the positive side; max 0xFFFF. */
-    Uint16 left_sat[3];     /**< Level when joystick is to the negative side; max 0xFFFF. */
-    Sint16 right_coeff[3];  /**< How fast to increase the force towards the positive side. */
-    Sint16 left_coeff[3];   /**< How fast to increase the force towards the negative side. */
-    Uint16 deadband[3];     /**< Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered. */
-    Sint16 center[3];       /**< Position of the dead zone. */
-} SDL_HapticCondition;
-
-/**
- *  \brief A structure containing a template for a Ramp effect.
- *
- *  This struct is exclusively for the ::SDL_HAPTIC_RAMP effect.
- *
- *  The ramp effect starts at start strength and ends at end strength.
- *  It augments in linear fashion.  If you use attack and fade with a ramp
- *  the effects get added to the ramp effect making the effect become
- *  quadratic instead of linear.
- *
- *  \sa SDL_HAPTIC_RAMP
- *  \sa SDL_HapticEffect
- */
-typedef struct SDL_HapticRamp
-{
-    /* Header */
-    Uint16 type;            /**< ::SDL_HAPTIC_RAMP */
-    SDL_HapticDirection direction;  /**< Direction of the effect. */
-
-    /* Replay */
-    Uint32 length;          /**< Duration of the effect. */
-    Uint16 delay;           /**< Delay before starting the effect. */
-
-    /* Trigger */
-    Uint16 button;          /**< Button that triggers the effect. */
-    Uint16 interval;        /**< How soon it can be triggered again after button. */
-
-    /* Ramp */
-    Sint16 start;           /**< Beginning strength level. */
-    Sint16 end;             /**< Ending strength level. */
-
-    /* Envelope */
-    Uint16 attack_length;   /**< Duration of the attack. */
-    Uint16 attack_level;    /**< Level at the start of the attack. */
-    Uint16 fade_length;     /**< Duration of the fade. */
-    Uint16 fade_level;      /**< Level at the end of the fade. */
-} SDL_HapticRamp;
-
-/**
- * \brief A structure containing a template for a Left/Right effect.
- *
- * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
- *
- * The Left/Right effect is used to explicitly control the large and small
- * motors, commonly found in modern game controllers. The small (right) motor
- * is high frequency, and the large (left) motor is low frequency.
- *
- * \sa SDL_HAPTIC_LEFTRIGHT
- * \sa SDL_HapticEffect
- */
-typedef struct SDL_HapticLeftRight
-{
-    /* Header */
-    Uint16 type;            /**< ::SDL_HAPTIC_LEFTRIGHT */
-
-    /* Replay */
-    Uint32 length;          /**< Duration of the effect in milliseconds. */
-
-    /* Rumble */
-    Uint16 large_magnitude; /**< Control of the large controller motor. */
-    Uint16 small_magnitude; /**< Control of the small controller motor. */
-} SDL_HapticLeftRight;
-
-/**
- *  \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.
- *
- *  This struct is exclusively for the ::SDL_HAPTIC_CUSTOM effect.
- *
- *  A custom force feedback effect is much like a periodic effect, where the
- *  application can define its exact shape.  You will have to allocate the
- *  data yourself.  Data should consist of channels * samples Uint16 samples.
- *
- *  If channels is one, the effect is rotated using the defined direction.
- *  Otherwise it uses the samples in data for the different axes.
- *
- *  \sa SDL_HAPTIC_CUSTOM
- *  \sa SDL_HapticEffect
- */
-typedef struct SDL_HapticCustom
-{
-    /* Header */
-    Uint16 type;            /**< ::SDL_HAPTIC_CUSTOM */
-    SDL_HapticDirection direction;  /**< Direction of the effect. */
-
-    /* Replay */
-    Uint32 length;          /**< Duration of the effect. */
-    Uint16 delay;           /**< Delay before starting the effect. */
-
-    /* Trigger */
-    Uint16 button;          /**< Button that triggers the effect. */
-    Uint16 interval;        /**< How soon it can be triggered again after button. */
-
-    /* Custom */
-    Uint8 channels;         /**< Axes to use, minimum of one. */
-    Uint16 period;          /**< Sample periods. */
-    Uint16 samples;         /**< Amount of samples. */
-    Uint16 *data;           /**< Should contain channels*samples items. */
-
-    /* Envelope */
-    Uint16 attack_length;   /**< Duration of the attack. */
-    Uint16 attack_level;    /**< Level at the start of the attack. */
-    Uint16 fade_length;     /**< Duration of the fade. */
-    Uint16 fade_level;      /**< Level at the end of the fade. */
-} SDL_HapticCustom;
-
-/**
- *  \brief The generic template for any haptic effect.
- *
- *  All values max at 32767 (0x7FFF).  Signed values also can be negative.
- *  Time values unless specified otherwise are in milliseconds.
- *
- *  You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767
- *  value.  Neither delay, interval, attack_length nor fade_length support
- *  ::SDL_HAPTIC_INFINITY.  Fade will also not be used since effect never ends.
- *
- *  Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of
- *  ::SDL_HAPTIC_INFINITY.
- *
- *  Button triggers may not be supported on all devices, it is advised to not
- *  use them if possible.  Buttons start at index 1 instead of index 0 like
- *  the joystick.
- *
- *  If both attack_length and fade_level are 0, the envelope is not used,
- *  otherwise both values are used.
- *
- *  Common parts:
- *  \code
- *  // Replay - All effects have this
- *  Uint32 length;        // Duration of effect (ms).
- *  Uint16 delay;         // Delay before starting effect.
- *
- *  // Trigger - All effects have this
- *  Uint16 button;        // Button that triggers effect.
- *  Uint16 interval;      // How soon before effect can be triggered again.
- *
- *  // Envelope - All effects except condition effects have this
- *  Uint16 attack_length; // Duration of the attack (ms).
- *  Uint16 attack_level;  // Level at the start of the attack.
- *  Uint16 fade_length;   // Duration of the fade out (ms).
- *  Uint16 fade_level;    // Level at the end of the fade.
- *  \endcode
- *
- *
- *  Here we have an example of a constant effect evolution in time:
- *  \verbatim
-    Strength
-    ^
-    |
-    |    effect level -->  _________________
-    |                     /                 \
-    |                    /                   \
-    |                   /                     \
-    |                  /                       \
-    | attack_level --> |                        \
-    |                  |                        |  <---  fade_level
-    |
-    +--------------------------------------------------> Time
-                       [--]                 [---]
-                       attack_length        fade_length
-
-    [------------------][-----------------------]
-    delay               length
-    \endverbatim
- *
- *  Note either the attack_level or the fade_level may be above the actual
- *  effect level.
- *
- *  \sa SDL_HapticConstant
- *  \sa SDL_HapticPeriodic
- *  \sa SDL_HapticCondition
- *  \sa SDL_HapticRamp
- *  \sa SDL_HapticLeftRight
- *  \sa SDL_HapticCustom
- */
-typedef union SDL_HapticEffect
-{
-    /* Common for all force feedback effects */
-    Uint16 type;                    /**< Effect type. */
-    SDL_HapticConstant constant;    /**< Constant effect. */
-    SDL_HapticPeriodic periodic;    /**< Periodic effect. */
-    SDL_HapticCondition condition;  /**< Condition effect. */
-    SDL_HapticRamp ramp;            /**< Ramp effect. */
-    SDL_HapticLeftRight leftright;  /**< Left/Right effect. */
-    SDL_HapticCustom custom;        /**< Custom effect. */
-} SDL_HapticEffect;
-
-
-/* Function prototypes */
-
-/**
- * Count the number of haptic devices attached to the system.
- *
- * \returns the number of haptic devices detected on the system or a negative
- *          error code on failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticName
- */
-extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
-
-/**
- * Get the implementation dependent name of a haptic device.
- *
- * This can be called before any joysticks are opened. If no name can be
- * found, this function returns NULL.
- *
- * \param device_index index of the device to query.
- * \returns the name of the device or NULL on failure; call SDL_GetError() for
- *          more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_NumHaptics
- */
-extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);
-
-/**
- * Open a haptic device for use.
- *
- * The index passed as an argument refers to the N'th haptic device on this
- * system.
- *
- * When opening a haptic device, its gain will be set to maximum and
- * autocenter will be disabled. To modify these values use SDL_HapticSetGain()
- * and SDL_HapticSetAutocenter().
- *
- * \param device_index index of the device to open
- * \returns the device identifier or NULL on failure; call SDL_GetError() for
- *          more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticClose
- * \sa SDL_HapticIndex
- * \sa SDL_HapticOpenFromJoystick
- * \sa SDL_HapticOpenFromMouse
- * \sa SDL_HapticPause
- * \sa SDL_HapticSetAutocenter
- * \sa SDL_HapticSetGain
- * \sa SDL_HapticStopAll
- */
-extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index);
-
-/**
- * Check if the haptic device at the designated index has been opened.
- *
- * \param device_index the index of the device to query
- * \returns 1 if it has been opened, 0 if it hasn't or on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticIndex
- * \sa SDL_HapticOpen
- */
-extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index);
-
-/**
- * Get the index of a haptic device.
- *
- * \param haptic the SDL_Haptic device to query
- * \returns the index of the specified haptic device or a negative error code
- *          on failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticOpen
- * \sa SDL_HapticOpened
- */
-extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic);
-
-/**
- * Query whether or not the current mouse has haptic capabilities.
- *
- * \returns SDL_TRUE if the mouse is haptic or SDL_FALSE if it isn't.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticOpenFromMouse
- */
-extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void);
-
-/**
- * Try to open a haptic device from the current mouse.
- *
- * \returns the haptic device identifier or NULL on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticOpen
- * \sa SDL_MouseIsHaptic
- */
-extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void);
-
-/**
- * Query if a joystick has haptic features.
- *
- * \param joystick the SDL_Joystick to test for haptic capabilities
- * \returns SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't, or a
- *          negative error code on failure; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticOpenFromJoystick
- */
-extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);
-
-/**
- * Open a haptic device for use from a joystick device.
- *
- * You must still close the haptic device separately. It will not be closed
- * with the joystick.
- *
- * When opened from a joystick you should first close the haptic device before
- * closing the joystick device. If not, on some implementations the haptic
- * device will also get unallocated and you'll be unable to use force feedback
- * on that device.
- *
- * \param joystick the SDL_Joystick to create a haptic device from
- * \returns a valid haptic device identifier on success or NULL on failure;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticClose
- * \sa SDL_HapticOpen
- * \sa SDL_JoystickIsHaptic
- */
-extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *
-                                                               joystick);
-
-/**
- * Close a haptic device previously opened with SDL_HapticOpen().
- *
- * \param haptic the SDL_Haptic device to close
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticOpen
- */
-extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic);
-
-/**
- * Get the number of effects a haptic device can store.
- *
- * On some platforms this isn't fully supported, and therefore is an
- * approximation. Always check to see if your created effect was actually
- * created and do not rely solely on SDL_HapticNumEffects().
- *
- * \param haptic the SDL_Haptic device to query
- * \returns the number of effects the haptic device can store or a negative
- *          error code on failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticNumEffectsPlaying
- * \sa SDL_HapticQuery
- */
-extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic);
-
-/**
- * Get the number of effects a haptic device can play at the same time.
- *
- * This is not supported on all platforms, but will always return a value.
- *
- * \param haptic the SDL_Haptic device to query maximum playing effects
- * \returns the number of effects the haptic device can play at the same time
- *          or a negative error code on failure; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticNumEffects
- * \sa SDL_HapticQuery
- */
-extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
-
-/**
- * Get the haptic device's supported features in bitwise manner.
- *
- * \param haptic the SDL_Haptic device to query
- * \returns a list of supported haptic features in bitwise manner (OR'd), or 0
- *          on failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticEffectSupported
- * \sa SDL_HapticNumEffects
- */
-extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic);
-
-
-/**
- * Get the number of haptic axes the device has.
- *
- * The number of haptic axes might be useful if working with the
- * SDL_HapticDirection effect.
- *
- * \param haptic the SDL_Haptic device to query
- * \returns the number of axes on success or a negative error code on failure;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic);
-
-/**
- * Check to see if an effect is supported by a haptic device.
- *
- * \param haptic the SDL_Haptic device to query
- * \param effect the desired effect to query
- * \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
- *          negative error code on failure; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticNewEffect
- * \sa SDL_HapticQuery
- */
-extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,
-                                                      SDL_HapticEffect *
-                                                      effect);
-
-/**
- * Create a new haptic effect on a specified device.
- *
- * \param haptic an SDL_Haptic device to create the effect on
- * \param effect an SDL_HapticEffect structure containing the properties of
- *               the effect to create
- * \returns the ID of the effect on success or a negative error code on
- *          failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticDestroyEffect
- * \sa SDL_HapticRunEffect
- * \sa SDL_HapticUpdateEffect
- */
-extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,
-                                                SDL_HapticEffect * effect);
-
-/**
- * Update the properties of an effect.
- *
- * Can be used dynamically, although behavior when dynamically changing
- * direction may be strange. Specifically the effect may re-upload itself and
- * start playing from the start. You also cannot change the type either when
- * running SDL_HapticUpdateEffect().
- *
- * \param haptic the SDL_Haptic device that has the effect
- * \param effect the identifier of the effect to update
- * \param data an SDL_HapticEffect structure containing the new effect
- *             properties to use
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticDestroyEffect
- * \sa SDL_HapticNewEffect
- * \sa SDL_HapticRunEffect
- */
-extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic,
-                                                   int effect,
-                                                   SDL_HapticEffect * data);
-
-/**
- * Run the haptic effect on its associated haptic device.
- *
- * To repeat the effect over and over indefinitely, set `iterations` to
- * `SDL_HAPTIC_INFINITY`. (Repeats the envelope - attack and fade.) To make
- * one instance of the effect last indefinitely (so the effect does not fade),
- * set the effect's `length` in its structure/union to `SDL_HAPTIC_INFINITY`
- * instead.
- *
- * \param haptic the SDL_Haptic device to run the effect on
- * \param effect the ID of the haptic effect to run
- * \param iterations the number of iterations to run the effect; use
- *                   `SDL_HAPTIC_INFINITY` to repeat forever
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticDestroyEffect
- * \sa SDL_HapticGetEffectStatus
- * \sa SDL_HapticStopEffect
- */
-extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic,
-                                                int effect,
-                                                Uint32 iterations);
-
-/**
- * Stop the haptic effect on its associated haptic device.
- *
- * *
- *
- * \param haptic the SDL_Haptic device to stop the effect on
- * \param effect the ID of the haptic effect to stop
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticDestroyEffect
- * \sa SDL_HapticRunEffect
- */
-extern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic,
-                                                 int effect);
-
-/**
- * Destroy a haptic effect on the device.
- *
- * This will stop the effect if it's running. Effects are automatically
- * destroyed when the device is closed.
- *
- * \param haptic the SDL_Haptic device to destroy the effect on
- * \param effect the ID of the haptic effect to destroy
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticNewEffect
- */
-extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic,
-                                                     int effect);
-
-/**
- * Get the status of the current effect on the specified haptic device.
- *
- * Device must support the SDL_HAPTIC_STATUS feature.
- *
- * \param haptic the SDL_Haptic device to query for the effect status on
- * \param effect the ID of the haptic effect to query its status
- * \returns 0 if it isn't playing, 1 if it is playing, or a negative error
- *          code on failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticRunEffect
- * \sa SDL_HapticStopEffect
- */
-extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic,
-                                                      int effect);
-
-/**
- * Set the global gain of the specified haptic device.
- *
- * Device must support the SDL_HAPTIC_GAIN feature.
- *
- * The user may specify the maximum gain by setting the environment variable
- * `SDL_HAPTIC_GAIN_MAX` which should be between 0 and 100. All calls to
- * SDL_HapticSetGain() will scale linearly using `SDL_HAPTIC_GAIN_MAX` as the
- * maximum.
- *
- * \param haptic the SDL_Haptic device to set the gain on
- * \param gain value to set the gain to, should be between 0 and 100 (0 - 100)
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticQuery
- */
-extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain);
-
-/**
- * Set the global autocenter of the device.
- *
- * Autocenter should be between 0 and 100. Setting it to 0 will disable
- * autocentering.
- *
- * Device must support the SDL_HAPTIC_AUTOCENTER feature.
- *
- * \param haptic the SDL_Haptic device to set autocentering on
- * \param autocenter value to set autocenter to (0-100)
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticQuery
- */
-extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic,
-                                                    int autocenter);
-
-/**
- * Pause a haptic device.
- *
- * Device must support the `SDL_HAPTIC_PAUSE` feature. Call
- * SDL_HapticUnpause() to resume playback.
- *
- * Do not modify the effects nor add new ones while the device is paused. That
- * can cause all sorts of weird errors.
- *
- * \param haptic the SDL_Haptic device to pause
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticUnpause
- */
-extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);
-
-/**
- * Unpause a haptic device.
- *
- * Call to unpause after SDL_HapticPause().
- *
- * \param haptic the SDL_Haptic device to unpause
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticPause
- */
-extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);
-
-/**
- * Stop all the currently playing effects on a haptic device.
- *
- * \param haptic the SDL_Haptic device to stop
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);
-
-/**
- * Check whether rumble is supported on a haptic device.
- *
- * \param haptic haptic device to check for rumble support
- * \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
- *          negative error code on failure; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticRumbleInit
- * \sa SDL_HapticRumblePlay
- * \sa SDL_HapticRumbleStop
- */
-extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
-
-/**
- * Initialize a haptic device for simple rumble playback.
- *
- * \param haptic the haptic device to initialize for simple rumble playback
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticOpen
- * \sa SDL_HapticRumblePlay
- * \sa SDL_HapticRumbleStop
- * \sa SDL_HapticRumbleSupported
- */
-extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
-
-/**
- * Run a simple rumble effect on a haptic device.
- *
- * \param haptic the haptic device to play the rumble effect on
- * \param strength strength of the rumble to play as a 0-1 float value
- * \param length length of the rumble to play in milliseconds
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticRumbleInit
- * \sa SDL_HapticRumbleStop
- * \sa SDL_HapticRumbleSupported
- */
-extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length );
-
-/**
- * Stop the simple rumble on a haptic device.
- *
- * \param haptic the haptic device to stop the rumble effect on
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HapticRumbleInit
- * \sa SDL_HapticRumblePlay
- * \sa SDL_HapticRumbleSupported
- */
-extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_haptic_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_hidapi.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_hidapi.h
deleted file mode 100644 (file)
index 354af5c..0000000
+++ /dev/null
@@ -1,451 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_hidapi.h
- *
- *  Header file for SDL HIDAPI functions.
- *
- *  This is an adaptation of the original HIDAPI interface by Alan Ott,
- *  and includes source code licensed under the following BSD license:
- *
-    Copyright (c) 2010, Alan Ott, Signal 11 Software
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * 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.
-    * Neither the name of Signal 11 Software nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-    THIS 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 HOLDER 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.
- *
- * If you would like a version of SDL without this code, you can build SDL
- * with SDL_HIDAPI_DISABLED defined to 1. You might want to do this for example
- * on iOS or tvOS to avoid a dependency on the CoreBluetooth framework.
- */
-
-#ifndef SDL_hidapi_h_
-#define SDL_hidapi_h_
-
-#include "SDL_stdinc.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \brief  A handle representing an open HID device
- */
-struct SDL_hid_device_;
-typedef struct SDL_hid_device_ SDL_hid_device; /**< opaque hidapi structure */
-
-/** hidapi info structure */
-/**
- *  \brief  Information about a connected HID device
- */
-typedef struct SDL_hid_device_info
-{
-    /** Platform-specific device path */
-    char *path;
-    /** Device Vendor ID */
-    unsigned short vendor_id;
-    /** Device Product ID */
-    unsigned short product_id;
-    /** Serial Number */
-    wchar_t *serial_number;
-    /** Device Release Number in binary-coded decimal,
-        also known as Device Version Number */
-    unsigned short release_number;
-    /** Manufacturer String */
-    wchar_t *manufacturer_string;
-    /** Product string */
-    wchar_t *product_string;
-    /** Usage Page for this Device/Interface
-        (Windows/Mac only). */
-    unsigned short usage_page;
-    /** Usage for this Device/Interface
-        (Windows/Mac only).*/
-    unsigned short usage;
-    /** The USB interface which this logical device
-        represents.
-
-        * Valid on both Linux implementations in all cases.
-        * Valid on the Windows implementation only if the device
-          contains more than one interface. */
-    int interface_number;
-
-    /** Additional information about the USB interface.
-        Valid on libusb and Android implementations. */
-    int interface_class;
-    int interface_subclass;
-    int interface_protocol;
-
-    /** Pointer to the next device */
-    struct SDL_hid_device_info *next;
-} SDL_hid_device_info;
-
-
-/**
- * Initialize the HIDAPI library.
- *
- * This function initializes the HIDAPI library. Calling it is not strictly
- * necessary, as it will be called automatically by SDL_hid_enumerate() and
- * any of the SDL_hid_open_*() functions if it is needed. This function should
- * be called at the beginning of execution however, if there is a chance of
- * HIDAPI handles being opened by different threads simultaneously.
- *
- * Each call to this function should have a matching call to SDL_hid_exit()
- *
- * \returns 0 on success and -1 on error.
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_hid_exit
- */
-extern DECLSPEC int SDLCALL SDL_hid_init(void);
-
-/**
- * Finalize the HIDAPI library.
- *
- * This function frees all of the static data associated with HIDAPI. It
- * should be called at the end of execution to avoid memory leaks.
- *
- * \returns 0 on success and -1 on error.
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_hid_init
- */
-extern DECLSPEC int SDLCALL SDL_hid_exit(void);
-
-/**
- * Check to see if devices may have been added or removed.
- *
- * Enumerating the HID devices is an expensive operation, so you can call this
- * to see if there have been any system device changes since the last call to
- * this function. A change in the counter returned doesn't necessarily mean
- * that anything has changed, but you can call SDL_hid_enumerate() to get an
- * updated device list.
- *
- * Calling this function for the first time may cause a thread or other system
- * resource to be allocated to track device change notifications.
- *
- * \returns a change counter that is incremented with each potential device
- *          change, or 0 if device change detection isn't available.
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_hid_enumerate
- */
-extern DECLSPEC Uint32 SDLCALL SDL_hid_device_change_count(void);
-
-/**
- * Enumerate the HID Devices.
- *
- * This function returns a linked list of all the HID devices attached to the
- * system which match vendor_id and product_id. If `vendor_id` is set to 0
- * then any vendor matches. If `product_id` is set to 0 then any product
- * matches. If `vendor_id` and `product_id` are both set to 0, then all HID
- * devices will be returned.
- *
- * \param vendor_id The Vendor ID (VID) of the types of device to open.
- * \param product_id The Product ID (PID) of the types of device to open.
- * \returns a pointer to a linked list of type SDL_hid_device_info, containing
- *          information about the HID devices attached to the system, or NULL
- *          in the case of failure. Free this linked list by calling
- *          SDL_hid_free_enumeration().
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_hid_device_change_count
- */
-extern DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned short vendor_id, unsigned short product_id);
-
-/**
- * Free an enumeration Linked List
- *
- * This function frees a linked list created by SDL_hid_enumerate().
- *
- * \param devs Pointer to a list of struct_device returned from
- *             SDL_hid_enumerate().
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs);
-
-/**
- * Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally
- * a serial number.
- *
- * If `serial_number` is NULL, the first device with the specified VID and PID
- * is opened.
- *
- * \param vendor_id The Vendor ID (VID) of the device to open.
- * \param product_id The Product ID (PID) of the device to open.
- * \param serial_number The Serial Number of the device to open (Optionally
- *                      NULL).
- * \returns a pointer to a SDL_hid_device object on success or NULL on
- *          failure.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number);
-
-/**
- * Open a HID device by its path name.
- *
- * The path name be determined by calling SDL_hid_enumerate(), or a
- * platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
- *
- * \param path The path name of the device to open
- * \returns a pointer to a SDL_hid_device object on success or NULL on
- *          failure.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path, int bExclusive /* = false */);
-
-/**
- * Write an Output report to a HID device.
- *
- * The first byte of `data` must contain the Report ID. For devices which only
- * support a single report, this must be set to 0x0. The remaining bytes
- * contain the report data. Since the Report ID is mandatory, calls to
- * SDL_hid_write() will always contain one more byte than the report contains.
- * For example, if a hid report is 16 bytes long, 17 bytes must be passed to
- * SDL_hid_write(), the Report ID (or 0x0, for devices with a single report),
- * followed by the report data (16 bytes). In this example, the length passed
- * in would be 17.
- *
- * SDL_hid_write() will send the data on the first OUT endpoint, if one
- * exists. If it does not, it will send the data through the Control Endpoint
- * (Endpoint 0).
- *
- * \param dev A device handle returned from SDL_hid_open().
- * \param data The data to send, including the report number as the first
- *             byte.
- * \param length The length in bytes of the data to send.
- * \returns the actual number of bytes written and -1 on error.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigned char *data, size_t length);
-
-/**
- * Read an Input report from a HID device with timeout.
- *
- * Input reports are returned to the host through the INTERRUPT IN endpoint.
- * The first byte will contain the Report number if the device uses numbered
- * reports.
- *
- * \param dev A device handle returned from SDL_hid_open().
- * \param data A buffer to put the read data into.
- * \param length The number of bytes to read. For devices with multiple
- *               reports, make sure to read an extra byte for the report
- *               number.
- * \param milliseconds timeout in milliseconds or -1 for blocking wait.
- * \returns the actual number of bytes read and -1 on error. If no packet was
- *          available to be read within the timeout period, this function
- *          returns 0.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsigned char *data, size_t length, int milliseconds);
-
-/**
- * Read an Input report from a HID device.
- *
- * Input reports are returned to the host through the INTERRUPT IN endpoint.
- * The first byte will contain the Report number if the device uses numbered
- * reports.
- *
- * \param dev A device handle returned from SDL_hid_open().
- * \param data A buffer to put the read data into.
- * \param length The number of bytes to read. For devices with multiple
- *               reports, make sure to read an extra byte for the report
- *               number.
- * \returns the actual number of bytes read and -1 on error. If no packet was
- *          available to be read and the handle is in non-blocking mode, this
- *          function returns 0.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char *data, size_t length);
-
-/**
- * Set the device handle to be non-blocking.
- *
- * In non-blocking mode calls to SDL_hid_read() will return immediately with a
- * value of 0 if there is no data to be read. In blocking mode, SDL_hid_read()
- * will wait (block) until there is data to read before returning.
- *
- * Nonblocking can be turned on and off at any time.
- *
- * \param dev A device handle returned from SDL_hid_open().
- * \param nonblock enable or not the nonblocking reads - 1 to enable
- *                 nonblocking - 0 to disable nonblocking.
- * \returns 0 on success and -1 on error.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int nonblock);
-
-/**
- * Send a Feature report to the device.
- *
- * Feature reports are sent over the Control endpoint as a Set_Report
- * transfer. The first byte of `data` must contain the Report ID. For devices
- * which only support a single report, this must be set to 0x0. The remaining
- * bytes contain the report data. Since the Report ID is mandatory, calls to
- * SDL_hid_send_feature_report() will always contain one more byte than the
- * report contains. For example, if a hid report is 16 bytes long, 17 bytes
- * must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for
- * devices which do not use numbered reports), followed by the report data (16
- * bytes). In this example, the length passed in would be 17.
- *
- * \param dev A device handle returned from SDL_hid_open().
- * \param data The data to send, including the report number as the first
- *             byte.
- * \param length The length in bytes of the data to send, including the report
- *               number.
- * \returns the actual number of bytes written and -1 on error.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, const unsigned char *data, size_t length);
-
-/**
- * Get a feature report from a HID device.
- *
- * Set the first byte of `data` to the Report ID of the report to be read.
- * Make sure to allow space for this extra byte in `data`. Upon return, the
- * first byte will still contain the Report ID, and the report data will start
- * in data[1].
- *
- * \param dev A device handle returned from SDL_hid_open().
- * \param data A buffer to put the read data into, including the Report ID.
- *             Set the first byte of `data` to the Report ID of the report to
- *             be read, or set it to zero if your device does not use numbered
- *             reports.
- * \param length The number of bytes to read, including an extra byte for the
- *               report ID. The buffer can be longer than the actual report.
- * \returns the number of bytes read plus one for the report ID (which is
- *          still in the first byte), or -1 on error.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev, unsigned char *data, size_t length);
-
-/**
- * Close a HID device.
- *
- * \param dev A device handle returned from SDL_hid_open().
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC void SDLCALL SDL_hid_close(SDL_hid_device *dev);
-
-/**
- * Get The Manufacturer String from a HID device.
- *
- * \param dev A device handle returned from SDL_hid_open().
- * \param string A wide string buffer to put the data into.
- * \param maxlen The length of the buffer in multiples of wchar_t.
- * \returns 0 on success and -1 on error.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
-
-/**
- * Get The Product String from a HID device.
- *
- * \param dev A device handle returned from SDL_hid_open().
- * \param string A wide string buffer to put the data into.
- * \param maxlen The length of the buffer in multiples of wchar_t.
- * \returns 0 on success and -1 on error.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
-
-/**
- * Get The Serial Number String from a HID device.
- *
- * \param dev A device handle returned from SDL_hid_open().
- * \param string A wide string buffer to put the data into.
- * \param maxlen The length of the buffer in multiples of wchar_t.
- * \returns 0 on success and -1 on error.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
-
-/**
- * Get a string from a HID device, based on its string index.
- *
- * \param dev A device handle returned from SDL_hid_open().
- * \param string_index The index of the string to get.
- * \param string A wide string buffer to put the data into.
- * \param maxlen The length of the buffer in multiples of wchar_t.
- * \returns 0 on success and -1 on error.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
-
-/**
- * Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers
- *
- * \param active SDL_TRUE to start the scan, SDL_FALSE to stop the scan
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC void SDLCALL SDL_hid_ble_scan(SDL_bool active);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_hidapi_h_ */
-
-/* vi: set sts=4 ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_hints.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_hints.h
deleted file mode 100644 (file)
index ea819c8..0000000
+++ /dev/null
@@ -1,2182 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_hints.h
- *
- *  Official documentation for SDL configuration variables
- *
- *  This file contains functions to set and get configuration hints,
- *  as well as listing each of them alphabetically.
- *
- *  The convention for naming hints is SDL_HINT_X, where "SDL_X" is
- *  the environment variable that can be used to override the default.
- *
- *  In general these hints are just that - they may or may not be
- *  supported or applicable on any given platform, but they provide
- *  a way for an application or user to give the library a hint as
- *  to how they would like the library to work.
- */
-
-#ifndef SDL_hints_h_
-#define SDL_hints_h_
-
-#include "SDL_stdinc.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \brief  A variable controlling whether the Android / iOS built-in
- *  accelerometer should be listed as a joystick device.
- *
- *  This variable can be set to the following values:
- *    "0"       - The accelerometer is not listed as a joystick
- *    "1"       - The accelerometer is available as a 3 axis joystick (the default).
- */
-#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
-
-/**
- *  \brief Specify the behavior of Alt+Tab while the keyboard is grabbed.
- *
- * By default, SDL emulates Alt+Tab functionality while the keyboard is grabbed
- * and your window is full-screen. This prevents the user from getting stuck in
- * your application if you've enabled keyboard grab.
- *
- * The variable can be set to the following values:
- *   "0"       - SDL will not handle Alt+Tab. Your application is responsible
-                 for handling Alt+Tab while the keyboard is grabbed.
- *   "1"       - SDL will minimize your window when Alt+Tab is pressed (default)
-*/
-#define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
-
-/**
- *  \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
- *      This is a debugging aid for developers and not expected to be used by end users. The default is "1"
- *
- *  This variable can be set to the following values:
- *    "0"       - don't allow topmost
- *    "1"       - allow topmost
- */
-#define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
-
-/**
- * \brief Android APK expansion main file version. Should be a string number like "1", "2" etc.
- *
- * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION.
- *
- * If both hints were set then SDL_RWFromFile() will look into expansion files
- * after a given relative path was not found in the internal storage and assets.
- *
- * By default this hint is not set and the APK expansion files are not searched.
- */
-#define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"
-/**
- * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc.
- *
- * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION.
- *
- * If both hints were set then SDL_RWFromFile() will look into expansion files
- * after a given relative path was not found in the internal storage and assets.
- *
- * By default this hint is not set and the APK expansion files are not searched.
- */
-#define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"
-
-/**
- * \brief A variable to control whether the event loop will block itself when the app is paused.
- *
- * The variable can be set to the following values:
- *   "0"       - Non blocking.
- *   "1"       - Blocking. (default)
- *
- * The value should be set before SDL is initialized.
- */
-#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
-
-/**
- * \brief A variable to control whether SDL will pause audio in background
- *        (Requires SDL_ANDROID_BLOCK_ON_PAUSE as "Non blocking")
- *
- * The variable can be set to the following values:
- *   "0"       - Non paused.
- *   "1"       - Paused. (default)
- *
- * The value should be set before SDL is initialized.
- */
-#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO"
-
-/**
- * \brief A variable to control whether we trap the Android back button to handle it manually.
- *        This is necessary for the right mouse button to work on some Android devices, or
- *        to be able to trap the back button for use in your code reliably.  If set to true,
- *        the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of 
- *        SDL_SCANCODE_AC_BACK.
- *
- * The variable can be set to the following values:
- *   "0"       - Back button will be handled as usual for system. (default)
- *   "1"       - Back button will be trapped, allowing you to handle the key press
- *               manually.  (This will also let right mouse click work on systems 
- *               where the right mouse button functions as back.)
- *
- * The value of this hint is used at runtime, so it can be changed at any time.
- */
-#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
-
-/**
- *  \brief Specify an application name.
- * 
- * This hint lets you specify the application name sent to the OS when
- * required. For example, this will often appear in volume control applets for
- * audio streams, and in lists of applications which are inhibiting the
- * screensaver.  You should use a string that describes your program ("My Game
- * 2: The Revenge")
- *
- * Setting this to "" or leaving it unset will have SDL use a reasonable
- * default: probably the application's name or "SDL Application" if SDL
- * doesn't have any better information.
- *
- * Note that, for audio streams, this can be overridden with
- * SDL_HINT_AUDIO_DEVICE_APP_NAME.
- *
- * On targets where this is not supported, this hint does nothing.
- */
-#define SDL_HINT_APP_NAME "SDL_APP_NAME"
-
-/**
- *  \brief  A variable controlling whether controllers used with the Apple TV
- *  generate UI events.
- *
- * When UI events are generated by controller input, the app will be
- * backgrounded when the Apple TV remote's menu button is pressed, and when the
- * pause or B buttons on gamepads are pressed.
- *
- * More information about properly making use of controllers for the Apple TV
- * can be found here:
- * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
- *
- *  This variable can be set to the following values:
- *    "0"       - Controller input does not generate UI events (the default).
- *    "1"       - Controller input generates UI events.
- */
-#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
-
-/**
- * \brief  A variable controlling whether the Apple TV remote's joystick axes
- *         will automatically match the rotation of the remote.
- *
- *  This variable can be set to the following values:
- *    "0"       - Remote orientation does not affect joystick axes (the default).
- *    "1"       - Joystick axes are based on the orientation of the remote.
- */
-#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
-
-/**
- *  \brief  A variable controlling the audio category on iOS and Mac OS X
- *
- *  This variable can be set to the following values:
- *
- *    "ambient"     - Use the AVAudioSessionCategoryAmbient audio category, will be muted by the phone mute switch (default)
- *    "playback"    - Use the AVAudioSessionCategoryPlayback category
- *
- *  For more information, see Apple's documentation:
- *  https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
- */
-#define SDL_HINT_AUDIO_CATEGORY   "SDL_AUDIO_CATEGORY"
-
-/**
- *  \brief Specify an application name for an audio device.
- *
- * Some audio backends (such as PulseAudio) allow you to describe your audio
- * stream. Among other things, this description might show up in a system
- * control panel that lets the user adjust the volume on specific audio
- * streams instead of using one giant master volume slider.
- *
- * This hints lets you transmit that information to the OS. The contents of
- * this hint are used while opening an audio device. You should use a string
- * that describes your program ("My Game 2: The Revenge")
- *
- * Setting this to "" or leaving it unset will have SDL use a reasonable
- * default: this will be the name set with SDL_HINT_APP_NAME, if that hint is
- * set. Otherwise, it'll probably the application's name or "SDL Application"
- * if SDL doesn't have any better information.
- *
- * On targets where this is not supported, this hint does nothing.
- */
-#define SDL_HINT_AUDIO_DEVICE_APP_NAME "SDL_AUDIO_DEVICE_APP_NAME"
-
-/**
- *  \brief Specify an application name for an audio device.
- *
- * Some audio backends (such as PulseAudio) allow you to describe your audio
- * stream. Among other things, this description might show up in a system
- * control panel that lets the user adjust the volume on specific audio
- * streams instead of using one giant master volume slider.
- *
- * This hints lets you transmit that information to the OS. The contents of
- * this hint are used while opening an audio device. You should use a string
- * that describes your what your program is playing ("audio stream" is
- * probably sufficient in many cases, but this could be useful for something
- * like "team chat" if you have a headset playing VoIP audio separately).
- *
- * Setting this to "" or leaving it unset will have SDL use a reasonable
- * default: "audio stream" or something similar.
- *
- * On targets where this is not supported, this hint does nothing.
- */
-#define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
-
-/**
- *  \brief Specify an application role for an audio device.
- *
- * Some audio backends (such as Pipewire) allow you to describe the role of
- * your audio stream. Among other things, this description might show up in
- * a system control panel or software for displaying and manipulating media
- * playback/capture graphs.
- *
- * This hints lets you transmit that information to the OS. The contents of
- * this hint are used while opening an audio device. You should use a string
- * that describes your what your program is playing (Game, Music, Movie,
- * etc...).
- *
- * Setting this to "" or leaving it unset will have SDL use a reasonable
- * default: "Game" or something similar.
- *
- * On targets where this is not supported, this hint does nothing.
- */
-#define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE"
-
-/**
- *  \brief  A variable controlling speed/quality tradeoff of audio resampling.
- *
- *  If available, SDL can use libsamplerate ( http://www.mega-nerd.com/SRC/ )
- *  to handle audio resampling. There are different resampling modes available
- *  that produce different levels of quality, using more CPU.
- *
- *  If this hint isn't specified to a valid setting, or libsamplerate isn't
- *  available, SDL will use the default, internal resampling algorithm.
- *
- *  Note that this is currently only applicable to resampling audio that is
- *  being written to a device for playback or audio being read from a device
- *  for capture. SDL_AudioCVT always uses the default resampler (although this
- *  might change for SDL 2.1).
- *
- *  This hint is currently only checked at audio subsystem initialization.
- *
- *  This variable can be set to the following values:
- *
- *    "0" or "default" - Use SDL's internal resampling (Default when not set - low quality, fast)
- *    "1" or "fast"    - Use fast, slightly higher quality resampling, if available
- *    "2" or "medium"  - Use medium quality resampling, if available
- *    "3" or "best"    - Use high quality resampling, if available
- */
-#define SDL_HINT_AUDIO_RESAMPLING_MODE   "SDL_AUDIO_RESAMPLING_MODE"
-
-/**
- *  \brief  A variable controlling whether SDL updates joystick state when getting input events
- *
- *  This variable can be set to the following values:
- *
- *    "0"     - You'll call SDL_JoystickUpdate() manually
- *    "1"     - SDL will automatically call SDL_JoystickUpdate() (default)
- *
- *  This hint can be toggled on and off at runtime.
- */
-#define SDL_HINT_AUTO_UPDATE_JOYSTICKS  "SDL_AUTO_UPDATE_JOYSTICKS"
-
-/**
- *  \brief  A variable controlling whether SDL updates sensor state when getting input events
- *
- *  This variable can be set to the following values:
- *
- *    "0"     - You'll call SDL_SensorUpdate() manually
- *    "1"     - SDL will automatically call SDL_SensorUpdate() (default)
- *
- *  This hint can be toggled on and off at runtime.
- */
-#define SDL_HINT_AUTO_UPDATE_SENSORS    "SDL_AUTO_UPDATE_SENSORS"
-
-/**
- *  \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
- *
- * The bitmap header version 4 is required for proper alpha channel support and
- * SDL will use it when required. Should this not be desired, this hint can
- * force the use of the 40 byte header version which is supported everywhere.
- *
- * The variable can be set to the following values:
- *   "0"       - Surfaces with a colorkey or an alpha channel are saved to a
- *               32-bit BMP file with an alpha mask. SDL will use the bitmap
- *               header version 4 and set the alpha mask accordingly.
- *   "1"       - Surfaces with a colorkey or an alpha channel are saved to a
- *               32-bit BMP file without an alpha mask. The alpha channel data
- *               will be in the file, but applications are going to ignore it.
- *
- * The default value is "0".
- */
-#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
-
-/**
- *  \brief Override for SDL_GetDisplayUsableBounds()
- *
- *  If set, this hint will override the expected results for
- *  SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
- *  to do this, but this allows an embedded system to request that some of the
- *  screen be reserved for other uses when paired with a well-behaved
- *  application.
- *
- *  The contents of this hint must be 4 comma-separated integers, the first
- *  is the bounds x, then y, width and height, in that order.
- */
-#define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
-
-/**
- *  \brief Disable giving back control to the browser automatically
- *  when running with asyncify
- *
- * With -s ASYNCIFY, SDL2 calls emscripten_sleep during operations
- * such as refreshing the screen or polling events.
- *
- * This hint only applies to the emscripten platform
- *
- * The variable can be set to the following values:
- *    "0"       - Disable emscripten_sleep calls (if you give back browser control manually or use asyncify for other purposes)
- *    "1"       - Enable emscripten_sleep calls (the default)
- */
-#define SDL_HINT_EMSCRIPTEN_ASYNCIFY   "SDL_EMSCRIPTEN_ASYNCIFY"
-
-/**
- *  \brief override the binding element for keyboard inputs for Emscripten builds
- *
- * This hint only applies to the emscripten platform
- *
- * The variable can be one of
- *    "#window"      - The javascript window object (this is the default)
- *    "#document"    - The javascript document object
- *    "#screen"      - the javascript window.screen object
- *    "#canvas"      - the WebGL canvas element
- *    any other string without a leading # sign applies to the element on the page with that ID.
- */
-#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT   "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
-
-/**
- *  \brief  A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
- *
- *  The variable can be set to the following values:
- *    "0"       - Do not scan for Steam Controllers
- *    "1"       - Scan for Steam Controllers (the default)
- *
- *  The default value is "1".  This hint must be set before initializing the joystick subsystem.
- */
-#define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
-
-/**
- *  \brief  A variable controlling whether SDL logs all events pushed onto its internal queue.
- *
- *  This variable can be set to the following values:
- *
- *    "0"     - Don't log any events (default)
- *    "1"     - Log all events except mouse and finger motion, which are pretty spammy.
- *    "2"     - Log all events.
- *
- *  This is generally meant to be used to debug SDL itself, but can be useful
- *  for application developers that need better visibility into what is going
- *  on in the event queue. Logged events are sent through SDL_Log(), which
- *  means by default they appear on stdout on most platforms or maybe
- *  OutputDebugString() on Windows, and can be funneled by the app with
- *  SDL_LogSetOutputFunction(), etc.
- *
- *  This hint can be toggled on and off at runtime, if you only need to log
- *  events for a small subset of program execution.
- */
-#define SDL_HINT_EVENT_LOGGING   "SDL_EVENT_LOGGING"
-
-/**
- *  \brief  A variable controlling whether raising the window should be done more forcefully
- *
- *  This variable can be set to the following values:
- *    "0"       - No forcing (the default)
- *    "1"       - Extra level of forcing
- *
- *  At present, this is only an issue under MS Windows, which makes it nearly impossible to
- *  programmatically move a window to the foreground, for "security" reasons. See
- *  http://stackoverflow.com/a/34414846 for a discussion.
- */
-#define SDL_HINT_FORCE_RAISEWINDOW    "SDL_HINT_FORCE_RAISEWINDOW"
-
-/**
- *  \brief  A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.
- *
- *  SDL can try to accelerate the SDL screen surface by using streaming
- *  textures with a 3D rendering engine.  This variable controls whether and
- *  how this is done.
- *
- *  This variable can be set to the following values:
- *    "0"       - Disable 3D acceleration
- *    "1"       - Enable 3D acceleration, using the default renderer.
- *    "X"       - Enable 3D acceleration, using X where X is one of the valid rendering drivers.  (e.g. "direct3d", "opengl", etc.)
- *
- *  By default SDL tries to make a best guess for each platform whether
- *  to use acceleration or not.
- */
-#define SDL_HINT_FRAMEBUFFER_ACCELERATION   "SDL_FRAMEBUFFER_ACCELERATION"
-
-/**
- *  \brief  A variable that lets you manually hint extra gamecontroller db entries.
- *
- *  The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h
- *
- *  This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
- *  You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
- */
-#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
-
-/**
- *  \brief  A variable that lets you provide a file with extra gamecontroller db entries.
- *
- *  The file should contain lines of gamecontroller config data, see SDL_gamecontroller.h
- *
- *  This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
- *  You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
- */
-#define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
-
-/**
- *  \brief  A variable that overrides the automatic controller type detection
- *
- *  The variable should be comma separated entries, in the form: VID/PID=type
- *
- *  The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
- *
- *  The type should be one of:
- *      Xbox360
- *      XboxOne
- *      PS3
- *      PS4
- *      PS5
- *      SwitchPro
- *
- *  This hint affects what driver is used, and must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
- */
-#define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
-
-/**
- *  \brief  A variable containing a list of devices to skip when scanning for game controllers.
- *
- *  The format of the string is a comma separated list of USB VID/PID pairs
- *  in hexadecimal form, e.g.
- *
- *      0xAAAA/0xBBBB,0xCCCC/0xDDDD
- *
- *  The variable can also take the form of @file, in which case the named
- *  file will be loaded and interpreted as the value of the variable.
- */
-#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
-
-/**
- *  \brief  If set, all devices will be skipped when scanning for game controllers except for the ones listed in this variable.
- *
- *  The format of the string is a comma separated list of USB VID/PID pairs
- *  in hexadecimal form, e.g.
- *
- *      0xAAAA/0xBBBB,0xCCCC/0xDDDD
- *
- *  The variable can also take the form of @file, in which case the named
- *  file will be loaded and interpreted as the value of the variable.
- */
-#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
-
-/**
- *  \brief  If set, game controller face buttons report their values according to their labels instead of their positional layout.
- * 
- *  For example, on Nintendo Switch controllers, normally you'd get:
- *
- *      (Y)
- *  (X)     (B)
- *      (A)
- *
- *  but if this hint is set, you'll get:
- *
- *      (X)
- *  (Y)     (A)
- *      (B)
- *
- *  The variable can be set to the following values:
- *    "0"       - Report the face buttons by position, as though they were on an Xbox controller.
- *    "1"       - Report the face buttons by label instead of position
- *
- *  The default value is "1".  This hint may be set at any time.
- */
-#define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
-
-/**
- *  \brief  A variable controlling whether grabbing input grabs the keyboard
- *
- *  This variable can be set to the following values:
- *    "0"       - Grab will affect only the mouse
- *    "1"       - Grab will affect mouse and keyboard
- *
- *  By default SDL will not grab the keyboard so system shortcuts still work.
- */
-#define SDL_HINT_GRAB_KEYBOARD              "SDL_GRAB_KEYBOARD"
-
-/**
- *  \brief  A variable controlling whether the idle timer is disabled on iOS.
- *
- *  When an iOS app does not receive touches for some time, the screen is
- *  dimmed automatically. For games where the accelerometer is the only input
- *  this is problematic. This functionality can be disabled by setting this
- *  hint.
- *
- *  As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver()
- *  accomplish the same thing on iOS. They should be preferred over this hint.
- *
- *  This variable can be set to the following values:
- *    "0"       - Enable idle timer
- *    "1"       - Disable idle timer
- */
-#define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
-
-/**
- * \brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_TEXTEDITING events.
- *
- * The variable can be set to the following values:
- *   "0"       - SDL_TEXTEDITING events are sent, and it is the application's
- *               responsibility to render the text from these events and 
- *               differentiate it somehow from committed text. (default)
- *   "1"       - If supported by the IME then SDL_TEXTEDITING events are not sent, 
- *               and text that is being composed will be rendered in its own UI.
- */
-#define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
-
-/**
- * \brief A variable to control whether certain IMEs should show native UI components (such as the Candidate List) instead of suppressing them.
- *
- * The variable can be set to the following values:
- *   "0"       - Native UI components are not display. (default)
- *   "1"       - Native UI components are displayed.
- */
-#define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI"
-
-/**
- * \brief A variable to control if extended IME text support is enabled.
- * If enabled then SDL_TextEditingExtEvent will be issued if the text would be truncated otherwise.
- * Additionally SDL_TextInputEvent will be dispatched multiple times so that it is not truncated.
- *
- * The variable can be set to the following values:
- *   "0"       - Legacy behavior. Text can be truncated, no heap allocations. (default)
- *   "1"       - Modern behavior.
- */
-#define SDL_HINT_IME_SUPPORT_EXTENDED_TEXT "SDL_IME_SUPPORT_EXTENDED_TEXT"
-
-/**
- * \brief  A variable controlling whether the home indicator bar on iPhone X
- *         should be hidden.
- *
- *  This variable can be set to the following values:
- *    "0"       - The indicator bar is not hidden (default for windowed applications)
- *    "1"       - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)
- *    "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)
- */
-#define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
-
-/**
- *  \brief  A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
- *
- *  The variable can be set to the following values:
- *    "0"       - Disable joystick & gamecontroller input events when the
- *                application is in the background.
- *    "1"       - Enable joystick & gamecontroller input events when the
- *                application is in the background.
- *
- *  The default value is "0".  This hint may be set at any time.
- */
-#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
-
-/**
- *  \brief  A variable controlling whether the HIDAPI joystick drivers should be used.
- *
- *  This variable can be set to the following values:
- *    "0"       - HIDAPI drivers are not used
- *    "1"       - HIDAPI drivers are used (the default)
- *
- *  This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.
- */
-#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
-
-/**
- *  \brief  A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used.
- *
- *  This variable can be set to the following values:
- *    "0"       - HIDAPI driver is not used
- *    "1"       - HIDAPI driver is used
- *
- *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI
- */
-#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
-
-/**
- *  \brief  A variable controlling whether "low_frequency_rumble" and "high_frequency_rumble" is used to implement
- *          the GameCube controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2)
- *          this is useful for applications that need full compatibility for things like ADSR envelopes.
- *          Stop is implemented by setting "low_frequency_rumble" to "0" and "high_frequency_rumble" ">0"
- *          Rumble is both at any arbitrary value,
- *          StopHard is implemented by setting both "low_frequency_rumble" and "high_frequency_rumble" to "0"
- *
- *  This variable can be set to the following values:
- *    "0"       - Normal rumble behavior is behavior is used (default)
- *    "1"       - Proper GameCube controller rumble behavior is used
- *
- */
-#define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
-
- /**
-  *  \brief  A variable controlling whether Switch Joy-Cons should be treated the same as Switch Pro Controllers when using the HIDAPI driver.
-  *
-  *  This variable can be set to the following values:
-  *    "0"       - basic Joy-Con support with no analog input (the default)
-  *    "1"       - Joy-Cons treated as half full Pro Controllers with analog inputs and sensors
-  *
-  *  This does not combine Joy-Cons into a single controller. That's up to the user.
-  */
-#define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
-
- /**
-  *  \brief  A variable controlling whether the HIDAPI driver for Amazon Luna controllers connected via Bluetooth should be used.
-  *
-  *  This variable can be set to the following values:
-  *    "0"       - HIDAPI driver is not used
-  *    "1"       - HIDAPI driver is used
-  *
-  *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI
-  */
-#define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
-
-/**
- *  \brief  A variable controlling whether the HIDAPI driver for PS4 controllers should be used.
- *
- *  This variable can be set to the following values:
- *    "0"       - HIDAPI driver is not used
- *    "1"       - HIDAPI driver is used
- *
- *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI
- */
-#define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
-
-/**
- *  \brief  A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.
- *
- *  This variable can be set to the following values:
- *    "0"       - extended reports are not enabled (the default)
- *    "1"       - extended reports
- *
- *  Extended input reports allow rumble on Bluetooth PS4 controllers, but
- *  break DirectInput handling for applications that don't use SDL.
- *
- *  Once extended reports are enabled, they can not be disabled without
- *  power cycling the controller.
- *
- *  For compatibility with applications written for versions of SDL prior
- *  to the introduction of PS5 controller support, this value will also
- *  control the state of extended reports on PS5 controllers when the
- *  SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE hint is not explicitly set.
- */
-#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
-
-/**
- *  \brief  A variable controlling whether the HIDAPI driver for PS5 controllers should be used.
- *
- *  This variable can be set to the following values:
- *    "0"       - HIDAPI driver is not used
- *    "1"       - HIDAPI driver is used
- *
- *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI
- */
-#define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5"
-
-/**
- *  \brief  A variable controlling whether the player LEDs should be lit to indicate which player is associated with a PS5 controller.
- *
- *  This variable can be set to the following values:
- *    "0"       - player LEDs are not enabled
- *    "1"       - player LEDs are enabled (the default)
- */
-#define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
-
-/**
- *  \brief  A variable controlling whether extended input reports should be used for PS5 controllers when using the HIDAPI driver.
- *
- *  This variable can be set to the following values:
- *    "0"       - extended reports are not enabled (the default)
- *    "1"       - extended reports
- *
- *  Extended input reports allow rumble on Bluetooth PS5 controllers, but
- *  break DirectInput handling for applications that don't use SDL.
- *
- *  Once extended reports are enabled, they can not be disabled without
- *  power cycling the controller.
- *
- *  For compatibility with applications written for versions of SDL prior
- *  to the introduction of PS5 controller support, this value defaults to
- *  the value of SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE.
- */
-#define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE"
-
-/**
- *  \brief  A variable controlling whether the HIDAPI driver for Google Stadia controllers should be used.
- *
- *  This variable can be set to the following values:
- *    "0"       - HIDAPI driver is not used
- *    "1"       - HIDAPI driver is used
- *
- *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI
- */
-#define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
-
-/**
- *  \brief  A variable controlling whether the HIDAPI driver for Steam Controllers should be used.
- *
- *  This variable can be set to the following values:
- *    "0"       - HIDAPI driver is not used
- *    "1"       - HIDAPI driver is used for Steam Controllers, which requires Bluetooth access
- *                and may prompt the user for permission on iOS and Android.
- *
- *  The default is "0"
- */
-#define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
-
-/**
- *  \brief  A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used.
- *
- *  This variable can be set to the following values:
- *    "0"       - HIDAPI driver is not used
- *    "1"       - HIDAPI driver is used
- *
- *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI
- */
-#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
-
-/**
- *  \brief  A variable controlling whether the Home button LED should be turned on when a Nintendo Switch controller is opened
- *
- *  This variable can be set to the following values:
- *    "0"       - home button LED is turned off
- *    "1"       - home button LED is turned on
- *
- *  By default the Home button LED state is not changed.
- */
-#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
-
-/**
- *  \brief  A variable controlling whether the HIDAPI driver for XBox controllers should be used.
- *
- *  This variable can be set to the following values:
- *    "0"       - HIDAPI driver is not used
- *    "1"       - HIDAPI driver is used
- *
- *  The default is "0" on Windows, otherwise the value of SDL_HINT_JOYSTICK_HIDAPI
- */
-#define SDL_HINT_JOYSTICK_HIDAPI_XBOX   "SDL_JOYSTICK_HIDAPI_XBOX"
-
- /**
-  *  \brief  A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices.
-  *
-  *  This variable can be set to the following values:
-  *    "0"       - RAWINPUT drivers are not used
-  *    "1"       - RAWINPUT drivers are used (the default)
-  */
-#define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
-
- /**
-  *  \brief  A variable controlling whether the RAWINPUT driver should pull correlated data from XInput.
-  *
-  *  This variable can be set to the following values:
-  *    "0"       - RAWINPUT driver will only use data from raw input APIs
-  *    "1"       - RAWINPUT driver will also pull data from XInput, providing
-  *                better trigger axes, guide button presses, and rumble support
-  *                for Xbox controllers
-  *
-  *  The default is "1".  This hint applies to any joysticks opened after setting the hint.
-  */
-#define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT   "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
-
- /**
-  *  \brief  A variable controlling whether the ROG Chakram mice should show up as joysticks
-  *
-  *  This variable can be set to the following values:
-  *    "0"       - ROG Chakram mice do not show up as joysticks (the default)
-  *    "1"       - ROG Chakram mice show up as joysticks
-  */
-#define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
-
- /**
-  *  \brief  A variable controlling whether a separate thread should be used
-  *          for handling joystick detection and raw input messages on Windows
-  *
-  *  This variable can be set to the following values:
-  *    "0"       - A separate thread is not used (the default)
-  *    "1"       - A separate thread is used for handling raw input messages
-  *
-  */
-#define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
-
-/**
- * \brief Determines whether SDL enforces that DRM master is required in order
- *        to initialize the KMSDRM video backend.
- *
- * The DRM subsystem has a concept of a "DRM master" which is a DRM client that
- * has the ability to set planes, set cursor, etc. When SDL is DRM master, it
- * can draw to the screen using the SDL rendering APIs. Without DRM master, SDL
- * is still able to process input and query attributes of attached displays,
- * but it cannot change display state or draw to the screen directly.
- *
- * In some cases, it can be useful to have the KMSDRM backend even if it cannot
- * be used for rendering. An app may want to use SDL for input processing while
- * using another rendering API (such as an MMAL overlay on Raspberry Pi) or
- * using its own code to render to DRM overlays that SDL doesn't support.
- *
- * This hint must be set before initializing the video subsystem.
- *
- * This variable can be set to the following values:
- *    "0"       - SDL will allow usage of the KMSDRM backend without DRM master
- *    "1"       - SDL Will require DRM master to use the KMSDRM backend (default)
- */
-#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER      "SDL_KMSDRM_REQUIRE_DRM_MASTER"
-
- /**
-  *  \brief  A comma separated list of devices to open as joysticks
-  *
-  *  This variable is currently only used by the Linux joystick driver.
-  */
-#define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
-
- /**
-  *  \brief  A variable controlling whether to use the classic /dev/input/js* joystick interface or the newer /dev/input/event* joystick interface on Linux
-  *
-  *  This variable can be set to the following values:
-  *    "0"       - Use /dev/input/event*
-  *    "1"       - Use /dev/input/js*
-  *
-  *  By default the /dev/input/event* interfaces are used
-  */
-#define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC"
-
- /**
-  *  \brief  A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values.
-  *
-  *  This variable can be set to the following values:
-  *    "0"       - Return unfiltered joystick axis values (the default)
-  *    "1"       - Return axis values with deadzones taken into account
-  */
-#define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES"
-
-/**
-*  \brief  When set don't force the SDL app to become a foreground process
-*
-*  This hint only applies to Mac OS X.
-*
-*/
-#define SDL_HINT_MAC_BACKGROUND_APP    "SDL_MAC_BACKGROUND_APP"
-
-/**
- *  \brief A variable that determines whether ctrl+click should generate a right-click event on Mac
- *
- *  If present, holding ctrl while left clicking will generate a right click
- *  event when on Mac.
- */
-#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
-
-/**
- *  \brief  A variable setting the double click radius, in pixels.
- */
-#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS    "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
-
-/**
- *  \brief  A variable setting the double click time, in milliseconds.
- */
-#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME    "SDL_MOUSE_DOUBLE_CLICK_TIME"
-
-/**
- *  \brief Allow mouse click events when clicking to focus an SDL window
- *
- *  This variable can be set to the following values:
- *    "0"       - Ignore mouse clicks that activate a window
- *    "1"       - Generate events for mouse clicks that activate a window
- *
- *  By default SDL will ignore mouse clicks that activate a window
- */
-#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
-
-/**
- *  \brief  A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
- */
-#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE    "SDL_MOUSE_NORMAL_SPEED_SCALE"
-
-/**
- *  \brief  A variable controlling whether relative mouse mode constrains the mouse to the center of the window
- *
- *  This variable can be set to the following values:
- *    "0"       - Relative mouse mode constrains the mouse to the window
- *    "1"       - Relative mouse mode constrains the mouse to the center of the window
- *
- *  Constraining to the center of the window works better for FPS games and when the
- *  application is running over RDP. Constraining to the whole window works better
- *  for 2D games and increases the chance that the mouse will be in the correct
- *  position when using high DPI mice.
- *
- *  By default SDL will constrain the mouse to the center of the window
- */
-#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER    "SDL_MOUSE_RELATIVE_MODE_CENTER"
-
-/**
- *  \brief  A variable controlling whether relative mouse mode is implemented using mouse warping
- *
- *  This variable can be set to the following values:
- *    "0"       - Relative mouse mode uses raw input
- *    "1"       - Relative mouse mode uses mouse warping
- *
- *  By default SDL will use raw input for relative mouse mode
- */
-#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP    "SDL_MOUSE_RELATIVE_MODE_WARP"
-
-/**
- *  \brief  A variable controlling whether relative mouse motion is affected by renderer scaling
- *
- *  This variable can be set to the following values:
- *    "0"       - Relative motion is unaffected by DPI or renderer's logical size
- *    "1"       - Relative motion is scaled according to DPI scaling and logical size
- *
- *  By default relative mouse deltas are affected by DPI and renderer scaling
- */
-#define SDL_HINT_MOUSE_RELATIVE_SCALING "SDL_MOUSE_RELATIVE_SCALING"
-
-/**
- *  \brief  A variable setting the scale for mouse motion, in floating point, when the mouse is in relative mode
- */
-#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE    "SDL_MOUSE_RELATIVE_SPEED_SCALE"
-
-/**
- *  \brief  A variable controlling whether mouse events should generate synthetic touch events
- *
- *  This variable can be set to the following values:
- *    "0"       - Mouse events will not generate touch events (default for desktop platforms)
- *    "1"       - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS)
- */
-#define SDL_HINT_MOUSE_TOUCH_EVENTS    "SDL_MOUSE_TOUCH_EVENTS"
-
-/**
- *  \brief  A variable controlling whether the mouse is captured while mouse buttons are pressed
- *
- *  This variable can be set to the following values:
- *    "0"       - The mouse is not captured while mouse buttons are pressed
- *    "1"       - The mouse is captured while mouse buttons are pressed
- *
- *  By default the mouse is captured while mouse buttons are pressed so if the mouse is dragged
- *  outside the window, the application continues to receive mouse events until the button is
- *  released.
- */
-#define SDL_HINT_MOUSE_AUTO_CAPTURE    "SDL_MOUSE_AUTO_CAPTURE"
-
-/**
- *  \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
- *
- * This hint only applies to Unix-like platforms, and should set before
- * any calls to SDL_Init()
- *
- * The variable can be set to the following values:
- *   "0"       - SDL will install a SIGINT and SIGTERM handler, and when it
- *               catches a signal, convert it into an SDL_QUIT event.
- *   "1"       - SDL will not install a signal handler at all.
- */
-#define SDL_HINT_NO_SIGNAL_HANDLERS   "SDL_NO_SIGNAL_HANDLERS"
-
-/**
- *  \brief  A variable controlling what driver to use for OpenGL ES contexts.
- *
- *  On some platforms, currently Windows and X11, OpenGL drivers may support
- *  creating contexts with an OpenGL ES profile. By default SDL uses these
- *  profiles, when available, otherwise it attempts to load an OpenGL ES
- *  library, e.g. that provided by the ANGLE project. This variable controls
- *  whether SDL follows this default behaviour or will always load an
- *  OpenGL ES library.
- *
- *  Circumstances where this is useful include
- *  - Testing an app with a particular OpenGL ES implementation, e.g ANGLE,
- *    or emulator, e.g. those from ARM, Imagination or Qualcomm.
- *  - Resolving OpenGL ES function addresses at link time by linking with
- *    the OpenGL ES library instead of querying them at run time with
- *    SDL_GL_GetProcAddress().
- *
- *  Caution: for an application to work with the default behaviour across
- *  different OpenGL drivers it must query the OpenGL ES function
- *  addresses at run time using SDL_GL_GetProcAddress().
- *
- *  This variable is ignored on most platforms because OpenGL ES is native
- *  or not supported.
- *
- *  This variable can be set to the following values:
- *    "0"       - Use ES profile of OpenGL, if available. (Default when not set.)
- *    "1"       - Load OpenGL ES library using the default library names.
- *
- */
-#define SDL_HINT_OPENGL_ES_DRIVER   "SDL_OPENGL_ES_DRIVER"
-
-/**
- *  \brief  A variable controlling which orientations are allowed on iOS/Android.
- *
- *  In some circumstances it is necessary to be able to explicitly control
- *  which UI orientations are allowed.
- *
- *  This variable is a space delimited list of the following values:
- *    "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
- */
-#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
-
-/**
- *  \brief  A variable controlling the use of a sentinel event when polling the event queue
- *
- *  This variable can be set to the following values:
- *    "0"       - Disable poll sentinels
- *    "1"       - Enable poll sentinels
- *
- *  When polling for events, SDL_PumpEvents is used to gather new events from devices.
- *  If a device keeps producing new events between calls to SDL_PumpEvents, a poll loop will
- *  become stuck until the new events stop.
- *  This is most noticable when moving a high frequency mouse.
- *
- *  By default, poll sentinels are enabled.
- */
-#define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL"
-
-/**
- *  \brief Override for SDL_GetPreferredLocales()
- *
- *  If set, this will be favored over anything the OS might report for the
- *  user's preferred locales. Changing this hint at runtime will not generate
- *  a SDL_LOCALECHANGED event (but if you can change the hint, you can push
- *  your own event, if you want).
- *
- *  The format of this hint is a comma-separated list of language and locale,
- *  combined with an underscore, as is a common format: "en_GB". Locale is
- *  optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
- */
-#define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
-
-/**
- *  \brief  A variable describing the content orientation on QtWayland-based platforms.
- *
- *  On QtWayland platforms, windows are rotated client-side to allow for custom
- *  transitions. In order to correctly position overlays (e.g. volume bar) and
- *  gestures (e.g. events view, close/minimize gestures), the system needs to
- *  know in which orientation the application is currently drawing its contents.
- *
- *  This does not cause the window to be rotated or resized, the application
- *  needs to take care of drawing the content in the right orientation (the
- *  framebuffer is always in portrait mode).
- *
- *  This variable can be one of the following values:
- *    "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape"
- */
-#define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION"
-
-/**
- *  \brief  Flags to set on QtWayland windows to integrate with the native window manager.
- *
- *  On QtWayland platforms, this hint controls the flags to set on the windows.
- *  For example, on Sailfish OS "OverridesSystemGestures" disables swipe gestures.
- *
- *  This variable is a space-separated list of the following values (empty = no flags):
- *    "OverridesSystemGestures", "StaysOnTop", "BypassWindowManager"
- */
-#define SDL_HINT_QTWAYLAND_WINDOW_FLAGS "SDL_QTWAYLAND_WINDOW_FLAGS"
-
-/**
- *  \brief  A variable controlling whether the 2D render API is compatible or efficient.
- *
- *  This variable can be set to the following values:
- *
- *    "0"     - Don't use batching to make rendering more efficient.
- *    "1"     - Use batching, but might cause problems if app makes its own direct OpenGL calls.
- *
- *  Up to SDL 2.0.9, the render API would draw immediately when requested. Now
- *  it batches up draw requests and sends them all to the GPU only when forced
- *  to (during SDL_RenderPresent, when changing render targets, by updating a
- *  texture that the batch needs, etc). This is significantly more efficient,
- *  but it can cause problems for apps that expect to render on top of the
- *  render API's output. As such, SDL will disable batching if a specific
- *  render backend is requested (since this might indicate that the app is
- *  planning to use the underlying graphics API directly). This hint can
- *  be used to explicitly request batching in this instance. It is a contract
- *  that you will either never use the underlying graphics API directly, or
- *  if you do, you will call SDL_RenderFlush() before you do so any current
- *  batch goes to the GPU before your work begins. Not following this contract
- *  will result in undefined behavior.
- */
-#define SDL_HINT_RENDER_BATCHING  "SDL_RENDER_BATCHING"
-
-/**
- *  \brief  A variable controlling how the 2D render API renders lines
- *
- *  This variable can be set to the following values:
- *    "0"     - Use the default line drawing method (Bresenham's line algorithm as of SDL 2.0.20)
- *    "1"     - Use the driver point API using Bresenham's line algorithm (correct, draws many points)
- *    "2"     - Use the driver line API (occasionally misses line endpoints based on hardware driver quirks, was the default before 2.0.20)
- *    "3"     - Use the driver geometry API (correct, draws thicker diagonal lines)
- *
- *  This variable should be set when the renderer is created.
- */
-#define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD"
-
-/**
- *  \brief  A variable controlling whether to enable Direct3D 11+'s Debug Layer.
- *
- *  This variable does not have any effect on the Direct3D 9 based renderer.
- *
- *  This variable can be set to the following values:
- *    "0"       - Disable Debug Layer use
- *    "1"       - Enable Debug Layer use
- *
- *  By default, SDL does not use Direct3D Debug Layer.
- */
-#define SDL_HINT_RENDER_DIRECT3D11_DEBUG    "SDL_RENDER_DIRECT3D11_DEBUG"
-
-/**
- *  \brief  A variable controlling whether the Direct3D device is initialized for thread-safe operations.
- *
- *  This variable can be set to the following values:
- *    "0"       - Thread-safety is not enabled (faster)
- *    "1"       - Thread-safety is enabled
- *
- *  By default the Direct3D device is created with thread-safety disabled.
- */
-#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
-
-/**
- *  \brief  A variable specifying which render driver to use.
- *
- *  If the application doesn't pick a specific renderer to use, this variable
- *  specifies the name of the preferred renderer.  If the preferred renderer
- *  can't be initialized, the normal default renderer is used.
- *
- *  This variable is case insensitive and can be set to the following values:
- *    "direct3d"
- *    "opengl"
- *    "opengles2"
- *    "opengles"
- *    "metal"
- *    "software"
- *
- *  The default varies by platform, but it's the first one in the list that
- *  is available on the current platform.
- */
-#define SDL_HINT_RENDER_DRIVER              "SDL_RENDER_DRIVER"
-
-/**
- *  \brief  A variable controlling the scaling policy for SDL_RenderSetLogicalSize.
- *
- *  This variable can be set to the following values:
- *    "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen
- *    "1" or "overscan"  - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen
- *
- *  By default letterbox is used
- */
-#define SDL_HINT_RENDER_LOGICAL_SIZE_MODE       "SDL_RENDER_LOGICAL_SIZE_MODE"
-
-/**
- *  \brief  A variable controlling whether the OpenGL render driver uses shaders if they are available.
- *
- *  This variable can be set to the following values:
- *    "0"       - Disable shaders
- *    "1"       - Enable shaders
- *
- *  By default shaders are used if OpenGL supports them.
- */
-#define SDL_HINT_RENDER_OPENGL_SHADERS      "SDL_RENDER_OPENGL_SHADERS"
-
-/**
- *  \brief  A variable controlling the scaling quality
- *
- *  This variable can be set to the following values:
- *    "0" or "nearest" - Nearest pixel sampling
- *    "1" or "linear"  - Linear filtering (supported by OpenGL and Direct3D)
- *    "2" or "best"    - Currently this is the same as "linear"
- *
- *  By default nearest pixel sampling is used
- */
-#define SDL_HINT_RENDER_SCALE_QUALITY       "SDL_RENDER_SCALE_QUALITY"
-
-/**
- *  \brief  A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing.
- *
- *  This variable can be set to the following values:
- *    "0"       - Disable vsync
- *    "1"       - Enable vsync
- *
- *  By default SDL does not sync screen surface updates with vertical refresh.
- */
-#define SDL_HINT_RENDER_VSYNC               "SDL_RENDER_VSYNC"
-
- /**
- * \brief A variable to control whether the return key on the soft keyboard
- *        should hide the soft keyboard on Android and iOS.
- *
- * The variable can be set to the following values:
- *   "0"       - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default)
- *   "1"       - The return key will hide the keyboard.
- *
- * The value of this hint is used at runtime, so it can be changed at any time.
- */
-#define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
-
-/**
- * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
- *
- * Also known as Z-order. The variable can take a negative or positive value.
- * The default is 10000.
- */
-#define SDL_HINT_RPI_VIDEO_LAYER           "SDL_RPI_VIDEO_LAYER"
-
-/**
- *  \brief Specify an "activity name" for screensaver inhibition.
- *
- * Some platforms, notably Linux desktops, list the applications which are
- * inhibiting the screensaver or other power-saving features.
- *
- * This hint lets you specify the "activity name" sent to the OS when
- * SDL_DisableScreenSaver() is used (or the screensaver is automatically
- * disabled). The contents of this hint are used when the screensaver is
- * disabled. You should use a string that describes what your program is doing
- * (and, therefore, why the screensaver is disabled).  For example, "Playing a
- * game" or "Watching a video".
- * 
- * Setting this to "" or leaving it unset will have SDL use a reasonable
- * default: "Playing a game" or something similar.
- *
- * On targets where this is not supported, this hint does nothing.
- */
-#define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
-
-/**
- *  \brief Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as realtime.
- *
- *  On some platforms, like Linux, a realtime priority thread may be subject to restrictions
- *  that require special handling by the application. This hint exists to let SDL know that
- *  the app is prepared to handle said restrictions.
- * 
- *  On Linux, SDL will apply the following configuration to any thread that becomes realtime:
- *   * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy,
- *   * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
- *     * Exceeding this limit will result in the kernel sending SIGKILL to the app,
- *     * Refer to the man pages for more information.
- * 
- *  This variable can be set to the following values:
- *    "0"       - default platform specific behaviour
- *    "1"       - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy
- */
-#define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
-
-/**
-*  \brief  A string specifying additional information to use with SDL_SetThreadPriority.
-*
-*  By default SDL_SetThreadPriority will make appropriate system changes in order to
-*  apply a thread priority.  For example on systems using pthreads the scheduler policy
-*  is changed automatically to a policy that works well with a given priority.
-*  Code which has specific requirements can override SDL's default behavior with this hint.
-*
-*  pthread hint values are "current", "other", "fifo" and "rr".
-*  Currently no other platform hint values are defined but may be in the future.
-*
-*  \note On Linux, the kernel may send SIGKILL to realtime tasks which exceed the distro
-*  configured execution budget for rtkit. This budget can be queried through RLIMIT_RTTIME
-*  after calling SDL_SetThreadPriority().
-*/
-#define SDL_HINT_THREAD_PRIORITY_POLICY         "SDL_THREAD_PRIORITY_POLICY"
-
-/**
-*  \brief  A string specifying SDL's threads stack size in bytes or "0" for the backend's default size
-*
-*  Use this hint in case you need to set SDL's threads stack size to other than the default.
-*  This is specially useful if you build SDL against a non glibc libc library (such as musl) which
-*  provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
-*  Support for this hint is currently available only in the pthread, Windows, and PSP backend.
-*
-*  Instead of this hint, in 2.0.9 and later, you can use
-*  SDL_CreateThreadWithStackSize(). This hint only works with the classic
-*  SDL_CreateThread().
-*/
-#define SDL_HINT_THREAD_STACK_SIZE              "SDL_THREAD_STACK_SIZE"
-
-/**
- *  \brief A variable that controls the timer resolution, in milliseconds.
- *
- *  The higher resolution the timer, the more frequently the CPU services
- *  timer interrupts, and the more precise delays are, but this takes up
- *  power and CPU time.  This hint is only used on Windows.
- *
- *  See this blog post for more information:
- *  http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
- *
- *  If this variable is set to "0", the system timer resolution is not set.
- *
- *  The default value is "1". This hint may be set at any time.
- */
-#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
-
-/**
- *  \brief  A variable controlling whether touch events should generate synthetic mouse events
- *
- *  This variable can be set to the following values:
- *    "0"       - Touch events will not generate mouse events
- *    "1"       - Touch events will generate mouse events
- *
- *  By default SDL will generate mouse events for touch events
- */
-#define SDL_HINT_TOUCH_MOUSE_EVENTS    "SDL_TOUCH_MOUSE_EVENTS"
-
-/**
- *  \brief  A variable controlling which touchpad should generate synthetic mouse events
- *
- *  This variable can be set to the following values:
- *    "0"       - Only front touchpad should generate mouse events. Default
- *    "1"       - Only back touchpad should generate mouse events.
- *    "2"       - Both touchpads should generate mouse events.
- *
- *  By default SDL will generate mouse events for all touch devices
- */
-#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE    "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE"
-
-/**
- *  \brief  A variable controlling whether the Android / tvOS remotes
- *  should be listed as joystick devices, instead of sending keyboard events.
- *
- *  This variable can be set to the following values:
- *    "0"       - Remotes send enter/escape/arrow key events
- *    "1"       - Remotes are available as 2 axis, 2 button joysticks (the default).
- */
-#define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
-
-/**
- *  \brief  A variable controlling whether the screensaver is enabled. 
- *
- *  This variable can be set to the following values:
- *    "0"       - Disable screensaver
- *    "1"       - Enable screensaver
- *
- *  By default SDL will disable the screensaver.
- */
-#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER    "SDL_VIDEO_ALLOW_SCREENSAVER"
-
-/**
- * \brief Tell the video driver that we only want a double buffer.
- *
- * By default, most lowlevel 2D APIs will use a triple buffer scheme that 
- * wastes no CPU time on waiting for vsync after issuing a flip, but
- * introduces a frame of latency. On the other hand, using a double buffer
- * scheme instead is recommended for cases where low latency is an important
- * factor because we save a whole frame of latency.
- * We do so by waiting for vsync immediately after issuing a flip, usually just
- * after eglSwapBuffers call in the backend's *_SwapWindow function.
- *
- * Since it's driver-specific, it's only supported where possible and
- * implemented. Currently supported the following drivers:
- *
- * - KMSDRM (kmsdrm)
- * - Raspberry Pi (raspberrypi)
- */
-#define SDL_HINT_VIDEO_DOUBLE_BUFFER      "SDL_VIDEO_DOUBLE_BUFFER"
-
-/**
- * \brief A variable controlling whether the EGL window is allowed to be
- * composited as transparent, rather than opaque.
- *
- * Most window systems will always render windows opaque, even if the surface
- * format has an alpha channel. This is not always true, however, so by default
- * SDL will try to enforce opaque composition. To override this behavior, you
- * can set this hint to "1".
- */
-#define SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY "SDL_VIDEO_EGL_ALLOW_TRANSPARENCY"
-
-/**
- * \brief A variable controlling whether the graphics context is externally managed.
- *
- * This variable can be set to the following values:
- *  "0"         - SDL will manage graphics contexts that are attached to windows.
- *  "1"         - Disable graphics context management on windows.
- *
- * By default SDL will manage OpenGL contexts in certain situations. For example, on Android the
- * context will be automatically saved and restored when pausing the application. Additionally, some
- * platforms will assume usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this
- * behavior, which is desireable when the application manages the graphics context, such as
- * an externally managed OpenGL context or attaching a Vulkan surface to the window.
- */
-#define SDL_HINT_VIDEO_EXTERNAL_CONTEXT    "SDL_VIDEO_EXTERNAL_CONTEXT"
-
-/**
- *  \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac and iOS)
- */
-#define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
-
-/**
- *  \brief  A variable that dictates policy for fullscreen Spaces on Mac OS X.
- *
- *  This hint only applies to Mac OS X.
- *
- *  The variable can be set to the following values:
- *    "0"       - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
- *                SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen"
- *                button on their titlebars).
- *    "1"       - Enable Spaces support (FULLSCREEN_DESKTOP will use them and
- *                SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
- *                button on their titlebars).
- *
- *  The default value is "1". Spaces are disabled regardless of this hint if
- *   the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
- *   any windows are created.
- */
-#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES    "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
-
-/**
- *  \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to false.
- *  \warning  Before SDL 2.0.14, this defaulted to true! In 2.0.14, we're
- *            seeing if "true" causes more problems than it solves in modern times.
- *
- */
-#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS   "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
-
-/**
- *  \brief  A variable controlling whether the libdecor Wayland backend is allowed to be used.
- *
- *  This variable can be set to the following values:
- *    "0"       - libdecor use is disabled.
- *    "1"       - libdecor use is enabled (default).
- *
- *  libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
- */
-#define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
-
-/**
- *  \brief  A variable controlling whether the libdecor Wayland backend is preferred over native decrations.
- *
- *  When this hint is set, libdecor will be used to provide window decorations, even if xdg-decoration is
- *  available. (Note that, by default, libdecor will use xdg-decoration itself if available).
- *
- *  This variable can be set to the following values:
- *    "0"       - libdecor is enabled only if server-side decorations are unavailable.
- *    "1"       - libdecor is always enabled if available.
- *
- *  libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
- */
-#define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
-
-/**
-*  \brief  A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
-*  
-*  If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
-*  SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly 
-*  created SDL_Window:
-*
-*  1. Its pixel format will be set to the same pixel format as this SDL_Window.  This is
-*  needed for example when sharing an OpenGL context across multiple windows.
-*
-*  2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for
-*  OpenGL rendering.
-*
-*  This variable can be set to the following values:
-*    The address (as a string "%p") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should
-*    share a pixel format with.
-*/
-#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT    "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
-
-/**
- *  \brief  When calling SDL_CreateWindowFrom(), make the window compatible with OpenGL.
- *
- * This variable can be set to the following values:
- * "0" - Don't add any graphics flags to the SDL_WindowFlags
- * "1" - Add SDL_WINDOW_OPENGL to the SDL_WindowFlags
- *
- * By default SDL will not make the foreign window compatible with OpenGL.
- */
-#define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
-
-/**
- *  \brief  When calling SDL_CreateWindowFrom(), make the window compatible with Vulkan.
- *
- * This variable can be set to the following values:
- * "0" - Don't add any graphics flags to the SDL_WindowFlags
- * "1" - Add SDL_WINDOW_VULKAN to the SDL_WindowFlags
- *
- * By default SDL will not make the foreign window compatible with Vulkan.
- */
-#define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
-
-/**
-*  \brief  A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
-*
-*  SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It
-*  can use two different sets of binaries, those compiled by the user from source
-*  or those provided by the Chrome browser. In the later case, these binaries require
-*  that SDL loads a DLL providing the shader compiler.
-*
-*  This variable can be set to the following values:
-*    "d3dcompiler_46.dll" - default, best for Vista or later.
-*    "d3dcompiler_43.dll" - for XP support.
-*    "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries.
-*
-*/
-#define SDL_HINT_VIDEO_WIN_D3DCOMPILER              "SDL_VIDEO_WIN_D3DCOMPILER"
-
-/**
- * \brief A variable controlling whether X11 should use GLX or EGL by default
- *
- * This variable can be set to the following values:
- * "0" - Use GLX
- * "1" - Use EGL
- *
- * By default SDL will use GLX when both are present.
- */
-#define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL"
-
-/**
- * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
- * 
- * This variable can be set to the following values:
- * "0" - Disable _NET_WM_BYPASS_COMPOSITOR
- * "1" - Enable _NET_WM_BYPASS_COMPOSITOR
- * 
- * By default SDL will use _NET_WM_BYPASS_COMPOSITOR
- * 
- */
-#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
-
-/**
- *  \brief  A variable controlling whether the X11 _NET_WM_PING protocol should be supported.
- *
- *  This variable can be set to the following values:
- *    "0"       - Disable _NET_WM_PING
- *    "1"       - Enable _NET_WM_PING
- *
- *  By default SDL will use _NET_WM_PING, but for applications that know they
- *  will not always be able to respond to ping requests in a timely manner they can
- *  turn it off to avoid the window manager thinking the app is hung.
- *  The hint is checked in CreateWindow.
- */
-#define SDL_HINT_VIDEO_X11_NET_WM_PING      "SDL_VIDEO_X11_NET_WM_PING"
-
-/**
- *  \brief  A variable forcing the visual ID chosen for new X11 windows
- *
- */
-#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID      "SDL_VIDEO_X11_WINDOW_VISUALID"
-
-/**
- *  \brief  A variable controlling whether the X11 Xinerama extension should be used.
- *
- *  This variable can be set to the following values:
- *    "0"       - Disable Xinerama
- *    "1"       - Enable Xinerama
- *
- *  By default SDL will use Xinerama if it is available.
- */
-#define SDL_HINT_VIDEO_X11_XINERAMA         "SDL_VIDEO_X11_XINERAMA"
-
-/**
- *  \brief  A variable controlling whether the X11 XRandR extension should be used.
- *
- *  This variable can be set to the following values:
- *    "0"       - Disable XRandR
- *    "1"       - Enable XRandR
- *
- *  By default SDL will not use XRandR because of window manager issues.
- */
-#define SDL_HINT_VIDEO_X11_XRANDR           "SDL_VIDEO_X11_XRANDR"
-
-/**
- *  \brief  A variable controlling whether the X11 VidMode extension should be used.
- *
- *  This variable can be set to the following values:
- *    "0"       - Disable XVidMode
- *    "1"       - Enable XVidMode
- *
- *  By default SDL will use XVidMode if it is available.
- */
-#define SDL_HINT_VIDEO_X11_XVIDMODE         "SDL_VIDEO_X11_XVIDMODE"
-
-/**
- *  \brief  Controls how the fact chunk affects the loading of a WAVE file.
- *
- *  The fact chunk stores information about the number of samples of a WAVE
- *  file. The Standards Update from Microsoft notes that this value can be used
- *  to 'determine the length of the data in seconds'. This is especially useful
- *  for compressed formats (for which this is a mandatory chunk) if they produce
- *  multiple sample frames per block and truncating the block is not allowed.
- *  The fact chunk can exactly specify how many sample frames there should be
- *  in this case.
- *
- *  Unfortunately, most application seem to ignore the fact chunk and so SDL
- *  ignores it by default as well.
- *
- *  This variable can be set to the following values:
- *
- *    "truncate"    - Use the number of samples to truncate the wave data if
- *                    the fact chunk is present and valid
- *    "strict"      - Like "truncate", but raise an error if the fact chunk
- *                    is invalid, not present for non-PCM formats, or if the
- *                    data chunk doesn't have that many samples
- *    "ignorezero"  - Like "truncate", but ignore fact chunk if the number of
- *                    samples is zero
- *    "ignore"      - Ignore fact chunk entirely (default)
- */
-#define SDL_HINT_WAVE_FACT_CHUNK   "SDL_WAVE_FACT_CHUNK"
-
-/**
- *  \brief  Controls how the size of the RIFF chunk affects the loading of a WAVE file.
- *
- *  The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
- *  file) is not always reliable. In case the size is wrong, it's possible to
- *  just ignore it and step through the chunks until a fixed limit is reached.
- *
- *  Note that files that have trailing data unrelated to the WAVE file or
- *  corrupt files may slow down the loading process without a reliable boundary.
- *  By default, SDL stops after 10000 chunks to prevent wasting time. Use the
- *  environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
- *
- *  This variable can be set to the following values:
- *
- *    "force"        - Always use the RIFF chunk size as a boundary for the chunk search
- *    "ignorezero"   - Like "force", but a zero size searches up to 4 GiB (default)
- *    "ignore"       - Ignore the RIFF chunk size and always search up to 4 GiB
- *    "maximum"      - Search for chunks until the end of file (not recommended)
- */
-#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE   "SDL_WAVE_RIFF_CHUNK_SIZE"
-
-/**
- *  \brief  Controls how a truncated WAVE file is handled.
- *
- *  A WAVE file is considered truncated if any of the chunks are incomplete or
- *  the data chunk size is not a multiple of the block size. By default, SDL
- *  decodes until the first incomplete block, as most applications seem to do.
- *
- *  This variable can be set to the following values:
- *
- *    "verystrict" - Raise an error if the file is truncated
- *    "strict"     - Like "verystrict", but the size of the RIFF chunk is ignored
- *    "dropframe"  - Decode until the first incomplete sample frame
- *    "dropblock"  - Decode until the first incomplete block (default)
- */
-#define SDL_HINT_WAVE_TRUNCATION   "SDL_WAVE_TRUNCATION"
-
-/**
- * \brief Tell SDL not to name threads on Windows with the 0x406D1388 Exception.
- *        The 0x406D1388 Exception is a trick used to inform Visual Studio of a
- *        thread's name, but it tends to cause problems with other debuggers,
- *        and the .NET runtime. Note that SDL 2.0.6 and later will still use
- *        the (safer) SetThreadDescription API, introduced in the Windows 10
- *        Creators Update, if available.
- *
- * The variable can be set to the following values:
- *   "0"       - SDL will raise the 0x406D1388 Exception to name threads.
- *               This is the default behavior of SDL <= 2.0.4.
- *   "1"       - SDL will not raise this exception, and threads will be unnamed. (default)
- *               This is necessary with .NET languages or debuggers that aren't Visual Studio.
- */
-#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
-
-/**
- *  \brief  A variable controlling whether the windows message loop is processed by SDL 
- *
- *  This variable can be set to the following values:
- *    "0"       - The window message loop is not run
- *    "1"       - The window message loop is processed in SDL_PumpEvents()
- *
- *  By default SDL will process the windows message loop
- */
-#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
-
-/**
- * \brief Force SDL to use Critical Sections for mutexes on Windows.
- *        On Windows 7 and newer, Slim Reader/Writer Locks are available.
- *        They offer better performance, allocate no kernel ressources and
- *        use less memory. SDL will fall back to Critical Sections on older
- *        OS versions or if forced to by this hint.
- *
- *  This variable can be set to the following values:
- *    "0"       - Use SRW Locks when available. If not, fall back to Critical Sections. (default)
- *    "1"       - Force the use of Critical Sections in all cases.
- *
- */
-#define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS"
-
-/**
- * \brief Force SDL to use Kernel Semaphores on Windows.
- *        Kernel Semaphores are inter-process and require a context
- *        switch on every interaction. On Windows 8 and newer, the
- *        WaitOnAddress API is available. Using that and atomics to
- *        implement semaphores increases performance.
- *        SDL will fall back to Kernel Objects on older OS versions
- *        or if forced to by this hint.
- *
- *  This variable can be set to the following values:
- *    "0"       - Use Atomics and WaitOnAddress API when available. If not, fall back to Kernel Objects. (default)
- *    "1"       - Force the use of Kernel Objects in all cases.
- *
- */
-#define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
-
-/**
- * \brief A variable to specify custom icon resource id from RC file on Windows platform 
- */
-#define SDL_HINT_WINDOWS_INTRESOURCE_ICON       "SDL_WINDOWS_INTRESOURCE_ICON"
-#define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
-
-/**
- *  \brief Tell SDL not to generate window-close events for Alt+F4 on Windows.
- *
- * The variable can be set to the following values:
- *   "0"       - SDL will generate a window-close event when it sees Alt+F4.
- *   "1"       - SDL will only do normal key handling for Alt+F4.
- */
-#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
-
-/**
- * \brief Use the D3D9Ex API introduced in Windows Vista, instead of normal D3D9.
- *        Direct3D 9Ex contains changes to state management that can eliminate device
- *        loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may require
- *        some changes to your application to cope with the new behavior, so this
- *        is disabled by default.
- *
- *  This hint must be set before initializing the video subsystem.
- *
- *  For more information on Direct3D 9Ex, see:
- *    - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex
- *    - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements
- *
- *  This variable can be set to the following values:
- *    "0"       - Use the original Direct3D 9 API (default)
- *    "1"       - Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex is unavailable)
- *
- */
-#define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
-
-/**
- *  \brief  A variable controlling whether the window frame and title bar are interactive when the cursor is hidden 
- *
- *  This variable can be set to the following values:
- *    "0"       - The window frame is not interactive when the cursor is hidden (no move, resize, etc)
- *    "1"       - The window frame is interactive when the cursor is hidden
- *
- *  By default SDL will allow interaction with the window frame when the cursor is hidden
- */
-#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN    "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
-
-/**
-*  \brief  A variable controlling whether the window is activated when the SDL_ShowWindow function is called 
-*
-*  This variable can be set to the following values:
-*    "0"       - The window is activated when the SDL_ShowWindow function is called
-*    "1"       - The window is not activated when the SDL_ShowWindow function is called
-*
-*  By default SDL will activate the window when the SDL_ShowWindow function is called
-*/
-#define SDL_HINT_WINDOW_NO_ACTIVATION_WHEN_SHOWN    "SDL_WINDOW_NO_ACTIVATION_WHEN_SHOWN"
-
-/** \brief Allows back-button-press events on Windows Phone to be marked as handled
- *
- *  Windows Phone devices typically feature a Back button.  When pressed,
- *  the OS will emit back-button-press events, which apps are expected to
- *  handle in an appropriate manner.  If apps do not explicitly mark these
- *  events as 'Handled', then the OS will invoke its default behavior for
- *  unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to
- *  terminate the app (and attempt to switch to the previous app, or to the
- *  device's home screen).
- *
- *  Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL
- *  to mark back-button-press events as Handled, if and when one is sent to
- *  the app.
- *
- *  Internally, Windows Phone sends back button events as parameters to
- *  special back-button-press callback functions.  Apps that need to respond
- *  to back-button-press events are expected to register one or more
- *  callback functions for such, shortly after being launched (during the
- *  app's initialization phase).  After the back button is pressed, the OS
- *  will invoke these callbacks.  If the app's callback(s) do not explicitly
- *  mark the event as handled by the time they return, or if the app never
- *  registers one of these callback, the OS will consider the event
- *  un-handled, and it will apply its default back button behavior (terminate
- *  the app).
- *
- *  SDL registers its own back-button-press callback with the Windows Phone
- *  OS.  This callback will emit a pair of SDL key-press events (SDL_KEYDOWN
- *  and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which
- *  it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON.
- *  If the hint's value is set to "1", the back button event's Handled
- *  property will get set to 'true'.  If the hint's value is set to something
- *  else, or if it is unset, SDL will leave the event's Handled property
- *  alone.  (By default, the OS sets this property to 'false', to note.)
- *
- *  SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a
- *  back button is pressed, or can set it in direct-response to a back button
- *  being pressed.
- *
- *  In order to get notified when a back button is pressed, SDL apps should
- *  register a callback function with SDL_AddEventWatch(), and have it listen
- *  for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
- *  (Alternatively, SDL_KEYUP events can be listened-for.  Listening for
- *  either event type is suitable.)  Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON
- *  set by such a callback, will be applied to the OS' current
- *  back-button-press event.
- *
- *  More details on back button behavior in Windows Phone apps can be found
- *  at the following page, on Microsoft's developer site:
- *  http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
- */
-#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
-
-/** \brief Label text for a WinRT app's privacy policy link
- *
- *  Network-enabled WinRT apps must include a privacy policy.  On Windows 8, 8.1, and RT,
- *  Microsoft mandates that this policy be available via the Windows Settings charm.
- *  SDL provides code to add a link there, with its label text being set via the
- *  optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
- *
- *  Please note that a privacy policy's contents are not set via this hint.  A separate
- *  hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
- *  policy.
- *
- *  The contents of this hint should be encoded as a UTF8 string.
- *
- *  The default value is "Privacy Policy".  This hint should only be set during app
- *  initialization, preferably before any calls to SDL_Init().
- *
- *  For additional information on linking to a privacy policy, see the documentation for
- *  SDL_HINT_WINRT_PRIVACY_POLICY_URL.
- */
-#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL"
-
-/**
- *  \brief A URL to a WinRT app's privacy policy
- *
- *  All network-enabled WinRT apps must make a privacy policy available to its
- *  users.  On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
- *  be available in the Windows Settings charm, as accessed from within the app.
- *  SDL provides code to add a URL-based link there, which can point to the app's
- *  privacy policy.
- *
- *  To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
- *  before calling any SDL_Init() functions.  The contents of the hint should
- *  be a valid URL.  For example, "http://www.example.com".
- *
- *  The default value is "", which will prevent SDL from adding a privacy policy
- *  link to the Settings charm.  This hint should only be set during app init.
- *
- *  The label text of an app's "Privacy Policy" link may be customized via another
- *  hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
- *
- *  Please note that on Windows Phone, Microsoft does not provide standard UI
- *  for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
- *  will not get used on that platform.  Network-enabled phone apps should display
- *  their privacy policy through some other, in-app means.
- */
-#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL"
-
-/**
- *  \brief Mark X11 windows as override-redirect.
- *
- *  If set, this _might_ increase framerate at the expense of the desktop
- *  not working as expected. Override-redirect windows aren't noticed by the
- *  window manager at all.
- *
- *  You should probably only use this for fullscreen windows, and you probably
- *  shouldn't even use it for that. But it's here if you want to try!
- */
-#define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
-
-/**
- *  \brief  A variable that lets you disable the detection and use of Xinput gamepad devices
- *
- *  The variable can be set to the following values:
- *    "0"       - Disable XInput detection (only uses direct input)
- *    "1"       - Enable XInput detection (the default)
- */
-#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
-
-/**
- *  \brief  A variable that causes SDL to use the old axis and button mapping for XInput devices.
- *
- *  This hint is for backwards compatibility only and will be removed in SDL 2.1
- *
- *  The default value is "0".  This hint must be set before SDL_Init()
- */
-#define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
-
-/**
- *  \brief  A variable that causes SDL to not ignore audio "monitors"
- *
- *  This is currently only used for PulseAudio and ignored elsewhere.
- *
- *  By default, SDL ignores audio devices that aren't associated with physical
- *  hardware. Changing this hint to "1" will expose anything SDL sees that
- *  appears to be an audio source or sink. This will add "devices" to the list
- *  that the user probably doesn't want or need, but it can be useful in
- *  scenarios where you want to hook up SDL to some sort of virtual device,
- *  etc.
- *
- *  The default value is "0".  This hint must be set before SDL_Init().
- *
- *  This hint is available since SDL 2.0.16. Before then, virtual devices are
- *  always ignored.
- */
-#define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
-
-/**
- *  \brief  A variable that forces X11 windows to create as a custom type.
- *
- *  This is currently only used for X11 and ignored elsewhere.
- *
- *  During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property
- *  to report to the window manager the type of window it wants to create.
- *  This might be set to various things if SDL_WINDOW_TOOLTIP or
- *  SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
- *  haven't set a specific type, this hint can be used to specify a custom
- *  type. For example, a dock window might set this to
- *  "_NET_WM_WINDOW_TYPE_DOCK".
- *
- *  If not set or set to "", this hint is ignored. This hint must be set
- *  before the SDL_CreateWindow() call that it is intended to affect.
- *
- *  This hint is available since SDL 2.0.22.
- */
-#define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
-
-/**
- *  \brief  A variable that decides whether to send SDL_QUIT when closing the final window.
- *
- *  By default, SDL sends an SDL_QUIT event when there is only one window
- *  and it receives an SDL_WINDOWEVENT_CLOSE event, under the assumption most
- *  apps would also take the loss of this window as a signal to terminate the
- *  program.
- *
- *  However, it's not unreasonable in some cases to have the program continue
- *  to live on, perhaps to create new windows later.
- *
- *  Changing this hint to "0" will cause SDL to not send an SDL_QUIT event
- *  when the final window is requesting to close. Note that in this case,
- *  there are still other legitimate reasons one might get an SDL_QUIT
- *  event: choosing "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c)
- *  on Unix, etc.
- *
- *  The default value is "1".  This hint can be changed at any time.
- *
- *  This hint is available since SDL 2.0.22. Before then, you always get
- *  an SDL_QUIT event when closing the final window.
- */
-#define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
-
-
-/**
- *  \brief  A variable that decides what video backend to use.
- *
- *  By default, SDL will try all available video backends in a reasonable
- *  order until it finds one that can work, but this hint allows the app
- *  or user to force a specific target, such as "x11" if, say, you are
- *  on Wayland but want to try talking to the X server instead.
- *
- *  This functionality has existed since SDL 2.0.0 (indeed, before that)
- *  but before 2.0.22 this was an environment variable only. In 2.0.22,
- *  it was upgraded to a full SDL hint, so you can set the environment
- *  variable as usual or programatically set the hint with SDL_SetHint,
- *  which won't propagate to child processes.
- *
- *  The default value is unset, in which case SDL will try to figure out
- *  the best video backend on your behalf. This hint needs to be set
- *  before SDL_Init() is called to be useful.
- *
- *  This hint is available since SDL 2.0.22. Before then, you could set
- *  the environment variable to get the same effect.
- */
-#define SDL_HINT_VIDEODRIVER "SDL_VIDEODRIVER"
-
-/**
- *  \brief  A variable that decides what audio backend to use.
- *
- *  By default, SDL will try all available audio backends in a reasonable
- *  order until it finds one that can work, but this hint allows the app
- *  or user to force a specific target, such as "alsa" if, say, you are
- *  on PulseAudio but want to try talking to the lower level instead.
- *
- *  This functionality has existed since SDL 2.0.0 (indeed, before that)
- *  but before 2.0.22 this was an environment variable only. In 2.0.22,
- *  it was upgraded to a full SDL hint, so you can set the environment
- *  variable as usual or programatically set the hint with SDL_SetHint,
- *  which won't propagate to child processes.
- *
- *  The default value is unset, in which case SDL will try to figure out
- *  the best audio backend on your behalf. This hint needs to be set
- *  before SDL_Init() is called to be useful.
- *
- *  This hint is available since SDL 2.0.22. Before then, you could set
- *  the environment variable to get the same effect.
- */
-#define SDL_HINT_AUDIODRIVER "SDL_AUDIODRIVER"
-
-
-/**
- *  \brief  An enumeration of hint priorities
- */
-typedef enum
-{
-    SDL_HINT_DEFAULT,
-    SDL_HINT_NORMAL,
-    SDL_HINT_OVERRIDE
-} SDL_HintPriority;
-
-
-/**
- * Set a hint with a specific priority.
- *
- * The priority controls the behavior when setting a hint that already has a
- * value. Hints will replace existing hints of their priority and lower.
- * Environment variables are considered to have override priority.
- *
- * \param name the hint to set
- * \param value the value of the hint variable
- * \param priority the SDL_HintPriority level for the hint
- * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetHint
- * \sa SDL_SetHint
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
-                                                         const char *value,
-                                                         SDL_HintPriority priority);
-
-/**
- * Set a hint with normal priority.
- *
- * Hints will not be set if there is an existing override hint or environment
- * variable that takes precedence. You can use SDL_SetHintWithPriority() to
- * set the hint with override priority instead.
- *
- * \param name the hint to set
- * \param value the value of the hint variable
- * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetHint
- * \sa SDL_SetHintWithPriority
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
-                                             const char *value);
-
-/**
- * Get the value of a hint.
- *
- * \param name the hint to query
- * \returns the string value of a hint or NULL if the hint isn't set.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetHint
- * \sa SDL_SetHintWithPriority
- */
-extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
-
-/**
- * Get the boolean value of a hint variable.
- *
- * \param name the name of the hint to get the boolean value from
- * \param default_value the value to return if the hint does not exist
- * \returns the boolean value of a hint or the provided default value if the
- *          hint does not exist.
- *
- * \since This function is available since SDL 2.0.5.
- *
- * \sa SDL_GetHint
- * \sa SDL_SetHint
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
-
-/**
- * Type definition of the hint callback function.
- *
- * \param userdata what was passed as `userdata` to SDL_AddHintCallback()
- * \param name what was passed as `name` to SDL_AddHintCallback()
- * \param oldValue the previous hint value
- * \param newValue the new value hint is to be set to
- */
-typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
-
-/**
- * Add a function to watch a particular hint.
- *
- * \param name the hint to watch
- * \param callback An SDL_HintCallback function that will be called when the
- *                 hint value changes
- * \param userdata a pointer to pass to the callback function
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_DelHintCallback
- */
-extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
-                                                 SDL_HintCallback callback,
-                                                 void *userdata);
-
-/**
- * Remove a function watching a particular hint.
- *
- * \param name the hint being watched
- * \param callback An SDL_HintCallback function that will be called when the
- *                 hint value changes
- * \param userdata a pointer being passed to the callback function
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AddHintCallback
- */
-extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
-                                                 SDL_HintCallback callback,
-                                                 void *userdata);
-
-/**
- * Clear all hints.
- *
- * This function is automatically called during SDL_Quit().
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC void SDLCALL SDL_ClearHints(void);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_hints_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_joystick.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_joystick.h
deleted file mode 100644 (file)
index 07e2b15..0000000
+++ /dev/null
@@ -1,946 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_joystick.h
- *
- *  Include file for SDL joystick event handling
- *
- * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
- *   behind a device_index changing as joysticks are plugged and unplugged.
- *
- * The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
- *   then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in.
- *
- * The term "player_index" is the number assigned to a player on a specific
- *   controller. For XInput controllers this returns the XInput user index.
- *   Many joysticks will not be able to supply this information.
- *
- * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of
- *   the device (a X360 wired controller for example). This identifier is platform dependent.
- */
-
-#ifndef SDL_joystick_h_
-#define SDL_joystick_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \file SDL_joystick.h
- *
- *  In order to use these functions, SDL_Init() must have been called
- *  with the ::SDL_INIT_JOYSTICK flag.  This causes SDL to scan the system
- *  for joysticks, and load appropriate drivers.
- *
- *  If you would like to receive joystick updates while the application
- *  is in the background, you should set the following hint before calling
- *  SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
- */
-
-/**
- * The joystick structure used to identify an SDL joystick
- */
-struct _SDL_Joystick;
-typedef struct _SDL_Joystick SDL_Joystick;
-
-/* A structure that encodes the stable unique id for a joystick device */
-typedef struct {
-    Uint8 data[16];
-} SDL_JoystickGUID;
-
-/**
- * This is a unique ID for a joystick for the time it is connected to the system,
- * and is never reused for the lifetime of the application. If the joystick is
- * disconnected and reconnected, it will get a new ID.
- *
- * The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
- */
-typedef Sint32 SDL_JoystickID;
-
-typedef enum
-{
-    SDL_JOYSTICK_TYPE_UNKNOWN,
-    SDL_JOYSTICK_TYPE_GAMECONTROLLER,
-    SDL_JOYSTICK_TYPE_WHEEL,
-    SDL_JOYSTICK_TYPE_ARCADE_STICK,
-    SDL_JOYSTICK_TYPE_FLIGHT_STICK,
-    SDL_JOYSTICK_TYPE_DANCE_PAD,
-    SDL_JOYSTICK_TYPE_GUITAR,
-    SDL_JOYSTICK_TYPE_DRUM_KIT,
-    SDL_JOYSTICK_TYPE_ARCADE_PAD,
-    SDL_JOYSTICK_TYPE_THROTTLE
-} SDL_JoystickType;
-
-typedef enum
-{
-    SDL_JOYSTICK_POWER_UNKNOWN = -1,
-    SDL_JOYSTICK_POWER_EMPTY,   /* <= 5% */
-    SDL_JOYSTICK_POWER_LOW,     /* <= 20% */
-    SDL_JOYSTICK_POWER_MEDIUM,  /* <= 70% */
-    SDL_JOYSTICK_POWER_FULL,    /* <= 100% */
-    SDL_JOYSTICK_POWER_WIRED,
-    SDL_JOYSTICK_POWER_MAX
-} SDL_JoystickPowerLevel;
-
-/* Set max recognized G-force from accelerometer
-   See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
- */
-#define SDL_IPHONE_MAX_GFORCE 5.0
-
-
-/* Function prototypes */
-
-/**
- * Locking for multi-threaded access to the joystick API
- *
- * If you are using the joystick API or handling events from multiple threads
- * you should use these locking functions to protect access to the joysticks.
- *
- * In particular, you are guaranteed that the joystick list won't change, so
- * the API functions that take a joystick index will be valid, and joystick
- * and game controller events will not be delivered.
- *
- * \since This function is available since SDL 2.0.7.
- */
-extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
-
-
-/**
- * Unlocking for multi-threaded access to the joystick API
- *
- * If you are using the joystick API or handling events from multiple threads
- * you should use these locking functions to protect access to the joysticks.
- *
- * In particular, you are guaranteed that the joystick list won't change, so
- * the API functions that take a joystick index will be valid, and joystick
- * and game controller events will not be delivered.
- *
- * \since This function is available since SDL 2.0.7.
- */
-extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
-
-/**
- * Count the number of joysticks attached to the system.
- *
- * \returns the number of attached joysticks on success or a negative error
- *          code on failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickName
- * \sa SDL_JoystickOpen
- */
-extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
-
-/**
- * Get the implementation dependent name of a joystick.
- *
- * This can be called before any joysticks are opened.
- *
- * \param device_index the index of the joystick to query (the N'th joystick
- *                     on the system)
- * \returns the name of the selected joystick. If no name can be found, this
- *          function returns NULL; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickName
- * \sa SDL_JoystickOpen
- */
-extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
-
-/**
- * Get the player index of a joystick, or -1 if it's not available This can be
- * called before any joysticks are opened.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
-
-/**
- * Get the implementation-dependent GUID for the joystick at a given device
- * index.
- *
- * This function can be called before any joysticks are opened.
- *
- * \param device_index the index of the joystick to query (the N'th joystick
- *                     on the system
- * \returns the GUID of the selected joystick. If called on an invalid index,
- *          this function returns a zero GUID
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickGetGUID
- * \sa SDL_JoystickGetGUIDString
- */
-extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
-
-/**
- * Get the USB vendor ID of a joystick, if available.
- *
- * This can be called before any joysticks are opened. If the vendor ID isn't
- * available this function returns 0.
- *
- * \param device_index the index of the joystick to query (the N'th joystick
- *                     on the system
- * \returns the USB vendor ID of the selected joystick. If called on an
- *          invalid index, this function returns zero
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);
-
-/**
- * Get the USB product ID of a joystick, if available.
- *
- * This can be called before any joysticks are opened. If the product ID isn't
- * available this function returns 0.
- *
- * \param device_index the index of the joystick to query (the N'th joystick
- *                     on the system
- * \returns the USB product ID of the selected joystick. If called on an
- *          invalid index, this function returns zero
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);
-
-/**
- * Get the product version of a joystick, if available.
- *
- * This can be called before any joysticks are opened. If the product version
- * isn't available this function returns 0.
- *
- * \param device_index the index of the joystick to query (the N'th joystick
- *                     on the system
- * \returns the product version of the selected joystick. If called on an
- *          invalid index, this function returns zero
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index);
-
-/**
- * Get the type of a joystick, if available.
- *
- * This can be called before any joysticks are opened.
- *
- * \param device_index the index of the joystick to query (the N'th joystick
- *                     on the system
- * \returns the SDL_JoystickType of the selected joystick. If called on an
- *          invalid index, this function returns `SDL_JOYSTICK_TYPE_UNKNOWN`
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index);
-
-/**
- * Get the instance ID of a joystick.
- *
- * This can be called before any joysticks are opened. If the index is out of
- * range, this function will return -1.
- *
- * \param device_index the index of the joystick to query (the N'th joystick
- *                     on the system
- * \returns the instance id of the selected joystick. If called on an invalid
- *          index, this function returns zero
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index);
-
-/**
- * Open a joystick for use.
- *
- * The `device_index` argument refers to the N'th joystick presently
- * recognized by SDL on the system. It is **NOT** the same as the instance ID
- * used to identify the joystick in future events. See
- * SDL_JoystickInstanceID() for more details about instance IDs.
- *
- * The joystick subsystem must be initialized before a joystick can be opened
- * for use.
- *
- * \param device_index the index of the joystick to query
- * \returns a joystick identifier or NULL if an error occurred; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickClose
- * \sa SDL_JoystickInstanceID
- */
-extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
-
-/**
- * Get the SDL_Joystick associated with an instance id.
- *
- * \param instance_id the instance id to get the SDL_Joystick for
- * \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError()
- *          for more information.
- *
- * \since This function is available since SDL 2.0.4.
- */
-extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID instance_id);
-
-/**
- * Get the SDL_Joystick associated with a player index.
- *
- * \param player_index the player index to get the SDL_Joystick for
- * \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError()
- *          for more information.
- *
- * \since This function is available since SDL 2.0.12.
- */
-extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index);
-
-/**
- * Attach a new virtual joystick.
- *
- * \returns the joystick's device index, or -1 if an error occurred.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type,
-                                                      int naxes,
-                                                      int nbuttons,
-                                                      int nhats);
-
-/**
- * Detach a virtual joystick.
- *
- * \param device_index a value previously returned from
- *                     SDL_JoystickAttachVirtual()
- * \returns 0 on success, or -1 if an error occurred.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index);
-
-/**
- * Query whether or not the joystick at a given device index is virtual.
- *
- * \param device_index a joystick device index.
- * \returns SDL_TRUE if the joystick is virtual, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);
-
-/**
- * Set values on an opened, virtual-joystick's axis.
- *
- * Please note that values set here will not be applied until the next call to
- * SDL_JoystickUpdate, which can either be called directly, or can be called
- * indirectly through various other SDL APIs, including, but not limited to
- * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
- * SDL_WaitEvent.
- *
- * \param joystick the virtual joystick on which to set state.
- * \param axis the specific axis on the virtual joystick to set.
- * \param value the new value for the specified axis.
- * \returns 0 on success, -1 on error.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value);
-
-/**
- * Set values on an opened, virtual-joystick's button.
- *
- * Please note that values set here will not be applied until the next call to
- * SDL_JoystickUpdate, which can either be called directly, or can be called
- * indirectly through various other SDL APIs, including, but not limited to
- * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
- * SDL_WaitEvent.
- *
- * \param joystick the virtual joystick on which to set state.
- * \param button the specific button on the virtual joystick to set.
- * \param value the new value for the specified button.
- * \returns 0 on success, -1 on error.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value);
-
-/**
- * Set values on an opened, virtual-joystick's hat.
- *
- * Please note that values set here will not be applied until the next call to
- * SDL_JoystickUpdate, which can either be called directly, or can be called
- * indirectly through various other SDL APIs, including, but not limited to
- * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
- * SDL_WaitEvent.
- *
- * \param joystick the virtual joystick on which to set state.
- * \param hat the specific hat on the virtual joystick to set.
- * \param value the new value for the specified hat.
- * \returns 0 on success, -1 on error.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value);
-
-/**
- * Get the implementation dependent name of a joystick.
- *
- * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
- * \returns the name of the selected joystick. If no name can be found, this
- *          function returns NULL; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickNameForIndex
- * \sa SDL_JoystickOpen
- */
-extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *joystick);
-
-/**
- * Get the player index of an opened joystick.
- *
- * For XInput controllers this returns the XInput user index. Many joysticks
- * will not be able to supply this information.
- *
- * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
- * \returns the player index, or -1 if it's not available.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick);
-
-/**
- * Set the player index of an opened joystick.
- *
- * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
- * \param player_index the player index to set.
- *
- * \since This function is available since SDL 2.0.12.
- */
-extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index);
-
-/**
- * Get the implementation-dependent GUID for the joystick.
- *
- * This function requires an open joystick.
- *
- * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
- * \returns the GUID of the given joystick. If called on an invalid index,
- *          this function returns a zero GUID; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickGetDeviceGUID
- * \sa SDL_JoystickGetGUIDString
- */
-extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick *joystick);
-
-/**
- * Get the USB vendor ID of an opened joystick, if available.
- *
- * If the vendor ID isn't available this function returns 0.
- *
- * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
- * \returns the USB vendor ID of the selected joystick, or 0 if unavailable.
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick *joystick);
-
-/**
- * Get the USB product ID of an opened joystick, if available.
- *
- * If the product ID isn't available this function returns 0.
- *
- * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
- * \returns the USB product ID of the selected joystick, or 0 if unavailable.
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick);
-
-/**
- * Get the product version of an opened joystick, if available.
- *
- * If the product version isn't available this function returns 0.
- *
- * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
- * \returns the product version of the selected joystick, or 0 if unavailable.
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joystick);
-
-/**
- * Get the serial number of an opened joystick, if available.
- *
- * Returns the serial number of the joystick, or NULL if it is not available.
- *
- * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
- * \returns the serial number of the selected joystick, or NULL if
- *          unavailable.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC const char * SDLCALL SDL_JoystickGetSerial(SDL_Joystick *joystick);
-
-/**
- * Get the type of an opened joystick.
- *
- * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
- * \returns the SDL_JoystickType of the selected joystick.
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joystick);
-
-/**
- * Get an ASCII string representation for a given SDL_JoystickGUID.
- *
- * You should supply at least 33 bytes for pszGUID.
- *
- * \param guid the SDL_JoystickGUID you wish to convert to string
- * \param pszGUID buffer in which to write the ASCII string
- * \param cbGUID the size of pszGUID
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickGetDeviceGUID
- * \sa SDL_JoystickGetGUID
- * \sa SDL_JoystickGetGUIDFromString
- */
-extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
-
-/**
- * Convert a GUID string into a SDL_JoystickGUID structure.
- *
- * Performs no error checking. If this function is given a string containing
- * an invalid GUID, the function will silently succeed, but the GUID generated
- * will not be useful.
- *
- * \param pchGUID string containing an ASCII representation of a GUID
- * \returns a SDL_JoystickGUID structure.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickGetGUIDString
- */
-extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
-
-/**
- * Get the status of a specified joystick.
- *
- * \param joystick the joystick to query
- * \returns SDL_TRUE if the joystick has been opened, SDL_FALSE if it has not;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickClose
- * \sa SDL_JoystickOpen
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick *joystick);
-
-/**
- * Get the instance ID of an opened joystick.
- *
- * \param joystick an SDL_Joystick structure containing joystick information
- * \returns the instance ID of the specified joystick on success or a negative
- *          error code on failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickOpen
- */
-extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joystick);
-
-/**
- * Get the number of general axis controls on a joystick.
- *
- * Often, the directional pad on a game controller will either look like 4
- * separate buttons or a POV hat, and not axes, but all of this is up to the
- * device and platform.
- *
- * \param joystick an SDL_Joystick structure containing joystick information
- * \returns the number of axis controls/number of axes on success or a
- *          negative error code on failure; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickGetAxis
- * \sa SDL_JoystickOpen
- */
-extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick);
-
-/**
- * Get the number of trackballs on a joystick.
- *
- * Joystick trackballs have only relative motion events associated with them
- * and their state cannot be polled.
- *
- * Most joysticks do not have trackballs.
- *
- * \param joystick an SDL_Joystick structure containing joystick information
- * \returns the number of trackballs on success or a negative error code on
- *          failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickGetBall
- */
-extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick);
-
-/**
- * Get the number of POV hats on a joystick.
- *
- * \param joystick an SDL_Joystick structure containing joystick information
- * \returns the number of POV hats on success or a negative error code on
- *          failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickGetHat
- * \sa SDL_JoystickOpen
- */
-extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick);
-
-/**
- * Get the number of buttons on a joystick.
- *
- * \param joystick an SDL_Joystick structure containing joystick information
- * \returns the number of buttons on success or a negative error code on
- *          failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickGetButton
- * \sa SDL_JoystickOpen
- */
-extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick);
-
-/**
- * Update the current state of the open joysticks.
- *
- * This is called automatically by the event loop if any joystick events are
- * enabled.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickEventState
- */
-extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
-
-/**
- * Enable/disable joystick event polling.
- *
- * If joystick events are disabled, you must call SDL_JoystickUpdate()
- * yourself and manually check the state of the joystick when you want
- * joystick information.
- *
- * It is recommended that you leave joystick event handling enabled.
- *
- * **WARNING**: Calling this function may delete all events currently in SDL's
- * event queue.
- *
- * \param state can be one of `SDL_QUERY`, `SDL_IGNORE`, or `SDL_ENABLE`
- * \returns 1 if enabled, 0 if disabled, or a negative error code on failure;
- *          call SDL_GetError() for more information.
- *
- *          If `state` is `SDL_QUERY` then the current state is returned,
- *          otherwise the new processing state is returned.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GameControllerEventState
- */
-extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
-
-#define SDL_JOYSTICK_AXIS_MAX   32767
-#define SDL_JOYSTICK_AXIS_MIN   -32768
-
-/**
- * Get the current state of an axis control on a joystick.
- *
- * SDL makes no promises about what part of the joystick any given axis refers
- * to. Your game should have some sort of configuration UI to let users
- * specify what each axis should be bound to. Alternately, SDL's higher-level
- * Game Controller API makes a great effort to apply order to this lower-level
- * interface, so you know that a specific axis is the "left thumb stick," etc.
- *
- * The value returned by SDL_JoystickGetAxis() is a signed integer (-32768 to
- * 32767) representing the current position of the axis. It may be necessary
- * to impose certain tolerances on these values to account for jitter.
- *
- * \param joystick an SDL_Joystick structure containing joystick information
- * \param axis the axis to query; the axis indices start at index 0
- * \returns a 16-bit signed integer representing the current position of the
- *          axis or 0 on failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickNumAxes
- */
-extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick,
-                                                   int axis);
-
-/**
- * Get the initial state of an axis control on a joystick.
- *
- * The state is a value ranging from -32768 to 32767.
- *
- * The axis indices start at index 0.
- *
- * \param joystick an SDL_Joystick structure containing joystick information
- * \param axis the axis to query; the axis indices start at index 0
- * \param state Upon return, the initial value is supplied here.
- * \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick,
-                                                   int axis, Sint16 *state);
-
-/**
- *  \name Hat positions
- */
-/* @{ */
-#define SDL_HAT_CENTERED    0x00
-#define SDL_HAT_UP          0x01
-#define SDL_HAT_RIGHT       0x02
-#define SDL_HAT_DOWN        0x04
-#define SDL_HAT_LEFT        0x08
-#define SDL_HAT_RIGHTUP     (SDL_HAT_RIGHT|SDL_HAT_UP)
-#define SDL_HAT_RIGHTDOWN   (SDL_HAT_RIGHT|SDL_HAT_DOWN)
-#define SDL_HAT_LEFTUP      (SDL_HAT_LEFT|SDL_HAT_UP)
-#define SDL_HAT_LEFTDOWN    (SDL_HAT_LEFT|SDL_HAT_DOWN)
-/* @} */
-
-/**
- * Get the current state of a POV hat on a joystick.
- *
- * The returned value will be one of the following positions:
- *
- * - `SDL_HAT_CENTERED`
- * - `SDL_HAT_UP`
- * - `SDL_HAT_RIGHT`
- * - `SDL_HAT_DOWN`
- * - `SDL_HAT_LEFT`
- * - `SDL_HAT_RIGHTUP`
- * - `SDL_HAT_RIGHTDOWN`
- * - `SDL_HAT_LEFTUP`
- * - `SDL_HAT_LEFTDOWN`
- *
- * \param joystick an SDL_Joystick structure containing joystick information
- * \param hat the hat index to get the state from; indices start at index 0
- * \returns the current hat position.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickNumHats
- */
-extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick,
-                                                 int hat);
-
-/**
- * Get the ball axis change since the last poll.
- *
- * Trackballs can only return relative motion since the last call to
- * SDL_JoystickGetBall(), these motion deltas are placed into `dx` and `dy`.
- *
- * Most joysticks do not have trackballs.
- *
- * \param joystick the SDL_Joystick to query
- * \param ball the ball index to query; ball indices start at index 0
- * \param dx stores the difference in the x axis position since the last poll
- * \param dy stores the difference in the y axis position since the last poll
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickNumBalls
- */
-extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick,
-                                                int ball, int *dx, int *dy);
-
-/**
- * Get the current state of a button on a joystick.
- *
- * \param joystick an SDL_Joystick structure containing joystick information
- * \param button the button index to get the state from; indices start at
- *               index 0
- * \returns 1 if the specified button is pressed, 0 otherwise.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickNumButtons
- */
-extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick,
-                                                    int button);
-
-/**
- * Start a rumble effect.
- *
- * Each call to this function cancels any previous rumble effect, and calling
- * it with 0 intensity stops any rumbling.
- *
- * \param joystick The joystick to vibrate
- * \param low_frequency_rumble The intensity of the low frequency (left)
- *                             rumble motor, from 0 to 0xFFFF
- * \param high_frequency_rumble The intensity of the high frequency (right)
- *                              rumble motor, from 0 to 0xFFFF
- * \param duration_ms The duration of the rumble effect, in milliseconds
- * \returns 0, or -1 if rumble isn't supported on this joystick
- *
- * \since This function is available since SDL 2.0.9.
- *
- * \sa SDL_JoystickHasRumble
- */
-extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
-
-/**
- * Start a rumble effect in the joystick's triggers
- *
- * Each call to this function cancels any previous trigger rumble effect, and
- * calling it with 0 intensity stops any rumbling.
- *
- * Note that this is rumbling of the _triggers_ and not the game controller as
- * a whole. This is currently only supported on Xbox One controllers. If you
- * want the (more common) whole-controller rumble, use SDL_JoystickRumble()
- * instead.
- *
- * \param joystick The joystick to vibrate
- * \param left_rumble The intensity of the left trigger rumble motor, from 0
- *                    to 0xFFFF
- * \param right_rumble The intensity of the right trigger rumble motor, from 0
- *                     to 0xFFFF
- * \param duration_ms The duration of the rumble effect, in milliseconds
- * \returns 0, or -1 if trigger rumble isn't supported on this joystick
- *
- * \since This function is available since SDL 2.0.14.
- *
- * \sa SDL_JoystickHasRumbleTriggers
- */
-extern DECLSPEC int SDLCALL SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
-
-/**
- * Query whether a joystick has an LED.
- *
- * An example of a joystick LED is the light on the back of a PlayStation 4's
- * DualShock 4 controller.
- *
- * \param joystick The joystick to query
- * \return SDL_TRUE if the joystick has a modifiable LED, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasLED(SDL_Joystick *joystick);
-
-/**
- * Query whether a joystick has rumble support.
- *
- * \param joystick The joystick to query
- * \return SDL_TRUE if the joystick has rumble, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_JoystickRumble
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumble(SDL_Joystick *joystick);
-
-/**
- * Query whether a joystick has rumble support on triggers.
- *
- * \param joystick The joystick to query
- * \return SDL_TRUE if the joystick has trigger rumble, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_JoystickRumbleTriggers
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumbleTriggers(SDL_Joystick *joystick);
-
-/**
- * Update a joystick's LED color.
- *
- * An example of a joystick LED is the light on the back of a PlayStation 4's
- * DualShock 4 controller.
- *
- * \param joystick The joystick to update
- * \param red The intensity of the red LED
- * \param green The intensity of the green LED
- * \param blue The intensity of the blue LED
- * \returns 0 on success, -1 if this joystick does not have a modifiable LED
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue);
-
-/**
- * Send a joystick specific effect packet
- *
- * \param joystick The joystick to affect
- * \param data The data to send to the joystick
- * \param size The size of the data to send to the joystick
- * \returns 0, or -1 if this joystick or driver doesn't support effect packets
- *
- * \since This function is available since SDL 2.0.16.
- */
-extern DECLSPEC int SDLCALL SDL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size);
-
-/**
- * Close a joystick previously opened with SDL_JoystickOpen().
- *
- * \param joystick The joystick device to close
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_JoystickOpen
- */
-extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick);
-
-/**
- * Get the battery level of a joystick as SDL_JoystickPowerLevel.
- *
- * \param joystick the SDL_Joystick to query
- * \returns the current battery level as SDL_JoystickPowerLevel on success or
- *          `SDL_JOYSTICK_POWER_UNKNOWN` if it is unknown
- *
- * \since This function is available since SDL 2.0.4.
- */
-extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_joystick_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_keyboard.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_keyboard.h
deleted file mode 100644 (file)
index 0aa5990..0000000
+++ /dev/null
@@ -1,337 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_keyboard.h
- *
- *  Include file for SDL keyboard event handling
- */
-
-#ifndef SDL_keyboard_h_
-#define SDL_keyboard_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-#include "SDL_keycode.h"
-#include "SDL_video.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \brief The SDL keysym structure, used in key events.
- *
- *  \note  If you are looking for translated character input, see the ::SDL_TEXTINPUT event.
- */
-typedef struct SDL_Keysym
-{
-    SDL_Scancode scancode;      /**< SDL physical key code - see ::SDL_Scancode for details */
-    SDL_Keycode sym;            /**< SDL virtual key code - see ::SDL_Keycode for details */
-    Uint16 mod;                 /**< current key modifiers */
-    Uint32 unused;
-} SDL_Keysym;
-
-/* Function prototypes */
-
-/**
- * Query the window which currently has keyboard focus.
- *
- * \returns the window with keyboard focus.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
-
-/**
- * Get a snapshot of the current state of the keyboard.
- *
- * The pointer returned is a pointer to an internal SDL array. It will be
- * valid for the whole lifetime of the application and should not be freed by
- * the caller.
- *
- * A array element with a value of 1 means that the key is pressed and a value
- * of 0 means that it is not. Indexes into this array are obtained by using
- * SDL_Scancode values.
- *
- * Use SDL_PumpEvents() to update the state array.
- *
- * This function gives you the current state after all events have been
- * processed, so if a key or button has been pressed and released before you
- * process events, then the pressed state will never show up in the
- * SDL_GetKeyboardState() calls.
- *
- * Note: This function doesn't take into account whether shift has been
- * pressed or not.
- *
- * \param numkeys if non-NULL, receives the length of the returned array
- * \returns a pointer to an array of key states.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_PumpEvents
- */
-extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
-
-/**
- * Get the current key modifier state for the keyboard.
- *
- * \returns an OR'd combination of the modifier keys for the keyboard. See
- *          SDL_Keymod for details.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetKeyboardState
- * \sa SDL_SetModState
- */
-extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
-
-/**
- * Set the current key modifier state for the keyboard.
- *
- * The inverse of SDL_GetModState(), SDL_SetModState() allows you to impose
- * modifier key states on your application. Simply pass your desired modifier
- * states into `modstate`. This value may be a bitwise, OR'd combination of
- * SDL_Keymod values.
- *
- * This does not change the keyboard state, only the key modifier flags that
- * SDL reports.
- *
- * \param modstate the desired SDL_Keymod for the keyboard
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetModState
- */
-extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
-
-/**
- * Get the key code corresponding to the given scancode according to the
- * current keyboard layout.
- *
- * See SDL_Keycode for details.
- *
- * \param scancode the desired SDL_Scancode to query
- * \returns the SDL_Keycode that corresponds to the given SDL_Scancode.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetKeyName
- * \sa SDL_GetScancodeFromKey
- */
-extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);
-
-/**
- * Get the scancode corresponding to the given key code according to the
- * current keyboard layout.
- *
- * See SDL_Scancode for details.
- *
- * \param key the desired SDL_Keycode to query
- * \returns the SDL_Scancode that corresponds to the given SDL_Keycode.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetKeyFromScancode
- * \sa SDL_GetScancodeName
- */
-extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key);
-
-/**
- * Get a human-readable name for a scancode.
- *
- * See SDL_Scancode for details.
- *
- * **Warning**: The returned name is by design not stable across platforms,
- * e.g. the name for `SDL_SCANCODE_LGUI` is "Left GUI" under Linux but "Left
- * Windows" under Microsoft Windows, and some scancodes like
- * `SDL_SCANCODE_NONUSBACKSLASH` don't have any name at all. There are even
- * scancodes that share names, e.g. `SDL_SCANCODE_RETURN` and
- * `SDL_SCANCODE_RETURN2` (both called "Return"). This function is therefore
- * unsuitable for creating a stable cross-platform two-way mapping between
- * strings and scancodes.
- *
- * \param scancode the desired SDL_Scancode to query
- * \returns a pointer to the name for the scancode. If the scancode doesn't
- *          have a name this function returns an empty string ("").
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetScancodeFromKey
- * \sa SDL_GetScancodeFromName
- */
-extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);
-
-/**
- * Get a scancode from a human-readable name.
- *
- * \param name the human-readable scancode name
- * \returns the SDL_Scancode, or `SDL_SCANCODE_UNKNOWN` if the name wasn't
- *          recognized; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetKeyFromName
- * \sa SDL_GetScancodeFromKey
- * \sa SDL_GetScancodeName
- */
-extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
-
-/**
- * Get a human-readable name for a key.
- *
- * See SDL_Scancode and SDL_Keycode for details.
- *
- * \param key the desired SDL_Keycode to query
- * \returns a pointer to a UTF-8 string that stays valid at least until the
- *          next call to this function. If you need it around any longer, you
- *          must copy it. If the key doesn't have a name, this function
- *          returns an empty string ("").
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetKeyFromName
- * \sa SDL_GetKeyFromScancode
- * \sa SDL_GetScancodeFromKey
- */
-extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
-
-/**
- * Get a key code from a human-readable name.
- *
- * \param name the human-readable key name
- * \returns key code, or `SDLK_UNKNOWN` if the name wasn't recognized; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetKeyFromScancode
- * \sa SDL_GetKeyName
- * \sa SDL_GetScancodeFromName
- */
-extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
-
-/**
- * Start accepting Unicode text input events.
- *
- * This function will start accepting Unicode text input events in the focused
- * SDL window, and start emitting SDL_TextInputEvent (SDL_TEXTINPUT) and
- * SDL_TextEditingEvent (SDL_TEXTEDITING) events. Please use this function in
- * pair with SDL_StopTextInput().
- *
- * On some platforms using this function activates the screen keyboard.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetTextInputRect
- * \sa SDL_StopTextInput
- */
-extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
-
-/**
- * Check whether or not Unicode text input events are enabled.
- *
- * \returns SDL_TRUE if text input events are enabled else SDL_FALSE.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_StartTextInput
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
-
-/**
- * Stop receiving any text input events.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_StartTextInput
- */
-extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
-
-/**
- * Dismiss the composition window/IME without disabling the subsystem.
- *
- * \since This function is available since SDL 2.0.22.
- *
- * \sa SDL_StartTextInput
- * \sa SDL_StopTextInput
- */
-extern DECLSPEC void SDLCALL SDL_ClearComposition(void);
-
-/**
- * Returns if an IME Composite or Candidate window is currently shown.
- *
- * \since This function is available since SDL 2.0.22.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void);
-
-/**
- * Set the rectangle used to type Unicode text inputs.
- *
- * Note: If you want use system native IME window, try to set hint
- * **SDL_HINT_IME_SHOW_UI** to **1**, otherwise this function won't give you
- * any feedback.
- *
- * \param rect the SDL_Rect structure representing the rectangle to receive
- *             text (ignored if NULL)
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_StartTextInput
- */
-extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
-
-/**
- * Check whether the platform has screen keyboard support.
- *
- * \returns SDL_TRUE if the platform has some screen keyboard support or
- *          SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_StartTextInput
- * \sa SDL_IsScreenKeyboardShown
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);
-
-/**
- * Check whether the screen keyboard is shown for given window.
- *
- * \param window the window for which screen keyboard should be queried
- * \returns SDL_TRUE if screen keyboard is shown or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HasScreenKeyboardSupport
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_keyboard_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_keycode.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_keycode.h
deleted file mode 100644 (file)
index 3560254..0000000
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_keycode.h
- *
- *  Defines constants which identify keyboard keys and modifiers.
- */
-
-#ifndef SDL_keycode_h_
-#define SDL_keycode_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_scancode.h"
-
-/**
- *  \brief The SDL virtual key representation.
- *
- *  Values of this type are used to represent keyboard keys using the current
- *  layout of the keyboard.  These values include Unicode values representing
- *  the unmodified character that would be generated by pressing the key, or
- *  an SDLK_* constant for those keys that do not generate characters.
- *
- *  A special exception is the number keys at the top of the keyboard which
- *  always map to SDLK_0...SDLK_9, regardless of layout.
- */
-typedef Sint32 SDL_Keycode;
-
-#define SDLK_SCANCODE_MASK (1<<30)
-#define SDL_SCANCODE_TO_KEYCODE(X)  (X | SDLK_SCANCODE_MASK)
-
-typedef enum
-{
-    SDLK_UNKNOWN = 0,
-
-    SDLK_RETURN = '\r',
-    SDLK_ESCAPE = '\x1B',
-    SDLK_BACKSPACE = '\b',
-    SDLK_TAB = '\t',
-    SDLK_SPACE = ' ',
-    SDLK_EXCLAIM = '!',
-    SDLK_QUOTEDBL = '"',
-    SDLK_HASH = '#',
-    SDLK_PERCENT = '%',
-    SDLK_DOLLAR = '$',
-    SDLK_AMPERSAND = '&',
-    SDLK_QUOTE = '\'',
-    SDLK_LEFTPAREN = '(',
-    SDLK_RIGHTPAREN = ')',
-    SDLK_ASTERISK = '*',
-    SDLK_PLUS = '+',
-    SDLK_COMMA = ',',
-    SDLK_MINUS = '-',
-    SDLK_PERIOD = '.',
-    SDLK_SLASH = '/',
-    SDLK_0 = '0',
-    SDLK_1 = '1',
-    SDLK_2 = '2',
-    SDLK_3 = '3',
-    SDLK_4 = '4',
-    SDLK_5 = '5',
-    SDLK_6 = '6',
-    SDLK_7 = '7',
-    SDLK_8 = '8',
-    SDLK_9 = '9',
-    SDLK_COLON = ':',
-    SDLK_SEMICOLON = ';',
-    SDLK_LESS = '<',
-    SDLK_EQUALS = '=',
-    SDLK_GREATER = '>',
-    SDLK_QUESTION = '?',
-    SDLK_AT = '@',
-
-    /*
-       Skip uppercase letters
-     */
-
-    SDLK_LEFTBRACKET = '[',
-    SDLK_BACKSLASH = '\\',
-    SDLK_RIGHTBRACKET = ']',
-    SDLK_CARET = '^',
-    SDLK_UNDERSCORE = '_',
-    SDLK_BACKQUOTE = '`',
-    SDLK_a = 'a',
-    SDLK_b = 'b',
-    SDLK_c = 'c',
-    SDLK_d = 'd',
-    SDLK_e = 'e',
-    SDLK_f = 'f',
-    SDLK_g = 'g',
-    SDLK_h = 'h',
-    SDLK_i = 'i',
-    SDLK_j = 'j',
-    SDLK_k = 'k',
-    SDLK_l = 'l',
-    SDLK_m = 'm',
-    SDLK_n = 'n',
-    SDLK_o = 'o',
-    SDLK_p = 'p',
-    SDLK_q = 'q',
-    SDLK_r = 'r',
-    SDLK_s = 's',
-    SDLK_t = 't',
-    SDLK_u = 'u',
-    SDLK_v = 'v',
-    SDLK_w = 'w',
-    SDLK_x = 'x',
-    SDLK_y = 'y',
-    SDLK_z = 'z',
-
-    SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),
-
-    SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),
-    SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2),
-    SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3),
-    SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4),
-    SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5),
-    SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6),
-    SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7),
-    SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8),
-    SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9),
-    SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10),
-    SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11),
-    SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12),
-
-    SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN),
-    SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK),
-    SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE),
-    SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),
-    SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),
-    SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),
-    SDLK_DELETE = '\x7F',
-    SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),
-    SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),
-    SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),
-    SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT),
-    SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN),
-    SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP),
-
-    SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR),
-    SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE),
-    SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY),
-    SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS),
-    SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS),
-    SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER),
-    SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1),
-    SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2),
-    SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3),
-    SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4),
-    SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5),
-    SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6),
-    SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7),
-    SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8),
-    SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9),
-    SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0),
-    SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD),
-
-    SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION),
-    SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER),
-    SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS),
-    SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13),
-    SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14),
-    SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15),
-    SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16),
-    SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17),
-    SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18),
-    SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19),
-    SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20),
-    SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21),
-    SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22),
-    SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23),
-    SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24),
-    SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE),
-    SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP),
-    SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU),
-    SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT),
-    SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP),
-    SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN),
-    SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO),
-    SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT),
-    SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY),
-    SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE),
-    SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND),
-    SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE),
-    SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP),
-    SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN),
-    SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA),
-    SDLK_KP_EQUALSAS400 =
-        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400),
-
-    SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE),
-    SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ),
-    SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL),
-    SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR),
-    SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR),
-    SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2),
-    SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR),
-    SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT),
-    SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER),
-    SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN),
-    SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL),
-    SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL),
-
-    SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00),
-    SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000),
-    SDLK_THOUSANDSSEPARATOR =
-        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR),
-    SDLK_DECIMALSEPARATOR =
-        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR),
-    SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT),
-    SDLK_CURRENCYSUBUNIT =
-        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT),
-    SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN),
-    SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN),
-    SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE),
-    SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE),
-    SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB),
-    SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE),
-    SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A),
-    SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B),
-    SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C),
-    SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D),
-    SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E),
-    SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F),
-    SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR),
-    SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER),
-    SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT),
-    SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS),
-    SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER),
-    SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND),
-    SDLK_KP_DBLAMPERSAND =
-        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND),
-    SDLK_KP_VERTICALBAR =
-        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR),
-    SDLK_KP_DBLVERTICALBAR =
-        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR),
-    SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON),
-    SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH),
-    SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE),
-    SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT),
-    SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM),
-    SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE),
-    SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL),
-    SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR),
-    SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD),
-    SDLK_KP_MEMSUBTRACT =
-        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT),
-    SDLK_KP_MEMMULTIPLY =
-        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY),
-    SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE),
-    SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS),
-    SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR),
-    SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY),
-    SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY),
-    SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL),
-    SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL),
-    SDLK_KP_HEXADECIMAL =
-        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL),
-
-    SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL),
-    SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT),
-    SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT),
-    SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI),
-    SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL),
-    SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT),
-    SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT),
-    SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI),
-
-    SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE),
-
-    SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT),
-    SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV),
-    SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP),
-    SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY),
-    SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE),
-    SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT),
-    SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW),
-    SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL),
-    SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR),
-    SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER),
-    SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH),
-    SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME),
-    SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK),
-    SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD),
-    SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP),
-    SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH),
-    SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS),
-
-    SDLK_BRIGHTNESSDOWN =
-        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN),
-    SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP),
-    SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH),
-    SDLK_KBDILLUMTOGGLE =
-        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE),
-    SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),
-    SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),
-    SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
-    SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP),
-    SDLK_APP1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1),
-    SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2),
-
-    SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
-    SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
-} SDL_KeyCode;
-
-/**
- * \brief Enumeration of valid key mods (possibly OR'd together).
- */
-typedef enum
-{
-    KMOD_NONE = 0x0000,
-    KMOD_LSHIFT = 0x0001,
-    KMOD_RSHIFT = 0x0002,
-    KMOD_LCTRL = 0x0040,
-    KMOD_RCTRL = 0x0080,
-    KMOD_LALT = 0x0100,
-    KMOD_RALT = 0x0200,
-    KMOD_LGUI = 0x0400,
-    KMOD_RGUI = 0x0800,
-    KMOD_NUM = 0x1000,
-    KMOD_CAPS = 0x2000,
-    KMOD_MODE = 0x4000,
-    KMOD_SCROLL = 0x8000,
-
-    KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL,
-    KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT,
-    KMOD_ALT = KMOD_LALT | KMOD_RALT,
-    KMOD_GUI = KMOD_LGUI | KMOD_RGUI,
-
-    KMOD_RESERVED = KMOD_SCROLL /* This is for source-level compatibility with SDL 2.0.0. */
-} SDL_Keymod;
-
-#endif /* SDL_keycode_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_loadso.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_loadso.h
deleted file mode 100644 (file)
index 61857c8..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_loadso.h
- *
- *  System dependent library loading routines
- *
- *  Some things to keep in mind:
- *  \li These functions only work on C function names.  Other languages may
- *      have name mangling and intrinsic language support that varies from
- *      compiler to compiler.
- *  \li Make sure you declare your function pointers with the same calling
- *      convention as the actual library function.  Your code will crash
- *      mysteriously if you do not do this.
- *  \li Avoid namespace collisions.  If you load a symbol from the library,
- *      it is not defined whether or not it goes into the global symbol
- *      namespace for the application.  If it does and it conflicts with
- *      symbols in your code or other shared libraries, you will not get
- *      the results you expect. :)
- */
-
-#ifndef SDL_loadso_h_
-#define SDL_loadso_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Dynamically load a shared object.
- *
- * \param sofile a system-dependent name of the object file
- * \returns an opaque pointer to the object handle or NULL if there was an
- *          error; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LoadFunction
- * \sa SDL_UnloadObject
- */
-extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
-
-/**
- * Look up the address of the named function in a shared object.
- *
- * This function pointer is no longer valid after calling SDL_UnloadObject().
- *
- * This function can only look up C function names. Other languages may have
- * name mangling and intrinsic language support that varies from compiler to
- * compiler.
- *
- * Make sure you declare your function pointers with the same calling
- * convention as the actual library function. Your code will crash
- * mysteriously if you do not do this.
- *
- * If the requested function doesn't exist, NULL is returned.
- *
- * \param handle a valid shared object handle returned by SDL_LoadObject()
- * \param name the name of the function to look up
- * \returns a pointer to the function or NULL if there was an error; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LoadObject
- * \sa SDL_UnloadObject
- */
-extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
-                                               const char *name);
-
-/**
- * Unload a shared object from memory.
- *
- * \param handle a valid shared object handle returned by SDL_LoadObject()
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LoadFunction
- * \sa SDL_LoadObject
- */
-extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_loadso_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_locale.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_locale.h
deleted file mode 100644 (file)
index 7515779..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_locale.h
- *
- *  Include file for SDL locale services
- */
-
-#ifndef _SDL_locale_h
-#define _SDL_locale_h
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-/* *INDENT-OFF* */
-extern "C" {
-/* *INDENT-ON* */
-#endif
-
-
-typedef struct SDL_Locale
-{
-    const char *language;  /**< A language name, like "en" for English. */
-    const char *country;  /**< A country, like "US" for America. Can be NULL. */
-} SDL_Locale;
-
-/**
- * Report the user's preferred locale.
- *
- * This returns an array of SDL_Locale structs, the final item zeroed out.
- * When the caller is done with this array, it should call SDL_free() on the
- * returned value; all the memory involved is allocated in a single block, so
- * a single SDL_free() will suffice.
- *
- * Returned language strings are in the format xx, where 'xx' is an ISO-639
- * language specifier (such as "en" for English, "de" for German, etc).
- * Country strings are in the format YY, where "YY" is an ISO-3166 country
- * code (such as "US" for the United States, "CA" for Canada, etc). Country
- * might be NULL if there's no specific guidance on them (so you might get {
- * "en", "US" } for American English, but { "en", NULL } means "English
- * language, generically"). Language strings are never NULL, except to
- * terminate the array.
- *
- * Please note that not all of these strings are 2 characters; some are three
- * or more.
- *
- * The returned list of locales are in the order of the user's preference. For
- * example, a German citizen that is fluent in US English and knows enough
- * Japanese to navigate around Tokyo might have a list like: { "de", "en_US",
- * "jp", NULL }. Someone from England might prefer British English (where
- * "color" is spelled "colour", etc), but will settle for anything like it: {
- * "en_GB", "en", NULL }.
- *
- * This function returns NULL on error, including when the platform does not
- * supply this information at all.
- *
- * This might be a "slow" call that has to query the operating system. It's
- * best to ask for this once and save the results. However, this list can
- * change, usually because the user has changed a system preference outside of
- * your program; SDL will send an SDL_LOCALECHANGED event in this case, if
- * possible, and you can call this function again to get an updated copy of
- * preferred locales.
- *
- * \return array of locales, terminated with a locale with a NULL language
- *         field. Will return NULL on error.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC SDL_Locale * SDLCALL SDL_GetPreferredLocales(void);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-/* *INDENT-OFF* */
-}
-/* *INDENT-ON* */
-#endif
-#include "close_code.h"
-
-#endif /* _SDL_locale_h */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_log.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_log.h
deleted file mode 100644 (file)
index dbbcb1e..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_log.h
- *
- *  Simple log messages with categories and priorities.
- *
- *  By default logs are quiet, but if you're debugging SDL you might want:
- *
- *      SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN);
- *
- *  Here's where the messages go on different platforms:
- *      Windows: debug output stream
- *      Android: log output
- *      Others: standard error output (stderr)
- */
-
-#ifndef SDL_log_h_
-#define SDL_log_h_
-
-#include "SDL_stdinc.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/**
- *  \brief The maximum size of a log message
- *
- *  Messages longer than the maximum size will be truncated
- */
-#define SDL_MAX_LOG_MESSAGE 4096
-
-/**
- *  \brief The predefined log categories
- *
- *  By default the application category is enabled at the INFO level,
- *  the assert category is enabled at the WARN level, test is enabled
- *  at the VERBOSE level and all other categories are enabled at the
- *  CRITICAL level.
- */
-typedef enum
-{
-    SDL_LOG_CATEGORY_APPLICATION,
-    SDL_LOG_CATEGORY_ERROR,
-    SDL_LOG_CATEGORY_ASSERT,
-    SDL_LOG_CATEGORY_SYSTEM,
-    SDL_LOG_CATEGORY_AUDIO,
-    SDL_LOG_CATEGORY_VIDEO,
-    SDL_LOG_CATEGORY_RENDER,
-    SDL_LOG_CATEGORY_INPUT,
-    SDL_LOG_CATEGORY_TEST,
-
-    /* Reserved for future SDL library use */
-    SDL_LOG_CATEGORY_RESERVED1,
-    SDL_LOG_CATEGORY_RESERVED2,
-    SDL_LOG_CATEGORY_RESERVED3,
-    SDL_LOG_CATEGORY_RESERVED4,
-    SDL_LOG_CATEGORY_RESERVED5,
-    SDL_LOG_CATEGORY_RESERVED6,
-    SDL_LOG_CATEGORY_RESERVED7,
-    SDL_LOG_CATEGORY_RESERVED8,
-    SDL_LOG_CATEGORY_RESERVED9,
-    SDL_LOG_CATEGORY_RESERVED10,
-
-    /* Beyond this point is reserved for application use, e.g.
-       enum {
-           MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM,
-           MYAPP_CATEGORY_AWESOME2,
-           MYAPP_CATEGORY_AWESOME3,
-           ...
-       };
-     */
-    SDL_LOG_CATEGORY_CUSTOM
-} SDL_LogCategory;
-
-/**
- *  \brief The predefined log priorities
- */
-typedef enum
-{
-    SDL_LOG_PRIORITY_VERBOSE = 1,
-    SDL_LOG_PRIORITY_DEBUG,
-    SDL_LOG_PRIORITY_INFO,
-    SDL_LOG_PRIORITY_WARN,
-    SDL_LOG_PRIORITY_ERROR,
-    SDL_LOG_PRIORITY_CRITICAL,
-    SDL_NUM_LOG_PRIORITIES
-} SDL_LogPriority;
-
-
-/**
- * Set the priority of all log categories.
- *
- * \param priority the SDL_LogPriority to assign
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LogSetPriority
- */
-extern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority);
-
-/**
- * Set the priority of a particular log category.
- *
- * \param category the category to assign a priority to
- * \param priority the SDL_LogPriority to assign
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LogGetPriority
- * \sa SDL_LogSetAllPriority
- */
-extern DECLSPEC void SDLCALL SDL_LogSetPriority(int category,
-                                                SDL_LogPriority priority);
-
-/**
- * Get the priority of a particular log category.
- *
- * \param category the category to query
- * \returns the SDL_LogPriority for the requested category
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LogSetPriority
- */
-extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category);
-
-/**
- * Reset all priorities to default.
- *
- * This is called by SDL_Quit().
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LogSetAllPriority
- * \sa SDL_LogSetPriority
- */
-extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);
-
-/**
- * Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO.
- *
- * = * \param fmt a printf() style message format string
- *
- * \param ... additional parameters matching % tokens in the `fmt` string, if
- *            any
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LogCritical
- * \sa SDL_LogDebug
- * \sa SDL_LogError
- * \sa SDL_LogInfo
- * \sa SDL_LogMessage
- * \sa SDL_LogMessageV
- * \sa SDL_LogVerbose
- * \sa SDL_LogWarn
- */
-extern DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
-
-/**
- * Log a message with SDL_LOG_PRIORITY_VERBOSE.
- *
- * \param category the category of the message
- * \param fmt a printf() style message format string
- * \param ... additional parameters matching % tokens in the **fmt** string,
- *            if any
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Log
- * \sa SDL_LogCritical
- * \sa SDL_LogDebug
- * \sa SDL_LogError
- * \sa SDL_LogInfo
- * \sa SDL_LogMessage
- * \sa SDL_LogMessageV
- * \sa SDL_LogWarn
- */
-extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
-
-/**
- * Log a message with SDL_LOG_PRIORITY_DEBUG.
- *
- * \param category the category of the message
- * \param fmt a printf() style message format string
- * \param ... additional parameters matching % tokens in the **fmt** string,
- *            if any
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Log
- * \sa SDL_LogCritical
- * \sa SDL_LogError
- * \sa SDL_LogInfo
- * \sa SDL_LogMessage
- * \sa SDL_LogMessageV
- * \sa SDL_LogVerbose
- * \sa SDL_LogWarn
- */
-extern DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
-
-/**
- * Log a message with SDL_LOG_PRIORITY_INFO.
- *
- * \param category the category of the message
- * \param fmt a printf() style message format string
- * \param ... additional parameters matching % tokens in the **fmt** string,
- *            if any
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Log
- * \sa SDL_LogCritical
- * \sa SDL_LogDebug
- * \sa SDL_LogError
- * \sa SDL_LogMessage
- * \sa SDL_LogMessageV
- * \sa SDL_LogVerbose
- * \sa SDL_LogWarn
- */
-extern DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
-
-/**
- * Log a message with SDL_LOG_PRIORITY_WARN.
- *
- * \param category the category of the message
- * \param fmt a printf() style message format string
- * \param ... additional parameters matching % tokens in the **fmt** string,
- *            if any
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Log
- * \sa SDL_LogCritical
- * \sa SDL_LogDebug
- * \sa SDL_LogError
- * \sa SDL_LogInfo
- * \sa SDL_LogMessage
- * \sa SDL_LogMessageV
- * \sa SDL_LogVerbose
- */
-extern DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
-
-/**
- * Log a message with SDL_LOG_PRIORITY_ERROR.
- *
- * \param category the category of the message
- * \param fmt a printf() style message format string
- * \param ... additional parameters matching % tokens in the **fmt** string,
- *            if any
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Log
- * \sa SDL_LogCritical
- * \sa SDL_LogDebug
- * \sa SDL_LogInfo
- * \sa SDL_LogMessage
- * \sa SDL_LogMessageV
- * \sa SDL_LogVerbose
- * \sa SDL_LogWarn
- */
-extern DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
-
-/**
- * Log a message with SDL_LOG_PRIORITY_CRITICAL.
- *
- * \param category the category of the message
- * \param fmt a printf() style message format string
- * \param ... additional parameters matching % tokens in the **fmt** string,
- *            if any
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Log
- * \sa SDL_LogDebug
- * \sa SDL_LogError
- * \sa SDL_LogInfo
- * \sa SDL_LogMessage
- * \sa SDL_LogMessageV
- * \sa SDL_LogVerbose
- * \sa SDL_LogWarn
- */
-extern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
-
-/**
- * Log a message with the specified category and priority.
- *
- * \param category the category of the message
- * \param priority the priority of the message
- * \param fmt a printf() style message format string
- * \param ... additional parameters matching % tokens in the **fmt** string,
- *            if any
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Log
- * \sa SDL_LogCritical
- * \sa SDL_LogDebug
- * \sa SDL_LogError
- * \sa SDL_LogInfo
- * \sa SDL_LogMessageV
- * \sa SDL_LogVerbose
- * \sa SDL_LogWarn
- */
-extern DECLSPEC void SDLCALL SDL_LogMessage(int category,
-                                            SDL_LogPriority priority,
-                                            SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3);
-
-/**
- * Log a message with the specified category and priority.
- *
- * \param category the category of the message
- * \param priority the priority of the message
- * \param fmt a printf() style message format string
- * \param ap a variable argument list
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Log
- * \sa SDL_LogCritical
- * \sa SDL_LogDebug
- * \sa SDL_LogError
- * \sa SDL_LogInfo
- * \sa SDL_LogMessage
- * \sa SDL_LogVerbose
- * \sa SDL_LogWarn
- */
-extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
-                                             SDL_LogPriority priority,
-                                             const char *fmt, va_list ap);
-
-/**
- * The prototype for the log output callback function.
- *
- * This function is called by SDL when there is new text to be logged.
- *
- * \param userdata what was passed as `userdata` to SDL_LogSetOutputFunction()
- * \param category the category of the message
- * \param priority the priority of the message
- * \param message the message being output
- */
-typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
-
-/**
- * Get the current log output function.
- *
- * \param callback an SDL_LogOutputFunction filled in with the current log
- *                 callback
- * \param userdata a pointer filled in with the pointer that is passed to
- *                 `callback`
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LogSetOutputFunction
- */
-extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
-
-/**
- * Replace the default log output function with one of your own.
- *
- * \param callback an SDL_LogOutputFunction to call instead of the default
- * \param userdata a pointer that is passed to `callback`
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LogGetOutputFunction
- */
-extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_log_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_main.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_main.h
deleted file mode 100644 (file)
index b3fec15..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_main_h_
-#define SDL_main_h_
-
-#include "SDL_stdinc.h"
-
-/**
- *  \file SDL_main.h
- *
- *  Redefine main() on some platforms so that it is called by SDL.
- */
-
-#ifndef SDL_MAIN_HANDLED
-#if defined(__WIN32__)
-/* On Windows SDL provides WinMain(), which parses the command line and passes
-   the arguments to your main function.
-
-   If you provide your own WinMain(), you may define SDL_MAIN_HANDLED
- */
-#define SDL_MAIN_AVAILABLE
-
-#elif defined(__WINRT__)
-/* On WinRT, SDL provides a main function that initializes CoreApplication,
-   creating an instance of IFrameworkView in the process.
-
-   Please note that #include'ing SDL_main.h is not enough to get a main()
-   function working.  In non-XAML apps, the file,
-   src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled
-   into the app itself.  In XAML apps, the function, SDL_WinRTRunApp must be
-   called, with a pointer to the Direct3D-hosted XAML control passed in.
-*/
-#define SDL_MAIN_NEEDED
-
-#elif defined(__IPHONEOS__)
-/* On iOS SDL provides a main function that creates an application delegate
-   and starts the iOS application run loop.
-
-   If you link with SDL dynamically on iOS, the main function can't be in a
-   shared library, so you need to link with libSDLmain.a, which includes a
-   stub main function that calls into the shared library to start execution.
-
-   See src/video/uikit/SDL_uikitappdelegate.m for more details.
- */
-#define SDL_MAIN_NEEDED
-
-#elif defined(__ANDROID__)
-/* On Android SDL provides a Java class in SDLActivity.java that is the
-   main activity entry point.
-
-   See docs/README-android.md for more details on extending that class.
- */
-#define SDL_MAIN_NEEDED
-
-/* We need to export SDL_main so it can be launched from Java */
-#define SDLMAIN_DECLSPEC    DECLSPEC
-
-#elif defined(__NACL__)
-/* On NACL we use ppapi_simple to set up the application helper code,
-   then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before 
-   starting the user main function.
-   All user code is run in a separate thread by ppapi_simple, thus 
-   allowing for blocking io to take place via nacl_io
-*/
-#define SDL_MAIN_NEEDED
-
-#elif defined(__PSP__)
-/* On PSP SDL provides a main function that sets the module info,
-   activates the GPU and starts the thread required to be able to exit
-   the software.
-
-   If you provide this yourself, you may define SDL_MAIN_HANDLED
- */
-#define SDL_MAIN_AVAILABLE
-
-#endif
-#endif /* SDL_MAIN_HANDLED */
-
-#ifndef SDLMAIN_DECLSPEC
-#define SDLMAIN_DECLSPEC
-#endif
-
-/**
- *  \file SDL_main.h
- *
- *  The application's main() function must be called with C linkage,
- *  and should be declared like this:
- *  \code
- *  #ifdef __cplusplus
- *  extern "C"
- *  #endif
- *  int main(int argc, char *argv[])
- *  {
- *  }
- *  \endcode
- */
-
-#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE)
-#define main    SDL_main
-#endif
-
-#include "begin_code.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  The prototype for the application's main() function
- */
-typedef int (*SDL_main_func)(int argc, char *argv[]);
-extern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
-
-
-/**
- * Circumvent failure of SDL_Init() when not using SDL_main() as an entry
- * point.
- *
- * This function is defined in SDL_main.h, along with the preprocessor rule to
- * redefine main() as SDL_main(). Thus to ensure that your main() function
- * will not be changed it is necessary to define SDL_MAIN_HANDLED before
- * including SDL.h.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_Init
- */
-extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
-
-#ifdef __WIN32__
-
-/**
- * Register a win32 window class for SDL's use.
- *
- * This can be called to set the application window class at startup. It is
- * safe to call this multiple times, as long as every call is eventually
- * paired with a call to SDL_UnregisterApp, but a second registration attempt
- * while a previous registration is still active will be ignored, other than
- * to increment a counter.
- *
- * Most applications do not need to, and should not, call this directly; SDL
- * will call it when initializing the video subsystem.
- *
- * \param name the window class name, in UTF-8 encoding. If NULL, SDL
- *             currently uses "SDL_app" but this isn't guaranteed.
- * \param style the value to use in WNDCLASSEX::style. If `name` is NULL, SDL
- *              currently uses `(CS_BYTEALIGNCLIENT | CS_OWNDC)` regardless of
- *              what is specified here.
- * \param hInst the HINSTANCE to use in WNDCLASSEX::hInstance. If zero, SDL
- *              will use `GetModuleHandle(NULL)` instead.
- * \returns 0 on success, -1 on error. SDL_GetError() may have details.
- *
- * \since This function is available since SDL 2.0.2.
- */
-extern DECLSPEC int SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
-
-/**
- * Deregister the win32 window class from an SDL_RegisterApp call.
- *
- * This can be called to undo the effects of SDL_RegisterApp.
- *
- * Most applications do not need to, and should not, call this directly; SDL
- * will call it when deinitializing the video subsystem.
- *
- * It is safe to call this multiple times, as long as every call is eventually
- * paired with a prior call to SDL_RegisterApp. The window class will only be
- * deregistered when the registration counter in SDL_RegisterApp decrements to
- * zero through calls to this function.
- *
- * \since This function is available since SDL 2.0.2.
- */
-extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
-
-#endif /* __WIN32__ */
-
-
-#ifdef __WINRT__
-
-/**
- * Initialize and launch an SDL/WinRT application.
- *
- * \param mainFunction the SDL app's C-style main(), an SDL_main_func
- * \param reserved reserved for future use; should be NULL
- * \returns 0 on success or -1 on failure; call SDL_GetError() to retrieve
- *          more information on the failure.
- *
- * \since This function is available since SDL 2.0.3.
- */
-extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * reserved);
-
-#endif /* __WINRT__ */
-
-#if defined(__IPHONEOS__)
-
-/**
- * Initializes and launches an SDL application.
- *
- * \param argc The argc parameter from the application's main() function
- * \param argv The argv parameter from the application's main() function
- * \param mainFunction The SDL app's C-style main(), an SDL_main_func
- * \return the return value from mainFunction
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);
-
-#endif /* __IPHONEOS__ */
-
-
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_main_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_messagebox.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_messagebox.h
deleted file mode 100644 (file)
index d763534..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_messagebox_h_
-#define SDL_messagebox_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_video.h"      /* For SDL_Window */
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * SDL_MessageBox flags. If supported will display warning icon, etc.
- */
-typedef enum
-{
-    SDL_MESSAGEBOX_ERROR                 = 0x00000010,   /**< error dialog */
-    SDL_MESSAGEBOX_WARNING               = 0x00000020,   /**< warning dialog */
-    SDL_MESSAGEBOX_INFORMATION           = 0x00000040,   /**< informational dialog */
-    SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080,   /**< buttons placed left to right */
-    SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100    /**< buttons placed right to left */
-} SDL_MessageBoxFlags;
-
-/**
- * Flags for SDL_MessageBoxButtonData.
- */
-typedef enum
-{
-    SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001,  /**< Marks the default button when return is hit */
-    SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002   /**< Marks the default button when escape is hit */
-} SDL_MessageBoxButtonFlags;
-
-/**
- * Individual button data.
- */
-typedef struct
-{
-    Uint32 flags;       /**< ::SDL_MessageBoxButtonFlags */
-    int buttonid;       /**< User defined button id (value returned via SDL_ShowMessageBox) */
-    const char * text;  /**< The UTF-8 button text */
-} SDL_MessageBoxButtonData;
-
-/**
- * RGB value used in a message box color scheme
- */
-typedef struct
-{
-    Uint8 r, g, b;
-} SDL_MessageBoxColor;
-
-typedef enum
-{
-    SDL_MESSAGEBOX_COLOR_BACKGROUND,
-    SDL_MESSAGEBOX_COLOR_TEXT,
-    SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
-    SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
-    SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,
-    SDL_MESSAGEBOX_COLOR_MAX
-} SDL_MessageBoxColorType;
-
-/**
- * A set of colors to use for message box dialogs
- */
-typedef struct
-{
-    SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX];
-} SDL_MessageBoxColorScheme;
-
-/**
- * MessageBox structure containing title, text, window, etc.
- */
-typedef struct
-{
-    Uint32 flags;                       /**< ::SDL_MessageBoxFlags */
-    SDL_Window *window;                 /**< Parent window, can be NULL */
-    const char *title;                  /**< UTF-8 title */
-    const char *message;                /**< UTF-8 message text */
-
-    int numbuttons;
-    const SDL_MessageBoxButtonData *buttons;
-
-    const SDL_MessageBoxColorScheme *colorScheme;   /**< ::SDL_MessageBoxColorScheme, can be NULL to use system settings */
-} SDL_MessageBoxData;
-
-/**
- * Create a modal message box.
- *
- * If your needs aren't complex, it might be easier to use
- * SDL_ShowSimpleMessageBox.
- *
- * This function should be called on the thread that created the parent
- * window, or on the main thread if the messagebox has no parent. It will
- * block execution of that thread until the user clicks a button or closes the
- * messagebox.
- *
- * This function may be called at any time, even before SDL_Init(). This makes
- * it useful for reporting errors like a failure to create a renderer or
- * OpenGL context.
- *
- * On X11, SDL rolls its own dialog box with X11 primitives instead of a
- * formal toolkit like GTK+ or Qt.
- *
- * Note that if SDL_Init() would fail because there isn't any available video
- * target, this function is likely to fail for the same reasons. If this is a
- * concern, check the return value from this function and fall back to writing
- * to stderr if you can.
- *
- * \param messageboxdata the SDL_MessageBoxData structure with title, text and
- *                       other options
- * \param buttonid the pointer to which user id of hit button should be copied
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ShowSimpleMessageBox
- */
-extern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
-
-/**
- * Display a simple modal message box.
- *
- * If your needs aren't complex, this function is preferred over
- * SDL_ShowMessageBox.
- *
- * `flags` may be any of the following:
- *
- * - `SDL_MESSAGEBOX_ERROR`: error dialog
- * - `SDL_MESSAGEBOX_WARNING`: warning dialog
- * - `SDL_MESSAGEBOX_INFORMATION`: informational dialog
- *
- * This function should be called on the thread that created the parent
- * window, or on the main thread if the messagebox has no parent. It will
- * block execution of that thread until the user clicks a button or closes the
- * messagebox.
- *
- * This function may be called at any time, even before SDL_Init(). This makes
- * it useful for reporting errors like a failure to create a renderer or
- * OpenGL context.
- *
- * On X11, SDL rolls its own dialog box with X11 primitives instead of a
- * formal toolkit like GTK+ or Qt.
- *
- * Note that if SDL_Init() would fail because there isn't any available video
- * target, this function is likely to fail for the same reasons. If this is a
- * concern, check the return value from this function and fall back to writing
- * to stderr if you can.
- *
- * \param flags an SDL_MessageBoxFlags value
- * \param title UTF-8 title text
- * \param message UTF-8 message text
- * \param window the parent window, or NULL for no parent
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ShowMessageBox
- */
-extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_messagebox_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_metal.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_metal.h
deleted file mode 100644 (file)
index eb30828..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_metal.h
- *
- *  Header file for functions to creating Metal layers and views on SDL windows.
- */
-
-#ifndef SDL_metal_h_
-#define SDL_metal_h_
-
-#include "SDL_video.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \brief A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).
- *
- *  \note This can be cast directly to an NSView or UIView.
- */
-typedef void *SDL_MetalView;
-
-/**
- *  \name Metal support functions
- */
-/* @{ */
-
-/**
- * Create a CAMetalLayer-backed NSView/UIView and attach it to the specified
- * window.
- *
- * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on
- * its own. It is up to user code to do that.
- *
- * The returned handle can be casted directly to a NSView or UIView. To access
- * the backing CAMetalLayer, call SDL_Metal_GetLayer().
- *
- * \since This function is available since SDL 2.0.12.
- *
- * \sa SDL_Metal_DestroyView
- * \sa SDL_Metal_GetLayer
- */
-extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window);
-
-/**
- * Destroy an existing SDL_MetalView object.
- *
- * This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was
- * called after SDL_CreateWindow.
- *
- * \since This function is available since SDL 2.0.12.
- *
- * \sa SDL_Metal_CreateView
- */
-extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
-
-/**
- * Get a pointer to the backing CAMetalLayer for the given view.
- *
- * \since This function is available since SDL 2.0.14.
- *
- * \sa SDL_MetalCreateView
- */
-extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
-
-/**
- * Get the size of a window's underlying drawable in pixels (for use with
- * setting viewport, scissor & etc).
- *
- * \param window SDL_Window from which the drawable size should be queried
- * \param w Pointer to variable for storing the width in pixels, may be NULL
- * \param h Pointer to variable for storing the height in pixels, may be NULL
- *
- * \since This function is available since SDL 2.0.14.
- *
- * \sa SDL_GetWindowSize
- * \sa SDL_CreateWindow
- */
-extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w,
-                                                       int *h);
-
-/* @} *//* Metal support functions */
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_metal_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_misc.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_misc.h
deleted file mode 100644 (file)
index 261b6b8..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_misc.h
- *
- *  \brief Include file for SDL API functions that don't fit elsewhere.
- */
-
-#ifndef SDL_misc_h_
-#define SDL_misc_h_
-
-#include "SDL_stdinc.h"
-
-#include "begin_code.h"
-
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Open a URL/URI in the browser or other appropriate external application.
- *
- * Open a URL in a separate, system-provided application. How this works will
- * vary wildly depending on the platform. This will likely launch what makes
- * sense to handle a specific URL's protocol (a web browser for `http://`,
- * etc), but it might also be able to launch file managers for directories and
- * other things.
- *
- * What happens when you open a URL varies wildly as well: your game window
- * may lose focus (and may or may not lose focus if your game was fullscreen
- * or grabbing input at the time). On mobile devices, your app will likely
- * move to the background or your process might be paused. Any given platform
- * may or may not handle a given URL.
- *
- * If this is unimplemented (or simply unavailable) for a platform, this will
- * fail with an error. A successful result does not mean the URL loaded, just
- * that we launched _something_ to handle it (or at least believe we did).
- *
- * All this to say: this function can be useful, but you should definitely
- * test it on every platform you target.
- *
- * \param url A valid URL/URI to open. Use `file:///full/path/to/file` for
- *            local files, if supported.
- * \returns 0 on success, or -1 on error; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_misc_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_mouse.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_mouse.h
deleted file mode 100644 (file)
index 1d4a2db..0000000
+++ /dev/null
@@ -1,454 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_mouse.h
- *
- *  Include file for SDL mouse event handling.
- */
-
-#ifndef SDL_mouse_h_
-#define SDL_mouse_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-#include "SDL_video.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct SDL_Cursor SDL_Cursor;   /**< Implementation dependent */
-
-/**
- * \brief Cursor types for SDL_CreateSystemCursor().
- */
-typedef enum
-{
-    SDL_SYSTEM_CURSOR_ARROW,     /**< Arrow */
-    SDL_SYSTEM_CURSOR_IBEAM,     /**< I-beam */
-    SDL_SYSTEM_CURSOR_WAIT,      /**< Wait */
-    SDL_SYSTEM_CURSOR_CROSSHAIR, /**< Crosshair */
-    SDL_SYSTEM_CURSOR_WAITARROW, /**< Small wait cursor (or Wait if not available) */
-    SDL_SYSTEM_CURSOR_SIZENWSE,  /**< Double arrow pointing northwest and southeast */
-    SDL_SYSTEM_CURSOR_SIZENESW,  /**< Double arrow pointing northeast and southwest */
-    SDL_SYSTEM_CURSOR_SIZEWE,    /**< Double arrow pointing west and east */
-    SDL_SYSTEM_CURSOR_SIZENS,    /**< Double arrow pointing north and south */
-    SDL_SYSTEM_CURSOR_SIZEALL,   /**< Four pointed arrow pointing north, south, east, and west */
-    SDL_SYSTEM_CURSOR_NO,        /**< Slashed circle or crossbones */
-    SDL_SYSTEM_CURSOR_HAND,      /**< Hand */
-    SDL_NUM_SYSTEM_CURSORS
-} SDL_SystemCursor;
-
-/**
- * \brief Scroll direction types for the Scroll event
- */
-typedef enum
-{
-    SDL_MOUSEWHEEL_NORMAL,    /**< The scroll direction is normal */
-    SDL_MOUSEWHEEL_FLIPPED    /**< The scroll direction is flipped / natural */
-} SDL_MouseWheelDirection;
-
-/* Function prototypes */
-
-/**
- * Get the window which currently has mouse focus.
- *
- * \returns the window with mouse focus.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);
-
-/**
- * Retrieve the current state of the mouse.
- *
- * The current button state is returned as a button bitmask, which can be
- * tested using the `SDL_BUTTON(X)` macros (where `X` is generally 1 for the
- * left, 2 for middle, 3 for the right button), and `x` and `y` are set to the
- * mouse cursor position relative to the focus window. You can pass NULL for
- * either `x` or `y`.
- *
- * \param x the x coordinate of the mouse cursor position relative to the
- *          focus window
- * \param y the y coordinate of the mouse cursor position relative to the
- *          focus window
- * \returns a 32-bit button bitmask of the current button state.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetGlobalMouseState
- * \sa SDL_GetRelativeMouseState
- * \sa SDL_PumpEvents
- */
-extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);
-
-/**
- * Get the current state of the mouse in relation to the desktop.
- *
- * This works similarly to SDL_GetMouseState(), but the coordinates will be
- * reported relative to the top-left of the desktop. This can be useful if you
- * need to track the mouse outside of a specific window and SDL_CaptureMouse()
- * doesn't fit your needs. For example, it could be useful if you need to
- * track the mouse while dragging a window, where coordinates relative to a
- * window might not be in sync at all times.
- *
- * Note: SDL_GetMouseState() returns the mouse position as SDL understands it
- * from the last pump of the event queue. This function, however, queries the
- * OS for the current mouse position, and as such, might be a slightly less
- * efficient function. Unless you know what you're doing and have a good
- * reason to use this function, you probably want SDL_GetMouseState() instead.
- *
- * \param x filled in with the current X coord relative to the desktop; can be
- *          NULL
- * \param y filled in with the current Y coord relative to the desktop; can be
- *          NULL
- * \returns the current button state as a bitmask which can be tested using
- *          the SDL_BUTTON(X) macros.
- *
- * \since This function is available since SDL 2.0.4.
- *
- * \sa SDL_CaptureMouse
- */
-extern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(int *x, int *y);
-
-/**
- * Retrieve the relative state of the mouse.
- *
- * The current button state is returned as a button bitmask, which can be
- * tested using the `SDL_BUTTON(X)` macros (where `X` is generally 1 for the
- * left, 2 for middle, 3 for the right button), and `x` and `y` are set to the
- * mouse deltas since the last call to SDL_GetRelativeMouseState() or since
- * event initialization. You can pass NULL for either `x` or `y`.
- *
- * \param x a pointer filled with the last recorded x coordinate of the mouse
- * \param y a pointer filled with the last recorded y coordinate of the mouse
- * \returns a 32-bit button bitmask of the relative button state.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetMouseState
- */
-extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
-
-/**
- * Move the mouse cursor to the given position within the window.
- *
- * This function generates a mouse motion event.
- *
- * Note that this function will appear to succeed, but not actually move the
- * mouse when used over Microsoft Remote Desktop.
- *
- * \param window the window to move the mouse into, or NULL for the current
- *               mouse focus
- * \param x the x coordinate within the window
- * \param y the y coordinate within the window
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_WarpMouseGlobal
- */
-extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
-                                                   int x, int y);
-
-/**
- * Move the mouse to the given position in global screen space.
- *
- * This function generates a mouse motion event.
- *
- * A failure of this function usually means that it is unsupported by a
- * platform.
- *
- * Note that this function will appear to succeed, but not actually move the
- * mouse when used over Microsoft Remote Desktop.
- *
- * \param x the x coordinate
- * \param y the y coordinate
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.4.
- *
- * \sa SDL_WarpMouseInWindow
- */
-extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y);
-
-/**
- * Set relative mouse mode.
- *
- * While the mouse is in relative mode, the cursor is hidden, and the driver
- * will try to report continuous motion in the current window. Only relative
- * motion events will be delivered, the mouse position will not change.
- *
- * Note that this function will not be able to provide continuous relative
- * motion when used over Microsoft Remote Desktop, instead motion is limited
- * to the bounds of the screen.
- *
- * This function will flush any pending mouse motion.
- *
- * \param enabled SDL_TRUE to enable relative mode, SDL_FALSE to disable.
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- *          If relative mode is not supported, this returns -1.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetRelativeMouseMode
- */
-extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
-
-/**
- * Capture the mouse and to track input outside an SDL window.
- *
- * Capturing enables your app to obtain mouse events globally, instead of just
- * within your window. Not all video targets support this function. When
- * capturing is enabled, the current window will get all mouse events, but
- * unlike relative mode, no change is made to the cursor and it is not
- * restrained to your window.
- *
- * This function may also deny mouse input to other windows--both those in
- * your application and others on the system--so you should use this function
- * sparingly, and in small bursts. For example, you might want to track the
- * mouse while the user is dragging something, until the user releases a mouse
- * button. It is not recommended that you capture the mouse for long periods
- * of time, such as the entire time your app is running. For that, you should
- * probably use SDL_SetRelativeMouseMode() or SDL_SetWindowGrab(), depending
- * on your goals.
- *
- * While captured, mouse events still report coordinates relative to the
- * current (foreground) window, but those coordinates may be outside the
- * bounds of the window (including negative values). Capturing is only allowed
- * for the foreground window. If the window loses focus while capturing, the
- * capture will be disabled automatically.
- *
- * While capturing is enabled, the current window will have the
- * `SDL_WINDOW_MOUSE_CAPTURE` flag set.
- *
- * \param enabled SDL_TRUE to enable capturing, SDL_FALSE to disable.
- * \returns 0 on success or -1 if not supported; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.4.
- *
- * \sa SDL_GetGlobalMouseState
- */
-extern DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled);
-
-/**
- * Query whether relative mouse mode is enabled.
- *
- * \returns SDL_TRUE if relative mode is enabled or SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetRelativeMouseMode
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
-
-/**
- * Create a cursor using the specified bitmap data and mask (in MSB format).
- *
- * `mask` has to be in MSB (Most Significant Bit) format.
- *
- * The cursor width (`w`) must be a multiple of 8 bits.
- *
- * The cursor is created in black and white according to the following:
- *
- * - data=0, mask=1: white
- * - data=1, mask=1: black
- * - data=0, mask=0: transparent
- * - data=1, mask=0: inverted color if possible, black if not.
- *
- * Cursors created with this function must be freed with SDL_FreeCursor().
- *
- * If you want to have a color cursor, or create your cursor from an
- * SDL_Surface, you should use SDL_CreateColorCursor(). Alternately, you can
- * hide the cursor and draw your own as part of your game's rendering, but it
- * will be bound to the framerate.
- *
- * Also, since SDL 2.0.0, SDL_CreateSystemCursor() is available, which
- * provides twelve readily available system cursors to pick from.
- *
- * \param data the color value for each pixel of the cursor
- * \param mask the mask value for each pixel of the cursor
- * \param w the width of the cursor
- * \param h the height of the cursor
- * \param hot_x the X-axis location of the upper left corner of the cursor
- *              relative to the actual mouse position
- * \param hot_y the Y-axis location of the upper left corner of the cursor
- *              relative to the actual mouse position
- * \returns a new cursor with the specified parameters on success or NULL on
- *          failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_FreeCursor
- * \sa SDL_SetCursor
- * \sa SDL_ShowCursor
- */
-extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
-                                                     const Uint8 * mask,
-                                                     int w, int h, int hot_x,
-                                                     int hot_y);
-
-/**
- * Create a color cursor.
- *
- * \param surface an SDL_Surface structure representing the cursor image
- * \param hot_x the x position of the cursor hot spot
- * \param hot_y the y position of the cursor hot spot
- * \returns the new cursor on success or NULL on failure; call SDL_GetError()
- *          for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateCursor
- * \sa SDL_FreeCursor
- */
-extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,
-                                                          int hot_x,
-                                                          int hot_y);
-
-/**
- * Create a system cursor.
- *
- * \param id an SDL_SystemCursor enum value
- * \returns a cursor on success or NULL on failure; call SDL_GetError() for
- *          more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_FreeCursor
- */
-extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id);
-
-/**
- * Set the active cursor.
- *
- * This function sets the currently active cursor to the specified one. If the
- * cursor is currently visible, the change will be immediately represented on
- * the display. SDL_SetCursor(NULL) can be used to force cursor redraw, if
- * this is desired for any reason.
- *
- * \param cursor a cursor to make active
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateCursor
- * \sa SDL_GetCursor
- * \sa SDL_ShowCursor
- */
-extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
-
-/**
- * Get the active cursor.
- *
- * This function returns a pointer to the current cursor which is owned by the
- * library. It is not necessary to free the cursor with SDL_FreeCursor().
- *
- * \returns the active cursor or NULL if there is no mouse.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetCursor
- */
-extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
-
-/**
- * Get the default cursor.
- *
- * \returns the default cursor on success or NULL on failure.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateSystemCursor
- */
-extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
-
-/**
- * Free a previously-created cursor.
- *
- * Use this function to free cursor resources created with SDL_CreateCursor(),
- * SDL_CreateColorCursor() or SDL_CreateSystemCursor().
- *
- * \param cursor the cursor to free
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateColorCursor
- * \sa SDL_CreateCursor
- * \sa SDL_CreateSystemCursor
- */
-extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
-
-/**
- * Toggle whether or not the cursor is shown.
- *
- * The cursor starts off displayed but can be turned off. Passing `SDL_ENABLE`
- * displays the cursor and passing `SDL_DISABLE` hides it.
- *
- * The current state of the mouse cursor can be queried by passing
- * `SDL_QUERY`; either `SDL_DISABLE` or `SDL_ENABLE` will be returned.
- *
- * \param toggle `SDL_ENABLE` to show the cursor, `SDL_DISABLE` to hide it,
- *               `SDL_QUERY` to query the current state without changing it.
- * \returns `SDL_ENABLE` if the cursor is shown, or `SDL_DISABLE` if the
- *          cursor is hidden, or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateCursor
- * \sa SDL_SetCursor
- */
-extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
-
-/**
- * Used as a mask when testing buttons in buttonstate.
- *
- * - Button 1:  Left mouse button
- * - Button 2:  Middle mouse button
- * - Button 3:  Right mouse button
- */
-#define SDL_BUTTON(X)       (1 << ((X)-1))
-#define SDL_BUTTON_LEFT     1
-#define SDL_BUTTON_MIDDLE   2
-#define SDL_BUTTON_RIGHT    3
-#define SDL_BUTTON_X1       4
-#define SDL_BUTTON_X2       5
-#define SDL_BUTTON_LMASK    SDL_BUTTON(SDL_BUTTON_LEFT)
-#define SDL_BUTTON_MMASK    SDL_BUTTON(SDL_BUTTON_MIDDLE)
-#define SDL_BUTTON_RMASK    SDL_BUTTON(SDL_BUTTON_RIGHT)
-#define SDL_BUTTON_X1MASK   SDL_BUTTON(SDL_BUTTON_X1)
-#define SDL_BUTTON_X2MASK   SDL_BUTTON(SDL_BUTTON_X2)
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_mouse_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_mutex.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_mutex.h
deleted file mode 100644 (file)
index 173468f..0000000
+++ /dev/null
@@ -1,471 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_mutex_h_
-#define SDL_mutex_h_
-
-/**
- *  \file SDL_mutex.h
- *
- *  Functions to provide thread synchronization primitives.
- */
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  Synchronization functions which can time out return this value
- *  if they time out.
- */
-#define SDL_MUTEX_TIMEDOUT  1
-
-/**
- *  This is the timeout value which corresponds to never time out.
- */
-#define SDL_MUTEX_MAXWAIT   (~(Uint32)0)
-
-
-/**
- *  \name Mutex functions
- */
-/* @{ */
-
-/* The SDL mutex structure, defined in SDL_sysmutex.c */
-struct SDL_mutex;
-typedef struct SDL_mutex SDL_mutex;
-
-/**
- * Create a new mutex.
- *
- * All newly-created mutexes begin in the _unlocked_ state.
- *
- * Calls to SDL_LockMutex() will not return while the mutex is locked by
- * another thread. See SDL_TryLockMutex() to attempt to lock without blocking.
- *
- * SDL mutexes are reentrant.
- *
- * \returns the initialized and unlocked mutex or NULL on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_DestroyMutex
- * \sa SDL_LockMutex
- * \sa SDL_TryLockMutex
- * \sa SDL_UnlockMutex
- */
-extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
-
-/**
- * Lock the mutex.
- *
- * This will block until the mutex is available, which is to say it is in the
- * unlocked state and the OS has chosen the caller as the next thread to lock
- * it. Of all threads waiting to lock the mutex, only one may do so at a time.
- *
- * It is legal for the owning thread to lock an already-locked mutex. It must
- * unlock it the same number of times before it is actually made available for
- * other threads in the system (this is known as a "recursive mutex").
- *
- * \param mutex the mutex to lock
- * \return 0, or -1 on error.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);
-#define SDL_mutexP(m)   SDL_LockMutex(m)
-
-/**
- * Try to lock a mutex without blocking.
- *
- * This works just like SDL_LockMutex(), but if the mutex is not available,
- * this function returns `SDL_MUTEX_TIMEOUT` immediately.
- *
- * This technique is useful if you need exclusive access to a resource but
- * don't want to wait for it, and will return to it to try again later.
- *
- * \param mutex the mutex to try to lock
- * \returns 0, `SDL_MUTEX_TIMEDOUT`, or -1 on error; call SDL_GetError() for
- *          more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateMutex
- * \sa SDL_DestroyMutex
- * \sa SDL_LockMutex
- * \sa SDL_UnlockMutex
- */
-extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
-
-/**
- * Unlock the mutex.
- *
- * It is legal for the owning thread to lock an already-locked mutex. It must
- * unlock it the same number of times before it is actually made available for
- * other threads in the system (this is known as a "recursive mutex").
- *
- * It is an error to unlock a mutex that has not been locked by the current
- * thread, and doing so results in undefined behavior.
- *
- * It is also an error to unlock a mutex that isn't locked at all.
- *
- * \param mutex the mutex to unlock.
- * \returns 0, or -1 on error.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex);
-#define SDL_mutexV(m)   SDL_UnlockMutex(m)
-
-/**
- * Destroy a mutex created with SDL_CreateMutex().
- *
- * This function must be called on any mutex that is no longer needed. Failure
- * to destroy a mutex will result in a system memory or resource leak. While
- * it is safe to destroy a mutex that is _unlocked_, it is not safe to attempt
- * to destroy a locked mutex, and may result in undefined behavior depending
- * on the platform.
- *
- * \param mutex the mutex to destroy
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateMutex
- * \sa SDL_LockMutex
- * \sa SDL_TryLockMutex
- * \sa SDL_UnlockMutex
- */
-extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
-
-/* @} *//* Mutex functions */
-
-
-/**
- *  \name Semaphore functions
- */
-/* @{ */
-
-/* The SDL semaphore structure, defined in SDL_syssem.c */
-struct SDL_semaphore;
-typedef struct SDL_semaphore SDL_sem;
-
-/**
- * Create a semaphore.
- *
- * This function creates a new semaphore and initializes it with the value
- * `initial_value`. Each wait operation on the semaphore will atomically
- * decrement the semaphore value and potentially block if the semaphore value
- * is 0. Each post operation will atomically increment the semaphore value and
- * wake waiting threads and allow them to retry the wait operation.
- *
- * \param initial_value the starting value of the semaphore
- * \returns a new semaphore or NULL on failure; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_DestroySemaphore
- * \sa SDL_SemPost
- * \sa SDL_SemTryWait
- * \sa SDL_SemValue
- * \sa SDL_SemWait
- * \sa SDL_SemWaitTimeout
- */
-extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
-
-/**
- * Destroy a semaphore.
- *
- * It is not safe to destroy a semaphore if there are threads currently
- * waiting on it.
- *
- * \param sem the semaphore to destroy
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateSemaphore
- * \sa SDL_SemPost
- * \sa SDL_SemTryWait
- * \sa SDL_SemValue
- * \sa SDL_SemWait
- * \sa SDL_SemWaitTimeout
- */
-extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
-
-/**
- * Wait until a semaphore has a positive value and then decrements it.
- *
- * This function suspends the calling thread until either the semaphore
- * pointed to by `sem` has a positive value or the call is interrupted by a
- * signal or error. If the call is successful it will atomically decrement the
- * semaphore value.
- *
- * This function is the equivalent of calling SDL_SemWaitTimeout() with a time
- * length of `SDL_MUTEX_MAXWAIT`.
- *
- * \param sem the semaphore wait on
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateSemaphore
- * \sa SDL_DestroySemaphore
- * \sa SDL_SemPost
- * \sa SDL_SemTryWait
- * \sa SDL_SemValue
- * \sa SDL_SemWait
- * \sa SDL_SemWaitTimeout
- */
-extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
-
-/**
- * See if a semaphore has a positive value and decrement it if it does.
- *
- * This function checks to see if the semaphore pointed to by `sem` has a
- * positive value and atomically decrements the semaphore value if it does. If
- * the semaphore doesn't have a positive value, the function immediately
- * returns SDL_MUTEX_TIMEDOUT.
- *
- * \param sem the semaphore to wait on
- * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait would
- *          block, or a negative error code on failure; call SDL_GetError()
- *          for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateSemaphore
- * \sa SDL_DestroySemaphore
- * \sa SDL_SemPost
- * \sa SDL_SemValue
- * \sa SDL_SemWait
- * \sa SDL_SemWaitTimeout
- */
-extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
-
-/**
- * Wait until a semaphore has a positive value and then decrements it.
- *
- * This function suspends the calling thread until either the semaphore
- * pointed to by `sem` has a positive value, the call is interrupted by a
- * signal or error, or the specified time has elapsed. If the call is
- * successful it will atomically decrement the semaphore value.
- *
- * \param sem the semaphore to wait on
- * \param ms the length of the timeout, in milliseconds
- * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not
- *          succeed in the allotted time, or a negative error code on failure;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateSemaphore
- * \sa SDL_DestroySemaphore
- * \sa SDL_SemPost
- * \sa SDL_SemTryWait
- * \sa SDL_SemValue
- * \sa SDL_SemWait
- */
-extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
-
-/**
- * Atomically increment a semaphore's value and wake waiting threads.
- *
- * \param sem the semaphore to increment
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateSemaphore
- * \sa SDL_DestroySemaphore
- * \sa SDL_SemTryWait
- * \sa SDL_SemValue
- * \sa SDL_SemWait
- * \sa SDL_SemWaitTimeout
- */
-extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
-
-/**
- * Get the current value of a semaphore.
- *
- * \param sem the semaphore to query
- * \returns the current value of the semaphore.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateSemaphore
- */
-extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
-
-/* @} *//* Semaphore functions */
-
-
-/**
- *  \name Condition variable functions
- */
-/* @{ */
-
-/* The SDL condition variable structure, defined in SDL_syscond.c */
-struct SDL_cond;
-typedef struct SDL_cond SDL_cond;
-
-/**
- * Create a condition variable.
- *
- * \returns a new condition variable or NULL on failure; call SDL_GetError()
- *          for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CondBroadcast
- * \sa SDL_CondSignal
- * \sa SDL_CondWait
- * \sa SDL_CondWaitTimeout
- * \sa SDL_DestroyCond
- */
-extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
-
-/**
- * Destroy a condition variable.
- *
- * \param cond the condition variable to destroy
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CondBroadcast
- * \sa SDL_CondSignal
- * \sa SDL_CondWait
- * \sa SDL_CondWaitTimeout
- * \sa SDL_CreateCond
- */
-extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
-
-/**
- * Restart one of the threads that are waiting on the condition variable.
- *
- * \param cond the condition variable to signal
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CondBroadcast
- * \sa SDL_CondWait
- * \sa SDL_CondWaitTimeout
- * \sa SDL_CreateCond
- * \sa SDL_DestroyCond
- */
-extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
-
-/**
- * Restart all threads that are waiting on the condition variable.
- *
- * \param cond the condition variable to signal
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CondSignal
- * \sa SDL_CondWait
- * \sa SDL_CondWaitTimeout
- * \sa SDL_CreateCond
- * \sa SDL_DestroyCond
- */
-extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
-
-/**
- * Wait until a condition variable is signaled.
- *
- * This function unlocks the specified `mutex` and waits for another thread to
- * call SDL_CondSignal() or SDL_CondBroadcast() on the condition variable
- * `cond`. Once the condition variable is signaled, the mutex is re-locked and
- * the function returns.
- *
- * The mutex must be locked before calling this function.
- *
- * This function is the equivalent of calling SDL_CondWaitTimeout() with a
- * time length of `SDL_MUTEX_MAXWAIT`.
- *
- * \param cond the condition variable to wait on
- * \param mutex the mutex used to coordinate thread access
- * \returns 0 when it is signaled or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CondBroadcast
- * \sa SDL_CondSignal
- * \sa SDL_CondWaitTimeout
- * \sa SDL_CreateCond
- * \sa SDL_DestroyCond
- */
-extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex);
-
-/**
- * Wait until a condition variable is signaled or a certain time has passed.
- *
- * This function unlocks the specified `mutex` and waits for another thread to
- * call SDL_CondSignal() or SDL_CondBroadcast() on the condition variable
- * `cond`, or for the specified time to elapse. Once the condition variable is
- * signaled or the time elapsed, the mutex is re-locked and the function
- * returns.
- *
- * The mutex must be locked before calling this function.
- *
- * \param cond the condition variable to wait on
- * \param mutex the mutex used to coordinate thread access
- * \param ms the maximum time to wait, in milliseconds, or `SDL_MUTEX_MAXWAIT`
- *           to wait indefinitely
- * \returns 0 if the condition variable is signaled, `SDL_MUTEX_TIMEDOUT` if
- *          the condition is not signaled in the allotted time, or a negative
- *          error code on failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CondBroadcast
- * \sa SDL_CondSignal
- * \sa SDL_CondWait
- * \sa SDL_CreateCond
- * \sa SDL_DestroyCond
- */
-extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
-                                                SDL_mutex * mutex, Uint32 ms);
-
-/* @} *//* Condition variable functions */
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_mutex_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_name.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_name.h
deleted file mode 100644 (file)
index 6ff35b4..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDLname_h_
-#define SDLname_h_
-
-#if defined(__STDC__) || defined(__cplusplus)
-#define NeedFunctionPrototypes 1
-#endif
-
-#define SDL_NAME(X) SDL_##X
-
-#endif /* SDLname_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengl.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengl.h
deleted file mode 100644 (file)
index 9aed503..0000000
+++ /dev/null
@@ -1,2183 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_opengl.h
- *
- *  This is a simple file to encapsulate the OpenGL API headers.
- */
-
-/**
- *  \def NO_SDL_GLEXT
- *
- *  Define this if you have your own version of glext.h and want to disable the
- *  version included in SDL_opengl.h.
- */
-
-#ifndef SDL_opengl_h_
-#define SDL_opengl_h_
-
-#include "SDL_config.h"
-
-#ifndef __IPHONEOS__  /* No OpenGL on iOS. */
-
-/*
- * Mesa 3-D graphics library
- *
- * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
- * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef __gl_h_
-#define __gl_h_
-
-#if defined(USE_MGL_NAMESPACE)
-#include "gl_mangle.h"
-#endif
-
-
-/**********************************************************************
- * Begin system-specific stuff.
- */
-
-#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
-#define __WIN32__
-#endif
-
-#if defined(__WIN32__) && !defined(__CYGWIN__)
-#  if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
-#    define GLAPI __declspec(dllexport)
-#  elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
-#    define GLAPI __declspec(dllimport)
-#  else /* for use with static link lib build of Win32 edition only */
-#    define GLAPI extern
-#  endif /* _STATIC_MESA support */
-#  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 */
-#    define GLAPIENTRY 
-#  else
-#    define GLAPIENTRY __stdcall
-#  endif
-#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
-#  define GLAPI extern
-#  define GLAPIENTRY __stdcall
-#elif defined(__OS2__) || defined(__EMX__) /* native os/2 opengl */
-#  define GLAPI extern
-#  define GLAPIENTRY _System
-#  define APIENTRY _System
-#  if defined(__GNUC__) && !defined(_System)
-#    define _System
-#  endif
-#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
-#  define GLAPI __attribute__((visibility("default")))
-#  define GLAPIENTRY
-#endif /* WIN32 && !CYGWIN */
-
-/*
- * WINDOWS: Include windows.h here to define APIENTRY.
- * It is also useful when applications include this file by
- * including only glut.h, since glut.h depends on windows.h.
- * Applications needing to include windows.h with parms other
- * than "WIN32_LEAN_AND_MEAN" may include windows.h before
- * glut.h or gl.h.
- */
-#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN 1
-#endif
-#ifndef NOMINMAX   /* don't define min() and max(). */
-#define NOMINMAX
-#endif
-#include <windows.h>
-#endif
-
-#ifndef GLAPI
-#define GLAPI extern
-#endif
-
-#ifndef GLAPIENTRY
-#define GLAPIENTRY
-#endif
-
-#ifndef APIENTRY
-#define APIENTRY GLAPIENTRY
-#endif
-
-/* "P" suffix to be used for a pointer to a function */
-#ifndef APIENTRYP
-#define APIENTRYP APIENTRY *
-#endif
-
-#ifndef GLAPIENTRYP
-#define GLAPIENTRYP GLAPIENTRY *
-#endif
-
-#if defined(PRAGMA_EXPORT_SUPPORTED)
-#pragma export on
-#endif
-
-/*
- * End system-specific stuff.
- **********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-#define GL_VERSION_1_1   1
-#define GL_VERSION_1_2   1
-#define GL_VERSION_1_3   1
-#define GL_ARB_imaging   1
-
-
-/*
- * Datatypes
- */
-typedef unsigned int   GLenum;
-typedef unsigned char  GLboolean;
-typedef unsigned int   GLbitfield;
-typedef void           GLvoid;
-typedef signed char    GLbyte;         /* 1-byte signed */
-typedef short          GLshort;        /* 2-byte signed */
-typedef int            GLint;          /* 4-byte signed */
-typedef unsigned char  GLubyte;        /* 1-byte unsigned */
-typedef unsigned short GLushort;       /* 2-byte unsigned */
-typedef unsigned int   GLuint;         /* 4-byte unsigned */
-typedef int            GLsizei;        /* 4-byte signed */
-typedef float          GLfloat;        /* single precision float */
-typedef float          GLclampf;       /* single precision float in [0,1] */
-typedef double         GLdouble;       /* double precision float */
-typedef double         GLclampd;       /* double precision float in [0,1] */
-
-
-
-/*
- * Constants
- */
-
-/* Boolean values */
-#define GL_FALSE                               0
-#define GL_TRUE                                        1
-
-/* Data types */
-#define GL_BYTE                                        0x1400
-#define GL_UNSIGNED_BYTE                       0x1401
-#define GL_SHORT                               0x1402
-#define GL_UNSIGNED_SHORT                      0x1403
-#define GL_INT                                 0x1404
-#define GL_UNSIGNED_INT                                0x1405
-#define GL_FLOAT                               0x1406
-#define GL_2_BYTES                             0x1407
-#define GL_3_BYTES                             0x1408
-#define GL_4_BYTES                             0x1409
-#define GL_DOUBLE                              0x140A
-
-/* Primitives */
-#define GL_POINTS                              0x0000
-#define GL_LINES                               0x0001
-#define GL_LINE_LOOP                           0x0002
-#define GL_LINE_STRIP                          0x0003
-#define GL_TRIANGLES                           0x0004
-#define GL_TRIANGLE_STRIP                      0x0005
-#define GL_TRIANGLE_FAN                                0x0006
-#define GL_QUADS                               0x0007
-#define GL_QUAD_STRIP                          0x0008
-#define GL_POLYGON                             0x0009
-
-/* Vertex Arrays */
-#define GL_VERTEX_ARRAY                                0x8074
-#define GL_NORMAL_ARRAY                                0x8075
-#define GL_COLOR_ARRAY                         0x8076
-#define GL_INDEX_ARRAY                         0x8077
-#define GL_TEXTURE_COORD_ARRAY                 0x8078
-#define GL_EDGE_FLAG_ARRAY                     0x8079
-#define GL_VERTEX_ARRAY_SIZE                   0x807A
-#define GL_VERTEX_ARRAY_TYPE                   0x807B
-#define GL_VERTEX_ARRAY_STRIDE                 0x807C
-#define GL_NORMAL_ARRAY_TYPE                   0x807E
-#define GL_NORMAL_ARRAY_STRIDE                 0x807F
-#define GL_COLOR_ARRAY_SIZE                    0x8081
-#define GL_COLOR_ARRAY_TYPE                    0x8082
-#define GL_COLOR_ARRAY_STRIDE                  0x8083
-#define GL_INDEX_ARRAY_TYPE                    0x8085
-#define GL_INDEX_ARRAY_STRIDE                  0x8086
-#define GL_TEXTURE_COORD_ARRAY_SIZE            0x8088
-#define GL_TEXTURE_COORD_ARRAY_TYPE            0x8089
-#define GL_TEXTURE_COORD_ARRAY_STRIDE          0x808A
-#define GL_EDGE_FLAG_ARRAY_STRIDE              0x808C
-#define GL_VERTEX_ARRAY_POINTER                        0x808E
-#define GL_NORMAL_ARRAY_POINTER                        0x808F
-#define GL_COLOR_ARRAY_POINTER                 0x8090
-#define GL_INDEX_ARRAY_POINTER                 0x8091
-#define GL_TEXTURE_COORD_ARRAY_POINTER         0x8092
-#define GL_EDGE_FLAG_ARRAY_POINTER             0x8093
-#define GL_V2F                                 0x2A20
-#define GL_V3F                                 0x2A21
-#define GL_C4UB_V2F                            0x2A22
-#define GL_C4UB_V3F                            0x2A23
-#define GL_C3F_V3F                             0x2A24
-#define GL_N3F_V3F                             0x2A25
-#define GL_C4F_N3F_V3F                         0x2A26
-#define GL_T2F_V3F                             0x2A27
-#define GL_T4F_V4F                             0x2A28
-#define GL_T2F_C4UB_V3F                                0x2A29
-#define GL_T2F_C3F_V3F                         0x2A2A
-#define GL_T2F_N3F_V3F                         0x2A2B
-#define GL_T2F_C4F_N3F_V3F                     0x2A2C
-#define GL_T4F_C4F_N3F_V4F                     0x2A2D
-
-/* Matrix Mode */
-#define GL_MATRIX_MODE                         0x0BA0
-#define GL_MODELVIEW                           0x1700
-#define GL_PROJECTION                          0x1701
-#define GL_TEXTURE                             0x1702
-
-/* Points */
-#define GL_POINT_SMOOTH                                0x0B10
-#define GL_POINT_SIZE                          0x0B11
-#define GL_POINT_SIZE_GRANULARITY              0x0B13
-#define GL_POINT_SIZE_RANGE                    0x0B12
-
-/* Lines */
-#define GL_LINE_SMOOTH                         0x0B20
-#define GL_LINE_STIPPLE                                0x0B24
-#define GL_LINE_STIPPLE_PATTERN                        0x0B25
-#define GL_LINE_STIPPLE_REPEAT                 0x0B26
-#define GL_LINE_WIDTH                          0x0B21
-#define GL_LINE_WIDTH_GRANULARITY              0x0B23
-#define GL_LINE_WIDTH_RANGE                    0x0B22
-
-/* Polygons */
-#define GL_POINT                               0x1B00
-#define GL_LINE                                        0x1B01
-#define GL_FILL                                        0x1B02
-#define GL_CW                                  0x0900
-#define GL_CCW                                 0x0901
-#define GL_FRONT                               0x0404
-#define GL_BACK                                        0x0405
-#define GL_POLYGON_MODE                                0x0B40
-#define GL_POLYGON_SMOOTH                      0x0B41
-#define GL_POLYGON_STIPPLE                     0x0B42
-#define GL_EDGE_FLAG                           0x0B43
-#define GL_CULL_FACE                           0x0B44
-#define GL_CULL_FACE_MODE                      0x0B45
-#define GL_FRONT_FACE                          0x0B46
-#define GL_POLYGON_OFFSET_FACTOR               0x8038
-#define GL_POLYGON_OFFSET_UNITS                        0x2A00
-#define GL_POLYGON_OFFSET_POINT                        0x2A01
-#define GL_POLYGON_OFFSET_LINE                 0x2A02
-#define GL_POLYGON_OFFSET_FILL                 0x8037
-
-/* Display Lists */
-#define GL_COMPILE                             0x1300
-#define GL_COMPILE_AND_EXECUTE                 0x1301
-#define GL_LIST_BASE                           0x0B32
-#define GL_LIST_INDEX                          0x0B33
-#define GL_LIST_MODE                           0x0B30
-
-/* Depth buffer */
-#define GL_NEVER                               0x0200
-#define GL_LESS                                        0x0201
-#define GL_EQUAL                               0x0202
-#define GL_LEQUAL                              0x0203
-#define GL_GREATER                             0x0204
-#define GL_NOTEQUAL                            0x0205
-#define GL_GEQUAL                              0x0206
-#define GL_ALWAYS                              0x0207
-#define GL_DEPTH_TEST                          0x0B71
-#define GL_DEPTH_BITS                          0x0D56
-#define GL_DEPTH_CLEAR_VALUE                   0x0B73
-#define GL_DEPTH_FUNC                          0x0B74
-#define GL_DEPTH_RANGE                         0x0B70
-#define GL_DEPTH_WRITEMASK                     0x0B72
-#define GL_DEPTH_COMPONENT                     0x1902
-
-/* Lighting */
-#define GL_LIGHTING                            0x0B50
-#define GL_LIGHT0                              0x4000
-#define GL_LIGHT1                              0x4001
-#define GL_LIGHT2                              0x4002
-#define GL_LIGHT3                              0x4003
-#define GL_LIGHT4                              0x4004
-#define GL_LIGHT5                              0x4005
-#define GL_LIGHT6                              0x4006
-#define GL_LIGHT7                              0x4007
-#define GL_SPOT_EXPONENT                       0x1205
-#define GL_SPOT_CUTOFF                         0x1206
-#define GL_CONSTANT_ATTENUATION                        0x1207
-#define GL_LINEAR_ATTENUATION                  0x1208
-#define GL_QUADRATIC_ATTENUATION               0x1209
-#define GL_AMBIENT                             0x1200
-#define GL_DIFFUSE                             0x1201
-#define GL_SPECULAR                            0x1202
-#define GL_SHININESS                           0x1601
-#define GL_EMISSION                            0x1600
-#define GL_POSITION                            0x1203
-#define GL_SPOT_DIRECTION                      0x1204
-#define GL_AMBIENT_AND_DIFFUSE                 0x1602
-#define GL_COLOR_INDEXES                       0x1603
-#define GL_LIGHT_MODEL_TWO_SIDE                        0x0B52
-#define GL_LIGHT_MODEL_LOCAL_VIEWER            0x0B51
-#define GL_LIGHT_MODEL_AMBIENT                 0x0B53
-#define GL_FRONT_AND_BACK                      0x0408
-#define GL_SHADE_MODEL                         0x0B54
-#define GL_FLAT                                        0x1D00
-#define GL_SMOOTH                              0x1D01
-#define GL_COLOR_MATERIAL                      0x0B57
-#define GL_COLOR_MATERIAL_FACE                 0x0B55
-#define GL_COLOR_MATERIAL_PARAMETER            0x0B56
-#define GL_NORMALIZE                           0x0BA1
-
-/* User clipping planes */
-#define GL_CLIP_PLANE0                         0x3000
-#define GL_CLIP_PLANE1                         0x3001
-#define GL_CLIP_PLANE2                         0x3002
-#define GL_CLIP_PLANE3                         0x3003
-#define GL_CLIP_PLANE4                         0x3004
-#define GL_CLIP_PLANE5                         0x3005
-
-/* Accumulation buffer */
-#define GL_ACCUM_RED_BITS                      0x0D58
-#define GL_ACCUM_GREEN_BITS                    0x0D59
-#define GL_ACCUM_BLUE_BITS                     0x0D5A
-#define GL_ACCUM_ALPHA_BITS                    0x0D5B
-#define GL_ACCUM_CLEAR_VALUE                   0x0B80
-#define GL_ACCUM                               0x0100
-#define GL_ADD                                 0x0104
-#define GL_LOAD                                        0x0101
-#define GL_MULT                                        0x0103
-#define GL_RETURN                              0x0102
-
-/* Alpha testing */
-#define GL_ALPHA_TEST                          0x0BC0
-#define GL_ALPHA_TEST_REF                      0x0BC2
-#define GL_ALPHA_TEST_FUNC                     0x0BC1
-
-/* Blending */
-#define GL_BLEND                               0x0BE2
-#define GL_BLEND_SRC                           0x0BE1
-#define GL_BLEND_DST                           0x0BE0
-#define GL_ZERO                                        0
-#define GL_ONE                                 1
-#define GL_SRC_COLOR                           0x0300
-#define GL_ONE_MINUS_SRC_COLOR                 0x0301
-#define GL_SRC_ALPHA                           0x0302
-#define GL_ONE_MINUS_SRC_ALPHA                 0x0303
-#define GL_DST_ALPHA                           0x0304
-#define GL_ONE_MINUS_DST_ALPHA                 0x0305
-#define GL_DST_COLOR                           0x0306
-#define GL_ONE_MINUS_DST_COLOR                 0x0307
-#define GL_SRC_ALPHA_SATURATE                  0x0308
-
-/* Render Mode */
-#define GL_FEEDBACK                            0x1C01
-#define GL_RENDER                              0x1C00
-#define GL_SELECT                              0x1C02
-
-/* Feedback */
-#define GL_2D                                  0x0600
-#define GL_3D                                  0x0601
-#define GL_3D_COLOR                            0x0602
-#define GL_3D_COLOR_TEXTURE                    0x0603
-#define GL_4D_COLOR_TEXTURE                    0x0604
-#define GL_POINT_TOKEN                         0x0701
-#define GL_LINE_TOKEN                          0x0702
-#define GL_LINE_RESET_TOKEN                    0x0707
-#define GL_POLYGON_TOKEN                       0x0703
-#define GL_BITMAP_TOKEN                                0x0704
-#define GL_DRAW_PIXEL_TOKEN                    0x0705
-#define GL_COPY_PIXEL_TOKEN                    0x0706
-#define GL_PASS_THROUGH_TOKEN                  0x0700
-#define GL_FEEDBACK_BUFFER_POINTER             0x0DF0
-#define GL_FEEDBACK_BUFFER_SIZE                        0x0DF1
-#define GL_FEEDBACK_BUFFER_TYPE                        0x0DF2
-
-/* Selection */
-#define GL_SELECTION_BUFFER_POINTER            0x0DF3
-#define GL_SELECTION_BUFFER_SIZE               0x0DF4
-
-/* Fog */
-#define GL_FOG                                 0x0B60
-#define GL_FOG_MODE                            0x0B65
-#define GL_FOG_DENSITY                         0x0B62
-#define GL_FOG_COLOR                           0x0B66
-#define GL_FOG_INDEX                           0x0B61
-#define GL_FOG_START                           0x0B63
-#define GL_FOG_END                             0x0B64
-#define GL_LINEAR                              0x2601
-#define GL_EXP                                 0x0800
-#define GL_EXP2                                        0x0801
-
-/* Logic Ops */
-#define GL_LOGIC_OP                            0x0BF1
-#define GL_INDEX_LOGIC_OP                      0x0BF1
-#define GL_COLOR_LOGIC_OP                      0x0BF2
-#define GL_LOGIC_OP_MODE                       0x0BF0
-#define GL_CLEAR                               0x1500
-#define GL_SET                                 0x150F
-#define GL_COPY                                        0x1503
-#define GL_COPY_INVERTED                       0x150C
-#define GL_NOOP                                        0x1505
-#define GL_INVERT                              0x150A
-#define GL_AND                                 0x1501
-#define GL_NAND                                        0x150E
-#define GL_OR                                  0x1507
-#define GL_NOR                                 0x1508
-#define GL_XOR                                 0x1506
-#define GL_EQUIV                               0x1509
-#define GL_AND_REVERSE                         0x1502
-#define GL_AND_INVERTED                                0x1504
-#define GL_OR_REVERSE                          0x150B
-#define GL_OR_INVERTED                         0x150D
-
-/* Stencil */
-#define GL_STENCIL_BITS                                0x0D57
-#define GL_STENCIL_TEST                                0x0B90
-#define GL_STENCIL_CLEAR_VALUE                 0x0B91
-#define GL_STENCIL_FUNC                                0x0B92
-#define GL_STENCIL_VALUE_MASK                  0x0B93
-#define GL_STENCIL_FAIL                                0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL             0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS             0x0B96
-#define GL_STENCIL_REF                         0x0B97
-#define GL_STENCIL_WRITEMASK                   0x0B98
-#define GL_STENCIL_INDEX                       0x1901
-#define GL_KEEP                                        0x1E00
-#define GL_REPLACE                             0x1E01
-#define GL_INCR                                        0x1E02
-#define GL_DECR                                        0x1E03
-
-/* Buffers, Pixel Drawing/Reading */
-#define GL_NONE                                        0
-#define GL_LEFT                                        0x0406
-#define GL_RIGHT                               0x0407
-/*GL_FRONT                                     0x0404 */
-/*GL_BACK                                      0x0405 */
-/*GL_FRONT_AND_BACK                            0x0408 */
-#define GL_FRONT_LEFT                          0x0400
-#define GL_FRONT_RIGHT                         0x0401
-#define GL_BACK_LEFT                           0x0402
-#define GL_BACK_RIGHT                          0x0403
-#define GL_AUX0                                        0x0409
-#define GL_AUX1                                        0x040A
-#define GL_AUX2                                        0x040B
-#define GL_AUX3                                        0x040C
-#define GL_COLOR_INDEX                         0x1900
-#define GL_RED                                 0x1903
-#define GL_GREEN                               0x1904
-#define GL_BLUE                                        0x1905
-#define GL_ALPHA                               0x1906
-#define GL_LUMINANCE                           0x1909
-#define GL_LUMINANCE_ALPHA                     0x190A
-#define GL_ALPHA_BITS                          0x0D55
-#define GL_RED_BITS                            0x0D52
-#define GL_GREEN_BITS                          0x0D53
-#define GL_BLUE_BITS                           0x0D54
-#define GL_INDEX_BITS                          0x0D51
-#define GL_SUBPIXEL_BITS                       0x0D50
-#define GL_AUX_BUFFERS                         0x0C00
-#define GL_READ_BUFFER                         0x0C02
-#define GL_DRAW_BUFFER                         0x0C01
-#define GL_DOUBLEBUFFER                                0x0C32
-#define GL_STEREO                              0x0C33
-#define GL_BITMAP                              0x1A00
-#define GL_COLOR                               0x1800
-#define GL_DEPTH                               0x1801
-#define GL_STENCIL                             0x1802
-#define GL_DITHER                              0x0BD0
-#define GL_RGB                                 0x1907
-#define GL_RGBA                                        0x1908
-
-/* Implementation limits */
-#define GL_MAX_LIST_NESTING                    0x0B31
-#define GL_MAX_EVAL_ORDER                      0x0D30
-#define GL_MAX_LIGHTS                          0x0D31
-#define GL_MAX_CLIP_PLANES                     0x0D32
-#define GL_MAX_TEXTURE_SIZE                    0x0D33
-#define GL_MAX_PIXEL_MAP_TABLE                 0x0D34
-#define GL_MAX_ATTRIB_STACK_DEPTH              0x0D35
-#define GL_MAX_MODELVIEW_STACK_DEPTH           0x0D36
-#define GL_MAX_NAME_STACK_DEPTH                        0x0D37
-#define GL_MAX_PROJECTION_STACK_DEPTH          0x0D38
-#define GL_MAX_TEXTURE_STACK_DEPTH             0x0D39
-#define GL_MAX_VIEWPORT_DIMS                   0x0D3A
-#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH       0x0D3B
-
-/* Gets */
-#define GL_ATTRIB_STACK_DEPTH                  0x0BB0
-#define GL_CLIENT_ATTRIB_STACK_DEPTH           0x0BB1
-#define GL_COLOR_CLEAR_VALUE                   0x0C22
-#define GL_COLOR_WRITEMASK                     0x0C23
-#define GL_CURRENT_INDEX                       0x0B01
-#define GL_CURRENT_COLOR                       0x0B00
-#define GL_CURRENT_NORMAL                      0x0B02
-#define GL_CURRENT_RASTER_COLOR                        0x0B04
-#define GL_CURRENT_RASTER_DISTANCE             0x0B09
-#define GL_CURRENT_RASTER_INDEX                        0x0B05
-#define GL_CURRENT_RASTER_POSITION             0x0B07
-#define GL_CURRENT_RASTER_TEXTURE_COORDS       0x0B06
-#define GL_CURRENT_RASTER_POSITION_VALID       0x0B08
-#define GL_CURRENT_TEXTURE_COORDS              0x0B03
-#define GL_INDEX_CLEAR_VALUE                   0x0C20
-#define GL_INDEX_MODE                          0x0C30
-#define GL_INDEX_WRITEMASK                     0x0C21
-#define GL_MODELVIEW_MATRIX                    0x0BA6
-#define GL_MODELVIEW_STACK_DEPTH               0x0BA3
-#define GL_NAME_STACK_DEPTH                    0x0D70
-#define GL_PROJECTION_MATRIX                   0x0BA7
-#define GL_PROJECTION_STACK_DEPTH              0x0BA4
-#define GL_RENDER_MODE                         0x0C40
-#define GL_RGBA_MODE                           0x0C31
-#define GL_TEXTURE_MATRIX                      0x0BA8
-#define GL_TEXTURE_STACK_DEPTH                 0x0BA5
-#define GL_VIEWPORT                            0x0BA2
-
-/* Evaluators */
-#define GL_AUTO_NORMAL                         0x0D80
-#define GL_MAP1_COLOR_4                                0x0D90
-#define GL_MAP1_INDEX                          0x0D91
-#define GL_MAP1_NORMAL                         0x0D92
-#define GL_MAP1_TEXTURE_COORD_1                        0x0D93
-#define GL_MAP1_TEXTURE_COORD_2                        0x0D94
-#define GL_MAP1_TEXTURE_COORD_3                        0x0D95
-#define GL_MAP1_TEXTURE_COORD_4                        0x0D96
-#define GL_MAP1_VERTEX_3                       0x0D97
-#define GL_MAP1_VERTEX_4                       0x0D98
-#define GL_MAP2_COLOR_4                                0x0DB0
-#define GL_MAP2_INDEX                          0x0DB1
-#define GL_MAP2_NORMAL                         0x0DB2
-#define GL_MAP2_TEXTURE_COORD_1                        0x0DB3
-#define GL_MAP2_TEXTURE_COORD_2                        0x0DB4
-#define GL_MAP2_TEXTURE_COORD_3                        0x0DB5
-#define GL_MAP2_TEXTURE_COORD_4                        0x0DB6
-#define GL_MAP2_VERTEX_3                       0x0DB7
-#define GL_MAP2_VERTEX_4                       0x0DB8
-#define GL_MAP1_GRID_DOMAIN                    0x0DD0
-#define GL_MAP1_GRID_SEGMENTS                  0x0DD1
-#define GL_MAP2_GRID_DOMAIN                    0x0DD2
-#define GL_MAP2_GRID_SEGMENTS                  0x0DD3
-#define GL_COEFF                               0x0A00
-#define GL_ORDER                               0x0A01
-#define GL_DOMAIN                              0x0A02
-
-/* Hints */
-#define GL_PERSPECTIVE_CORRECTION_HINT         0x0C50
-#define GL_POINT_SMOOTH_HINT                   0x0C51
-#define GL_LINE_SMOOTH_HINT                    0x0C52
-#define GL_POLYGON_SMOOTH_HINT                 0x0C53
-#define GL_FOG_HINT                            0x0C54
-#define GL_DONT_CARE                           0x1100
-#define GL_FASTEST                             0x1101
-#define GL_NICEST                              0x1102
-
-/* Scissor box */
-#define GL_SCISSOR_BOX                         0x0C10
-#define GL_SCISSOR_TEST                                0x0C11
-
-/* Pixel Mode / Transfer */
-#define GL_MAP_COLOR                           0x0D10
-#define GL_MAP_STENCIL                         0x0D11
-#define GL_INDEX_SHIFT                         0x0D12
-#define GL_INDEX_OFFSET                                0x0D13
-#define GL_RED_SCALE                           0x0D14
-#define GL_RED_BIAS                            0x0D15
-#define GL_GREEN_SCALE                         0x0D18
-#define GL_GREEN_BIAS                          0x0D19
-#define GL_BLUE_SCALE                          0x0D1A
-#define GL_BLUE_BIAS                           0x0D1B
-#define GL_ALPHA_SCALE                         0x0D1C
-#define GL_ALPHA_BIAS                          0x0D1D
-#define GL_DEPTH_SCALE                         0x0D1E
-#define GL_DEPTH_BIAS                          0x0D1F
-#define GL_PIXEL_MAP_S_TO_S_SIZE               0x0CB1
-#define GL_PIXEL_MAP_I_TO_I_SIZE               0x0CB0
-#define GL_PIXEL_MAP_I_TO_R_SIZE               0x0CB2
-#define GL_PIXEL_MAP_I_TO_G_SIZE               0x0CB3
-#define GL_PIXEL_MAP_I_TO_B_SIZE               0x0CB4
-#define GL_PIXEL_MAP_I_TO_A_SIZE               0x0CB5
-#define GL_PIXEL_MAP_R_TO_R_SIZE               0x0CB6
-#define GL_PIXEL_MAP_G_TO_G_SIZE               0x0CB7
-#define GL_PIXEL_MAP_B_TO_B_SIZE               0x0CB8
-#define GL_PIXEL_MAP_A_TO_A_SIZE               0x0CB9
-#define GL_PIXEL_MAP_S_TO_S                    0x0C71
-#define GL_PIXEL_MAP_I_TO_I                    0x0C70
-#define GL_PIXEL_MAP_I_TO_R                    0x0C72
-#define GL_PIXEL_MAP_I_TO_G                    0x0C73
-#define GL_PIXEL_MAP_I_TO_B                    0x0C74
-#define GL_PIXEL_MAP_I_TO_A                    0x0C75
-#define GL_PIXEL_MAP_R_TO_R                    0x0C76
-#define GL_PIXEL_MAP_G_TO_G                    0x0C77
-#define GL_PIXEL_MAP_B_TO_B                    0x0C78
-#define GL_PIXEL_MAP_A_TO_A                    0x0C79
-#define GL_PACK_ALIGNMENT                      0x0D05
-#define GL_PACK_LSB_FIRST                      0x0D01
-#define GL_PACK_ROW_LENGTH                     0x0D02
-#define GL_PACK_SKIP_PIXELS                    0x0D04
-#define GL_PACK_SKIP_ROWS                      0x0D03
-#define GL_PACK_SWAP_BYTES                     0x0D00
-#define GL_UNPACK_ALIGNMENT                    0x0CF5
-#define GL_UNPACK_LSB_FIRST                    0x0CF1
-#define GL_UNPACK_ROW_LENGTH                   0x0CF2
-#define GL_UNPACK_SKIP_PIXELS                  0x0CF4
-#define GL_UNPACK_SKIP_ROWS                    0x0CF3
-#define GL_UNPACK_SWAP_BYTES                   0x0CF0
-#define GL_ZOOM_X                              0x0D16
-#define GL_ZOOM_Y                              0x0D17
-
-/* Texture mapping */
-#define GL_TEXTURE_ENV                         0x2300
-#define GL_TEXTURE_ENV_MODE                    0x2200
-#define GL_TEXTURE_1D                          0x0DE0
-#define GL_TEXTURE_2D                          0x0DE1
-#define GL_TEXTURE_WRAP_S                      0x2802
-#define GL_TEXTURE_WRAP_T                      0x2803
-#define GL_TEXTURE_MAG_FILTER                  0x2800
-#define GL_TEXTURE_MIN_FILTER                  0x2801
-#define GL_TEXTURE_ENV_COLOR                   0x2201
-#define GL_TEXTURE_GEN_S                       0x0C60
-#define GL_TEXTURE_GEN_T                       0x0C61
-#define GL_TEXTURE_GEN_R                       0x0C62
-#define GL_TEXTURE_GEN_Q                       0x0C63
-#define GL_TEXTURE_GEN_MODE                    0x2500
-#define GL_TEXTURE_BORDER_COLOR                        0x1004
-#define GL_TEXTURE_WIDTH                       0x1000
-#define GL_TEXTURE_HEIGHT                      0x1001
-#define GL_TEXTURE_BORDER                      0x1005
-#define GL_TEXTURE_COMPONENTS                  0x1003
-#define GL_TEXTURE_RED_SIZE                    0x805C
-#define GL_TEXTURE_GREEN_SIZE                  0x805D
-#define GL_TEXTURE_BLUE_SIZE                   0x805E
-#define GL_TEXTURE_ALPHA_SIZE                  0x805F
-#define GL_TEXTURE_LUMINANCE_SIZE              0x8060
-#define GL_TEXTURE_INTENSITY_SIZE              0x8061
-#define GL_NEAREST_MIPMAP_NEAREST              0x2700
-#define GL_NEAREST_MIPMAP_LINEAR               0x2702
-#define GL_LINEAR_MIPMAP_NEAREST               0x2701
-#define GL_LINEAR_MIPMAP_LINEAR                        0x2703
-#define GL_OBJECT_LINEAR                       0x2401
-#define GL_OBJECT_PLANE                                0x2501
-#define GL_EYE_LINEAR                          0x2400
-#define GL_EYE_PLANE                           0x2502
-#define GL_SPHERE_MAP                          0x2402
-#define GL_DECAL                               0x2101
-#define GL_MODULATE                            0x2100
-#define GL_NEAREST                             0x2600
-#define GL_REPEAT                              0x2901
-#define GL_CLAMP                               0x2900
-#define GL_S                                   0x2000
-#define GL_T                                   0x2001
-#define GL_R                                   0x2002
-#define GL_Q                                   0x2003
-
-/* Utility */
-#define GL_VENDOR                              0x1F00
-#define GL_RENDERER                            0x1F01
-#define GL_VERSION                             0x1F02
-#define GL_EXTENSIONS                          0x1F03
-
-/* Errors */
-#define GL_NO_ERROR                            0
-#define GL_INVALID_ENUM                                0x0500
-#define GL_INVALID_VALUE                       0x0501
-#define GL_INVALID_OPERATION                   0x0502
-#define GL_STACK_OVERFLOW                      0x0503
-#define GL_STACK_UNDERFLOW                     0x0504
-#define GL_OUT_OF_MEMORY                       0x0505
-
-/* glPush/PopAttrib bits */
-#define GL_CURRENT_BIT                         0x00000001
-#define GL_POINT_BIT                           0x00000002
-#define GL_LINE_BIT                            0x00000004
-#define GL_POLYGON_BIT                         0x00000008
-#define GL_POLYGON_STIPPLE_BIT                 0x00000010
-#define GL_PIXEL_MODE_BIT                      0x00000020
-#define GL_LIGHTING_BIT                                0x00000040
-#define GL_FOG_BIT                             0x00000080
-#define GL_DEPTH_BUFFER_BIT                    0x00000100
-#define GL_ACCUM_BUFFER_BIT                    0x00000200
-#define GL_STENCIL_BUFFER_BIT                  0x00000400
-#define GL_VIEWPORT_BIT                                0x00000800
-#define GL_TRANSFORM_BIT                       0x00001000
-#define GL_ENABLE_BIT                          0x00002000
-#define GL_COLOR_BUFFER_BIT                    0x00004000
-#define GL_HINT_BIT                            0x00008000
-#define GL_EVAL_BIT                            0x00010000
-#define GL_LIST_BIT                            0x00020000
-#define GL_TEXTURE_BIT                         0x00040000
-#define GL_SCISSOR_BIT                         0x00080000
-#define GL_ALL_ATTRIB_BITS                     0x000FFFFF
-
-
-/* OpenGL 1.1 */
-#define GL_PROXY_TEXTURE_1D                    0x8063
-#define GL_PROXY_TEXTURE_2D                    0x8064
-#define GL_TEXTURE_PRIORITY                    0x8066
-#define GL_TEXTURE_RESIDENT                    0x8067
-#define GL_TEXTURE_BINDING_1D                  0x8068
-#define GL_TEXTURE_BINDING_2D                  0x8069
-#define GL_TEXTURE_INTERNAL_FORMAT             0x1003
-#define GL_ALPHA4                              0x803B
-#define GL_ALPHA8                              0x803C
-#define GL_ALPHA12                             0x803D
-#define GL_ALPHA16                             0x803E
-#define GL_LUMINANCE4                          0x803F
-#define GL_LUMINANCE8                          0x8040
-#define GL_LUMINANCE12                         0x8041
-#define GL_LUMINANCE16                         0x8042
-#define GL_LUMINANCE4_ALPHA4                   0x8043
-#define GL_LUMINANCE6_ALPHA2                   0x8044
-#define GL_LUMINANCE8_ALPHA8                   0x8045
-#define GL_LUMINANCE12_ALPHA4                  0x8046
-#define GL_LUMINANCE12_ALPHA12                 0x8047
-#define GL_LUMINANCE16_ALPHA16                 0x8048
-#define GL_INTENSITY                           0x8049
-#define GL_INTENSITY4                          0x804A
-#define GL_INTENSITY8                          0x804B
-#define GL_INTENSITY12                         0x804C
-#define GL_INTENSITY16                         0x804D
-#define GL_R3_G3_B2                            0x2A10
-#define GL_RGB4                                        0x804F
-#define GL_RGB5                                        0x8050
-#define GL_RGB8                                        0x8051
-#define GL_RGB10                               0x8052
-#define GL_RGB12                               0x8053
-#define GL_RGB16                               0x8054
-#define GL_RGBA2                               0x8055
-#define GL_RGBA4                               0x8056
-#define GL_RGB5_A1                             0x8057
-#define GL_RGBA8                               0x8058
-#define GL_RGB10_A2                            0x8059
-#define GL_RGBA12                              0x805A
-#define GL_RGBA16                              0x805B
-#define GL_CLIENT_PIXEL_STORE_BIT              0x00000001
-#define GL_CLIENT_VERTEX_ARRAY_BIT             0x00000002
-#define GL_ALL_CLIENT_ATTRIB_BITS              0xFFFFFFFF
-#define GL_CLIENT_ALL_ATTRIB_BITS              0xFFFFFFFF
-
-
-
-/*
- * Miscellaneous
- */
-
-GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
-
-GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
-
-GLAPI void GLAPIENTRY glClear( GLbitfield mask );
-
-GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
-
-GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
-
-GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
-
-GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
-
-GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
-
-GLAPI void GLAPIENTRY glCullFace( GLenum mode );
-
-GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
-
-GLAPI void GLAPIENTRY glPointSize( GLfloat size );
-
-GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
-
-GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
-
-GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
-
-GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
-
-GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
-
-GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
-
-GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
-
-GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
-
-GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
-
-GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
-
-GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
-
-GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
-
-GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
-
-GLAPI void GLAPIENTRY glEnable( GLenum cap );
-
-GLAPI void GLAPIENTRY glDisable( GLenum cap );
-
-GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
-
-
-GLAPI void GLAPIENTRY glEnableClientState( GLenum cap );  /* 1.1 */
-
-GLAPI void GLAPIENTRY glDisableClientState( GLenum cap );  /* 1.1 */
-
-
-GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
-
-GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
-
-GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
-
-GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
-
-
-GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
-
-GLAPI void GLAPIENTRY glPopAttrib( void );
-
-
-GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask );  /* 1.1 */
-
-GLAPI void GLAPIENTRY glPopClientAttrib( void );  /* 1.1 */
-
-
-GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
-
-GLAPI GLenum GLAPIENTRY glGetError( void );
-
-GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
-
-GLAPI void GLAPIENTRY glFinish( void );
-
-GLAPI void GLAPIENTRY glFlush( void );
-
-GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
-
-
-/*
- * Depth Buffer
- */
-
-GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
-
-GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
-
-GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
-
-GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
-
-
-/*
- * Accumulation Buffer
- */
-
-GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
-
-GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
-
-
-/*
- * Transformation
- */
-
-GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
-
-GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
-                                 GLdouble bottom, GLdouble top,
-                                 GLdouble near_val, GLdouble far_val );
-
-GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
-                                   GLdouble bottom, GLdouble top,
-                                   GLdouble near_val, GLdouble far_val );
-
-GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
-                                    GLsizei width, GLsizei height );
-
-GLAPI void GLAPIENTRY glPushMatrix( void );
-
-GLAPI void GLAPIENTRY glPopMatrix( void );
-
-GLAPI void GLAPIENTRY glLoadIdentity( void );
-
-GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
-GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
-
-GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
-GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
-
-GLAPI void GLAPIENTRY glRotated( GLdouble angle,
-                                   GLdouble x, GLdouble y, GLdouble z );
-GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
-                                   GLfloat x, GLfloat y, GLfloat z );
-
-GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
-GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
-
-GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
-GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
-
-
-/*
- * Display Lists
- */
-
-GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
-
-GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
-
-GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
-
-GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
-
-GLAPI void GLAPIENTRY glEndList( void );
-
-GLAPI void GLAPIENTRY glCallList( GLuint list );
-
-GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
-                                     const GLvoid *lists );
-
-GLAPI void GLAPIENTRY glListBase( GLuint base );
-
-
-/*
- * Drawing Functions
- */
-
-GLAPI void GLAPIENTRY glBegin( GLenum mode );
-
-GLAPI void GLAPIENTRY glEnd( void );
-
-
-GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
-GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
-GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
-GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
-
-GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
-GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
-GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
-GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
-
-GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
-GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
-GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
-GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
-
-GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
-GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
-GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
-GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
-
-GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
-GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
-GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
-GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
-
-GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
-GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
-GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
-GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
-
-
-GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
-GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
-GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
-GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
-GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
-
-GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
-GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
-GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
-GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
-GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
-
-
-GLAPI void GLAPIENTRY glIndexd( GLdouble c );
-GLAPI void GLAPIENTRY glIndexf( GLfloat c );
-GLAPI void GLAPIENTRY glIndexi( GLint c );
-GLAPI void GLAPIENTRY glIndexs( GLshort c );
-GLAPI void GLAPIENTRY glIndexub( GLubyte c );  /* 1.1 */
-
-GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
-GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
-GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
-GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
-GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c );  /* 1.1 */
-
-GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
-GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
-GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
-GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
-GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
-GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
-GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
-GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
-
-GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
-                                   GLbyte blue, GLbyte alpha );
-GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
-                                   GLdouble blue, GLdouble alpha );
-GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
-                                   GLfloat blue, GLfloat alpha );
-GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
-                                   GLint blue, GLint alpha );
-GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
-                                   GLshort blue, GLshort alpha );
-GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
-                                    GLubyte blue, GLubyte alpha );
-GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
-                                    GLuint blue, GLuint alpha );
-GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
-                                    GLushort blue, GLushort alpha );
-
-
-GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
-GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
-GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
-GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
-GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
-GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
-GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
-GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
-
-GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
-GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
-GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
-GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
-GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
-GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
-GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
-GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
-
-
-GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
-GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
-GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
-GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
-
-GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
-GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
-GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
-GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
-
-GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
-GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
-GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
-GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
-
-GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
-GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
-GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
-GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
-
-GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
-GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
-GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
-GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
-
-GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
-GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
-GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
-GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
-
-GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
-GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
-GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
-GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
-
-GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
-GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
-GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
-GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
-
-
-GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
-GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
-GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
-GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
-
-GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
-GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
-GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
-GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
-
-GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
-GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
-GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
-GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
-
-GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
-GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
-GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
-GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
-
-GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
-GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
-GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
-GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
-
-GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
-GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
-GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
-GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
-
-
-GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
-GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
-GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
-GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
-
-
-GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
-GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
-GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
-GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
-
-
-/*
- * Vertex Arrays  (1.1)
- */
-
-GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
-                                       GLsizei stride, const GLvoid *ptr );
-
-GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
-                                       const GLvoid *ptr );
-
-GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
-                                      GLsizei stride, const GLvoid *ptr );
-
-GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
-                                      const GLvoid *ptr );
-
-GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
-                                         GLsizei stride, const GLvoid *ptr );
-
-GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
-
-GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
-
-GLAPI void GLAPIENTRY glArrayElement( GLint i );
-
-GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
-
-GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
-                                      GLenum type, const GLvoid *indices );
-
-GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
-                                           const GLvoid *pointer );
-
-/*
- * Lighting
- */
-
-GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
-
-GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
-GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
-GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
-                                 const GLfloat *params );
-GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
-                                 const GLint *params );
-
-GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
-                                    GLfloat *params );
-GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
-                                    GLint *params );
-
-GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
-GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
-GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
-GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
-
-GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
-GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
-GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
-GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
-
-GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
-GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
-
-GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
-
-
-/*
- * Raster functions
- */
-
-GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
-
-GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
-GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
-
-GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
-GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
-
-GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
-                                    const GLfloat *values );
-GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
-                                     const GLuint *values );
-GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
-                                     const GLushort *values );
-
-GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
-GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
-GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
-
-GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
-                                GLfloat xorig, GLfloat yorig,
-                                GLfloat xmove, GLfloat ymove,
-                                const GLubyte *bitmap );
-
-GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
-                                    GLsizei width, GLsizei height,
-                                    GLenum format, GLenum type,
-                                    GLvoid *pixels );
-
-GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
-                                    GLenum format, GLenum type,
-                                    const GLvoid *pixels );
-
-GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
-                                    GLsizei width, GLsizei height,
-                                    GLenum type );
-
-/*
- * Stenciling
- */
-
-GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
-
-GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
-
-GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
-
-GLAPI void GLAPIENTRY glClearStencil( GLint s );
-
-
-
-/*
- * Texture mapping
- */
-
-GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
-GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
-GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
-
-GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
-GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
-GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
-
-GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
-GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
-GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
-
-
-GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
-GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
-
-GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
-GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
-
-GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
-GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
-
-
-GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
-GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
-
-GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
-                                          const GLfloat *params );
-GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
-                                          const GLint *params );
-
-GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
-                                           GLenum pname, GLfloat *params);
-GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
-                                           GLenum pname, GLint *params );
-
-GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
-                                                GLenum pname, GLfloat *params );
-GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
-                                                GLenum pname, GLint *params );
-
-
-GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
-                                    GLint internalFormat,
-                                    GLsizei width, GLint border,
-                                    GLenum format, GLenum type,
-                                    const GLvoid *pixels );
-
-GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
-                                    GLint internalFormat,
-                                    GLsizei width, GLsizei height,
-                                    GLint border, GLenum format, GLenum type,
-                                    const GLvoid *pixels );
-
-GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
-                                     GLenum format, GLenum type,
-                                     GLvoid *pixels );
-
-
-/* 1.1 functions */
-
-GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
-
-GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
-
-GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
-
-GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
-                                            const GLuint *textures,
-                                            const GLclampf *priorities );
-
-GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
-                                                  const GLuint *textures,
-                                                  GLboolean *residences );
-
-GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
-
-
-GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
-                                       GLint xoffset,
-                                       GLsizei width, GLenum format,
-                                       GLenum type, const GLvoid *pixels );
-
-
-GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
-                                       GLint xoffset, GLint yoffset,
-                                       GLsizei width, GLsizei height,
-                                       GLenum format, GLenum type,
-                                       const GLvoid *pixels );
-
-
-GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
-                                        GLenum internalformat,
-                                        GLint x, GLint y,
-                                        GLsizei width, GLint border );
-
-
-GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
-                                        GLenum internalformat,
-                                        GLint x, GLint y,
-                                        GLsizei width, GLsizei height,
-                                        GLint border );
-
-
-GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
-                                           GLint xoffset, GLint x, GLint y,
-                                           GLsizei width );
-
-
-GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
-                                           GLint xoffset, GLint yoffset,
-                                           GLint x, GLint y,
-                                           GLsizei width, GLsizei height );
-
-
-/*
- * Evaluators
- */
-
-GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
-                               GLint stride,
-                               GLint order, const GLdouble *points );
-GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
-                               GLint stride,
-                               GLint order, const GLfloat *points );
-
-GLAPI void GLAPIENTRY glMap2d( GLenum target,
-                    GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
-                    GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
-                    const GLdouble *points );
-GLAPI void GLAPIENTRY glMap2f( GLenum target,
-                    GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
-                    GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
-                    const GLfloat *points );
-
-GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
-GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
-GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
-
-GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
-GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
-
-GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
-GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
-
-GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
-GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
-
-GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
-GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
-
-GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
-GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
-
-GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
-                                   GLint vn, GLdouble v1, GLdouble v2 );
-GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
-                                   GLint vn, GLfloat v1, GLfloat v2 );
-
-GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
-
-GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
-
-GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
-
-GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
-
-
-/*
- * Fog
- */
-
-GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
-
-GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
-
-GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
-
-GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
-
-
-/*
- * Selection and Feedback
- */
-
-GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
-
-GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
-
-GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
-
-GLAPI void GLAPIENTRY glInitNames( void );
-
-GLAPI void GLAPIENTRY glLoadName( GLuint name );
-
-GLAPI void GLAPIENTRY glPushName( GLuint name );
-
-GLAPI void GLAPIENTRY glPopName( void );
-
-
-
-/*
- * OpenGL 1.2
- */
-
-#define GL_RESCALE_NORMAL                      0x803A
-#define GL_CLAMP_TO_EDGE                       0x812F
-#define GL_MAX_ELEMENTS_VERTICES               0x80E8
-#define GL_MAX_ELEMENTS_INDICES                        0x80E9
-#define GL_BGR                                 0x80E0
-#define GL_BGRA                                        0x80E1
-#define GL_UNSIGNED_BYTE_3_3_2                 0x8032
-#define GL_UNSIGNED_BYTE_2_3_3_REV             0x8362
-#define GL_UNSIGNED_SHORT_5_6_5                        0x8363
-#define GL_UNSIGNED_SHORT_5_6_5_REV            0x8364
-#define GL_UNSIGNED_SHORT_4_4_4_4              0x8033
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV          0x8365
-#define GL_UNSIGNED_SHORT_5_5_5_1              0x8034
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV          0x8366
-#define GL_UNSIGNED_INT_8_8_8_8                        0x8035
-#define GL_UNSIGNED_INT_8_8_8_8_REV            0x8367
-#define GL_UNSIGNED_INT_10_10_10_2             0x8036
-#define GL_UNSIGNED_INT_2_10_10_10_REV         0x8368
-#define GL_LIGHT_MODEL_COLOR_CONTROL           0x81F8
-#define GL_SINGLE_COLOR                                0x81F9
-#define GL_SEPARATE_SPECULAR_COLOR             0x81FA
-#define GL_TEXTURE_MIN_LOD                     0x813A
-#define GL_TEXTURE_MAX_LOD                     0x813B
-#define GL_TEXTURE_BASE_LEVEL                  0x813C
-#define GL_TEXTURE_MAX_LEVEL                   0x813D
-#define GL_SMOOTH_POINT_SIZE_RANGE             0x0B12
-#define GL_SMOOTH_POINT_SIZE_GRANULARITY       0x0B13
-#define GL_SMOOTH_LINE_WIDTH_RANGE             0x0B22
-#define GL_SMOOTH_LINE_WIDTH_GRANULARITY       0x0B23
-#define GL_ALIASED_POINT_SIZE_RANGE            0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE            0x846E
-#define GL_PACK_SKIP_IMAGES                    0x806B
-#define GL_PACK_IMAGE_HEIGHT                   0x806C
-#define GL_UNPACK_SKIP_IMAGES                  0x806D
-#define GL_UNPACK_IMAGE_HEIGHT                 0x806E
-#define GL_TEXTURE_3D                          0x806F
-#define GL_PROXY_TEXTURE_3D                    0x8070
-#define GL_TEXTURE_DEPTH                       0x8071
-#define GL_TEXTURE_WRAP_R                      0x8072
-#define GL_MAX_3D_TEXTURE_SIZE                 0x8073
-#define GL_TEXTURE_BINDING_3D                  0x806A
-
-GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
-       GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
-
-GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
-                                      GLint internalFormat,
-                                      GLsizei width, GLsizei height,
-                                      GLsizei depth, GLint border,
-                                      GLenum format, GLenum type,
-                                      const GLvoid *pixels );
-
-GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
-                                         GLint xoffset, GLint yoffset,
-                                         GLint zoffset, GLsizei width,
-                                         GLsizei height, GLsizei depth,
-                                         GLenum format,
-                                         GLenum type, const GLvoid *pixels);
-
-GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
-                                             GLint xoffset, GLint yoffset,
-                                             GLint zoffset, GLint x,
-                                             GLint y, GLsizei width,
-                                             GLsizei height );
-
-typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
-typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
-typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-
-
-/*
- * GL_ARB_imaging
- */
-
-#define GL_CONSTANT_COLOR                      0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR            0x8002
-#define GL_CONSTANT_ALPHA                      0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA            0x8004
-#define GL_COLOR_TABLE                         0x80D0
-#define GL_POST_CONVOLUTION_COLOR_TABLE                0x80D1
-#define GL_POST_COLOR_MATRIX_COLOR_TABLE       0x80D2
-#define GL_PROXY_COLOR_TABLE                   0x80D3
-#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE  0x80D4
-#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
-#define GL_COLOR_TABLE_SCALE                   0x80D6
-#define GL_COLOR_TABLE_BIAS                    0x80D7
-#define GL_COLOR_TABLE_FORMAT                  0x80D8
-#define GL_COLOR_TABLE_WIDTH                   0x80D9
-#define GL_COLOR_TABLE_RED_SIZE                        0x80DA
-#define GL_COLOR_TABLE_GREEN_SIZE              0x80DB
-#define GL_COLOR_TABLE_BLUE_SIZE               0x80DC
-#define GL_COLOR_TABLE_ALPHA_SIZE              0x80DD
-#define GL_COLOR_TABLE_LUMINANCE_SIZE          0x80DE
-#define GL_COLOR_TABLE_INTENSITY_SIZE          0x80DF
-#define GL_CONVOLUTION_1D                      0x8010
-#define GL_CONVOLUTION_2D                      0x8011
-#define GL_SEPARABLE_2D                                0x8012
-#define GL_CONVOLUTION_BORDER_MODE             0x8013
-#define GL_CONVOLUTION_FILTER_SCALE            0x8014
-#define GL_CONVOLUTION_FILTER_BIAS             0x8015
-#define GL_REDUCE                              0x8016
-#define GL_CONVOLUTION_FORMAT                  0x8017
-#define GL_CONVOLUTION_WIDTH                   0x8018
-#define GL_CONVOLUTION_HEIGHT                  0x8019
-#define GL_MAX_CONVOLUTION_WIDTH               0x801A
-#define GL_MAX_CONVOLUTION_HEIGHT              0x801B
-#define GL_POST_CONVOLUTION_RED_SCALE          0x801C
-#define GL_POST_CONVOLUTION_GREEN_SCALE                0x801D
-#define GL_POST_CONVOLUTION_BLUE_SCALE         0x801E
-#define GL_POST_CONVOLUTION_ALPHA_SCALE                0x801F
-#define GL_POST_CONVOLUTION_RED_BIAS           0x8020
-#define GL_POST_CONVOLUTION_GREEN_BIAS         0x8021
-#define GL_POST_CONVOLUTION_BLUE_BIAS          0x8022
-#define GL_POST_CONVOLUTION_ALPHA_BIAS         0x8023
-#define GL_CONSTANT_BORDER                     0x8151
-#define GL_REPLICATE_BORDER                    0x8153
-#define GL_CONVOLUTION_BORDER_COLOR            0x8154
-#define GL_COLOR_MATRIX                                0x80B1
-#define GL_COLOR_MATRIX_STACK_DEPTH            0x80B2
-#define GL_MAX_COLOR_MATRIX_STACK_DEPTH                0x80B3
-#define GL_POST_COLOR_MATRIX_RED_SCALE         0x80B4
-#define GL_POST_COLOR_MATRIX_GREEN_SCALE       0x80B5
-#define GL_POST_COLOR_MATRIX_BLUE_SCALE                0x80B6
-#define GL_POST_COLOR_MATRIX_ALPHA_SCALE       0x80B7
-#define GL_POST_COLOR_MATRIX_RED_BIAS          0x80B8
-#define GL_POST_COLOR_MATRIX_GREEN_BIAS                0x80B9
-#define GL_POST_COLOR_MATRIX_BLUE_BIAS         0x80BA
-#define GL_POST_COLOR_MATRIX_ALPHA_BIAS                0x80BB
-#define GL_HISTOGRAM                           0x8024
-#define GL_PROXY_HISTOGRAM                     0x8025
-#define GL_HISTOGRAM_WIDTH                     0x8026
-#define GL_HISTOGRAM_FORMAT                    0x8027
-#define GL_HISTOGRAM_RED_SIZE                  0x8028
-#define GL_HISTOGRAM_GREEN_SIZE                        0x8029
-#define GL_HISTOGRAM_BLUE_SIZE                 0x802A
-#define GL_HISTOGRAM_ALPHA_SIZE                        0x802B
-#define GL_HISTOGRAM_LUMINANCE_SIZE            0x802C
-#define GL_HISTOGRAM_SINK                      0x802D
-#define GL_MINMAX                              0x802E
-#define GL_MINMAX_FORMAT                       0x802F
-#define GL_MINMAX_SINK                         0x8030
-#define GL_TABLE_TOO_LARGE                     0x8031
-#define GL_BLEND_EQUATION                      0x8009
-#define GL_MIN                                 0x8007
-#define GL_MAX                                 0x8008
-#define GL_FUNC_ADD                            0x8006
-#define GL_FUNC_SUBTRACT                       0x800A
-#define GL_FUNC_REVERSE_SUBTRACT               0x800B
-#define GL_BLEND_COLOR                         0x8005
-
-
-GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
-                                    GLsizei width, GLenum format,
-                                    GLenum type, const GLvoid *table );
-
-GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
-                                       GLsizei start, GLsizei count,
-                                       GLenum format, GLenum type,
-                                       const GLvoid *data );
-
-GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
-                                              const GLint *params);
-
-GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
-                                              const GLfloat *params);
-
-GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
-                                           GLint x, GLint y, GLsizei width );
-
-GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
-                                        GLint x, GLint y, GLsizei width );
-
-GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
-                                       GLenum type, GLvoid *table );
-
-GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
-                                                  GLfloat *params );
-
-GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
-                                                  GLint *params );
-
-GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
-
-GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
-                                    GLclampf blue, GLclampf alpha );
-
-GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
-                                  GLenum internalformat, GLboolean sink );
-
-GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
-
-GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
-                                     GLenum format, GLenum type,
-                                     GLvoid *values );
-
-GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
-                                                GLfloat *params );
-
-GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
-                                                GLint *params );
-
-GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
-                               GLboolean sink );
-
-GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
-
-GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
-                                   GLenum format, GLenum types,
-                                   GLvoid *values );
-
-GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
-                                             GLfloat *params );
-
-GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
-                                             GLint *params );
-
-GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
-       GLenum internalformat, GLsizei width, GLenum format, GLenum type,
-       const GLvoid *image );
-
-GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
-       GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
-       GLenum type, const GLvoid *image );
-
-GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
-       GLfloat params );
-
-GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
-       const GLfloat *params );
-
-GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
-       GLint params );
-
-GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
-       const GLint *params );
-
-GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
-       GLenum internalformat, GLint x, GLint y, GLsizei width );
-
-GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
-       GLenum internalformat, GLint x, GLint y, GLsizei width,
-       GLsizei height);
-
-GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
-       GLenum type, GLvoid *image );
-
-GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
-       GLfloat *params );
-
-GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
-       GLint *params );
-
-GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
-       GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
-       GLenum type, const GLvoid *row, const GLvoid *column );
-
-GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
-       GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
-
-
-
-
-/*
- * OpenGL 1.3
- */
-
-/* multitexture */
-#define GL_TEXTURE0                            0x84C0
-#define GL_TEXTURE1                            0x84C1
-#define GL_TEXTURE2                            0x84C2
-#define GL_TEXTURE3                            0x84C3
-#define GL_TEXTURE4                            0x84C4
-#define GL_TEXTURE5                            0x84C5
-#define GL_TEXTURE6                            0x84C6
-#define GL_TEXTURE7                            0x84C7
-#define GL_TEXTURE8                            0x84C8
-#define GL_TEXTURE9                            0x84C9
-#define GL_TEXTURE10                           0x84CA
-#define GL_TEXTURE11                           0x84CB
-#define GL_TEXTURE12                           0x84CC
-#define GL_TEXTURE13                           0x84CD
-#define GL_TEXTURE14                           0x84CE
-#define GL_TEXTURE15                           0x84CF
-#define GL_TEXTURE16                           0x84D0
-#define GL_TEXTURE17                           0x84D1
-#define GL_TEXTURE18                           0x84D2
-#define GL_TEXTURE19                           0x84D3
-#define GL_TEXTURE20                           0x84D4
-#define GL_TEXTURE21                           0x84D5
-#define GL_TEXTURE22                           0x84D6
-#define GL_TEXTURE23                           0x84D7
-#define GL_TEXTURE24                           0x84D8
-#define GL_TEXTURE25                           0x84D9
-#define GL_TEXTURE26                           0x84DA
-#define GL_TEXTURE27                           0x84DB
-#define GL_TEXTURE28                           0x84DC
-#define GL_TEXTURE29                           0x84DD
-#define GL_TEXTURE30                           0x84DE
-#define GL_TEXTURE31                           0x84DF
-#define GL_ACTIVE_TEXTURE                      0x84E0
-#define GL_CLIENT_ACTIVE_TEXTURE               0x84E1
-#define GL_MAX_TEXTURE_UNITS                   0x84E2
-/* texture_cube_map */
-#define GL_NORMAL_MAP                          0x8511
-#define GL_REFLECTION_MAP                      0x8512
-#define GL_TEXTURE_CUBE_MAP                    0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP            0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X         0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X         0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y         0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y         0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z         0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z         0x851A
-#define GL_PROXY_TEXTURE_CUBE_MAP              0x851B
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE           0x851C
-/* texture_compression */
-#define GL_COMPRESSED_ALPHA                    0x84E9
-#define GL_COMPRESSED_LUMINANCE                        0x84EA
-#define GL_COMPRESSED_LUMINANCE_ALPHA          0x84EB
-#define GL_COMPRESSED_INTENSITY                        0x84EC
-#define GL_COMPRESSED_RGB                      0x84ED
-#define GL_COMPRESSED_RGBA                     0x84EE
-#define GL_TEXTURE_COMPRESSION_HINT            0x84EF
-#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE       0x86A0
-#define GL_TEXTURE_COMPRESSED                  0x86A1
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS      0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS          0x86A3
-/* multisample */
-#define GL_MULTISAMPLE                         0x809D
-#define GL_SAMPLE_ALPHA_TO_COVERAGE            0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE                 0x809F
-#define GL_SAMPLE_COVERAGE                     0x80A0
-#define GL_SAMPLE_BUFFERS                      0x80A8
-#define GL_SAMPLES                             0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE               0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT              0x80AB
-#define GL_MULTISAMPLE_BIT                     0x20000000
-/* transpose_matrix */
-#define GL_TRANSPOSE_MODELVIEW_MATRIX          0x84E3
-#define GL_TRANSPOSE_PROJECTION_MATRIX         0x84E4
-#define GL_TRANSPOSE_TEXTURE_MATRIX            0x84E5
-#define GL_TRANSPOSE_COLOR_MATRIX              0x84E6
-/* texture_env_combine */
-#define GL_COMBINE                             0x8570
-#define GL_COMBINE_RGB                         0x8571
-#define GL_COMBINE_ALPHA                       0x8572
-#define GL_SOURCE0_RGB                         0x8580
-#define GL_SOURCE1_RGB                         0x8581
-#define GL_SOURCE2_RGB                         0x8582
-#define GL_SOURCE0_ALPHA                       0x8588
-#define GL_SOURCE1_ALPHA                       0x8589
-#define GL_SOURCE2_ALPHA                       0x858A
-#define GL_OPERAND0_RGB                                0x8590
-#define GL_OPERAND1_RGB                                0x8591
-#define GL_OPERAND2_RGB                                0x8592
-#define GL_OPERAND0_ALPHA                      0x8598
-#define GL_OPERAND1_ALPHA                      0x8599
-#define GL_OPERAND2_ALPHA                      0x859A
-#define GL_RGB_SCALE                           0x8573
-#define GL_ADD_SIGNED                          0x8574
-#define GL_INTERPOLATE                         0x8575
-#define GL_SUBTRACT                            0x84E7
-#define GL_CONSTANT                            0x8576
-#define GL_PRIMARY_COLOR                       0x8577
-#define GL_PREVIOUS                            0x8578
-/* texture_env_dot3 */
-#define GL_DOT3_RGB                            0x86AE
-#define GL_DOT3_RGBA                           0x86AF
-/* texture_border_clamp */
-#define GL_CLAMP_TO_BORDER                     0x812D
-
-GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
-
-GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
-
-GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
-
-GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
-
-GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
-
-GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
-
-GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
-
-GLAPI 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 );
-
-GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
-
-GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
-
-GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
-
-GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
-
-GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
-
-GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
-
-GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
-
-GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
-
-GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
-
-GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
-
-GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
-
-GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
-
-GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
-
-GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
-
-GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
-
-GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
-
-GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
-
-GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
-
-GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
-
-
-GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
-
-GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
-
-GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
-
-GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
-
-GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
-
-
-typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
-typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
-
-
-
-/*
- * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
- */
-#ifndef GL_ARB_multitexture
-#define GL_ARB_multitexture 1
-
-#define GL_TEXTURE0_ARB                                0x84C0
-#define GL_TEXTURE1_ARB                                0x84C1
-#define GL_TEXTURE2_ARB                                0x84C2
-#define GL_TEXTURE3_ARB                                0x84C3
-#define GL_TEXTURE4_ARB                                0x84C4
-#define GL_TEXTURE5_ARB                                0x84C5
-#define GL_TEXTURE6_ARB                                0x84C6
-#define GL_TEXTURE7_ARB                                0x84C7
-#define GL_TEXTURE8_ARB                                0x84C8
-#define GL_TEXTURE9_ARB                                0x84C9
-#define GL_TEXTURE10_ARB                       0x84CA
-#define GL_TEXTURE11_ARB                       0x84CB
-#define GL_TEXTURE12_ARB                       0x84CC
-#define GL_TEXTURE13_ARB                       0x84CD
-#define GL_TEXTURE14_ARB                       0x84CE
-#define GL_TEXTURE15_ARB                       0x84CF
-#define GL_TEXTURE16_ARB                       0x84D0
-#define GL_TEXTURE17_ARB                       0x84D1
-#define GL_TEXTURE18_ARB                       0x84D2
-#define GL_TEXTURE19_ARB                       0x84D3
-#define GL_TEXTURE20_ARB                       0x84D4
-#define GL_TEXTURE21_ARB                       0x84D5
-#define GL_TEXTURE22_ARB                       0x84D6
-#define GL_TEXTURE23_ARB                       0x84D7
-#define GL_TEXTURE24_ARB                       0x84D8
-#define GL_TEXTURE25_ARB                       0x84D9
-#define GL_TEXTURE26_ARB                       0x84DA
-#define GL_TEXTURE27_ARB                       0x84DB
-#define GL_TEXTURE28_ARB                       0x84DC
-#define GL_TEXTURE29_ARB                       0x84DD
-#define GL_TEXTURE30_ARB                       0x84DE
-#define GL_TEXTURE31_ARB                       0x84DF
-#define GL_ACTIVE_TEXTURE_ARB                  0x84E0
-#define GL_CLIENT_ACTIVE_TEXTURE_ARB           0x84E1
-#define GL_MAX_TEXTURE_UNITS_ARB               0x84E2
-
-GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
-GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
-GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
-GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
-GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
-GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
-GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
-GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
-GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
-GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
-GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
-GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
-GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
-GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
-GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
-GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
-GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
-GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
-GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
-GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
-GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
-GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
-GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
-GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
-GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
-GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
-GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
-GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
-GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
-GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
-GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
-
-typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
-typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
-
-#endif /* GL_ARB_multitexture */
-
-
-
-/*
- * Define this token if you want "old-style" header file behaviour (extensions
- * defined in gl.h).  Otherwise, extensions will be included from glext.h.
- */
-#if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY)
-#include "SDL_opengl_glext.h"
-#endif  /* GL_GLEXT_LEGACY */
-
-
-
-/*
- * ???. GL_MESA_packed_depth_stencil
- * XXX obsolete
- */
-#ifndef GL_MESA_packed_depth_stencil
-#define GL_MESA_packed_depth_stencil 1
-
-#define GL_DEPTH_STENCIL_MESA                  0x8750
-#define GL_UNSIGNED_INT_24_8_MESA              0x8751
-#define GL_UNSIGNED_INT_8_24_REV_MESA          0x8752
-#define GL_UNSIGNED_SHORT_15_1_MESA            0x8753
-#define GL_UNSIGNED_SHORT_1_15_REV_MESA                0x8754
-
-#endif /* GL_MESA_packed_depth_stencil */
-
-
-#ifndef GL_ATI_blend_equation_separate
-#define GL_ATI_blend_equation_separate 1
-
-#define GL_ALPHA_BLEND_EQUATION_ATI            0x883D
-
-GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
-typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
-
-#endif /* GL_ATI_blend_equation_separate */
-
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-typedef void* GLeglImageOES;
-#endif
-
-#ifndef GL_OES_EGL_image
-#define GL_OES_EGL_image 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
-GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
-#endif
-typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-#endif
-
-
-/**
- ** NOTE!!!!!  If you add new functions to this file, or update
- ** glext.h be sure to regenerate the gl_mangle.h file.  See comments
- ** in that file for details.
- **/
-
-
-
-/**********************************************************************
- * Begin system-specific stuff
- */
-#if defined(PRAGMA_EXPORT_SUPPORTED)
-#pragma export off
-#endif
-
-/*
- * End system-specific stuff
- **********************************************************************/
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gl_h_ */
-
-#endif /* !__IPHONEOS__ */
-
-#endif /* SDL_opengl_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengl_glext.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengl_glext.h
deleted file mode 100644 (file)
index 6a402b1..0000000
+++ /dev/null
@@ -1,11180 +0,0 @@
-#ifndef __glext_h_
-#define __glext_h_ 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright (c) 2013-2014 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-/*
-** This header is generated from the Khronos OpenGL / OpenGL ES XML
-** API Registry. The current version of the Registry, generator scripts
-** used to make the header, and the header can be found at
-**   http://www.opengl.org/registry/
-**
-** Khronos $Revision: 26745 $ on $Date: 2014-05-21 03:12:26 -0700 (Wed, 21 May 2014) $
-*/
-
-#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN 1
-#endif
-#ifndef NOMINMAX   /* don't define min() and max(). */
-#define NOMINMAX
-#endif
-#include <windows.h>
-#endif
-
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-#ifndef APIENTRYP
-#define APIENTRYP APIENTRY *
-#endif
-#ifndef GLAPI
-#define GLAPI extern
-#endif
-
-#define GL_GLEXT_VERSION 20140521
-
-/* Generated C header for:
- * API: gl
- * Profile: compatibility
- * Versions considered: .*
- * Versions emitted: 1\.[2-9]|[234]\.[0-9]
- * Default extensions included: gl
- * Additional extensions included: _nomatch_^
- * Extensions removed: _nomatch_^
- */
-
-#ifndef GL_VERSION_1_2
-#define GL_VERSION_1_2 1
-#define GL_UNSIGNED_BYTE_3_3_2            0x8032
-#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
-#define GL_UNSIGNED_INT_8_8_8_8           0x8035
-#define GL_UNSIGNED_INT_10_10_10_2        0x8036
-#define GL_TEXTURE_BINDING_3D             0x806A
-#define GL_PACK_SKIP_IMAGES               0x806B
-#define GL_PACK_IMAGE_HEIGHT              0x806C
-#define GL_UNPACK_SKIP_IMAGES             0x806D
-#define GL_UNPACK_IMAGE_HEIGHT            0x806E
-#define GL_TEXTURE_3D                     0x806F
-#define GL_PROXY_TEXTURE_3D               0x8070
-#define GL_TEXTURE_DEPTH                  0x8071
-#define GL_TEXTURE_WRAP_R                 0x8072
-#define GL_MAX_3D_TEXTURE_SIZE            0x8073
-#define GL_UNSIGNED_BYTE_2_3_3_REV        0x8362
-#define GL_UNSIGNED_SHORT_5_6_5           0x8363
-#define GL_UNSIGNED_SHORT_5_6_5_REV       0x8364
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV     0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV     0x8366
-#define GL_UNSIGNED_INT_8_8_8_8_REV       0x8367
-#define GL_UNSIGNED_INT_2_10_10_10_REV    0x8368
-#define GL_BGR                            0x80E0
-#define GL_BGRA                           0x80E1
-#define GL_MAX_ELEMENTS_VERTICES          0x80E8
-#define GL_MAX_ELEMENTS_INDICES           0x80E9
-#define GL_CLAMP_TO_EDGE                  0x812F
-#define GL_TEXTURE_MIN_LOD                0x813A
-#define GL_TEXTURE_MAX_LOD                0x813B
-#define GL_TEXTURE_BASE_LEVEL             0x813C
-#define GL_TEXTURE_MAX_LEVEL              0x813D
-#define GL_SMOOTH_POINT_SIZE_RANGE        0x0B12
-#define GL_SMOOTH_POINT_SIZE_GRANULARITY  0x0B13
-#define GL_SMOOTH_LINE_WIDTH_RANGE        0x0B22
-#define GL_SMOOTH_LINE_WIDTH_GRANULARITY  0x0B23
-#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
-#define GL_RESCALE_NORMAL                 0x803A
-#define GL_LIGHT_MODEL_COLOR_CONTROL      0x81F8
-#define GL_SINGLE_COLOR                   0x81F9
-#define GL_SEPARATE_SPECULAR_COLOR        0x81FA
-#define GL_ALIASED_POINT_SIZE_RANGE       0x846D
-typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-GLAPI 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);
-GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-#endif
-#endif /* GL_VERSION_1_2 */
-
-#ifndef GL_VERSION_1_3
-#define GL_VERSION_1_3 1
-#define GL_TEXTURE0                       0x84C0
-#define GL_TEXTURE1                       0x84C1
-#define GL_TEXTURE2                       0x84C2
-#define GL_TEXTURE3                       0x84C3
-#define GL_TEXTURE4                       0x84C4
-#define GL_TEXTURE5                       0x84C5
-#define GL_TEXTURE6                       0x84C6
-#define GL_TEXTURE7                       0x84C7
-#define GL_TEXTURE8                       0x84C8
-#define GL_TEXTURE9                       0x84C9
-#define GL_TEXTURE10                      0x84CA
-#define GL_TEXTURE11                      0x84CB
-#define GL_TEXTURE12                      0x84CC
-#define GL_TEXTURE13                      0x84CD
-#define GL_TEXTURE14                      0x84CE
-#define GL_TEXTURE15                      0x84CF
-#define GL_TEXTURE16                      0x84D0
-#define GL_TEXTURE17                      0x84D1
-#define GL_TEXTURE18                      0x84D2
-#define GL_TEXTURE19                      0x84D3
-#define GL_TEXTURE20                      0x84D4
-#define GL_TEXTURE21                      0x84D5
-#define GL_TEXTURE22                      0x84D6
-#define GL_TEXTURE23                      0x84D7
-#define GL_TEXTURE24                      0x84D8
-#define GL_TEXTURE25                      0x84D9
-#define GL_TEXTURE26                      0x84DA
-#define GL_TEXTURE27                      0x84DB
-#define GL_TEXTURE28                      0x84DC
-#define GL_TEXTURE29                      0x84DD
-#define GL_TEXTURE30                      0x84DE
-#define GL_TEXTURE31                      0x84DF
-#define GL_ACTIVE_TEXTURE                 0x84E0
-#define GL_MULTISAMPLE                    0x809D
-#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE            0x809F
-#define GL_SAMPLE_COVERAGE                0x80A0
-#define GL_SAMPLE_BUFFERS                 0x80A8
-#define GL_SAMPLES                        0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE          0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT         0x80AB
-#define GL_TEXTURE_CUBE_MAP               0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
-#define GL_PROXY_TEXTURE_CUBE_MAP         0x851B
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
-#define GL_COMPRESSED_RGB                 0x84ED
-#define GL_COMPRESSED_RGBA                0x84EE
-#define GL_TEXTURE_COMPRESSION_HINT       0x84EF
-#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE  0x86A0
-#define GL_TEXTURE_COMPRESSED             0x86A1
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
-#define GL_CLAMP_TO_BORDER                0x812D
-#define GL_CLIENT_ACTIVE_TEXTURE          0x84E1
-#define GL_MAX_TEXTURE_UNITS              0x84E2
-#define GL_TRANSPOSE_MODELVIEW_MATRIX     0x84E3
-#define GL_TRANSPOSE_PROJECTION_MATRIX    0x84E4
-#define GL_TRANSPOSE_TEXTURE_MATRIX       0x84E5
-#define GL_TRANSPOSE_COLOR_MATRIX         0x84E6
-#define GL_MULTISAMPLE_BIT                0x20000000
-#define GL_NORMAL_MAP                     0x8511
-#define GL_REFLECTION_MAP                 0x8512
-#define GL_COMPRESSED_ALPHA               0x84E9
-#define GL_COMPRESSED_LUMINANCE           0x84EA
-#define GL_COMPRESSED_LUMINANCE_ALPHA     0x84EB
-#define GL_COMPRESSED_INTENSITY           0x84EC
-#define GL_COMBINE                        0x8570
-#define GL_COMBINE_RGB                    0x8571
-#define GL_COMBINE_ALPHA                  0x8572
-#define GL_SOURCE0_RGB                    0x8580
-#define GL_SOURCE1_RGB                    0x8581
-#define GL_SOURCE2_RGB                    0x8582
-#define GL_SOURCE0_ALPHA                  0x8588
-#define GL_SOURCE1_ALPHA                  0x8589
-#define GL_SOURCE2_ALPHA                  0x858A
-#define GL_OPERAND0_RGB                   0x8590
-#define GL_OPERAND1_RGB                   0x8591
-#define GL_OPERAND2_RGB                   0x8592
-#define GL_OPERAND0_ALPHA                 0x8598
-#define GL_OPERAND1_ALPHA                 0x8599
-#define GL_OPERAND2_ALPHA                 0x859A
-#define GL_RGB_SCALE                      0x8573
-#define GL_ADD_SIGNED                     0x8574
-#define GL_INTERPOLATE                    0x8575
-#define GL_SUBTRACT                       0x84E7
-#define GL_CONSTANT                       0x8576
-#define GL_PRIMARY_COLOR                  0x8577
-#define GL_PREVIOUS                       0x8578
-#define GL_DOT3_RGB                       0x86AE
-#define GL_DOT3_RGBA                      0x86AF
-typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
-typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
-typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
-typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
-typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
-typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glActiveTexture (GLenum texture);
-GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
-GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
-GLAPI 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);
-GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img);
-GLAPI void APIENTRY glClientActiveTexture (GLenum texture);
-GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s);
-GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v);
-GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s);
-GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v);
-GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s);
-GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v);
-GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s);
-GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v);
-GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t);
-GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v);
-GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t);
-GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v);
-GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t);
-GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v);
-GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t);
-GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v);
-GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v);
-GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v);
-GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r);
-GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v);
-GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r);
-GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v);
-GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v);
-GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v);
-GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q);
-GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v);
-GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v);
-GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m);
-GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m);
-GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m);
-GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m);
-#endif
-#endif /* GL_VERSION_1_3 */
-
-#ifndef GL_VERSION_1_4
-#define GL_VERSION_1_4 1
-#define GL_BLEND_DST_RGB                  0x80C8
-#define GL_BLEND_SRC_RGB                  0x80C9
-#define GL_BLEND_DST_ALPHA                0x80CA
-#define GL_BLEND_SRC_ALPHA                0x80CB
-#define GL_POINT_FADE_THRESHOLD_SIZE      0x8128
-#define GL_DEPTH_COMPONENT16              0x81A5
-#define GL_DEPTH_COMPONENT24              0x81A6
-#define GL_DEPTH_COMPONENT32              0x81A7
-#define GL_MIRRORED_REPEAT                0x8370
-#define GL_MAX_TEXTURE_LOD_BIAS           0x84FD
-#define GL_TEXTURE_LOD_BIAS               0x8501
-#define GL_INCR_WRAP                      0x8507
-#define GL_DECR_WRAP                      0x8508
-#define GL_TEXTURE_DEPTH_SIZE             0x884A
-#define GL_TEXTURE_COMPARE_MODE           0x884C
-#define GL_TEXTURE_COMPARE_FUNC           0x884D
-#define GL_POINT_SIZE_MIN                 0x8126
-#define GL_POINT_SIZE_MAX                 0x8127
-#define GL_POINT_DISTANCE_ATTENUATION     0x8129
-#define GL_GENERATE_MIPMAP                0x8191
-#define GL_GENERATE_MIPMAP_HINT           0x8192
-#define GL_FOG_COORDINATE_SOURCE          0x8450
-#define GL_FOG_COORDINATE                 0x8451
-#define GL_FRAGMENT_DEPTH                 0x8452
-#define GL_CURRENT_FOG_COORDINATE         0x8453
-#define GL_FOG_COORDINATE_ARRAY_TYPE      0x8454
-#define GL_FOG_COORDINATE_ARRAY_STRIDE    0x8455
-#define GL_FOG_COORDINATE_ARRAY_POINTER   0x8456
-#define GL_FOG_COORDINATE_ARRAY           0x8457
-#define GL_COLOR_SUM                      0x8458
-#define GL_CURRENT_SECONDARY_COLOR        0x8459
-#define GL_SECONDARY_COLOR_ARRAY_SIZE     0x845A
-#define GL_SECONDARY_COLOR_ARRAY_TYPE     0x845B
-#define GL_SECONDARY_COLOR_ARRAY_STRIDE   0x845C
-#define GL_SECONDARY_COLOR_ARRAY_POINTER  0x845D
-#define GL_SECONDARY_COLOR_ARRAY          0x845E
-#define GL_TEXTURE_FILTER_CONTROL         0x8500
-#define GL_DEPTH_TEXTURE_MODE             0x884B
-#define GL_COMPARE_R_TO_TEXTURE           0x884E
-#define GL_FUNC_ADD                       0x8006
-#define GL_FUNC_SUBTRACT                  0x800A
-#define GL_FUNC_REVERSE_SUBTRACT          0x800B
-#define GL_MIN                            0x8007
-#define GL_MAX                            0x8008
-#define GL_CONSTANT_COLOR                 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002
-#define GL_CONSTANT_ALPHA                 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
-typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
-typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
-typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
-typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
-typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
-typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
-typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const void *pointer);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
-typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
-typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
-typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
-typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
-typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
-typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
-typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
-GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
-GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param);
-GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param);
-GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params);
-GLAPI void APIENTRY glFogCoordf (GLfloat coord);
-GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord);
-GLAPI void APIENTRY glFogCoordd (GLdouble coord);
-GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord);
-GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer);
-GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue);
-GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v);
-GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue);
-GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v);
-GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue);
-GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v);
-GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue);
-GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v);
-GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue);
-GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v);
-GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue);
-GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v);
-GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue);
-GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v);
-GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue);
-GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v);
-GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
-GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y);
-GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v);
-GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y);
-GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v);
-GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y);
-GLAPI void APIENTRY glWindowPos2iv (const GLint *v);
-GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y);
-GLAPI void APIENTRY glWindowPos2sv (const GLshort *v);
-GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v);
-GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v);
-GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z);
-GLAPI void APIENTRY glWindowPos3iv (const GLint *v);
-GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z);
-GLAPI void APIENTRY glWindowPos3sv (const GLshort *v);
-GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GLAPI void APIENTRY glBlendEquation (GLenum mode);
-#endif
-#endif /* GL_VERSION_1_4 */
-
-#ifndef GL_VERSION_1_5
-#define GL_VERSION_1_5 1
-#include <stddef.h>
-#ifdef __MACOSX__
-typedef long GLsizeiptr;
-typedef long GLintptr;
-#else
-typedef ptrdiff_t GLsizeiptr;
-typedef ptrdiff_t GLintptr;
-#endif
-#define GL_BUFFER_SIZE                    0x8764
-#define GL_BUFFER_USAGE                   0x8765
-#define GL_QUERY_COUNTER_BITS             0x8864
-#define GL_CURRENT_QUERY                  0x8865
-#define GL_QUERY_RESULT                   0x8866
-#define GL_QUERY_RESULT_AVAILABLE         0x8867
-#define GL_ARRAY_BUFFER                   0x8892
-#define GL_ELEMENT_ARRAY_BUFFER           0x8893
-#define GL_ARRAY_BUFFER_BINDING           0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-#define GL_READ_ONLY                      0x88B8
-#define GL_WRITE_ONLY                     0x88B9
-#define GL_READ_WRITE                     0x88BA
-#define GL_BUFFER_ACCESS                  0x88BB
-#define GL_BUFFER_MAPPED                  0x88BC
-#define GL_BUFFER_MAP_POINTER             0x88BD
-#define GL_STREAM_DRAW                    0x88E0
-#define GL_STREAM_READ                    0x88E1
-#define GL_STREAM_COPY                    0x88E2
-#define GL_STATIC_DRAW                    0x88E4
-#define GL_STATIC_READ                    0x88E5
-#define GL_STATIC_COPY                    0x88E6
-#define GL_DYNAMIC_DRAW                   0x88E8
-#define GL_DYNAMIC_READ                   0x88E9
-#define GL_DYNAMIC_COPY                   0x88EA
-#define GL_SAMPLES_PASSED                 0x8914
-#define GL_SRC1_ALPHA                     0x8589
-#define GL_VERTEX_ARRAY_BUFFER_BINDING    0x8896
-#define GL_NORMAL_ARRAY_BUFFER_BINDING    0x8897
-#define GL_COLOR_ARRAY_BUFFER_BINDING     0x8898
-#define GL_INDEX_ARRAY_BUFFER_BINDING     0x8899
-#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
-#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
-#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
-#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
-#define GL_WEIGHT_ARRAY_BUFFER_BINDING    0x889E
-#define GL_FOG_COORD_SRC                  0x8450
-#define GL_FOG_COORD                      0x8451
-#define GL_CURRENT_FOG_COORD              0x8453
-#define GL_FOG_COORD_ARRAY_TYPE           0x8454
-#define GL_FOG_COORD_ARRAY_STRIDE         0x8455
-#define GL_FOG_COORD_ARRAY_POINTER        0x8456
-#define GL_FOG_COORD_ARRAY                0x8457
-#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D
-#define GL_SRC0_RGB                       0x8580
-#define GL_SRC1_RGB                       0x8581
-#define GL_SRC2_RGB                       0x8582
-#define GL_SRC0_ALPHA                     0x8588
-#define GL_SRC2_ALPHA                     0x858A
-typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
-typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
-typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
-typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
-typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
-typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
-typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
-typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
-typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
-typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
-typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
-typedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
-typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
-typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids);
-GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
-GLAPI GLboolean APIENTRY glIsQuery (GLuint id);
-GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id);
-GLAPI void APIENTRY glEndQuery (GLenum target);
-GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
-GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
-GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
-GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer);
-GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
-GLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access);
-GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target);
-GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);
-#endif
-#endif /* GL_VERSION_1_5 */
-
-#ifndef GL_VERSION_2_0
-#define GL_VERSION_2_0 1
-typedef char GLchar;
-#define GL_BLEND_EQUATION_RGB             0x8009
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED    0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE       0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE     0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE       0x8625
-#define GL_CURRENT_VERTEX_ATTRIB          0x8626
-#define GL_VERTEX_PROGRAM_POINT_SIZE      0x8642
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER    0x8645
-#define GL_STENCIL_BACK_FUNC              0x8800
-#define GL_STENCIL_BACK_FAIL              0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
-#define GL_MAX_DRAW_BUFFERS               0x8824
-#define GL_DRAW_BUFFER0                   0x8825
-#define GL_DRAW_BUFFER1                   0x8826
-#define GL_DRAW_BUFFER2                   0x8827
-#define GL_DRAW_BUFFER3                   0x8828
-#define GL_DRAW_BUFFER4                   0x8829
-#define GL_DRAW_BUFFER5                   0x882A
-#define GL_DRAW_BUFFER6                   0x882B
-#define GL_DRAW_BUFFER7                   0x882C
-#define GL_DRAW_BUFFER8                   0x882D
-#define GL_DRAW_BUFFER9                   0x882E
-#define GL_DRAW_BUFFER10                  0x882F
-#define GL_DRAW_BUFFER11                  0x8830
-#define GL_DRAW_BUFFER12                  0x8831
-#define GL_DRAW_BUFFER13                  0x8832
-#define GL_DRAW_BUFFER14                  0x8833
-#define GL_DRAW_BUFFER15                  0x8834
-#define GL_BLEND_EQUATION_ALPHA           0x883D
-#define GL_MAX_VERTEX_ATTRIBS             0x8869
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
-#define GL_MAX_TEXTURE_IMAGE_UNITS        0x8872
-#define GL_FRAGMENT_SHADER                0x8B30
-#define GL_VERTEX_SHADER                  0x8B31
-#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
-#define GL_MAX_VERTEX_UNIFORM_COMPONENTS  0x8B4A
-#define GL_MAX_VARYING_FLOATS             0x8B4B
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-#define GL_SHADER_TYPE                    0x8B4F
-#define GL_FLOAT_VEC2                     0x8B50
-#define GL_FLOAT_VEC3                     0x8B51
-#define GL_FLOAT_VEC4                     0x8B52
-#define GL_INT_VEC2                       0x8B53
-#define GL_INT_VEC3                       0x8B54
-#define GL_INT_VEC4                       0x8B55
-#define GL_BOOL                           0x8B56
-#define GL_BOOL_VEC2                      0x8B57
-#define GL_BOOL_VEC3                      0x8B58
-#define GL_BOOL_VEC4                      0x8B59
-#define GL_FLOAT_MAT2                     0x8B5A
-#define GL_FLOAT_MAT3                     0x8B5B
-#define GL_FLOAT_MAT4                     0x8B5C
-#define GL_SAMPLER_1D                     0x8B5D
-#define GL_SAMPLER_2D                     0x8B5E
-#define GL_SAMPLER_3D                     0x8B5F
-#define GL_SAMPLER_CUBE                   0x8B60
-#define GL_SAMPLER_1D_SHADOW              0x8B61
-#define GL_SAMPLER_2D_SHADOW              0x8B62
-#define GL_DELETE_STATUS                  0x8B80
-#define GL_COMPILE_STATUS                 0x8B81
-#define GL_LINK_STATUS                    0x8B82
-#define GL_VALIDATE_STATUS                0x8B83
-#define GL_INFO_LOG_LENGTH                0x8B84
-#define GL_ATTACHED_SHADERS               0x8B85
-#define GL_ACTIVE_UNIFORMS                0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH      0x8B87
-#define GL_SHADER_SOURCE_LENGTH           0x8B88
-#define GL_ACTIVE_ATTRIBUTES              0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH    0x8B8A
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
-#define GL_SHADING_LANGUAGE_VERSION       0x8B8C
-#define GL_CURRENT_PROGRAM                0x8B8D
-#define GL_POINT_SPRITE_COORD_ORIGIN      0x8CA0
-#define GL_LOWER_LEFT                     0x8CA1
-#define GL_UPPER_LEFT                     0x8CA2
-#define GL_STENCIL_BACK_REF               0x8CA3
-#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
-#define GL_STENCIL_BACK_WRITEMASK         0x8CA5
-#define GL_VERTEX_PROGRAM_TWO_SIDE        0x8643
-#define GL_POINT_SPRITE                   0x8861
-#define GL_COORD_REPLACE                  0x8862
-#define GL_MAX_TEXTURE_COORDS             0x8871
-typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
-typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
-typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
-typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
-typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
-typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
-typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
-typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
-typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
-typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
-typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
-typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
-typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
-typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
-typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
-typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
-typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
-typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
-typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
-typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
-typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
-typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
-typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
-typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
-typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
-typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
-typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
-typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
-typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
-GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);
-GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
-GLAPI void APIENTRY glCompileShader (GLuint shader);
-GLAPI GLuint APIENTRY glCreateProgram (void);
-GLAPI GLuint APIENTRY glCreateShader (GLenum type);
-GLAPI void APIENTRY glDeleteProgram (GLuint program);
-GLAPI void APIENTRY glDeleteShader (GLuint shader);
-GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);
-GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);
-GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);
-GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
-GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
-GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
-GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
-GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
-GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
-GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params);
-GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
-GLAPI GLboolean APIENTRY glIsProgram (GLuint program);
-GLAPI GLboolean APIENTRY glIsShader (GLuint shader);
-GLAPI void APIENTRY glLinkProgram (GLuint program);
-GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-GLAPI void APIENTRY glUseProgram (GLuint program);
-GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0);
-GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
-GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GLAPI void APIENTRY glUniform1i (GLint location, GLint v0);
-GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
-GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
-GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glValidateProgram (GLuint program);
-GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x);
-GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
-GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x);
-GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y);
-GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
-GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y);
-GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z);
-GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v);
-GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v);
-GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v);
-GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v);
-GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v);
-GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v);
-GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v);
-GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v);
-GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v);
-GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v);
-GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-#endif
-#endif /* GL_VERSION_2_0 */
-
-#ifndef GL_VERSION_2_1
-#define GL_VERSION_2_1 1
-#define GL_PIXEL_PACK_BUFFER              0x88EB
-#define GL_PIXEL_UNPACK_BUFFER            0x88EC
-#define GL_PIXEL_PACK_BUFFER_BINDING      0x88ED
-#define GL_PIXEL_UNPACK_BUFFER_BINDING    0x88EF
-#define GL_FLOAT_MAT2x3                   0x8B65
-#define GL_FLOAT_MAT2x4                   0x8B66
-#define GL_FLOAT_MAT3x2                   0x8B67
-#define GL_FLOAT_MAT3x4                   0x8B68
-#define GL_FLOAT_MAT4x2                   0x8B69
-#define GL_FLOAT_MAT4x3                   0x8B6A
-#define GL_SRGB                           0x8C40
-#define GL_SRGB8                          0x8C41
-#define GL_SRGB_ALPHA                     0x8C42
-#define GL_SRGB8_ALPHA8                   0x8C43
-#define GL_COMPRESSED_SRGB                0x8C48
-#define GL_COMPRESSED_SRGB_ALPHA          0x8C49
-#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
-#define GL_SLUMINANCE_ALPHA               0x8C44
-#define GL_SLUMINANCE8_ALPHA8             0x8C45
-#define GL_SLUMINANCE                     0x8C46
-#define GL_SLUMINANCE8                    0x8C47
-#define GL_COMPRESSED_SLUMINANCE          0x8C4A
-#define GL_COMPRESSED_SLUMINANCE_ALPHA    0x8C4B
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-#endif
-#endif /* GL_VERSION_2_1 */
-
-#ifndef GL_VERSION_3_0
-#define GL_VERSION_3_0 1
-typedef unsigned short GLhalf;
-#define GL_COMPARE_REF_TO_TEXTURE         0x884E
-#define GL_CLIP_DISTANCE0                 0x3000
-#define GL_CLIP_DISTANCE1                 0x3001
-#define GL_CLIP_DISTANCE2                 0x3002
-#define GL_CLIP_DISTANCE3                 0x3003
-#define GL_CLIP_DISTANCE4                 0x3004
-#define GL_CLIP_DISTANCE5                 0x3005
-#define GL_CLIP_DISTANCE6                 0x3006
-#define GL_CLIP_DISTANCE7                 0x3007
-#define GL_MAX_CLIP_DISTANCES             0x0D32
-#define GL_MAJOR_VERSION                  0x821B
-#define GL_MINOR_VERSION                  0x821C
-#define GL_NUM_EXTENSIONS                 0x821D
-#define GL_CONTEXT_FLAGS                  0x821E
-#define GL_COMPRESSED_RED                 0x8225
-#define GL_COMPRESSED_RG                  0x8226
-#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
-#define GL_RGBA32F                        0x8814
-#define GL_RGB32F                         0x8815
-#define GL_RGBA16F                        0x881A
-#define GL_RGB16F                         0x881B
-#define GL_VERTEX_ATTRIB_ARRAY_INTEGER    0x88FD
-#define GL_MAX_ARRAY_TEXTURE_LAYERS       0x88FF
-#define GL_MIN_PROGRAM_TEXEL_OFFSET       0x8904
-#define GL_MAX_PROGRAM_TEXEL_OFFSET       0x8905
-#define GL_CLAMP_READ_COLOR               0x891C
-#define GL_FIXED_ONLY                     0x891D
-#define GL_MAX_VARYING_COMPONENTS         0x8B4B
-#define GL_TEXTURE_1D_ARRAY               0x8C18
-#define GL_PROXY_TEXTURE_1D_ARRAY         0x8C19
-#define GL_TEXTURE_2D_ARRAY               0x8C1A
-#define GL_PROXY_TEXTURE_2D_ARRAY         0x8C1B
-#define GL_TEXTURE_BINDING_1D_ARRAY       0x8C1C
-#define GL_TEXTURE_BINDING_2D_ARRAY       0x8C1D
-#define GL_R11F_G11F_B10F                 0x8C3A
-#define GL_UNSIGNED_INT_10F_11F_11F_REV   0x8C3B
-#define GL_RGB9_E5                        0x8C3D
-#define GL_UNSIGNED_INT_5_9_9_9_REV       0x8C3E
-#define GL_TEXTURE_SHARED_SIZE            0x8C3F
-#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
-#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
-#define GL_TRANSFORM_FEEDBACK_VARYINGS    0x8C83
-#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
-#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
-#define GL_PRIMITIVES_GENERATED           0x8C87
-#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
-#define GL_RASTERIZER_DISCARD             0x8C89
-#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
-#define GL_INTERLEAVED_ATTRIBS            0x8C8C
-#define GL_SEPARATE_ATTRIBS               0x8C8D
-#define GL_TRANSFORM_FEEDBACK_BUFFER      0x8C8E
-#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
-#define GL_RGBA32UI                       0x8D70
-#define GL_RGB32UI                        0x8D71
-#define GL_RGBA16UI                       0x8D76
-#define GL_RGB16UI                        0x8D77
-#define GL_RGBA8UI                        0x8D7C
-#define GL_RGB8UI                         0x8D7D
-#define GL_RGBA32I                        0x8D82
-#define GL_RGB32I                         0x8D83
-#define GL_RGBA16I                        0x8D88
-#define GL_RGB16I                         0x8D89
-#define GL_RGBA8I                         0x8D8E
-#define GL_RGB8I                          0x8D8F
-#define GL_RED_INTEGER                    0x8D94
-#define GL_GREEN_INTEGER                  0x8D95
-#define GL_BLUE_INTEGER                   0x8D96
-#define GL_RGB_INTEGER                    0x8D98
-#define GL_RGBA_INTEGER                   0x8D99
-#define GL_BGR_INTEGER                    0x8D9A
-#define GL_BGRA_INTEGER                   0x8D9B
-#define GL_SAMPLER_1D_ARRAY               0x8DC0
-#define GL_SAMPLER_2D_ARRAY               0x8DC1
-#define GL_SAMPLER_1D_ARRAY_SHADOW        0x8DC3
-#define GL_SAMPLER_2D_ARRAY_SHADOW        0x8DC4
-#define GL_SAMPLER_CUBE_SHADOW            0x8DC5
-#define GL_UNSIGNED_INT_VEC2              0x8DC6
-#define GL_UNSIGNED_INT_VEC3              0x8DC7
-#define GL_UNSIGNED_INT_VEC4              0x8DC8
-#define GL_INT_SAMPLER_1D                 0x8DC9
-#define GL_INT_SAMPLER_2D                 0x8DCA
-#define GL_INT_SAMPLER_3D                 0x8DCB
-#define GL_INT_SAMPLER_CUBE               0x8DCC
-#define GL_INT_SAMPLER_1D_ARRAY           0x8DCE
-#define GL_INT_SAMPLER_2D_ARRAY           0x8DCF
-#define GL_UNSIGNED_INT_SAMPLER_1D        0x8DD1
-#define GL_UNSIGNED_INT_SAMPLER_2D        0x8DD2
-#define GL_UNSIGNED_INT_SAMPLER_3D        0x8DD3
-#define GL_UNSIGNED_INT_SAMPLER_CUBE      0x8DD4
-#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY  0x8DD6
-#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY  0x8DD7
-#define GL_QUERY_WAIT                     0x8E13
-#define GL_QUERY_NO_WAIT                  0x8E14
-#define GL_QUERY_BY_REGION_WAIT           0x8E15
-#define GL_QUERY_BY_REGION_NO_WAIT        0x8E16
-#define GL_BUFFER_ACCESS_FLAGS            0x911F
-#define GL_BUFFER_MAP_LENGTH              0x9120
-#define GL_BUFFER_MAP_OFFSET              0x9121
-#define GL_DEPTH_COMPONENT32F             0x8CAC
-#define GL_DEPTH32F_STENCIL8              0x8CAD
-#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
-#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
-#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
-#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
-#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
-#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
-#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
-#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
-#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
-#define GL_FRAMEBUFFER_DEFAULT            0x8218
-#define GL_FRAMEBUFFER_UNDEFINED          0x8219
-#define GL_DEPTH_STENCIL_ATTACHMENT       0x821A
-#define GL_MAX_RENDERBUFFER_SIZE          0x84E8
-#define GL_DEPTH_STENCIL                  0x84F9
-#define GL_UNSIGNED_INT_24_8              0x84FA
-#define GL_DEPTH24_STENCIL8               0x88F0
-#define GL_TEXTURE_STENCIL_SIZE           0x88F1
-#define GL_TEXTURE_RED_TYPE               0x8C10
-#define GL_TEXTURE_GREEN_TYPE             0x8C11
-#define GL_TEXTURE_BLUE_TYPE              0x8C12
-#define GL_TEXTURE_ALPHA_TYPE             0x8C13
-#define GL_TEXTURE_DEPTH_TYPE             0x8C16
-#define GL_UNSIGNED_NORMALIZED            0x8C17
-#define GL_FRAMEBUFFER_BINDING            0x8CA6
-#define GL_DRAW_FRAMEBUFFER_BINDING       0x8CA6
-#define GL_RENDERBUFFER_BINDING           0x8CA7
-#define GL_READ_FRAMEBUFFER               0x8CA8
-#define GL_DRAW_FRAMEBUFFER               0x8CA9
-#define GL_READ_FRAMEBUFFER_BINDING       0x8CAA
-#define GL_RENDERBUFFER_SAMPLES           0x8CAB
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
-#define GL_FRAMEBUFFER_COMPLETE           0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
-#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
-#define GL_FRAMEBUFFER_UNSUPPORTED        0x8CDD
-#define GL_MAX_COLOR_ATTACHMENTS          0x8CDF
-#define GL_COLOR_ATTACHMENT0              0x8CE0
-#define GL_COLOR_ATTACHMENT1              0x8CE1
-#define GL_COLOR_ATTACHMENT2              0x8CE2
-#define GL_COLOR_ATTACHMENT3              0x8CE3
-#define GL_COLOR_ATTACHMENT4              0x8CE4
-#define GL_COLOR_ATTACHMENT5              0x8CE5
-#define GL_COLOR_ATTACHMENT6              0x8CE6
-#define GL_COLOR_ATTACHMENT7              0x8CE7
-#define GL_COLOR_ATTACHMENT8              0x8CE8
-#define GL_COLOR_ATTACHMENT9              0x8CE9
-#define GL_COLOR_ATTACHMENT10             0x8CEA
-#define GL_COLOR_ATTACHMENT11             0x8CEB
-#define GL_COLOR_ATTACHMENT12             0x8CEC
-#define GL_COLOR_ATTACHMENT13             0x8CED
-#define GL_COLOR_ATTACHMENT14             0x8CEE
-#define GL_COLOR_ATTACHMENT15             0x8CEF
-#define GL_DEPTH_ATTACHMENT               0x8D00
-#define GL_STENCIL_ATTACHMENT             0x8D20
-#define GL_FRAMEBUFFER                    0x8D40
-#define GL_RENDERBUFFER                   0x8D41
-#define GL_RENDERBUFFER_WIDTH             0x8D42
-#define GL_RENDERBUFFER_HEIGHT            0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
-#define GL_STENCIL_INDEX1                 0x8D46
-#define GL_STENCIL_INDEX4                 0x8D47
-#define GL_STENCIL_INDEX8                 0x8D48
-#define GL_STENCIL_INDEX16                0x8D49
-#define GL_RENDERBUFFER_RED_SIZE          0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
-#define GL_MAX_SAMPLES                    0x8D57
-#define GL_INDEX                          0x8222
-#define GL_TEXTURE_LUMINANCE_TYPE         0x8C14
-#define GL_TEXTURE_INTENSITY_TYPE         0x8C15
-#define GL_FRAMEBUFFER_SRGB               0x8DB9
-#define GL_HALF_FLOAT                     0x140B
-#define GL_MAP_READ_BIT                   0x0001
-#define GL_MAP_WRITE_BIT                  0x0002
-#define GL_MAP_INVALIDATE_RANGE_BIT       0x0004
-#define GL_MAP_INVALIDATE_BUFFER_BIT      0x0008
-#define GL_MAP_FLUSH_EXPLICIT_BIT         0x0010
-#define GL_MAP_UNSYNCHRONIZED_BIT         0x0020
-#define GL_COMPRESSED_RED_RGTC1           0x8DBB
-#define GL_COMPRESSED_SIGNED_RED_RGTC1    0x8DBC
-#define GL_COMPRESSED_RG_RGTC2            0x8DBD
-#define GL_COMPRESSED_SIGNED_RG_RGTC2     0x8DBE
-#define GL_RG                             0x8227
-#define GL_RG_INTEGER                     0x8228
-#define GL_R8                             0x8229
-#define GL_R16                            0x822A
-#define GL_RG8                            0x822B
-#define GL_RG16                           0x822C
-#define GL_R16F                           0x822D
-#define GL_R32F                           0x822E
-#define GL_RG16F                          0x822F
-#define GL_RG32F                          0x8230
-#define GL_R8I                            0x8231
-#define GL_R8UI                           0x8232
-#define GL_R16I                           0x8233
-#define GL_R16UI                          0x8234
-#define GL_R32I                           0x8235
-#define GL_R32UI                          0x8236
-#define GL_RG8I                           0x8237
-#define GL_RG8UI                          0x8238
-#define GL_RG16I                          0x8239
-#define GL_RG16UI                         0x823A
-#define GL_RG32I                          0x823B
-#define GL_RG32UI                         0x823C
-#define GL_VERTEX_ARRAY_BINDING           0x85B5
-#define GL_CLAMP_VERTEX_COLOR             0x891A
-#define GL_CLAMP_FRAGMENT_COLOR           0x891B
-#define GL_ALPHA_INTEGER                  0x8D97
-typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);
-typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
-typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index);
-typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index);
-typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index);
-typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
-typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);
-typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
-typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
-typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
-typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v);
-typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);
-typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);
-typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);
-typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);
-typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);
-typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
-typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);
-typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params);
-typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);
-typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);
-typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);
-typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
-typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
-typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
-typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
-typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
-typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
-typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
-typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
-typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
-typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
-typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
-typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-typedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
-typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);
-typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
-typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
-typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);
-GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
-GLAPI void APIENTRY glEnablei (GLenum target, GLuint index);
-GLAPI void APIENTRY glDisablei (GLenum target, GLuint index);
-GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index);
-GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
-GLAPI void APIENTRY glEndTransformFeedback (void);
-GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
-GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp);
-GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode);
-GLAPI void APIENTRY glEndConditionalRender (void);
-GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
-GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x);
-GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y);
-GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z);
-GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
-GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x);
-GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y);
-GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z);
-GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v);
-GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v);
-GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v);
-GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
-GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v);
-GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v);
-GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v);
-GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
-GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v);
-GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v);
-GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v);
-GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
-GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name);
-GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
-GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0);
-GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
-GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
-GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params);
-GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params);
-GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
-GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
-GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
-GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
-GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index);
-GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
-GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
-GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer);
-GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
-GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
-GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target);
-GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGenerateMipmap (GLenum target);
-GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-GLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
-GLAPI void APIENTRY glBindVertexArray (GLuint array);
-GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
-GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
-GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);
-#endif
-#endif /* GL_VERSION_3_0 */
-
-#ifndef GL_VERSION_3_1
-#define GL_VERSION_3_1 1
-#define GL_SAMPLER_2D_RECT                0x8B63
-#define GL_SAMPLER_2D_RECT_SHADOW         0x8B64
-#define GL_SAMPLER_BUFFER                 0x8DC2
-#define GL_INT_SAMPLER_2D_RECT            0x8DCD
-#define GL_INT_SAMPLER_BUFFER             0x8DD0
-#define GL_UNSIGNED_INT_SAMPLER_2D_RECT   0x8DD5
-#define GL_UNSIGNED_INT_SAMPLER_BUFFER    0x8DD8
-#define GL_TEXTURE_BUFFER                 0x8C2A
-#define GL_MAX_TEXTURE_BUFFER_SIZE        0x8C2B
-#define GL_TEXTURE_BINDING_BUFFER         0x8C2C
-#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
-#define GL_TEXTURE_RECTANGLE              0x84F5
-#define GL_TEXTURE_BINDING_RECTANGLE      0x84F6
-#define GL_PROXY_TEXTURE_RECTANGLE        0x84F7
-#define GL_MAX_RECTANGLE_TEXTURE_SIZE     0x84F8
-#define GL_R8_SNORM                       0x8F94
-#define GL_RG8_SNORM                      0x8F95
-#define GL_RGB8_SNORM                     0x8F96
-#define GL_RGBA8_SNORM                    0x8F97
-#define GL_R16_SNORM                      0x8F98
-#define GL_RG16_SNORM                     0x8F99
-#define GL_RGB16_SNORM                    0x8F9A
-#define GL_RGBA16_SNORM                   0x8F9B
-#define GL_SIGNED_NORMALIZED              0x8F9C
-#define GL_PRIMITIVE_RESTART              0x8F9D
-#define GL_PRIMITIVE_RESTART_INDEX        0x8F9E
-#define GL_COPY_READ_BUFFER               0x8F36
-#define GL_COPY_WRITE_BUFFER              0x8F37
-#define GL_UNIFORM_BUFFER                 0x8A11
-#define GL_UNIFORM_BUFFER_BINDING         0x8A28
-#define GL_UNIFORM_BUFFER_START           0x8A29
-#define GL_UNIFORM_BUFFER_SIZE            0x8A2A
-#define GL_MAX_VERTEX_UNIFORM_BLOCKS      0x8A2B
-#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS    0x8A2D
-#define GL_MAX_COMBINED_UNIFORM_BLOCKS    0x8A2E
-#define GL_MAX_UNIFORM_BUFFER_BINDINGS    0x8A2F
-#define GL_MAX_UNIFORM_BLOCK_SIZE         0x8A30
-#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
-#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
-#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
-#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
-#define GL_ACTIVE_UNIFORM_BLOCKS          0x8A36
-#define GL_UNIFORM_TYPE                   0x8A37
-#define GL_UNIFORM_SIZE                   0x8A38
-#define GL_UNIFORM_NAME_LENGTH            0x8A39
-#define GL_UNIFORM_BLOCK_INDEX            0x8A3A
-#define GL_UNIFORM_OFFSET                 0x8A3B
-#define GL_UNIFORM_ARRAY_STRIDE           0x8A3C
-#define GL_UNIFORM_MATRIX_STRIDE          0x8A3D
-#define GL_UNIFORM_IS_ROW_MAJOR           0x8A3E
-#define GL_UNIFORM_BLOCK_BINDING          0x8A3F
-#define GL_UNIFORM_BLOCK_DATA_SIZE        0x8A40
-#define GL_UNIFORM_BLOCK_NAME_LENGTH      0x8A41
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS  0x8A42
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
-#define GL_INVALID_INDEX                  0xFFFFFFFFu
-typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
-typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
-typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);
-typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index);
-typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
-typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
-typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
-GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
-GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);
-GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index);
-GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
-GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
-GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
-GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
-GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-#endif
-#endif /* GL_VERSION_3_1 */
-
-#ifndef GL_VERSION_3_2
-#define GL_VERSION_3_2 1
-typedef struct __GLsync *GLsync;
-#ifndef GLEXT_64_TYPES_DEFINED
-/* This code block is duplicated in glxext.h, so must be protected */
-#define GLEXT_64_TYPES_DEFINED
-/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
-/* (as used in the GL_EXT_timer_query extension). */
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-#include <inttypes.h>
-#elif defined(__sun__) || defined(__digital__)
-#include <inttypes.h>
-#if defined(__STDC__)
-#if defined(__arch64__) || defined(_LP64)
-typedef long int int64_t;
-typedef unsigned long int uint64_t;
-#else
-typedef long long int int64_t;
-typedef unsigned long long int uint64_t;
-#endif /* __arch64__ */
-#endif /* __STDC__ */
-#elif defined( __VMS ) || defined(__sgi)
-#include <inttypes.h>
-#elif defined(__SCO__) || defined(__USLC__)
-#include <stdint.h>
-#elif defined(__UNIXOS2__) || defined(__SOL64__)
-typedef long int int32_t;
-typedef long long int int64_t;
-typedef unsigned long long int uint64_t;
-#elif defined(_WIN32) && defined(__GNUC__)
-#include <stdint.h>
-#elif defined(_WIN32)
-typedef __int32 int32_t;
-typedef __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-#else
-/* Fallback if nothing above works */
-#include <inttypes.h>
-#endif
-#endif
-typedef uint64_t GLuint64;
-typedef int64_t GLint64;
-#define GL_CONTEXT_CORE_PROFILE_BIT       0x00000001
-#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
-#define GL_LINES_ADJACENCY                0x000A
-#define GL_LINE_STRIP_ADJACENCY           0x000B
-#define GL_TRIANGLES_ADJACENCY            0x000C
-#define GL_TRIANGLE_STRIP_ADJACENCY       0x000D
-#define GL_PROGRAM_POINT_SIZE             0x8642
-#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29
-#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7
-#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
-#define GL_GEOMETRY_SHADER                0x8DD9
-#define GL_GEOMETRY_VERTICES_OUT          0x8916
-#define GL_GEOMETRY_INPUT_TYPE            0x8917
-#define GL_GEOMETRY_OUTPUT_TYPE           0x8918
-#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF
-#define GL_MAX_GEOMETRY_OUTPUT_VERTICES   0x8DE0
-#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1
-#define GL_MAX_VERTEX_OUTPUT_COMPONENTS   0x9122
-#define GL_MAX_GEOMETRY_INPUT_COMPONENTS  0x9123
-#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124
-#define GL_MAX_FRAGMENT_INPUT_COMPONENTS  0x9125
-#define GL_CONTEXT_PROFILE_MASK           0x9126
-#define GL_DEPTH_CLAMP                    0x864F
-#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C
-#define GL_FIRST_VERTEX_CONVENTION        0x8E4D
-#define GL_LAST_VERTEX_CONVENTION         0x8E4E
-#define GL_PROVOKING_VERTEX               0x8E4F
-#define GL_TEXTURE_CUBE_MAP_SEAMLESS      0x884F
-#define GL_MAX_SERVER_WAIT_TIMEOUT        0x9111
-#define GL_OBJECT_TYPE                    0x9112
-#define GL_SYNC_CONDITION                 0x9113
-#define GL_SYNC_STATUS                    0x9114
-#define GL_SYNC_FLAGS                     0x9115
-#define GL_SYNC_FENCE                     0x9116
-#define GL_SYNC_GPU_COMMANDS_COMPLETE     0x9117
-#define GL_UNSIGNALED                     0x9118
-#define GL_SIGNALED                       0x9119
-#define GL_ALREADY_SIGNALED               0x911A
-#define GL_TIMEOUT_EXPIRED                0x911B
-#define GL_CONDITION_SATISFIED            0x911C
-#define GL_WAIT_FAILED                    0x911D
-#define GL_TIMEOUT_IGNORED                0xFFFFFFFFFFFFFFFFull
-#define GL_SYNC_FLUSH_COMMANDS_BIT        0x00000001
-#define GL_SAMPLE_POSITION                0x8E50
-#define GL_SAMPLE_MASK                    0x8E51
-#define GL_SAMPLE_MASK_VALUE              0x8E52
-#define GL_MAX_SAMPLE_MASK_WORDS          0x8E59
-#define GL_TEXTURE_2D_MULTISAMPLE         0x9100
-#define GL_PROXY_TEXTURE_2D_MULTISAMPLE   0x9101
-#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY   0x9102
-#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
-#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
-#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
-#define GL_TEXTURE_SAMPLES                0x9106
-#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
-#define GL_SAMPLER_2D_MULTISAMPLE         0x9108
-#define GL_INT_SAMPLER_2D_MULTISAMPLE     0x9109
-#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
-#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY   0x910B
-#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
-#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
-#define GL_MAX_COLOR_TEXTURE_SAMPLES      0x910E
-#define GL_MAX_DEPTH_TEXTURE_SAMPLES      0x910F
-#define GL_MAX_INTEGER_SAMPLES            0x9110
-typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
-typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
-typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode);
-typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);
-typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync);
-typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync);
-typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data);
-typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
-typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
-typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);
-typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
-GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
-GLAPI void APIENTRY glProvokingVertex (GLenum mode);
-GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
-GLAPI GLboolean APIENTRY glIsSync (GLsync sync);
-GLAPI void APIENTRY glDeleteSync (GLsync sync);
-GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);
-GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
-GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
-GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level);
-GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
-GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);
-#endif
-#endif /* GL_VERSION_3_2 */
-
-#ifndef GL_VERSION_3_3
-#define GL_VERSION_3_3 1
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR    0x88FE
-#define GL_SRC1_COLOR                     0x88F9
-#define GL_ONE_MINUS_SRC1_COLOR           0x88FA
-#define GL_ONE_MINUS_SRC1_ALPHA           0x88FB
-#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS   0x88FC
-#define GL_ANY_SAMPLES_PASSED             0x8C2F
-#define GL_SAMPLER_BINDING                0x8919
-#define GL_RGB10_A2UI                     0x906F
-#define GL_TEXTURE_SWIZZLE_R              0x8E42
-#define GL_TEXTURE_SWIZZLE_G              0x8E43
-#define GL_TEXTURE_SWIZZLE_B              0x8E44
-#define GL_TEXTURE_SWIZZLE_A              0x8E45
-#define GL_TEXTURE_SWIZZLE_RGBA           0x8E46
-#define GL_TIME_ELAPSED                   0x88BF
-#define GL_TIMESTAMP                      0x8E28
-#define GL_INT_2_10_10_10_REV             0x8D9F
-typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
-typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name);
-typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
-typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);
-typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler);
-typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
-typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
-typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);
-typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
-typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param);
-typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);
-typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value);
-typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value);
-typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value);
-typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value);
-typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value);
-typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value);
-typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords);
-typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords);
-typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords);
-typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords);
-typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords);
-typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords);
-typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords);
-typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
-typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords);
-typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords);
-typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color);
-typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color);
-typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color);
-typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color);
-typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color);
-typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
-GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name);
-GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
-GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
-GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler);
-GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);
-GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
-GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
-GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
-GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param);
-GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param);
-GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params);
-GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target);
-GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params);
-GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params);
-GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
-GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value);
-GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value);
-GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value);
-GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value);
-GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value);
-GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value);
-GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords);
-GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords);
-GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords);
-GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords);
-GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords);
-GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords);
-GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords);
-GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords);
-GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords);
-GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords);
-GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords);
-GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords);
-GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords);
-GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords);
-GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords);
-GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords);
-GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords);
-GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords);
-GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color);
-GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color);
-GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color);
-GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color);
-GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color);
-GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color);
-#endif
-#endif /* GL_VERSION_3_3 */
-
-#ifndef GL_VERSION_4_0
-#define GL_VERSION_4_0 1
-#define GL_SAMPLE_SHADING                 0x8C36
-#define GL_MIN_SAMPLE_SHADING_VALUE       0x8C37
-#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
-#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
-#define GL_TEXTURE_CUBE_MAP_ARRAY         0x9009
-#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A
-#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY   0x900B
-#define GL_SAMPLER_CUBE_MAP_ARRAY         0x900C
-#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW  0x900D
-#define GL_INT_SAMPLER_CUBE_MAP_ARRAY     0x900E
-#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F
-#define GL_DRAW_INDIRECT_BUFFER           0x8F3F
-#define GL_DRAW_INDIRECT_BUFFER_BINDING   0x8F43
-#define GL_GEOMETRY_SHADER_INVOCATIONS    0x887F
-#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A
-#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B
-#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C
-#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D
-#define GL_MAX_VERTEX_STREAMS             0x8E71
-#define GL_DOUBLE_VEC2                    0x8FFC
-#define GL_DOUBLE_VEC3                    0x8FFD
-#define GL_DOUBLE_VEC4                    0x8FFE
-#define GL_DOUBLE_MAT2                    0x8F46
-#define GL_DOUBLE_MAT3                    0x8F47
-#define GL_DOUBLE_MAT4                    0x8F48
-#define GL_DOUBLE_MAT2x3                  0x8F49
-#define GL_DOUBLE_MAT2x4                  0x8F4A
-#define GL_DOUBLE_MAT3x2                  0x8F4B
-#define GL_DOUBLE_MAT3x4                  0x8F4C
-#define GL_DOUBLE_MAT4x2                  0x8F4D
-#define GL_DOUBLE_MAT4x3                  0x8F4E
-#define GL_ACTIVE_SUBROUTINES             0x8DE5
-#define GL_ACTIVE_SUBROUTINE_UNIFORMS     0x8DE6
-#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47
-#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH   0x8E48
-#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49
-#define GL_MAX_SUBROUTINES                0x8DE7
-#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8
-#define GL_NUM_COMPATIBLE_SUBROUTINES     0x8E4A
-#define GL_COMPATIBLE_SUBROUTINES         0x8E4B
-#define GL_PATCHES                        0x000E
-#define GL_PATCH_VERTICES                 0x8E72
-#define GL_PATCH_DEFAULT_INNER_LEVEL      0x8E73
-#define GL_PATCH_DEFAULT_OUTER_LEVEL      0x8E74
-#define GL_TESS_CONTROL_OUTPUT_VERTICES   0x8E75
-#define GL_TESS_GEN_MODE                  0x8E76
-#define GL_TESS_GEN_SPACING               0x8E77
-#define GL_TESS_GEN_VERTEX_ORDER          0x8E78
-#define GL_TESS_GEN_POINT_MODE            0x8E79
-#define GL_ISOLINES                       0x8E7A
-#define GL_FRACTIONAL_ODD                 0x8E7B
-#define GL_FRACTIONAL_EVEN                0x8E7C
-#define GL_MAX_PATCH_VERTICES             0x8E7D
-#define GL_MAX_TESS_GEN_LEVEL             0x8E7E
-#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F
-#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80
-#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81
-#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82
-#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83
-#define GL_MAX_TESS_PATCH_COMPONENTS      0x8E84
-#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85
-#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86
-#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89
-#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A
-#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C
-#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D
-#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E
-#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1
-#define GL_TESS_EVALUATION_SHADER         0x8E87
-#define GL_TESS_CONTROL_SHADER            0x8E88
-#define GL_TRANSFORM_FEEDBACK             0x8E22
-#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23
-#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24
-#define GL_TRANSFORM_FEEDBACK_BINDING     0x8E25
-#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70
-typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value);
-typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode);
-typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst);
-typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect);
-typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect);
-typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x);
-typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y);
-typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value);
-typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value);
-typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value);
-typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params);
-typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name);
-typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name);
-typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
-typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
-typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
-typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices);
-typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
-typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value);
-typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values);
-typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);
-typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids);
-typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
-typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);
-typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);
-typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);
-typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id);
-typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream);
-typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id);
-typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index);
-typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMinSampleShading (GLfloat value);
-GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode);
-GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst);
-GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);
-GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect);
-GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x);
-GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y);
-GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value);
-GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value);
-GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value);
-GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value);
-GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params);
-GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name);
-GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name);
-GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
-GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
-GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
-GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices);
-GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params);
-GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
-GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value);
-GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values);
-GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
-GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
-GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
-GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id);
-GLAPI void APIENTRY glPauseTransformFeedback (void);
-GLAPI void APIENTRY glResumeTransformFeedback (void);
-GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id);
-GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream);
-GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id);
-GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index);
-GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params);
-#endif
-#endif /* GL_VERSION_4_0 */
-
-#ifndef GL_VERSION_4_1
-#define GL_VERSION_4_1 1
-#define GL_FIXED                          0x140C
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-#define GL_LOW_FLOAT                      0x8DF0
-#define GL_MEDIUM_FLOAT                   0x8DF1
-#define GL_HIGH_FLOAT                     0x8DF2
-#define GL_LOW_INT                        0x8DF3
-#define GL_MEDIUM_INT                     0x8DF4
-#define GL_HIGH_INT                       0x8DF5
-#define GL_SHADER_COMPILER                0x8DFA
-#define GL_SHADER_BINARY_FORMATS          0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9
-#define GL_MAX_VERTEX_UNIFORM_VECTORS     0x8DFB
-#define GL_MAX_VARYING_VECTORS            0x8DFC
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS   0x8DFD
-#define GL_RGB565                         0x8D62
-#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
-#define GL_PROGRAM_BINARY_LENGTH          0x8741
-#define GL_NUM_PROGRAM_BINARY_FORMATS     0x87FE
-#define GL_PROGRAM_BINARY_FORMATS         0x87FF
-#define GL_VERTEX_SHADER_BIT              0x00000001
-#define GL_FRAGMENT_SHADER_BIT            0x00000002
-#define GL_GEOMETRY_SHADER_BIT            0x00000004
-#define GL_TESS_CONTROL_SHADER_BIT        0x00000008
-#define GL_TESS_EVALUATION_SHADER_BIT     0x00000010
-#define GL_ALL_SHADER_BITS                0xFFFFFFFF
-#define GL_PROGRAM_SEPARABLE              0x8258
-#define GL_ACTIVE_PROGRAM                 0x8259
-#define GL_PROGRAM_PIPELINE_BINDING       0x825A
-#define GL_MAX_VIEWPORTS                  0x825B
-#define GL_VIEWPORT_SUBPIXEL_BITS         0x825C
-#define GL_VIEWPORT_BOUNDS_RANGE          0x825D
-#define GL_LAYER_PROVOKING_VERTEX         0x825E
-#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F
-#define GL_UNDEFINED_VERTEX               0x8260
-typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
-typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
-typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
-typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
-typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
-typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
-typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);
-typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
-typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program);
-typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings);
-typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline);
-typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines);
-typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
-typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline);
-typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
-typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params);
-typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
-typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v);
-typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v);
-typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f);
-typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);
-typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glReleaseShaderCompiler (void);
-GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
-GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
-GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f);
-GLAPI void APIENTRY glClearDepthf (GLfloat d);
-GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
-GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
-GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);
-GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);
-GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);
-GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline);
-GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);
-GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);
-GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline);
-GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);
-GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);
-GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);
-GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0);
-GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);
-GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);
-GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1);
-GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);
-GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
-GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
-GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline);
-GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x);
-GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y);
-GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params);
-GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v);
-GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
-GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v);
-GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v);
-GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v);
-GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f);
-GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data);
-GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data);
-#endif
-#endif /* GL_VERSION_4_1 */
-
-#ifndef GL_VERSION_4_2
-#define GL_VERSION_4_2 1
-#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH  0x9127
-#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128
-#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH  0x9129
-#define GL_UNPACK_COMPRESSED_BLOCK_SIZE   0x912A
-#define GL_PACK_COMPRESSED_BLOCK_WIDTH    0x912B
-#define GL_PACK_COMPRESSED_BLOCK_HEIGHT   0x912C
-#define GL_PACK_COMPRESSED_BLOCK_DEPTH    0x912D
-#define GL_PACK_COMPRESSED_BLOCK_SIZE     0x912E
-#define GL_NUM_SAMPLE_COUNTS              0x9380
-#define GL_MIN_MAP_BUFFER_ALIGNMENT       0x90BC
-#define GL_ATOMIC_COUNTER_BUFFER          0x92C0
-#define GL_ATOMIC_COUNTER_BUFFER_BINDING  0x92C1
-#define GL_ATOMIC_COUNTER_BUFFER_START    0x92C2
-#define GL_ATOMIC_COUNTER_BUFFER_SIZE     0x92C3
-#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4
-#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5
-#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6
-#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7
-#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8
-#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9
-#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA
-#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB
-#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
-#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD
-#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE
-#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF
-#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0
-#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1
-#define GL_MAX_VERTEX_ATOMIC_COUNTERS     0x92D2
-#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3
-#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4
-#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS   0x92D5
-#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS   0x92D6
-#define GL_MAX_COMBINED_ATOMIC_COUNTERS   0x92D7
-#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8
-#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC
-#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS  0x92D9
-#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA
-#define GL_UNSIGNED_INT_ATOMIC_COUNTER    0x92DB
-#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
-#define GL_ELEMENT_ARRAY_BARRIER_BIT      0x00000002
-#define GL_UNIFORM_BARRIER_BIT            0x00000004
-#define GL_TEXTURE_FETCH_BARRIER_BIT      0x00000008
-#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
-#define GL_COMMAND_BARRIER_BIT            0x00000040
-#define GL_PIXEL_BUFFER_BARRIER_BIT       0x00000080
-#define GL_TEXTURE_UPDATE_BARRIER_BIT     0x00000100
-#define GL_BUFFER_UPDATE_BARRIER_BIT      0x00000200
-#define GL_FRAMEBUFFER_BARRIER_BIT        0x00000400
-#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
-#define GL_ATOMIC_COUNTER_BARRIER_BIT     0x00001000
-#define GL_ALL_BARRIER_BITS               0xFFFFFFFF
-#define GL_MAX_IMAGE_UNITS                0x8F38
-#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
-#define GL_IMAGE_BINDING_NAME             0x8F3A
-#define GL_IMAGE_BINDING_LEVEL            0x8F3B
-#define GL_IMAGE_BINDING_LAYERED          0x8F3C
-#define GL_IMAGE_BINDING_LAYER            0x8F3D
-#define GL_IMAGE_BINDING_ACCESS           0x8F3E
-#define GL_IMAGE_1D                       0x904C
-#define GL_IMAGE_2D                       0x904D
-#define GL_IMAGE_3D                       0x904E
-#define GL_IMAGE_2D_RECT                  0x904F
-#define GL_IMAGE_CUBE                     0x9050
-#define GL_IMAGE_BUFFER                   0x9051
-#define GL_IMAGE_1D_ARRAY                 0x9052
-#define GL_IMAGE_2D_ARRAY                 0x9053
-#define GL_IMAGE_CUBE_MAP_ARRAY           0x9054
-#define GL_IMAGE_2D_MULTISAMPLE           0x9055
-#define GL_IMAGE_2D_MULTISAMPLE_ARRAY     0x9056
-#define GL_INT_IMAGE_1D                   0x9057
-#define GL_INT_IMAGE_2D                   0x9058
-#define GL_INT_IMAGE_3D                   0x9059
-#define GL_INT_IMAGE_2D_RECT              0x905A
-#define GL_INT_IMAGE_CUBE                 0x905B
-#define GL_INT_IMAGE_BUFFER               0x905C
-#define GL_INT_IMAGE_1D_ARRAY             0x905D
-#define GL_INT_IMAGE_2D_ARRAY             0x905E
-#define GL_INT_IMAGE_CUBE_MAP_ARRAY       0x905F
-#define GL_INT_IMAGE_2D_MULTISAMPLE       0x9060
-#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
-#define GL_UNSIGNED_INT_IMAGE_1D          0x9062
-#define GL_UNSIGNED_INT_IMAGE_2D          0x9063
-#define GL_UNSIGNED_INT_IMAGE_3D          0x9064
-#define GL_UNSIGNED_INT_IMAGE_2D_RECT     0x9065
-#define GL_UNSIGNED_INT_IMAGE_CUBE        0x9066
-#define GL_UNSIGNED_INT_IMAGE_BUFFER      0x9067
-#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY    0x9068
-#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY    0x9069
-#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
-#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
-#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
-#define GL_MAX_IMAGE_SAMPLES              0x906D
-#define GL_IMAGE_BINDING_FORMAT           0x906E
-#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
-#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
-#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
-#define GL_MAX_VERTEX_IMAGE_UNIFORMS      0x90CA
-#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
-#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
-#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS    0x90CD
-#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS    0x90CE
-#define GL_MAX_COMBINED_IMAGE_UNIFORMS    0x90CF
-#define GL_COMPRESSED_RGBA_BPTC_UNORM     0x8E8C
-#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
-#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
-#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
-#define GL_TEXTURE_IMMUTABLE_FORMAT       0x912F
-typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
-typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
-typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
-typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
-typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
-typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);
-typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount);
-typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
-GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
-GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
-GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
-GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
-GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
-GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers);
-GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount);
-GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
-#endif
-#endif /* GL_VERSION_4_2 */
-
-#ifndef GL_VERSION_4_3
-#define GL_VERSION_4_3 1
-typedef void (APIENTRY  *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-#define GL_NUM_SHADING_LANGUAGE_VERSIONS  0x82E9
-#define GL_VERTEX_ATTRIB_ARRAY_LONG       0x874E
-#define GL_COMPRESSED_RGB8_ETC2           0x9274
-#define GL_COMPRESSED_SRGB8_ETC2          0x9275
-#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
-#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
-#define GL_COMPRESSED_RGBA8_ETC2_EAC      0x9278
-#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
-#define GL_COMPRESSED_R11_EAC             0x9270
-#define GL_COMPRESSED_SIGNED_R11_EAC      0x9271
-#define GL_COMPRESSED_RG11_EAC            0x9272
-#define GL_COMPRESSED_SIGNED_RG11_EAC     0x9273
-#define GL_PRIMITIVE_RESTART_FIXED_INDEX  0x8D69
-#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
-#define GL_MAX_ELEMENT_INDEX              0x8D6B
-#define GL_COMPUTE_SHADER                 0x91B9
-#define GL_MAX_COMPUTE_UNIFORM_BLOCKS     0x91BB
-#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC
-#define GL_MAX_COMPUTE_IMAGE_UNIFORMS     0x91BD
-#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262
-#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263
-#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264
-#define GL_MAX_COMPUTE_ATOMIC_COUNTERS    0x8265
-#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266
-#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB
-#define GL_MAX_COMPUTE_WORK_GROUP_COUNT   0x91BE
-#define GL_MAX_COMPUTE_WORK_GROUP_SIZE    0x91BF
-#define GL_COMPUTE_WORK_GROUP_SIZE        0x8267
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC
-#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED
-#define GL_DISPATCH_INDIRECT_BUFFER       0x90EE
-#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
-#define GL_DEBUG_OUTPUT_SYNCHRONOUS       0x8242
-#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
-#define GL_DEBUG_CALLBACK_FUNCTION        0x8244
-#define GL_DEBUG_CALLBACK_USER_PARAM      0x8245
-#define GL_DEBUG_SOURCE_API               0x8246
-#define GL_DEBUG_SOURCE_WINDOW_SYSTEM     0x8247
-#define GL_DEBUG_SOURCE_SHADER_COMPILER   0x8248
-#define GL_DEBUG_SOURCE_THIRD_PARTY       0x8249
-#define GL_DEBUG_SOURCE_APPLICATION       0x824A
-#define GL_DEBUG_SOURCE_OTHER             0x824B
-#define GL_DEBUG_TYPE_ERROR               0x824C
-#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
-#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR  0x824E
-#define GL_DEBUG_TYPE_PORTABILITY         0x824F
-#define GL_DEBUG_TYPE_PERFORMANCE         0x8250
-#define GL_DEBUG_TYPE_OTHER               0x8251
-#define GL_MAX_DEBUG_MESSAGE_LENGTH       0x9143
-#define GL_MAX_DEBUG_LOGGED_MESSAGES      0x9144
-#define GL_DEBUG_LOGGED_MESSAGES          0x9145
-#define GL_DEBUG_SEVERITY_HIGH            0x9146
-#define GL_DEBUG_SEVERITY_MEDIUM          0x9147
-#define GL_DEBUG_SEVERITY_LOW             0x9148
-#define GL_DEBUG_TYPE_MARKER              0x8268
-#define GL_DEBUG_TYPE_PUSH_GROUP          0x8269
-#define GL_DEBUG_TYPE_POP_GROUP           0x826A
-#define GL_DEBUG_SEVERITY_NOTIFICATION    0x826B
-#define GL_MAX_DEBUG_GROUP_STACK_DEPTH    0x826C
-#define GL_DEBUG_GROUP_STACK_DEPTH        0x826D
-#define GL_BUFFER                         0x82E0
-#define GL_SHADER                         0x82E1
-#define GL_PROGRAM                        0x82E2
-#define GL_QUERY                          0x82E3
-#define GL_PROGRAM_PIPELINE               0x82E4
-#define GL_SAMPLER                        0x82E6
-#define GL_MAX_LABEL_LENGTH               0x82E8
-#define GL_DEBUG_OUTPUT                   0x92E0
-#define GL_CONTEXT_FLAG_DEBUG_BIT         0x00000002
-#define GL_MAX_UNIFORM_LOCATIONS          0x826E
-#define GL_FRAMEBUFFER_DEFAULT_WIDTH      0x9310
-#define GL_FRAMEBUFFER_DEFAULT_HEIGHT     0x9311
-#define GL_FRAMEBUFFER_DEFAULT_LAYERS     0x9312
-#define GL_FRAMEBUFFER_DEFAULT_SAMPLES    0x9313
-#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314
-#define GL_MAX_FRAMEBUFFER_WIDTH          0x9315
-#define GL_MAX_FRAMEBUFFER_HEIGHT         0x9316
-#define GL_MAX_FRAMEBUFFER_LAYERS         0x9317
-#define GL_MAX_FRAMEBUFFER_SAMPLES        0x9318
-#define GL_INTERNALFORMAT_SUPPORTED       0x826F
-#define GL_INTERNALFORMAT_PREFERRED       0x8270
-#define GL_INTERNALFORMAT_RED_SIZE        0x8271
-#define GL_INTERNALFORMAT_GREEN_SIZE      0x8272
-#define GL_INTERNALFORMAT_BLUE_SIZE       0x8273
-#define GL_INTERNALFORMAT_ALPHA_SIZE      0x8274
-#define GL_INTERNALFORMAT_DEPTH_SIZE      0x8275
-#define GL_INTERNALFORMAT_STENCIL_SIZE    0x8276
-#define GL_INTERNALFORMAT_SHARED_SIZE     0x8277
-#define GL_INTERNALFORMAT_RED_TYPE        0x8278
-#define GL_INTERNALFORMAT_GREEN_TYPE      0x8279
-#define GL_INTERNALFORMAT_BLUE_TYPE       0x827A
-#define GL_INTERNALFORMAT_ALPHA_TYPE      0x827B
-#define GL_INTERNALFORMAT_DEPTH_TYPE      0x827C
-#define GL_INTERNALFORMAT_STENCIL_TYPE    0x827D
-#define GL_MAX_WIDTH                      0x827E
-#define GL_MAX_HEIGHT                     0x827F
-#define GL_MAX_DEPTH                      0x8280
-#define GL_MAX_LAYERS                     0x8281
-#define GL_MAX_COMBINED_DIMENSIONS        0x8282
-#define GL_COLOR_COMPONENTS               0x8283
-#define GL_DEPTH_COMPONENTS               0x8284
-#define GL_STENCIL_COMPONENTS             0x8285
-#define GL_COLOR_RENDERABLE               0x8286
-#define GL_DEPTH_RENDERABLE               0x8287
-#define GL_STENCIL_RENDERABLE             0x8288
-#define GL_FRAMEBUFFER_RENDERABLE         0x8289
-#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A
-#define GL_FRAMEBUFFER_BLEND              0x828B
-#define GL_READ_PIXELS                    0x828C
-#define GL_READ_PIXELS_FORMAT             0x828D
-#define GL_READ_PIXELS_TYPE               0x828E
-#define GL_TEXTURE_IMAGE_FORMAT           0x828F
-#define GL_TEXTURE_IMAGE_TYPE             0x8290
-#define GL_GET_TEXTURE_IMAGE_FORMAT       0x8291
-#define GL_GET_TEXTURE_IMAGE_TYPE         0x8292
-#define GL_MIPMAP                         0x8293
-#define GL_MANUAL_GENERATE_MIPMAP         0x8294
-#define GL_AUTO_GENERATE_MIPMAP           0x8295
-#define GL_COLOR_ENCODING                 0x8296
-#define GL_SRGB_READ                      0x8297
-#define GL_SRGB_WRITE                     0x8298
-#define GL_FILTER                         0x829A
-#define GL_VERTEX_TEXTURE                 0x829B
-#define GL_TESS_CONTROL_TEXTURE           0x829C
-#define GL_TESS_EVALUATION_TEXTURE        0x829D
-#define GL_GEOMETRY_TEXTURE               0x829E
-#define GL_FRAGMENT_TEXTURE               0x829F
-#define GL_COMPUTE_TEXTURE                0x82A0
-#define GL_TEXTURE_SHADOW                 0x82A1
-#define GL_TEXTURE_GATHER                 0x82A2
-#define GL_TEXTURE_GATHER_SHADOW          0x82A3
-#define GL_SHADER_IMAGE_LOAD              0x82A4
-#define GL_SHADER_IMAGE_STORE             0x82A5
-#define GL_SHADER_IMAGE_ATOMIC            0x82A6
-#define GL_IMAGE_TEXEL_SIZE               0x82A7
-#define GL_IMAGE_COMPATIBILITY_CLASS      0x82A8
-#define GL_IMAGE_PIXEL_FORMAT             0x82A9
-#define GL_IMAGE_PIXEL_TYPE               0x82AA
-#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC
-#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD
-#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE
-#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF
-#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1
-#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2
-#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE  0x82B3
-#define GL_CLEAR_BUFFER                   0x82B4
-#define GL_TEXTURE_VIEW                   0x82B5
-#define GL_VIEW_COMPATIBILITY_CLASS       0x82B6
-#define GL_FULL_SUPPORT                   0x82B7
-#define GL_CAVEAT_SUPPORT                 0x82B8
-#define GL_IMAGE_CLASS_4_X_32             0x82B9
-#define GL_IMAGE_CLASS_2_X_32             0x82BA
-#define GL_IMAGE_CLASS_1_X_32             0x82BB
-#define GL_IMAGE_CLASS_4_X_16             0x82BC
-#define GL_IMAGE_CLASS_2_X_16             0x82BD
-#define GL_IMAGE_CLASS_1_X_16             0x82BE
-#define GL_IMAGE_CLASS_4_X_8              0x82BF
-#define GL_IMAGE_CLASS_2_X_8              0x82C0
-#define GL_IMAGE_CLASS_1_X_8              0x82C1
-#define GL_IMAGE_CLASS_11_11_10           0x82C2
-#define GL_IMAGE_CLASS_10_10_10_2         0x82C3
-#define GL_VIEW_CLASS_128_BITS            0x82C4
-#define GL_VIEW_CLASS_96_BITS             0x82C5
-#define GL_VIEW_CLASS_64_BITS             0x82C6
-#define GL_VIEW_CLASS_48_BITS             0x82C7
-#define GL_VIEW_CLASS_32_BITS             0x82C8
-#define GL_VIEW_CLASS_24_BITS             0x82C9
-#define GL_VIEW_CLASS_16_BITS             0x82CA
-#define GL_VIEW_CLASS_8_BITS              0x82CB
-#define GL_VIEW_CLASS_S3TC_DXT1_RGB       0x82CC
-#define GL_VIEW_CLASS_S3TC_DXT1_RGBA      0x82CD
-#define GL_VIEW_CLASS_S3TC_DXT3_RGBA      0x82CE
-#define GL_VIEW_CLASS_S3TC_DXT5_RGBA      0x82CF
-#define GL_VIEW_CLASS_RGTC1_RED           0x82D0
-#define GL_VIEW_CLASS_RGTC2_RG            0x82D1
-#define GL_VIEW_CLASS_BPTC_UNORM          0x82D2
-#define GL_VIEW_CLASS_BPTC_FLOAT          0x82D3
-#define GL_UNIFORM                        0x92E1
-#define GL_UNIFORM_BLOCK                  0x92E2
-#define GL_PROGRAM_INPUT                  0x92E3
-#define GL_PROGRAM_OUTPUT                 0x92E4
-#define GL_BUFFER_VARIABLE                0x92E5
-#define GL_SHADER_STORAGE_BLOCK           0x92E6
-#define GL_VERTEX_SUBROUTINE              0x92E8
-#define GL_TESS_CONTROL_SUBROUTINE        0x92E9
-#define GL_TESS_EVALUATION_SUBROUTINE     0x92EA
-#define GL_GEOMETRY_SUBROUTINE            0x92EB
-#define GL_FRAGMENT_SUBROUTINE            0x92EC
-#define GL_COMPUTE_SUBROUTINE             0x92ED
-#define GL_VERTEX_SUBROUTINE_UNIFORM      0x92EE
-#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF
-#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0
-#define GL_GEOMETRY_SUBROUTINE_UNIFORM    0x92F1
-#define GL_FRAGMENT_SUBROUTINE_UNIFORM    0x92F2
-#define GL_COMPUTE_SUBROUTINE_UNIFORM     0x92F3
-#define GL_TRANSFORM_FEEDBACK_VARYING     0x92F4
-#define GL_ACTIVE_RESOURCES               0x92F5
-#define GL_MAX_NAME_LENGTH                0x92F6
-#define GL_MAX_NUM_ACTIVE_VARIABLES       0x92F7
-#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8
-#define GL_NAME_LENGTH                    0x92F9
-#define GL_TYPE                           0x92FA
-#define GL_ARRAY_SIZE                     0x92FB
-#define GL_OFFSET                         0x92FC
-#define GL_BLOCK_INDEX                    0x92FD
-#define GL_ARRAY_STRIDE                   0x92FE
-#define GL_MATRIX_STRIDE                  0x92FF
-#define GL_IS_ROW_MAJOR                   0x9300
-#define GL_ATOMIC_COUNTER_BUFFER_INDEX    0x9301
-#define GL_BUFFER_BINDING                 0x9302
-#define GL_BUFFER_DATA_SIZE               0x9303
-#define GL_NUM_ACTIVE_VARIABLES           0x9304
-#define GL_ACTIVE_VARIABLES               0x9305
-#define GL_REFERENCED_BY_VERTEX_SHADER    0x9306
-#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307
-#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308
-#define GL_REFERENCED_BY_GEOMETRY_SHADER  0x9309
-#define GL_REFERENCED_BY_FRAGMENT_SHADER  0x930A
-#define GL_REFERENCED_BY_COMPUTE_SHADER   0x930B
-#define GL_TOP_LEVEL_ARRAY_SIZE           0x930C
-#define GL_TOP_LEVEL_ARRAY_STRIDE         0x930D
-#define GL_LOCATION                       0x930E
-#define GL_LOCATION_INDEX                 0x930F
-#define GL_IS_PER_PATCH                   0x92E7
-#define GL_SHADER_STORAGE_BUFFER          0x90D2
-#define GL_SHADER_STORAGE_BUFFER_BINDING  0x90D3
-#define GL_SHADER_STORAGE_BUFFER_START    0x90D4
-#define GL_SHADER_STORAGE_BUFFER_SIZE     0x90D5
-#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6
-#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7
-#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8
-#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9
-#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA
-#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB
-#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC
-#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD
-#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE  0x90DE
-#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF
-#define GL_SHADER_STORAGE_BARRIER_BIT     0x00002000
-#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39
-#define GL_DEPTH_STENCIL_TEXTURE_MODE     0x90EA
-#define GL_TEXTURE_BUFFER_OFFSET          0x919D
-#define GL_TEXTURE_BUFFER_SIZE            0x919E
-#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F
-#define GL_TEXTURE_VIEW_MIN_LEVEL         0x82DB
-#define GL_TEXTURE_VIEW_NUM_LEVELS        0x82DC
-#define GL_TEXTURE_VIEW_MIN_LAYER         0x82DD
-#define GL_TEXTURE_VIEW_NUM_LAYERS        0x82DE
-#define GL_TEXTURE_IMMUTABLE_LEVELS       0x82DF
-#define GL_VERTEX_ATTRIB_BINDING          0x82D4
-#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET  0x82D5
-#define GL_VERTEX_BINDING_DIVISOR         0x82D6
-#define GL_VERTEX_BINDING_OFFSET          0x82D7
-#define GL_VERTEX_BINDING_STRIDE          0x82D8
-#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
-#define GL_MAX_VERTEX_ATTRIB_BINDINGS     0x82DA
-#define GL_VERTEX_BINDING_BUFFER          0x8F4F
-#define GL_DISPLAY_LIST                   0x82E7
-typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
-typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
-typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
-typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect);
-typedef 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);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
-typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
-typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level);
-typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
-typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer);
-typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
-typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
-typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
-typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
-typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
-typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
-typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name);
-typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
-typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
-typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
-typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);
-typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);
-typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
-typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);
-typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);
-typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
-GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
-GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
-GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect);
-GLAPI 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);
-GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);
-GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
-GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
-GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level);
-GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length);
-GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer);
-GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
-GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
-GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
-GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);
-GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
-GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
-GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);
-GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name);
-GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
-GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
-GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);
-GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);
-GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);
-GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-GLAPI void APIENTRY glPopDebugGroup (void);
-GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);
-GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-#endif
-#endif /* GL_VERSION_4_3 */
-
-#ifndef GL_VERSION_4_4
-#define GL_VERSION_4_4 1
-#define GL_MAX_VERTEX_ATTRIB_STRIDE       0x82E5
-#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
-#define GL_TEXTURE_BUFFER_BINDING         0x8C2A
-#define GL_MAP_PERSISTENT_BIT             0x0040
-#define GL_MAP_COHERENT_BIT               0x0080
-#define GL_DYNAMIC_STORAGE_BIT            0x0100
-#define GL_CLIENT_STORAGE_BIT             0x0200
-#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000
-#define GL_BUFFER_IMMUTABLE_STORAGE       0x821F
-#define GL_BUFFER_STORAGE_FLAGS           0x8220
-#define GL_CLEAR_TEXTURE                  0x9365
-#define GL_LOCATION_COMPONENT             0x934A
-#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B
-#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C
-#define GL_QUERY_BUFFER                   0x9192
-#define GL_QUERY_BUFFER_BARRIER_BIT       0x00008000
-#define GL_QUERY_BUFFER_BINDING           0x9193
-#define GL_QUERY_RESULT_NO_WAIT           0x9194
-#define GL_MIRROR_CLAMP_TO_EDGE           0x8743
-typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
-typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
-typedef 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);
-typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
-typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
-typedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
-typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers);
-typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
-typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
-GLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
-GLAPI 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);
-GLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
-GLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
-GLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures);
-GLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers);
-GLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures);
-GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
-#endif
-#endif /* GL_VERSION_4_4 */
-
-#ifndef GL_ARB_ES2_compatibility
-#define GL_ARB_ES2_compatibility 1
-#endif /* GL_ARB_ES2_compatibility */
-
-#ifndef GL_ARB_ES3_compatibility
-#define GL_ARB_ES3_compatibility 1
-#endif /* GL_ARB_ES3_compatibility */
-
-#ifndef GL_ARB_arrays_of_arrays
-#define GL_ARB_arrays_of_arrays 1
-#endif /* GL_ARB_arrays_of_arrays */
-
-#ifndef GL_ARB_base_instance
-#define GL_ARB_base_instance 1
-#endif /* GL_ARB_base_instance */
-
-#ifndef GL_ARB_bindless_texture
-#define GL_ARB_bindless_texture 1
-typedef uint64_t GLuint64EXT;
-#define GL_UNSIGNED_INT64_ARB             0x140F
-typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture);
-typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler);
-typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
-typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle);
-typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
-typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access);
-typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle);
-typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value);
-typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
-typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
-typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture);
-GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler);
-GLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle);
-GLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle);
-GLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
-GLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access);
-GLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle);
-GLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value);
-GLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value);
-GLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value);
-GLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
-GLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle);
-GLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle);
-GLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x);
-GLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v);
-GLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params);
-#endif
-#endif /* GL_ARB_bindless_texture */
-
-#ifndef GL_ARB_blend_func_extended
-#define GL_ARB_blend_func_extended 1
-#endif /* GL_ARB_blend_func_extended */
-
-#ifndef GL_ARB_buffer_storage
-#define GL_ARB_buffer_storage 1
-#endif /* GL_ARB_buffer_storage */
-
-#ifndef GL_ARB_cl_event
-#define GL_ARB_cl_event 1
-struct _cl_context;
-struct _cl_event;
-#define GL_SYNC_CL_EVENT_ARB              0x8240
-#define GL_SYNC_CL_EVENT_COMPLETE_ARB     0x8241
-typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
-#endif
-#endif /* GL_ARB_cl_event */
-
-#ifndef GL_ARB_clear_buffer_object
-#define GL_ARB_clear_buffer_object 1
-#endif /* GL_ARB_clear_buffer_object */
-
-#ifndef GL_ARB_clear_texture
-#define GL_ARB_clear_texture 1
-#endif /* GL_ARB_clear_texture */
-
-#ifndef GL_ARB_color_buffer_float
-#define GL_ARB_color_buffer_float 1
-#define GL_RGBA_FLOAT_MODE_ARB            0x8820
-#define GL_CLAMP_VERTEX_COLOR_ARB         0x891A
-#define GL_CLAMP_FRAGMENT_COLOR_ARB       0x891B
-#define GL_CLAMP_READ_COLOR_ARB           0x891C
-#define GL_FIXED_ONLY_ARB                 0x891D
-typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp);
-#endif
-#endif /* GL_ARB_color_buffer_float */
-
-#ifndef GL_ARB_compatibility
-#define GL_ARB_compatibility 1
-#endif /* GL_ARB_compatibility */
-
-#ifndef GL_ARB_compressed_texture_pixel_storage
-#define GL_ARB_compressed_texture_pixel_storage 1
-#endif /* GL_ARB_compressed_texture_pixel_storage */
-
-#ifndef GL_ARB_compute_shader
-#define GL_ARB_compute_shader 1
-#define GL_COMPUTE_SHADER_BIT             0x00000020
-#endif /* GL_ARB_compute_shader */
-
-#ifndef GL_ARB_compute_variable_group_size
-#define GL_ARB_compute_variable_group_size 1
-#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344
-#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB
-#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345
-#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF
-typedef 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);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI 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);
-#endif
-#endif /* GL_ARB_compute_variable_group_size */
-
-#ifndef GL_ARB_conservative_depth
-#define GL_ARB_conservative_depth 1
-#endif /* GL_ARB_conservative_depth */
-
-#ifndef GL_ARB_copy_buffer
-#define GL_ARB_copy_buffer 1
-#define GL_COPY_READ_BUFFER_BINDING       0x8F36
-#define GL_COPY_WRITE_BUFFER_BINDING      0x8F37
-#endif /* GL_ARB_copy_buffer */
-
-#ifndef GL_ARB_copy_image
-#define GL_ARB_copy_image 1
-#endif /* GL_ARB_copy_image */
-
-#ifndef GL_ARB_debug_output
-#define GL_ARB_debug_output 1
-typedef void (APIENTRY  *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB   0x8242
-#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
-#define GL_DEBUG_CALLBACK_FUNCTION_ARB    0x8244
-#define GL_DEBUG_CALLBACK_USER_PARAM_ARB  0x8245
-#define GL_DEBUG_SOURCE_API_ARB           0x8246
-#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247
-#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248
-#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB   0x8249
-#define GL_DEBUG_SOURCE_APPLICATION_ARB   0x824A
-#define GL_DEBUG_SOURCE_OTHER_ARB         0x824B
-#define GL_DEBUG_TYPE_ERROR_ARB           0x824C
-#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D
-#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E
-#define GL_DEBUG_TYPE_PORTABILITY_ARB     0x824F
-#define GL_DEBUG_TYPE_PERFORMANCE_ARB     0x8250
-#define GL_DEBUG_TYPE_OTHER_ARB           0x8251
-#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB   0x9143
-#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB  0x9144
-#define GL_DEBUG_LOGGED_MESSAGES_ARB      0x9145
-#define GL_DEBUG_SEVERITY_HIGH_ARB        0x9146
-#define GL_DEBUG_SEVERITY_MEDIUM_ARB      0x9147
-#define GL_DEBUG_SEVERITY_LOW_ARB         0x9148
-typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam);
-typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam);
-GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-#endif
-#endif /* GL_ARB_debug_output */
-
-#ifndef GL_ARB_depth_buffer_float
-#define GL_ARB_depth_buffer_float 1
-#endif /* GL_ARB_depth_buffer_float */
-
-#ifndef GL_ARB_depth_clamp
-#define GL_ARB_depth_clamp 1
-#endif /* GL_ARB_depth_clamp */
-
-#ifndef GL_ARB_depth_texture
-#define GL_ARB_depth_texture 1
-#define GL_DEPTH_COMPONENT16_ARB          0x81A5
-#define GL_DEPTH_COMPONENT24_ARB          0x81A6
-#define GL_DEPTH_COMPONENT32_ARB          0x81A7
-#define GL_TEXTURE_DEPTH_SIZE_ARB         0x884A
-#define GL_DEPTH_TEXTURE_MODE_ARB         0x884B
-#endif /* GL_ARB_depth_texture */
-
-#ifndef GL_ARB_draw_buffers
-#define GL_ARB_draw_buffers 1
-#define GL_MAX_DRAW_BUFFERS_ARB           0x8824
-#define GL_DRAW_BUFFER0_ARB               0x8825
-#define GL_DRAW_BUFFER1_ARB               0x8826
-#define GL_DRAW_BUFFER2_ARB               0x8827
-#define GL_DRAW_BUFFER3_ARB               0x8828
-#define GL_DRAW_BUFFER4_ARB               0x8829
-#define GL_DRAW_BUFFER5_ARB               0x882A
-#define GL_DRAW_BUFFER6_ARB               0x882B
-#define GL_DRAW_BUFFER7_ARB               0x882C
-#define GL_DRAW_BUFFER8_ARB               0x882D
-#define GL_DRAW_BUFFER9_ARB               0x882E
-#define GL_DRAW_BUFFER10_ARB              0x882F
-#define GL_DRAW_BUFFER11_ARB              0x8830
-#define GL_DRAW_BUFFER12_ARB              0x8831
-#define GL_DRAW_BUFFER13_ARB              0x8832
-#define GL_DRAW_BUFFER14_ARB              0x8833
-#define GL_DRAW_BUFFER15_ARB              0x8834
-typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs);
-#endif
-#endif /* GL_ARB_draw_buffers */
-
-#ifndef GL_ARB_draw_buffers_blend
-#define GL_ARB_draw_buffers_blend 1
-typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);
-typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst);
-typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode);
-GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst);
-GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-#endif
-#endif /* GL_ARB_draw_buffers_blend */
-
-#ifndef GL_ARB_draw_elements_base_vertex
-#define GL_ARB_draw_elements_base_vertex 1
-#endif /* GL_ARB_draw_elements_base_vertex */
-
-#ifndef GL_ARB_draw_indirect
-#define GL_ARB_draw_indirect 1
-#endif /* GL_ARB_draw_indirect */
-
-#ifndef GL_ARB_draw_instanced
-#define GL_ARB_draw_instanced 1
-typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-#endif
-#endif /* GL_ARB_draw_instanced */
-
-#ifndef GL_ARB_enhanced_layouts
-#define GL_ARB_enhanced_layouts 1
-#endif /* GL_ARB_enhanced_layouts */
-
-#ifndef GL_ARB_explicit_attrib_location
-#define GL_ARB_explicit_attrib_location 1
-#endif /* GL_ARB_explicit_attrib_location */
-
-#ifndef GL_ARB_explicit_uniform_location
-#define GL_ARB_explicit_uniform_location 1
-#endif /* GL_ARB_explicit_uniform_location */
-
-#ifndef GL_ARB_fragment_coord_conventions
-#define GL_ARB_fragment_coord_conventions 1
-#endif /* GL_ARB_fragment_coord_conventions */
-
-#ifndef GL_ARB_fragment_layer_viewport
-#define GL_ARB_fragment_layer_viewport 1
-#endif /* GL_ARB_fragment_layer_viewport */
-
-#ifndef GL_ARB_fragment_program
-#define GL_ARB_fragment_program 1
-#define GL_FRAGMENT_PROGRAM_ARB           0x8804
-#define GL_PROGRAM_FORMAT_ASCII_ARB       0x8875
-#define GL_PROGRAM_LENGTH_ARB             0x8627
-#define GL_PROGRAM_FORMAT_ARB             0x8876
-#define GL_PROGRAM_BINDING_ARB            0x8677
-#define GL_PROGRAM_INSTRUCTIONS_ARB       0x88A0
-#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB   0x88A1
-#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
-#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
-#define GL_PROGRAM_TEMPORARIES_ARB        0x88A4
-#define GL_MAX_PROGRAM_TEMPORARIES_ARB    0x88A5
-#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
-#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
-#define GL_PROGRAM_PARAMETERS_ARB         0x88A8
-#define GL_MAX_PROGRAM_PARAMETERS_ARB     0x88A9
-#define GL_PROGRAM_NATIVE_PARAMETERS_ARB  0x88AA
-#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
-#define GL_PROGRAM_ATTRIBS_ARB            0x88AC
-#define GL_MAX_PROGRAM_ATTRIBS_ARB        0x88AD
-#define GL_PROGRAM_NATIVE_ATTRIBS_ARB     0x88AE
-#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
-#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
-#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
-#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
-#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB   0x8805
-#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB   0x8806
-#define GL_PROGRAM_TEX_INDIRECTIONS_ARB   0x8807
-#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
-#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
-#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
-#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
-#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
-#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
-#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
-#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
-#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
-#define GL_PROGRAM_STRING_ARB             0x8628
-#define GL_PROGRAM_ERROR_POSITION_ARB     0x864B
-#define GL_CURRENT_MATRIX_ARB             0x8641
-#define GL_TRANSPOSE_CURRENT_MATRIX_ARB   0x88B7
-#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
-#define GL_MAX_PROGRAM_MATRICES_ARB       0x862F
-#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
-#define GL_MAX_TEXTURE_COORDS_ARB         0x8871
-#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB    0x8872
-#define GL_PROGRAM_ERROR_STRING_ARB       0x8874
-#define GL_MATRIX0_ARB                    0x88C0
-#define GL_MATRIX1_ARB                    0x88C1
-#define GL_MATRIX2_ARB                    0x88C2
-#define GL_MATRIX3_ARB                    0x88C3
-#define GL_MATRIX4_ARB                    0x88C4
-#define GL_MATRIX5_ARB                    0x88C5
-#define GL_MATRIX6_ARB                    0x88C6
-#define GL_MATRIX7_ARB                    0x88C7
-#define GL_MATRIX8_ARB                    0x88C8
-#define GL_MATRIX9_ARB                    0x88C9
-#define GL_MATRIX10_ARB                   0x88CA
-#define GL_MATRIX11_ARB                   0x88CB
-#define GL_MATRIX12_ARB                   0x88CC
-#define GL_MATRIX13_ARB                   0x88CD
-#define GL_MATRIX14_ARB                   0x88CE
-#define GL_MATRIX15_ARB                   0x88CF
-#define GL_MATRIX16_ARB                   0x88D0
-#define GL_MATRIX17_ARB                   0x88D1
-#define GL_MATRIX18_ARB                   0x88D2
-#define GL_MATRIX19_ARB                   0x88D3
-#define GL_MATRIX20_ARB                   0x88D4
-#define GL_MATRIX21_ARB                   0x88D5
-#define GL_MATRIX22_ARB                   0x88D6
-#define GL_MATRIX23_ARB                   0x88D7
-#define GL_MATRIX24_ARB                   0x88D8
-#define GL_MATRIX25_ARB                   0x88D9
-#define GL_MATRIX26_ARB                   0x88DA
-#define GL_MATRIX27_ARB                   0x88DB
-#define GL_MATRIX28_ARB                   0x88DC
-#define GL_MATRIX29_ARB                   0x88DD
-#define GL_MATRIX30_ARB                   0x88DE
-#define GL_MATRIX31_ARB                   0x88DF
-typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string);
-typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
-typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
-typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
-typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
-typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
-typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
-typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void *string);
-typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const void *string);
-GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program);
-GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs);
-GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs);
-GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
-GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
-GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
-GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
-GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params);
-GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params);
-GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params);
-GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params);
-GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, void *string);
-GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program);
-#endif
-#endif /* GL_ARB_fragment_program */
-
-#ifndef GL_ARB_fragment_program_shadow
-#define GL_ARB_fragment_program_shadow 1
-#endif /* GL_ARB_fragment_program_shadow */
-
-#ifndef GL_ARB_fragment_shader
-#define GL_ARB_fragment_shader 1
-#define GL_FRAGMENT_SHADER_ARB            0x8B30
-#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
-#endif /* GL_ARB_fragment_shader */
-
-#ifndef GL_ARB_framebuffer_no_attachments
-#define GL_ARB_framebuffer_no_attachments 1
-#endif /* GL_ARB_framebuffer_no_attachments */
-
-#ifndef GL_ARB_framebuffer_object
-#define GL_ARB_framebuffer_object 1
-#endif /* GL_ARB_framebuffer_object */
-
-#ifndef GL_ARB_framebuffer_sRGB
-#define GL_ARB_framebuffer_sRGB 1
-#endif /* GL_ARB_framebuffer_sRGB */
-
-#ifndef GL_KHR_context_flush_control
-#define GL_CONTEXT_RELEASE_BEHAVIOR       0x82FB
-#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC
-#endif /* GL_KHR_context_flush_control */
-
-#ifndef GL_ARB_geometry_shader4
-#define GL_ARB_geometry_shader4 1
-#define GL_LINES_ADJACENCY_ARB            0x000A
-#define GL_LINE_STRIP_ADJACENCY_ARB       0x000B
-#define GL_TRIANGLES_ADJACENCY_ARB        0x000C
-#define GL_TRIANGLE_STRIP_ADJACENCY_ARB   0x000D
-#define GL_PROGRAM_POINT_SIZE_ARB         0x8642
-#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29
-#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7
-#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8
-#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9
-#define GL_GEOMETRY_SHADER_ARB            0x8DD9
-#define GL_GEOMETRY_VERTICES_OUT_ARB      0x8DDA
-#define GL_GEOMETRY_INPUT_TYPE_ARB        0x8DDB
-#define GL_GEOMETRY_OUTPUT_TYPE_ARB       0x8DDC
-#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD
-#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE
-#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
-#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
-#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
-typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value);
-GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level);
-GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
-#endif
-#endif /* GL_ARB_geometry_shader4 */
-
-#ifndef GL_ARB_get_program_binary
-#define GL_ARB_get_program_binary 1
-#endif /* GL_ARB_get_program_binary */
-
-#ifndef GL_ARB_gpu_shader5
-#define GL_ARB_gpu_shader5 1
-#endif /* GL_ARB_gpu_shader5 */
-
-#ifndef GL_ARB_gpu_shader_fp64
-#define GL_ARB_gpu_shader_fp64 1
-#endif /* GL_ARB_gpu_shader_fp64 */
-
-#ifndef GL_ARB_half_float_pixel
-#define GL_ARB_half_float_pixel 1
-typedef unsigned short GLhalfARB;
-#define GL_HALF_FLOAT_ARB                 0x140B
-#endif /* GL_ARB_half_float_pixel */
-
-#ifndef GL_ARB_half_float_vertex
-#define GL_ARB_half_float_vertex 1
-#endif /* GL_ARB_half_float_vertex */
-
-#ifndef GL_ARB_imaging
-#define GL_ARB_imaging 1
-#define GL_BLEND_COLOR                    0x8005
-#define GL_BLEND_EQUATION                 0x8009
-#define GL_CONVOLUTION_1D                 0x8010
-#define GL_CONVOLUTION_2D                 0x8011
-#define GL_SEPARABLE_2D                   0x8012
-#define GL_CONVOLUTION_BORDER_MODE        0x8013
-#define GL_CONVOLUTION_FILTER_SCALE       0x8014
-#define GL_CONVOLUTION_FILTER_BIAS        0x8015
-#define GL_REDUCE                         0x8016
-#define GL_CONVOLUTION_FORMAT             0x8017
-#define GL_CONVOLUTION_WIDTH              0x8018
-#define GL_CONVOLUTION_HEIGHT             0x8019
-#define GL_MAX_CONVOLUTION_WIDTH          0x801A
-#define GL_MAX_CONVOLUTION_HEIGHT         0x801B
-#define GL_POST_CONVOLUTION_RED_SCALE     0x801C
-#define GL_POST_CONVOLUTION_GREEN_SCALE   0x801D
-#define GL_POST_CONVOLUTION_BLUE_SCALE    0x801E
-#define GL_POST_CONVOLUTION_ALPHA_SCALE   0x801F
-#define GL_POST_CONVOLUTION_RED_BIAS      0x8020
-#define GL_POST_CONVOLUTION_GREEN_BIAS    0x8021
-#define GL_POST_CONVOLUTION_BLUE_BIAS     0x8022
-#define GL_POST_CONVOLUTION_ALPHA_BIAS    0x8023
-#define GL_HISTOGRAM                      0x8024
-#define GL_PROXY_HISTOGRAM                0x8025
-#define GL_HISTOGRAM_WIDTH                0x8026
-#define GL_HISTOGRAM_FORMAT               0x8027
-#define GL_HISTOGRAM_RED_SIZE             0x8028
-#define GL_HISTOGRAM_GREEN_SIZE           0x8029
-#define GL_HISTOGRAM_BLUE_SIZE            0x802A
-#define GL_HISTOGRAM_ALPHA_SIZE           0x802B
-#define GL_HISTOGRAM_LUMINANCE_SIZE       0x802C
-#define GL_HISTOGRAM_SINK                 0x802D
-#define GL_MINMAX                         0x802E
-#define GL_MINMAX_FORMAT                  0x802F
-#define GL_MINMAX_SINK                    0x8030
-#define GL_TABLE_TOO_LARGE                0x8031
-#define GL_COLOR_MATRIX                   0x80B1
-#define GL_COLOR_MATRIX_STACK_DEPTH       0x80B2
-#define GL_MAX_COLOR_MATRIX_STACK_DEPTH   0x80B3
-#define GL_POST_COLOR_MATRIX_RED_SCALE    0x80B4
-#define GL_POST_COLOR_MATRIX_GREEN_SCALE  0x80B5
-#define GL_POST_COLOR_MATRIX_BLUE_SCALE   0x80B6
-#define GL_POST_COLOR_MATRIX_ALPHA_SCALE  0x80B7
-#define GL_POST_COLOR_MATRIX_RED_BIAS     0x80B8
-#define GL_POST_COLOR_MATRIX_GREEN_BIAS   0x80B9
-#define GL_POST_COLOR_MATRIX_BLUE_BIAS    0x80BA
-#define GL_POST_COLOR_MATRIX_ALPHA_BIAS   0x80BB
-#define GL_COLOR_TABLE                    0x80D0
-#define GL_POST_CONVOLUTION_COLOR_TABLE   0x80D1
-#define GL_POST_COLOR_MATRIX_COLOR_TABLE  0x80D2
-#define GL_PROXY_COLOR_TABLE              0x80D3
-#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
-#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
-#define GL_COLOR_TABLE_SCALE              0x80D6
-#define GL_COLOR_TABLE_BIAS               0x80D7
-#define GL_COLOR_TABLE_FORMAT             0x80D8
-#define GL_COLOR_TABLE_WIDTH              0x80D9
-#define GL_COLOR_TABLE_RED_SIZE           0x80DA
-#define GL_COLOR_TABLE_GREEN_SIZE         0x80DB
-#define GL_COLOR_TABLE_BLUE_SIZE          0x80DC
-#define GL_COLOR_TABLE_ALPHA_SIZE         0x80DD
-#define GL_COLOR_TABLE_LUMINANCE_SIZE     0x80DE
-#define GL_COLOR_TABLE_INTENSITY_SIZE     0x80DF
-#define GL_CONSTANT_BORDER                0x8151
-#define GL_REPLICATE_BORDER               0x8153
-#define GL_CONVOLUTION_BORDER_COLOR       0x8154
-typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
-typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, void *table);
-typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
-typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
-typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
-typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
-typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
-typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, void *image);
-typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
-typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
-typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
-typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
-typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
-GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, void *table);
-GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
-GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
-GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
-GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params);
-GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params);
-GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, void *image);
-GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
-GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
-GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink);
-GLAPI void APIENTRY glResetHistogram (GLenum target);
-GLAPI void APIENTRY glResetMinmax (GLenum target);
-#endif
-#endif /* GL_ARB_imaging */
-
-#ifndef GL_ARB_indirect_parameters
-#define GL_ARB_indirect_parameters 1
-#define GL_PARAMETER_BUFFER_ARB           0x80EE
-#define GL_PARAMETER_BUFFER_BINDING_ARB   0x80EF
-typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
-typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
-GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
-#endif
-#endif /* GL_ARB_indirect_parameters */
-
-#ifndef GL_ARB_instanced_arrays
-#define GL_ARB_instanced_arrays 1
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE
-typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor);
-#endif
-#endif /* GL_ARB_instanced_arrays */
-
-#ifndef GL_ARB_internalformat_query
-#define GL_ARB_internalformat_query 1
-#endif /* GL_ARB_internalformat_query */
-
-#ifndef GL_ARB_internalformat_query2
-#define GL_ARB_internalformat_query2 1
-#define GL_SRGB_DECODE_ARB                0x8299
-#endif /* GL_ARB_internalformat_query2 */
-
-#ifndef GL_ARB_invalidate_subdata
-#define GL_ARB_invalidate_subdata 1
-#endif /* GL_ARB_invalidate_subdata */
-
-#ifndef GL_ARB_map_buffer_alignment
-#define GL_ARB_map_buffer_alignment 1
-#endif /* GL_ARB_map_buffer_alignment */
-
-#ifndef GL_ARB_map_buffer_range
-#define GL_ARB_map_buffer_range 1
-#endif /* GL_ARB_map_buffer_range */
-
-#ifndef GL_ARB_matrix_palette
-#define GL_ARB_matrix_palette 1
-#define GL_MATRIX_PALETTE_ARB             0x8840
-#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
-#define GL_MAX_PALETTE_MATRICES_ARB       0x8842
-#define GL_CURRENT_PALETTE_MATRIX_ARB     0x8843
-#define GL_MATRIX_INDEX_ARRAY_ARB         0x8844
-#define GL_CURRENT_MATRIX_INDEX_ARB       0x8845
-#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB    0x8846
-#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB    0x8847
-#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB  0x8848
-#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
-typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
-typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
-typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
-typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
-typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index);
-GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices);
-GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices);
-GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices);
-GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);
-#endif
-#endif /* GL_ARB_matrix_palette */
-
-#ifndef GL_ARB_multi_bind
-#define GL_ARB_multi_bind 1
-#endif /* GL_ARB_multi_bind */
-
-#ifndef GL_ARB_multi_draw_indirect
-#define GL_ARB_multi_draw_indirect 1
-#endif /* GL_ARB_multi_draw_indirect */
-
-#ifndef GL_ARB_multisample
-#define GL_ARB_multisample 1
-#define GL_MULTISAMPLE_ARB                0x809D
-#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB   0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE_ARB        0x809F
-#define GL_SAMPLE_COVERAGE_ARB            0x80A0
-#define GL_SAMPLE_BUFFERS_ARB             0x80A8
-#define GL_SAMPLES_ARB                    0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE_ARB      0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT_ARB     0x80AB
-#define GL_MULTISAMPLE_BIT_ARB            0x20000000
-typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert);
-#endif
-#endif /* GL_ARB_multisample */
-
-#ifndef GL_ARB_multitexture
-#define GL_ARB_multitexture 1
-#define GL_TEXTURE0_ARB                   0x84C0
-#define GL_TEXTURE1_ARB                   0x84C1
-#define GL_TEXTURE2_ARB                   0x84C2
-#define GL_TEXTURE3_ARB                   0x84C3
-#define GL_TEXTURE4_ARB                   0x84C4
-#define GL_TEXTURE5_ARB                   0x84C5
-#define GL_TEXTURE6_ARB                   0x84C6
-#define GL_TEXTURE7_ARB                   0x84C7
-#define GL_TEXTURE8_ARB                   0x84C8
-#define GL_TEXTURE9_ARB                   0x84C9
-#define GL_TEXTURE10_ARB                  0x84CA
-#define GL_TEXTURE11_ARB                  0x84CB
-#define GL_TEXTURE12_ARB                  0x84CC
-#define GL_TEXTURE13_ARB                  0x84CD
-#define GL_TEXTURE14_ARB                  0x84CE
-#define GL_TEXTURE15_ARB                  0x84CF
-#define GL_TEXTURE16_ARB                  0x84D0
-#define GL_TEXTURE17_ARB                  0x84D1
-#define GL_TEXTURE18_ARB                  0x84D2
-#define GL_TEXTURE19_ARB                  0x84D3
-#define GL_TEXTURE20_ARB                  0x84D4
-#define GL_TEXTURE21_ARB                  0x84D5
-#define GL_TEXTURE22_ARB                  0x84D6
-#define GL_TEXTURE23_ARB                  0x84D7
-#define GL_TEXTURE24_ARB                  0x84D8
-#define GL_TEXTURE25_ARB                  0x84D9
-#define GL_TEXTURE26_ARB                  0x84DA
-#define GL_TEXTURE27_ARB                  0x84DB
-#define GL_TEXTURE28_ARB                  0x84DC
-#define GL_TEXTURE29_ARB                  0x84DD
-#define GL_TEXTURE30_ARB                  0x84DE
-#define GL_TEXTURE31_ARB                  0x84DF
-#define GL_ACTIVE_TEXTURE_ARB             0x84E0
-#define GL_CLIENT_ACTIVE_TEXTURE_ARB      0x84E1
-#define GL_MAX_TEXTURE_UNITS_ARB          0x84E2
-typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
-typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glActiveTextureARB (GLenum texture);
-GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture);
-GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s);
-GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v);
-GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s);
-GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v);
-GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s);
-GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v);
-GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s);
-GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v);
-GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t);
-GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v);
-GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t);
-GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v);
-GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t);
-GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v);
-GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t);
-GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v);
-GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v);
-GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v);
-GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r);
-GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v);
-GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r);
-GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v);
-GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v);
-GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v);
-GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q);
-GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v);
-GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v);
-#endif
-#endif /* GL_ARB_multitexture */
-
-#ifndef GL_ARB_occlusion_query
-#define GL_ARB_occlusion_query 1
-#define GL_QUERY_COUNTER_BITS_ARB         0x8864
-#define GL_CURRENT_QUERY_ARB              0x8865
-#define GL_QUERY_RESULT_ARB               0x8866
-#define GL_QUERY_RESULT_AVAILABLE_ARB     0x8867
-#define GL_SAMPLES_PASSED_ARB             0x8914
-typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
-typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
-typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
-typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
-typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
-typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids);
-GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids);
-GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id);
-GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id);
-GLAPI void APIENTRY glEndQueryARB (GLenum target);
-GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params);
-#endif
-#endif /* GL_ARB_occlusion_query */
-
-#ifndef GL_ARB_occlusion_query2
-#define GL_ARB_occlusion_query2 1
-#endif /* GL_ARB_occlusion_query2 */
-
-#ifndef GL_ARB_pixel_buffer_object
-#define GL_ARB_pixel_buffer_object 1
-#define GL_PIXEL_PACK_BUFFER_ARB          0x88EB
-#define GL_PIXEL_UNPACK_BUFFER_ARB        0x88EC
-#define GL_PIXEL_PACK_BUFFER_BINDING_ARB  0x88ED
-#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
-#endif /* GL_ARB_pixel_buffer_object */
-
-#ifndef GL_ARB_point_parameters
-#define GL_ARB_point_parameters 1
-#define GL_POINT_SIZE_MIN_ARB             0x8126
-#define GL_POINT_SIZE_MAX_ARB             0x8127
-#define GL_POINT_FADE_THRESHOLD_SIZE_ARB  0x8128
-#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
-typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param);
-GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params);
-#endif
-#endif /* GL_ARB_point_parameters */
-
-#ifndef GL_ARB_point_sprite
-#define GL_ARB_point_sprite 1
-#define GL_POINT_SPRITE_ARB               0x8861
-#define GL_COORD_REPLACE_ARB              0x8862
-#endif /* GL_ARB_point_sprite */
-
-#ifndef GL_ARB_program_interface_query
-#define GL_ARB_program_interface_query 1
-#endif /* GL_ARB_program_interface_query */
-
-#ifndef GL_ARB_provoking_vertex
-#define GL_ARB_provoking_vertex 1
-#endif /* GL_ARB_provoking_vertex */
-
-#ifndef GL_ARB_query_buffer_object
-#define GL_ARB_query_buffer_object 1
-#endif /* GL_ARB_query_buffer_object */
-
-#ifndef GL_ARB_robust_buffer_access_behavior
-#define GL_ARB_robust_buffer_access_behavior 1
-#endif /* GL_ARB_robust_buffer_access_behavior */
-
-#ifndef GL_ARB_robustness
-#define GL_ARB_robustness 1
-#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004
-#define GL_LOSE_CONTEXT_ON_RESET_ARB      0x8252
-#define GL_GUILTY_CONTEXT_RESET_ARB       0x8253
-#define GL_INNOCENT_CONTEXT_RESET_ARB     0x8254
-#define GL_UNKNOWN_CONTEXT_RESET_ARB      0x8255
-#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
-#define GL_NO_RESET_NOTIFICATION_ARB      0x8261
-typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);
-typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
-typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img);
-typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
-typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
-typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
-typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
-typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values);
-typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values);
-typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values);
-typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern);
-typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
-typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
-typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
-typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
-typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void);
-GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
-GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img);
-GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
-GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
-GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
-GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
-GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values);
-GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values);
-GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values);
-GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern);
-GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
-GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
-GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
-GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
-GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
-#endif
-#endif /* GL_ARB_robustness */
-
-#ifndef GL_ARB_robustness_isolation
-#define GL_ARB_robustness_isolation 1
-#endif /* GL_ARB_robustness_isolation */
-
-#ifndef GL_ARB_sample_shading
-#define GL_ARB_sample_shading 1
-#define GL_SAMPLE_SHADING_ARB             0x8C36
-#define GL_MIN_SAMPLE_SHADING_VALUE_ARB   0x8C37
-typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value);
-#endif
-#endif /* GL_ARB_sample_shading */
-
-#ifndef GL_ARB_sampler_objects
-#define GL_ARB_sampler_objects 1
-#endif /* GL_ARB_sampler_objects */
-
-#ifndef GL_ARB_seamless_cube_map
-#define GL_ARB_seamless_cube_map 1
-#endif /* GL_ARB_seamless_cube_map */
-
-#ifndef GL_ARB_seamless_cubemap_per_texture
-#define GL_ARB_seamless_cubemap_per_texture 1
-#endif /* GL_ARB_seamless_cubemap_per_texture */
-
-#ifndef GL_ARB_separate_shader_objects
-#define GL_ARB_separate_shader_objects 1
-#endif /* GL_ARB_separate_shader_objects */
-
-#ifndef GL_ARB_shader_atomic_counters
-#define GL_ARB_shader_atomic_counters 1
-#endif /* GL_ARB_shader_atomic_counters */
-
-#ifndef GL_ARB_shader_bit_encoding
-#define GL_ARB_shader_bit_encoding 1
-#endif /* GL_ARB_shader_bit_encoding */
-
-#ifndef GL_ARB_shader_draw_parameters
-#define GL_ARB_shader_draw_parameters 1
-#endif /* GL_ARB_shader_draw_parameters */
-
-#ifndef GL_ARB_shader_group_vote
-#define GL_ARB_shader_group_vote 1
-#endif /* GL_ARB_shader_group_vote */
-
-#ifndef GL_ARB_shader_image_load_store
-#define GL_ARB_shader_image_load_store 1
-#endif /* GL_ARB_shader_image_load_store */
-
-#ifndef GL_ARB_shader_image_size
-#define GL_ARB_shader_image_size 1
-#endif /* GL_ARB_shader_image_size */
-
-#ifndef GL_ARB_shader_objects
-#define GL_ARB_shader_objects 1
-#ifdef __APPLE__
-typedef void *GLhandleARB;
-#else
-typedef unsigned int GLhandleARB;
-#endif
-typedef char GLcharARB;
-#define GL_PROGRAM_OBJECT_ARB             0x8B40
-#define GL_SHADER_OBJECT_ARB              0x8B48
-#define GL_OBJECT_TYPE_ARB                0x8B4E
-#define GL_OBJECT_SUBTYPE_ARB             0x8B4F
-#define GL_FLOAT_VEC2_ARB                 0x8B50
-#define GL_FLOAT_VEC3_ARB                 0x8B51
-#define GL_FLOAT_VEC4_ARB                 0x8B52
-#define GL_INT_VEC2_ARB                   0x8B53
-#define GL_INT_VEC3_ARB                   0x8B54
-#define GL_INT_VEC4_ARB                   0x8B55
-#define GL_BOOL_ARB                       0x8B56
-#define GL_BOOL_VEC2_ARB                  0x8B57
-#define GL_BOOL_VEC3_ARB                  0x8B58
-#define GL_BOOL_VEC4_ARB                  0x8B59
-#define GL_FLOAT_MAT2_ARB                 0x8B5A
-#define GL_FLOAT_MAT3_ARB                 0x8B5B
-#define GL_FLOAT_MAT4_ARB                 0x8B5C
-#define GL_SAMPLER_1D_ARB                 0x8B5D
-#define GL_SAMPLER_2D_ARB                 0x8B5E
-#define GL_SAMPLER_3D_ARB                 0x8B5F
-#define GL_SAMPLER_CUBE_ARB               0x8B60
-#define GL_SAMPLER_1D_SHADOW_ARB          0x8B61
-#define GL_SAMPLER_2D_SHADOW_ARB          0x8B62
-#define GL_SAMPLER_2D_RECT_ARB            0x8B63
-#define GL_SAMPLER_2D_RECT_SHADOW_ARB     0x8B64
-#define GL_OBJECT_DELETE_STATUS_ARB       0x8B80
-#define GL_OBJECT_COMPILE_STATUS_ARB      0x8B81
-#define GL_OBJECT_LINK_STATUS_ARB         0x8B82
-#define GL_OBJECT_VALIDATE_STATUS_ARB     0x8B83
-#define GL_OBJECT_INFO_LOG_LENGTH_ARB     0x8B84
-#define GL_OBJECT_ATTACHED_OBJECTS_ARB    0x8B85
-#define GL_OBJECT_ACTIVE_UNIFORMS_ARB     0x8B86
-#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
-#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
-typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
-typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
-typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
-typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
-typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);
-typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
-typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
-typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
-typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
-typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
-typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
-typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
-typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
-typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
-typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
-typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
-typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
-typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
-typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
-typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
-typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj);
-GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname);
-GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj);
-GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType);
-GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);
-GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj);
-GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
-GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj);
-GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj);
-GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj);
-GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj);
-GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0);
-GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1);
-GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0);
-GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1);
-GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2);
-GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
-GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
-GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name);
-GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
-GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params);
-GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params);
-GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
-#endif
-#endif /* GL_ARB_shader_objects */
-
-#ifndef GL_ARB_shader_precision
-#define GL_ARB_shader_precision 1
-#endif /* GL_ARB_shader_precision */
-
-#ifndef GL_ARB_shader_stencil_export
-#define GL_ARB_shader_stencil_export 1
-#endif /* GL_ARB_shader_stencil_export */
-
-#ifndef GL_ARB_shader_storage_buffer_object
-#define GL_ARB_shader_storage_buffer_object 1
-#endif /* GL_ARB_shader_storage_buffer_object */
-
-#ifndef GL_ARB_shader_subroutine
-#define GL_ARB_shader_subroutine 1
-#endif /* GL_ARB_shader_subroutine */
-
-#ifndef GL_ARB_shader_texture_lod
-#define GL_ARB_shader_texture_lod 1
-#endif /* GL_ARB_shader_texture_lod */
-
-#ifndef GL_ARB_shading_language_100
-#define GL_ARB_shading_language_100 1
-#define GL_SHADING_LANGUAGE_VERSION_ARB   0x8B8C
-#endif /* GL_ARB_shading_language_100 */
-
-#ifndef GL_ARB_shading_language_420pack
-#define GL_ARB_shading_language_420pack 1
-#endif /* GL_ARB_shading_language_420pack */
-
-#ifndef GL_ARB_shading_language_include
-#define GL_ARB_shading_language_include 1
-#define GL_SHADER_INCLUDE_ARB             0x8DAE
-#define GL_NAMED_STRING_LENGTH_ARB        0x8DE9
-#define GL_NAMED_STRING_TYPE_ARB          0x8DEA
-typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
-typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
-typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
-typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
-typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
-typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
-GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name);
-GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
-GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name);
-GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
-GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
-#endif
-#endif /* GL_ARB_shading_language_include */
-
-#ifndef GL_ARB_shading_language_packing
-#define GL_ARB_shading_language_packing 1
-#endif /* GL_ARB_shading_language_packing */
-
-#ifndef GL_ARB_shadow
-#define GL_ARB_shadow 1
-#define GL_TEXTURE_COMPARE_MODE_ARB       0x884C
-#define GL_TEXTURE_COMPARE_FUNC_ARB       0x884D
-#define GL_COMPARE_R_TO_TEXTURE_ARB       0x884E
-#endif /* GL_ARB_shadow */
-
-#ifndef GL_ARB_shadow_ambient
-#define GL_ARB_shadow_ambient 1
-#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
-#endif /* GL_ARB_shadow_ambient */
-
-#ifndef GL_ARB_sparse_texture
-#define GL_ARB_sparse_texture 1
-#define GL_TEXTURE_SPARSE_ARB             0x91A6
-#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB    0x91A7
-#define GL_MIN_SPARSE_LEVEL_ARB           0x919B
-#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB     0x91A8
-#define GL_VIRTUAL_PAGE_SIZE_X_ARB        0x9195
-#define GL_VIRTUAL_PAGE_SIZE_Y_ARB        0x9196
-#define GL_VIRTUAL_PAGE_SIZE_Z_ARB        0x9197
-#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB    0x9198
-#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199
-#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A
-#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9
-typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
-#endif
-#endif /* GL_ARB_sparse_texture */
-
-#ifndef GL_ARB_stencil_texturing
-#define GL_ARB_stencil_texturing 1
-#endif /* GL_ARB_stencil_texturing */
-
-#ifndef GL_ARB_sync
-#define GL_ARB_sync 1
-#endif /* GL_ARB_sync */
-
-#ifndef GL_ARB_tessellation_shader
-#define GL_ARB_tessellation_shader 1
-#endif /* GL_ARB_tessellation_shader */
-
-#ifndef GL_ARB_texture_border_clamp
-#define GL_ARB_texture_border_clamp 1
-#define GL_CLAMP_TO_BORDER_ARB            0x812D
-#endif /* GL_ARB_texture_border_clamp */
-
-#ifndef GL_ARB_texture_buffer_object
-#define GL_ARB_texture_buffer_object 1
-#define GL_TEXTURE_BUFFER_ARB             0x8C2A
-#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB    0x8C2B
-#define GL_TEXTURE_BINDING_BUFFER_ARB     0x8C2C
-#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D
-#define GL_TEXTURE_BUFFER_FORMAT_ARB      0x8C2E
-typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer);
-#endif
-#endif /* GL_ARB_texture_buffer_object */
-
-#ifndef GL_ARB_texture_buffer_object_rgb32
-#define GL_ARB_texture_buffer_object_rgb32 1
-#endif /* GL_ARB_texture_buffer_object_rgb32 */
-
-#ifndef GL_ARB_texture_buffer_range
-#define GL_ARB_texture_buffer_range 1
-#endif /* GL_ARB_texture_buffer_range */
-
-#ifndef GL_ARB_texture_compression
-#define GL_ARB_texture_compression 1
-#define GL_COMPRESSED_ALPHA_ARB           0x84E9
-#define GL_COMPRESSED_LUMINANCE_ARB       0x84EA
-#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
-#define GL_COMPRESSED_INTENSITY_ARB       0x84EC
-#define GL_COMPRESSED_RGB_ARB             0x84ED
-#define GL_COMPRESSED_RGBA_ARB            0x84EE
-#define GL_TEXTURE_COMPRESSION_HINT_ARB   0x84EF
-#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
-#define GL_TEXTURE_COMPRESSED_ARB         0x86A1
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
-GLAPI 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);
-GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void *img);
-#endif
-#endif /* GL_ARB_texture_compression */
-
-#ifndef GL_ARB_texture_compression_bptc
-#define GL_ARB_texture_compression_bptc 1
-#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
-#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D
-#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E
-#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F
-#endif /* GL_ARB_texture_compression_bptc */
-
-#ifndef GL_ARB_texture_compression_rgtc
-#define GL_ARB_texture_compression_rgtc 1
-#endif /* GL_ARB_texture_compression_rgtc */
-
-#ifndef GL_ARB_texture_cube_map
-#define GL_ARB_texture_cube_map 1
-#define GL_NORMAL_MAP_ARB                 0x8511
-#define GL_REFLECTION_MAP_ARB             0x8512
-#define GL_TEXTURE_CUBE_MAP_ARB           0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP_ARB   0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
-#define GL_PROXY_TEXTURE_CUBE_MAP_ARB     0x851B
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB  0x851C
-#endif /* GL_ARB_texture_cube_map */
-
-#ifndef GL_ARB_texture_cube_map_array
-#define GL_ARB_texture_cube_map_array 1
-#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB     0x9009
-#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A
-#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B
-#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB     0x900C
-#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D
-#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E
-#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F
-#endif /* GL_ARB_texture_cube_map_array */
-
-#ifndef GL_ARB_texture_env_add
-#define GL_ARB_texture_env_add 1
-#endif /* GL_ARB_texture_env_add */
-
-#ifndef GL_ARB_texture_env_combine
-#define GL_ARB_texture_env_combine 1
-#define GL_COMBINE_ARB                    0x8570
-#define GL_COMBINE_RGB_ARB                0x8571
-#define GL_COMBINE_ALPHA_ARB              0x8572
-#define GL_SOURCE0_RGB_ARB                0x8580
-#define GL_SOURCE1_RGB_ARB                0x8581
-#define GL_SOURCE2_RGB_ARB                0x8582
-#define GL_SOURCE0_ALPHA_ARB              0x8588
-#define GL_SOURCE1_ALPHA_ARB              0x8589
-#define GL_SOURCE2_ALPHA_ARB              0x858A
-#define GL_OPERAND0_RGB_ARB               0x8590
-#define GL_OPERAND1_RGB_ARB               0x8591
-#define GL_OPERAND2_RGB_ARB               0x8592
-#define GL_OPERAND0_ALPHA_ARB             0x8598
-#define GL_OPERAND1_ALPHA_ARB             0x8599
-#define GL_OPERAND2_ALPHA_ARB             0x859A
-#define GL_RGB_SCALE_ARB                  0x8573
-#define GL_ADD_SIGNED_ARB                 0x8574
-#define GL_INTERPOLATE_ARB                0x8575
-#define GL_SUBTRACT_ARB                   0x84E7
-#define GL_CONSTANT_ARB                   0x8576
-#define GL_PRIMARY_COLOR_ARB              0x8577
-#define GL_PREVIOUS_ARB                   0x8578
-#endif /* GL_ARB_texture_env_combine */
-
-#ifndef GL_ARB_texture_env_crossbar
-#define GL_ARB_texture_env_crossbar 1
-#endif /* GL_ARB_texture_env_crossbar */
-
-#ifndef GL_ARB_texture_env_dot3
-#define GL_ARB_texture_env_dot3 1
-#define GL_DOT3_RGB_ARB                   0x86AE
-#define GL_DOT3_RGBA_ARB                  0x86AF
-#endif /* GL_ARB_texture_env_dot3 */
-
-#ifndef GL_ARB_texture_float
-#define GL_ARB_texture_float 1
-#define GL_TEXTURE_RED_TYPE_ARB           0x8C10
-#define GL_TEXTURE_GREEN_TYPE_ARB         0x8C11
-#define GL_TEXTURE_BLUE_TYPE_ARB          0x8C12
-#define GL_TEXTURE_ALPHA_TYPE_ARB         0x8C13
-#define GL_TEXTURE_LUMINANCE_TYPE_ARB     0x8C14
-#define GL_TEXTURE_INTENSITY_TYPE_ARB     0x8C15
-#define GL_TEXTURE_DEPTH_TYPE_ARB         0x8C16
-#define GL_UNSIGNED_NORMALIZED_ARB        0x8C17
-#define GL_RGBA32F_ARB                    0x8814
-#define GL_RGB32F_ARB                     0x8815
-#define GL_ALPHA32F_ARB                   0x8816
-#define GL_INTENSITY32F_ARB               0x8817
-#define GL_LUMINANCE32F_ARB               0x8818
-#define GL_LUMINANCE_ALPHA32F_ARB         0x8819
-#define GL_RGBA16F_ARB                    0x881A
-#define GL_RGB16F_ARB                     0x881B
-#define GL_ALPHA16F_ARB                   0x881C
-#define GL_INTENSITY16F_ARB               0x881D
-#define GL_LUMINANCE16F_ARB               0x881E
-#define GL_LUMINANCE_ALPHA16F_ARB         0x881F
-#endif /* GL_ARB_texture_float */
-
-#ifndef GL_ARB_texture_gather
-#define GL_ARB_texture_gather 1
-#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E
-#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F
-#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F
-#endif /* GL_ARB_texture_gather */
-
-#ifndef GL_ARB_texture_mirror_clamp_to_edge
-#define GL_ARB_texture_mirror_clamp_to_edge 1
-#endif /* GL_ARB_texture_mirror_clamp_to_edge */
-
-#ifndef GL_ARB_texture_mirrored_repeat
-#define GL_ARB_texture_mirrored_repeat 1
-#define GL_MIRRORED_REPEAT_ARB            0x8370
-#endif /* GL_ARB_texture_mirrored_repeat */
-
-#ifndef GL_ARB_texture_multisample
-#define GL_ARB_texture_multisample 1
-#endif /* GL_ARB_texture_multisample */
-
-#ifndef GL_ARB_texture_non_power_of_two
-#define GL_ARB_texture_non_power_of_two 1
-#endif /* GL_ARB_texture_non_power_of_two */
-
-#ifndef GL_ARB_texture_query_levels
-#define GL_ARB_texture_query_levels 1
-#endif /* GL_ARB_texture_query_levels */
-
-#ifndef GL_ARB_texture_query_lod
-#define GL_ARB_texture_query_lod 1
-#endif /* GL_ARB_texture_query_lod */
-
-#ifndef GL_ARB_texture_rectangle
-#define GL_ARB_texture_rectangle 1
-#define GL_TEXTURE_RECTANGLE_ARB          0x84F5
-#define GL_TEXTURE_BINDING_RECTANGLE_ARB  0x84F6
-#define GL_PROXY_TEXTURE_RECTANGLE_ARB    0x84F7
-#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
-#endif /* GL_ARB_texture_rectangle */
-
-#ifndef GL_ARB_texture_rg
-#define GL_ARB_texture_rg 1
-#endif /* GL_ARB_texture_rg */
-
-#ifndef GL_ARB_texture_rgb10_a2ui
-#define GL_ARB_texture_rgb10_a2ui 1
-#endif /* GL_ARB_texture_rgb10_a2ui */
-
-#ifndef GL_ARB_texture_stencil8
-#define GL_ARB_texture_stencil8 1
-#endif /* GL_ARB_texture_stencil8 */
-
-#ifndef GL_ARB_texture_storage
-#define GL_ARB_texture_storage 1
-#endif /* GL_ARB_texture_storage */
-
-#ifndef GL_ARB_texture_storage_multisample
-#define GL_ARB_texture_storage_multisample 1
-#endif /* GL_ARB_texture_storage_multisample */
-
-#ifndef GL_ARB_texture_swizzle
-#define GL_ARB_texture_swizzle 1
-#endif /* GL_ARB_texture_swizzle */
-
-#ifndef GL_ARB_texture_view
-#define GL_ARB_texture_view 1
-#endif /* GL_ARB_texture_view */
-
-#ifndef GL_ARB_timer_query
-#define GL_ARB_timer_query 1
-#endif /* GL_ARB_timer_query */
-
-#ifndef GL_ARB_transform_feedback2
-#define GL_ARB_transform_feedback2 1
-#define GL_TRANSFORM_FEEDBACK_PAUSED      0x8E23
-#define GL_TRANSFORM_FEEDBACK_ACTIVE      0x8E24
-#endif /* GL_ARB_transform_feedback2 */
-
-#ifndef GL_ARB_transform_feedback3
-#define GL_ARB_transform_feedback3 1
-#endif /* GL_ARB_transform_feedback3 */
-
-#ifndef GL_ARB_transform_feedback_instanced
-#define GL_ARB_transform_feedback_instanced 1
-#endif /* GL_ARB_transform_feedback_instanced */
-
-#ifndef GL_ARB_transpose_matrix
-#define GL_ARB_transpose_matrix 1
-#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
-#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
-#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB   0x84E5
-#define GL_TRANSPOSE_COLOR_MATRIX_ARB     0x84E6
-typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
-typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
-typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
-typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m);
-GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m);
-GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m);
-GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m);
-#endif
-#endif /* GL_ARB_transpose_matrix */
-
-#ifndef GL_ARB_uniform_buffer_object
-#define GL_ARB_uniform_buffer_object 1
-#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS    0x8A2C
-#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
-#endif /* GL_ARB_uniform_buffer_object */
-
-#ifndef GL_ARB_vertex_array_bgra
-#define GL_ARB_vertex_array_bgra 1
-#endif /* GL_ARB_vertex_array_bgra */
-
-#ifndef GL_ARB_vertex_array_object
-#define GL_ARB_vertex_array_object 1
-#endif /* GL_ARB_vertex_array_object */
-
-#ifndef GL_ARB_vertex_attrib_64bit
-#define GL_ARB_vertex_attrib_64bit 1
-#endif /* GL_ARB_vertex_attrib_64bit */
-
-#ifndef GL_ARB_vertex_attrib_binding
-#define GL_ARB_vertex_attrib_binding 1
-#endif /* GL_ARB_vertex_attrib_binding */
-
-#ifndef GL_ARB_vertex_blend
-#define GL_ARB_vertex_blend 1
-#define GL_MAX_VERTEX_UNITS_ARB           0x86A4
-#define GL_ACTIVE_VERTEX_UNITS_ARB        0x86A5
-#define GL_WEIGHT_SUM_UNITY_ARB           0x86A6
-#define GL_VERTEX_BLEND_ARB               0x86A7
-#define GL_CURRENT_WEIGHT_ARB             0x86A8
-#define GL_WEIGHT_ARRAY_TYPE_ARB          0x86A9
-#define GL_WEIGHT_ARRAY_STRIDE_ARB        0x86AA
-#define GL_WEIGHT_ARRAY_SIZE_ARB          0x86AB
-#define GL_WEIGHT_ARRAY_POINTER_ARB       0x86AC
-#define GL_WEIGHT_ARRAY_ARB               0x86AD
-#define GL_MODELVIEW0_ARB                 0x1700
-#define GL_MODELVIEW1_ARB                 0x850A
-#define GL_MODELVIEW2_ARB                 0x8722
-#define GL_MODELVIEW3_ARB                 0x8723
-#define GL_MODELVIEW4_ARB                 0x8724
-#define GL_MODELVIEW5_ARB                 0x8725
-#define GL_MODELVIEW6_ARB                 0x8726
-#define GL_MODELVIEW7_ARB                 0x8727
-#define GL_MODELVIEW8_ARB                 0x8728
-#define GL_MODELVIEW9_ARB                 0x8729
-#define GL_MODELVIEW10_ARB                0x872A
-#define GL_MODELVIEW11_ARB                0x872B
-#define GL_MODELVIEW12_ARB                0x872C
-#define GL_MODELVIEW13_ARB                0x872D
-#define GL_MODELVIEW14_ARB                0x872E
-#define GL_MODELVIEW15_ARB                0x872F
-#define GL_MODELVIEW16_ARB                0x8730
-#define GL_MODELVIEW17_ARB                0x8731
-#define GL_MODELVIEW18_ARB                0x8732
-#define GL_MODELVIEW19_ARB                0x8733
-#define GL_MODELVIEW20_ARB                0x8734
-#define GL_MODELVIEW21_ARB                0x8735
-#define GL_MODELVIEW22_ARB                0x8736
-#define GL_MODELVIEW23_ARB                0x8737
-#define GL_MODELVIEW24_ARB                0x8738
-#define GL_MODELVIEW25_ARB                0x8739
-#define GL_MODELVIEW26_ARB                0x873A
-#define GL_MODELVIEW27_ARB                0x873B
-#define GL_MODELVIEW28_ARB                0x873C
-#define GL_MODELVIEW29_ARB                0x873D
-#define GL_MODELVIEW30_ARB                0x873E
-#define GL_MODELVIEW31_ARB                0x873F
-typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
-typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
-typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
-typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
-typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
-typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
-typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
-typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
-typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
-typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights);
-GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights);
-GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights);
-GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights);
-GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights);
-GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights);
-GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights);
-GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights);
-GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);
-GLAPI void APIENTRY glVertexBlendARB (GLint count);
-#endif
-#endif /* GL_ARB_vertex_blend */
-
-#ifndef GL_ARB_vertex_buffer_object
-#define GL_ARB_vertex_buffer_object 1
-#ifdef __MACOSX__ /* The OS X headers haven't caught up with Khronos yet */
-typedef long GLsizeiptrARB;
-typedef long GLintptrARB;
-#else
-typedef ptrdiff_t GLsizeiptrARB;
-typedef ptrdiff_t GLintptrARB;
-#endif
-#define GL_BUFFER_SIZE_ARB                0x8764
-#define GL_BUFFER_USAGE_ARB               0x8765
-#define GL_ARRAY_BUFFER_ARB               0x8892
-#define GL_ELEMENT_ARRAY_BUFFER_ARB       0x8893
-#define GL_ARRAY_BUFFER_BINDING_ARB       0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
-#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
-#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
-#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
-#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
-#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
-#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
-#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
-#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
-#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
-#define GL_READ_ONLY_ARB                  0x88B8
-#define GL_WRITE_ONLY_ARB                 0x88B9
-#define GL_READ_WRITE_ARB                 0x88BA
-#define GL_BUFFER_ACCESS_ARB              0x88BB
-#define GL_BUFFER_MAPPED_ARB              0x88BC
-#define GL_BUFFER_MAP_POINTER_ARB         0x88BD
-#define GL_STREAM_DRAW_ARB                0x88E0
-#define GL_STREAM_READ_ARB                0x88E1
-#define GL_STREAM_COPY_ARB                0x88E2
-#define GL_STATIC_DRAW_ARB                0x88E4
-#define GL_STATIC_READ_ARB                0x88E5
-#define GL_STATIC_COPY_ARB                0x88E6
-#define GL_DYNAMIC_DRAW_ARB               0x88E8
-#define GL_DYNAMIC_READ_ARB               0x88E9
-#define GL_DYNAMIC_COPY_ARB               0x88EA
-typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
-typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
-typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
-typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
-typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);
-typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);
-typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);
-typedef void *(APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
-typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
-typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, void **params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer);
-GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers);
-GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers);
-GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer);
-GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);
-GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);
-GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);
-GLAPI void *APIENTRY glMapBufferARB (GLenum target, GLenum access);
-GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target);
-GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, void **params);
-#endif
-#endif /* GL_ARB_vertex_buffer_object */
-
-#ifndef GL_ARB_vertex_program
-#define GL_ARB_vertex_program 1
-#define GL_COLOR_SUM_ARB                  0x8458
-#define GL_VERTEX_PROGRAM_ARB             0x8620
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB   0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB   0x8625
-#define GL_CURRENT_VERTEX_ATTRIB_ARB      0x8626
-#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB  0x8642
-#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB    0x8643
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
-#define GL_MAX_VERTEX_ATTRIBS_ARB         0x8869
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
-#define GL_PROGRAM_ADDRESS_REGISTERS_ARB  0x88B0
-#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
-#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
-#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
-typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, void **pointer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x);
-GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x);
-GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x);
-GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y);
-GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y);
-GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y);
-GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z);
-GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v);
-GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v);
-GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v);
-GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v);
-GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v);
-GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v);
-GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v);
-GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v);
-GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v);
-GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v);
-GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index);
-GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index);
-GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params);
-GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, void **pointer);
-#endif
-#endif /* GL_ARB_vertex_program */
-
-#ifndef GL_ARB_vertex_shader
-#define GL_ARB_vertex_shader 1
-#define GL_VERTEX_SHADER_ARB              0x8B31
-#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
-#define GL_MAX_VARYING_FLOATS_ARB         0x8B4B
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
-#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB   0x8B89
-#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
-typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
-typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
-typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name);
-GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
-GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name);
-#endif
-#endif /* GL_ARB_vertex_shader */
-
-#ifndef GL_ARB_vertex_type_10f_11f_11f_rev
-#define GL_ARB_vertex_type_10f_11f_11f_rev 1
-#endif /* GL_ARB_vertex_type_10f_11f_11f_rev */
-
-#ifndef GL_ARB_vertex_type_2_10_10_10_rev
-#define GL_ARB_vertex_type_2_10_10_10_rev 1
-#endif /* GL_ARB_vertex_type_2_10_10_10_rev */
-
-#ifndef GL_ARB_viewport_array
-#define GL_ARB_viewport_array 1
-#endif /* GL_ARB_viewport_array */
-
-#ifndef GL_ARB_window_pos
-#define GL_ARB_window_pos 1
-typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
-typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
-typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
-typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
-typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
-typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y);
-GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v);
-GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y);
-GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v);
-GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y);
-GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v);
-GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y);
-GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v);
-GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v);
-GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v);
-GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z);
-GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v);
-GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z);
-GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v);
-#endif
-#endif /* GL_ARB_window_pos */
-
-#ifndef GL_KHR_debug
-#define GL_KHR_debug 1
-#endif /* GL_KHR_debug */
-
-#ifndef GL_KHR_texture_compression_astc_hdr
-#define GL_KHR_texture_compression_astc_hdr 1
-#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR   0x93B0
-#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR   0x93B1
-#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR   0x93B2
-#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR   0x93B3
-#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR   0x93B4
-#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR   0x93B5
-#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR   0x93B6
-#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR   0x93B7
-#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR  0x93B8
-#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR  0x93B9
-#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR  0x93BA
-#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
-#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
-#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
-#endif /* GL_KHR_texture_compression_astc_hdr */
-
-#ifndef GL_KHR_texture_compression_astc_ldr
-#define GL_KHR_texture_compression_astc_ldr 1
-#endif /* GL_KHR_texture_compression_astc_ldr */
-
-#ifndef GL_OES_byte_coordinates
-#define GL_OES_byte_coordinates 1
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1BOESPROC) (GLenum texture, GLbyte s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1BVOESPROC) (GLenum texture, const GLbyte *coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2BOESPROC) (GLenum texture, GLbyte s, GLbyte t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2BVOESPROC) (GLenum texture, const GLbyte *coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3BVOESPROC) (GLenum texture, const GLbyte *coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4BVOESPROC) (GLenum texture, const GLbyte *coords);
-typedef void (APIENTRYP PFNGLTEXCOORD1BOESPROC) (GLbyte s);
-typedef void (APIENTRYP PFNGLTEXCOORD1BVOESPROC) (const GLbyte *coords);
-typedef void (APIENTRYP PFNGLTEXCOORD2BOESPROC) (GLbyte s, GLbyte t);
-typedef void (APIENTRYP PFNGLTEXCOORD2BVOESPROC) (const GLbyte *coords);
-typedef void (APIENTRYP PFNGLTEXCOORD3BOESPROC) (GLbyte s, GLbyte t, GLbyte r);
-typedef void (APIENTRYP PFNGLTEXCOORD3BVOESPROC) (const GLbyte *coords);
-typedef void (APIENTRYP PFNGLTEXCOORD4BOESPROC) (GLbyte s, GLbyte t, GLbyte r, GLbyte q);
-typedef void (APIENTRYP PFNGLTEXCOORD4BVOESPROC) (const GLbyte *coords);
-typedef void (APIENTRYP PFNGLVERTEX2BOESPROC) (GLbyte x);
-typedef void (APIENTRYP PFNGLVERTEX2BVOESPROC) (const GLbyte *coords);
-typedef void (APIENTRYP PFNGLVERTEX3BOESPROC) (GLbyte x, GLbyte y);
-typedef void (APIENTRYP PFNGLVERTEX3BVOESPROC) (const GLbyte *coords);
-typedef void (APIENTRYP PFNGLVERTEX4BOESPROC) (GLbyte x, GLbyte y, GLbyte z);
-typedef void (APIENTRYP PFNGLVERTEX4BVOESPROC) (const GLbyte *coords);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMultiTexCoord1bOES (GLenum texture, GLbyte s);
-GLAPI void APIENTRY glMultiTexCoord1bvOES (GLenum texture, const GLbyte *coords);
-GLAPI void APIENTRY glMultiTexCoord2bOES (GLenum texture, GLbyte s, GLbyte t);
-GLAPI void APIENTRY glMultiTexCoord2bvOES (GLenum texture, const GLbyte *coords);
-GLAPI void APIENTRY glMultiTexCoord3bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r);
-GLAPI void APIENTRY glMultiTexCoord3bvOES (GLenum texture, const GLbyte *coords);
-GLAPI void APIENTRY glMultiTexCoord4bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);
-GLAPI void APIENTRY glMultiTexCoord4bvOES (GLenum texture, const GLbyte *coords);
-GLAPI void APIENTRY glTexCoord1bOES (GLbyte s);
-GLAPI void APIENTRY glTexCoord1bvOES (const GLbyte *coords);
-GLAPI void APIENTRY glTexCoord2bOES (GLbyte s, GLbyte t);
-GLAPI void APIENTRY glTexCoord2bvOES (const GLbyte *coords);
-GLAPI void APIENTRY glTexCoord3bOES (GLbyte s, GLbyte t, GLbyte r);
-GLAPI void APIENTRY glTexCoord3bvOES (const GLbyte *coords);
-GLAPI void APIENTRY glTexCoord4bOES (GLbyte s, GLbyte t, GLbyte r, GLbyte q);
-GLAPI void APIENTRY glTexCoord4bvOES (const GLbyte *coords);
-GLAPI void APIENTRY glVertex2bOES (GLbyte x);
-GLAPI void APIENTRY glVertex2bvOES (const GLbyte *coords);
-GLAPI void APIENTRY glVertex3bOES (GLbyte x, GLbyte y);
-GLAPI void APIENTRY glVertex3bvOES (const GLbyte *coords);
-GLAPI void APIENTRY glVertex4bOES (GLbyte x, GLbyte y, GLbyte z);
-GLAPI void APIENTRY glVertex4bvOES (const GLbyte *coords);
-#endif
-#endif /* GL_OES_byte_coordinates */
-
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_OES_compressed_paletted_texture 1
-#define GL_PALETTE4_RGB8_OES              0x8B90
-#define GL_PALETTE4_RGBA8_OES             0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES          0x8B92
-#define GL_PALETTE4_RGBA4_OES             0x8B93
-#define GL_PALETTE4_RGB5_A1_OES           0x8B94
-#define GL_PALETTE8_RGB8_OES              0x8B95
-#define GL_PALETTE8_RGBA8_OES             0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES          0x8B97
-#define GL_PALETTE8_RGBA4_OES             0x8B98
-#define GL_PALETTE8_RGB5_A1_OES           0x8B99
-#endif /* GL_OES_compressed_paletted_texture */
-
-#ifndef GL_OES_fixed_point
-#define GL_OES_fixed_point 1
-typedef GLint GLfixed;
-#define GL_FIXED_OES                      0x140C
-typedef void (APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref);
-typedef void (APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-typedef void (APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth);
-typedef void (APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);
-typedef void (APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-typedef void (APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f);
-typedef void (APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);
-typedef void (APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param);
-typedef void (APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
-typedef void (APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation);
-typedef void (APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);
-typedef void (APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
-typedef void (APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
-typedef void (APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);
-typedef void (APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param);
-typedef void (APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);
-typedef void (APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);
-typedef void (APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);
-typedef void (APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);
-typedef void (APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
-typedef void (APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param);
-typedef void (APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-typedef void (APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
-typedef void (APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
-typedef void (APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);
-typedef void (APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);
-typedef void (APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);
-typedef void (APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-typedef void (APIENTRYP PFNGLSAMPLECOVERAGEOESPROC) (GLfixed value, GLboolean invert);
-typedef void (APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
-typedef void (APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);
-typedef void (APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
-typedef void (APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
-typedef void (APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
-typedef void (APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
-typedef void (APIENTRYP PFNGLACCUMXOESPROC) (GLenum op, GLfixed value);
-typedef void (APIENTRYP PFNGLBITMAPXOESPROC) (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);
-typedef void (APIENTRYP PFNGLBLENDCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-typedef void (APIENTRYP PFNGLCLEARACCUMXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-typedef void (APIENTRYP PFNGLCOLOR3XOESPROC) (GLfixed red, GLfixed green, GLfixed blue);
-typedef void (APIENTRYP PFNGLCOLOR3XVOESPROC) (const GLfixed *components);
-typedef void (APIENTRYP PFNGLCOLOR4XVOESPROC) (const GLfixed *components);
-typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
-typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
-typedef void (APIENTRYP PFNGLEVALCOORD1XOESPROC) (GLfixed u);
-typedef void (APIENTRYP PFNGLEVALCOORD1XVOESPROC) (const GLfixed *coords);
-typedef void (APIENTRYP PFNGLEVALCOORD2XOESPROC) (GLfixed u, GLfixed v);
-typedef void (APIENTRYP PFNGLEVALCOORD2XVOESPROC) (const GLfixed *coords);
-typedef void (APIENTRYP PFNGLFEEDBACKBUFFERXOESPROC) (GLsizei n, GLenum type, const GLfixed *buffer);
-typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
-typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
-typedef void (APIENTRYP PFNGLGETLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed *params);
-typedef void (APIENTRYP PFNGLGETMAPXVOESPROC) (GLenum target, GLenum query, GLfixed *v);
-typedef void (APIENTRYP PFNGLGETMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
-typedef void (APIENTRYP PFNGLGETPIXELMAPXVPROC) (GLenum map, GLint size, GLfixed *values);
-typedef void (APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
-typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERXVOESPROC) (GLenum target, GLint level, GLenum pname, GLfixed *params);
-typedef void (APIENTRYP PFNGLINDEXXOESPROC) (GLfixed component);
-typedef void (APIENTRYP PFNGLINDEXXVOESPROC) (const GLfixed *component);
-typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);
-typedef void (APIENTRYP PFNGLMAP1XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);
-typedef void (APIENTRYP PFNGLMAP2XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);
-typedef void (APIENTRYP PFNGLMAPGRID1XOESPROC) (GLint n, GLfixed u1, GLfixed u2);
-typedef void (APIENTRYP PFNGLMAPGRID2XOESPROC) (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);
-typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1XOESPROC) (GLenum texture, GLfixed s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1XVOESPROC) (GLenum texture, const GLfixed *coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2XOESPROC) (GLenum texture, GLfixed s, GLfixed t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2XVOESPROC) (GLenum texture, const GLfixed *coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3XVOESPROC) (GLenum texture, const GLfixed *coords);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4XVOESPROC) (GLenum texture, const GLfixed *coords);
-typedef void (APIENTRYP PFNGLNORMAL3XVOESPROC) (const GLfixed *coords);
-typedef void (APIENTRYP PFNGLPASSTHROUGHXOESPROC) (GLfixed token);
-typedef void (APIENTRYP PFNGLPIXELMAPXPROC) (GLenum map, GLint size, const GLfixed *values);
-typedef void (APIENTRYP PFNGLPIXELSTOREXPROC) (GLenum pname, GLfixed param);
-typedef void (APIENTRYP PFNGLPIXELTRANSFERXOESPROC) (GLenum pname, GLfixed param);
-typedef void (APIENTRYP PFNGLPIXELZOOMXOESPROC) (GLfixed xfactor, GLfixed yfactor);
-typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESXOESPROC) (GLsizei n, const GLuint *textures, const GLfixed *priorities);
-typedef void (APIENTRYP PFNGLRASTERPOS2XOESPROC) (GLfixed x, GLfixed y);
-typedef void (APIENTRYP PFNGLRASTERPOS2XVOESPROC) (const GLfixed *coords);
-typedef void (APIENTRYP PFNGLRASTERPOS3XOESPROC) (GLfixed x, GLfixed y, GLfixed z);
-typedef void (APIENTRYP PFNGLRASTERPOS3XVOESPROC) (const GLfixed *coords);
-typedef void (APIENTRYP PFNGLRASTERPOS4XOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed w);
-typedef void (APIENTRYP PFNGLRASTERPOS4XVOESPROC) (const GLfixed *coords);
-typedef void (APIENTRYP PFNGLRECTXOESPROC) (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);
-typedef void (APIENTRYP PFNGLRECTXVOESPROC) (const GLfixed *v1, const GLfixed *v2);
-typedef void (APIENTRYP PFNGLTEXCOORD1XOESPROC) (GLfixed s);
-typedef void (APIENTRYP PFNGLTEXCOORD1XVOESPROC) (const GLfixed *coords);
-typedef void (APIENTRYP PFNGLTEXCOORD2XOESPROC) (GLfixed s, GLfixed t);
-typedef void (APIENTRYP PFNGLTEXCOORD2XVOESPROC) (const GLfixed *coords);
-typedef void (APIENTRYP PFNGLTEXCOORD3XOESPROC) (GLfixed s, GLfixed t, GLfixed r);
-typedef void (APIENTRYP PFNGLTEXCOORD3XVOESPROC) (const GLfixed *coords);
-typedef void (APIENTRYP PFNGLTEXCOORD4XOESPROC) (GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-typedef void (APIENTRYP PFNGLTEXCOORD4XVOESPROC) (const GLfixed *coords);
-typedef void (APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
-typedef void (APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
-typedef void (APIENTRYP PFNGLVERTEX2XOESPROC) (GLfixed x);
-typedef void (APIENTRYP PFNGLVERTEX2XVOESPROC) (const GLfixed *coords);
-typedef void (APIENTRYP PFNGLVERTEX3XOESPROC) (GLfixed x, GLfixed y);
-typedef void (APIENTRYP PFNGLVERTEX3XVOESPROC) (const GLfixed *coords);
-typedef void (APIENTRYP PFNGLVERTEX4XOESPROC) (GLfixed x, GLfixed y, GLfixed z);
-typedef void (APIENTRYP PFNGLVERTEX4XVOESPROC) (const GLfixed *coords);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref);
-GLAPI void APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-GLAPI void APIENTRY glClearDepthxOES (GLfixed depth);
-GLAPI void APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);
-GLAPI void APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-GLAPI void APIENTRY glDepthRangexOES (GLfixed n, GLfixed f);
-GLAPI void APIENTRY glFogxOES (GLenum pname, GLfixed param);
-GLAPI void APIENTRY glFogxvOES (GLenum pname, const GLfixed *param);
-GLAPI void APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
-GLAPI void APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation);
-GLAPI void APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);
-GLAPI void APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params);
-GLAPI void APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
-GLAPI void APIENTRY glLightModelxOES (GLenum pname, GLfixed param);
-GLAPI void APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param);
-GLAPI void APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);
-GLAPI void APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);
-GLAPI void APIENTRY glLineWidthxOES (GLfixed width);
-GLAPI void APIENTRY glLoadMatrixxOES (const GLfixed *m);
-GLAPI void APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);
-GLAPI void APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param);
-GLAPI void APIENTRY glMultMatrixxOES (const GLfixed *m);
-GLAPI void APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-GLAPI void APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);
-GLAPI void APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
-GLAPI void APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);
-GLAPI void APIENTRY glPointSizexOES (GLfixed size);
-GLAPI void APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);
-GLAPI void APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-GLAPI void APIENTRY glSampleCoverageOES (GLfixed value, GLboolean invert);
-GLAPI void APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);
-GLAPI void APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);
-GLAPI void APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);
-GLAPI void APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);
-GLAPI void APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
-GLAPI void APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);
-GLAPI void APIENTRY glAccumxOES (GLenum op, GLfixed value);
-GLAPI void APIENTRY glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);
-GLAPI void APIENTRY glBlendColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-GLAPI void APIENTRY glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-GLAPI void APIENTRY glColor3xOES (GLfixed red, GLfixed green, GLfixed blue);
-GLAPI void APIENTRY glColor3xvOES (const GLfixed *components);
-GLAPI void APIENTRY glColor4xvOES (const GLfixed *components);
-GLAPI void APIENTRY glConvolutionParameterxOES (GLenum target, GLenum pname, GLfixed param);
-GLAPI void APIENTRY glConvolutionParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
-GLAPI void APIENTRY glEvalCoord1xOES (GLfixed u);
-GLAPI void APIENTRY glEvalCoord1xvOES (const GLfixed *coords);
-GLAPI void APIENTRY glEvalCoord2xOES (GLfixed u, GLfixed v);
-GLAPI void APIENTRY glEvalCoord2xvOES (const GLfixed *coords);
-GLAPI void APIENTRY glFeedbackBufferxOES (GLsizei n, GLenum type, const GLfixed *buffer);
-GLAPI void APIENTRY glGetConvolutionParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
-GLAPI void APIENTRY glGetHistogramParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
-GLAPI void APIENTRY glGetLightxOES (GLenum light, GLenum pname, GLfixed *params);
-GLAPI void APIENTRY glGetMapxvOES (GLenum target, GLenum query, GLfixed *v);
-GLAPI void APIENTRY glGetMaterialxOES (GLenum face, GLenum pname, GLfixed param);
-GLAPI void APIENTRY glGetPixelMapxv (GLenum map, GLint size, GLfixed *values);
-GLAPI void APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);
-GLAPI void APIENTRY glGetTexLevelParameterxvOES (GLenum target, GLint level, GLenum pname, GLfixed *params);
-GLAPI void APIENTRY glIndexxOES (GLfixed component);
-GLAPI void APIENTRY glIndexxvOES (const GLfixed *component);
-GLAPI void APIENTRY glLoadTransposeMatrixxOES (const GLfixed *m);
-GLAPI void APIENTRY glMap1xOES (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);
-GLAPI void APIENTRY glMap2xOES (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);
-GLAPI void APIENTRY glMapGrid1xOES (GLint n, GLfixed u1, GLfixed u2);
-GLAPI void APIENTRY glMapGrid2xOES (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);
-GLAPI void APIENTRY glMultTransposeMatrixxOES (const GLfixed *m);
-GLAPI void APIENTRY glMultiTexCoord1xOES (GLenum texture, GLfixed s);
-GLAPI void APIENTRY glMultiTexCoord1xvOES (GLenum texture, const GLfixed *coords);
-GLAPI void APIENTRY glMultiTexCoord2xOES (GLenum texture, GLfixed s, GLfixed t);
-GLAPI void APIENTRY glMultiTexCoord2xvOES (GLenum texture, const GLfixed *coords);
-GLAPI void APIENTRY glMultiTexCoord3xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r);
-GLAPI void APIENTRY glMultiTexCoord3xvOES (GLenum texture, const GLfixed *coords);
-GLAPI void APIENTRY glMultiTexCoord4xvOES (GLenum texture, const GLfixed *coords);
-GLAPI void APIENTRY glNormal3xvOES (const GLfixed *coords);
-GLAPI void APIENTRY glPassThroughxOES (GLfixed token);
-GLAPI void APIENTRY glPixelMapx (GLenum map, GLint size, const GLfixed *values);
-GLAPI void APIENTRY glPixelStorex (GLenum pname, GLfixed param);
-GLAPI void APIENTRY glPixelTransferxOES (GLenum pname, GLfixed param);
-GLAPI void APIENTRY glPixelZoomxOES (GLfixed xfactor, GLfixed yfactor);
-GLAPI void APIENTRY glPrioritizeTexturesxOES (GLsizei n, const GLuint *textures, const GLfixed *priorities);
-GLAPI void APIENTRY glRasterPos2xOES (GLfixed x, GLfixed y);
-GLAPI void APIENTRY glRasterPos2xvOES (const GLfixed *coords);
-GLAPI void APIENTRY glRasterPos3xOES (GLfixed x, GLfixed y, GLfixed z);
-GLAPI void APIENTRY glRasterPos3xvOES (const GLfixed *coords);
-GLAPI void APIENTRY glRasterPos4xOES (GLfixed x, GLfixed y, GLfixed z, GLfixed w);
-GLAPI void APIENTRY glRasterPos4xvOES (const GLfixed *coords);
-GLAPI void APIENTRY glRectxOES (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);
-GLAPI void APIENTRY glRectxvOES (const GLfixed *v1, const GLfixed *v2);
-GLAPI void APIENTRY glTexCoord1xOES (GLfixed s);
-GLAPI void APIENTRY glTexCoord1xvOES (const GLfixed *coords);
-GLAPI void APIENTRY glTexCoord2xOES (GLfixed s, GLfixed t);
-GLAPI void APIENTRY glTexCoord2xvOES (const GLfixed *coords);
-GLAPI void APIENTRY glTexCoord3xOES (GLfixed s, GLfixed t, GLfixed r);
-GLAPI void APIENTRY glTexCoord3xvOES (const GLfixed *coords);
-GLAPI void APIENTRY glTexCoord4xOES (GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-GLAPI void APIENTRY glTexCoord4xvOES (const GLfixed *coords);
-GLAPI void APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);
-GLAPI void APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);
-GLAPI void APIENTRY glVertex2xOES (GLfixed x);
-GLAPI void APIENTRY glVertex2xvOES (const GLfixed *coords);
-GLAPI void APIENTRY glVertex3xOES (GLfixed x, GLfixed y);
-GLAPI void APIENTRY glVertex3xvOES (const GLfixed *coords);
-GLAPI void APIENTRY glVertex4xOES (GLfixed x, GLfixed y, GLfixed z);
-GLAPI void APIENTRY glVertex4xvOES (const GLfixed *coords);
-#endif
-#endif /* GL_OES_fixed_point */
-
-#ifndef GL_OES_query_matrix
-#define GL_OES_query_matrix 1
-typedef GLbitfield (APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLbitfield APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent);
-#endif
-#endif /* GL_OES_query_matrix */
-
-#ifndef GL_OES_read_format
-#define GL_OES_read_format 1
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
-#endif /* GL_OES_read_format */
-
-#ifndef GL_OES_single_precision
-#define GL_OES_single_precision 1
-typedef void (APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
-typedef void (APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);
-typedef void (APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f);
-typedef void (APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
-typedef void (APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation);
-typedef void (APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glClearDepthfOES (GLclampf depth);
-GLAPI void APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
-GLAPI void APIENTRY glDepthRangefOES (GLclampf n, GLclampf f);
-GLAPI void APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
-GLAPI void APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation);
-GLAPI void APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
-#endif
-#endif /* GL_OES_single_precision */
-
-#ifndef GL_3DFX_multisample
-#define GL_3DFX_multisample 1
-#define GL_MULTISAMPLE_3DFX               0x86B2
-#define GL_SAMPLE_BUFFERS_3DFX            0x86B3
-#define GL_SAMPLES_3DFX                   0x86B4
-#define GL_MULTISAMPLE_BIT_3DFX           0x20000000
-#endif /* GL_3DFX_multisample */
-
-#ifndef GL_3DFX_tbuffer
-#define GL_3DFX_tbuffer 1
-typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask);
-#endif
-#endif /* GL_3DFX_tbuffer */
-
-#ifndef GL_3DFX_texture_compression_FXT1
-#define GL_3DFX_texture_compression_FXT1 1
-#define GL_COMPRESSED_RGB_FXT1_3DFX       0x86B0
-#define GL_COMPRESSED_RGBA_FXT1_3DFX      0x86B1
-#endif /* GL_3DFX_texture_compression_FXT1 */
-
-#ifndef GL_AMD_blend_minmax_factor
-#define GL_AMD_blend_minmax_factor 1
-#define GL_FACTOR_MIN_AMD                 0x901C
-#define GL_FACTOR_MAX_AMD                 0x901D
-#endif /* GL_AMD_blend_minmax_factor */
-
-#ifndef GL_AMD_conservative_depth
-#define GL_AMD_conservative_depth 1
-#endif /* GL_AMD_conservative_depth */
-
-#ifndef GL_AMD_debug_output
-#define GL_AMD_debug_output 1
-typedef void (APIENTRY  *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
-#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD   0x9143
-#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD  0x9144
-#define GL_DEBUG_LOGGED_MESSAGES_AMD      0x9145
-#define GL_DEBUG_SEVERITY_HIGH_AMD        0x9146
-#define GL_DEBUG_SEVERITY_MEDIUM_AMD      0x9147
-#define GL_DEBUG_SEVERITY_LOW_AMD         0x9148
-#define GL_DEBUG_CATEGORY_API_ERROR_AMD   0x9149
-#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A
-#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B
-#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C
-#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D
-#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E
-#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F
-#define GL_DEBUG_CATEGORY_OTHER_AMD       0x9150
-typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
-typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void *userParam);
-typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
-GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, void *userParam);
-GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
-#endif
-#endif /* GL_AMD_debug_output */
-
-#ifndef GL_AMD_depth_clamp_separate
-#define GL_AMD_depth_clamp_separate 1
-#define GL_DEPTH_CLAMP_NEAR_AMD           0x901E
-#define GL_DEPTH_CLAMP_FAR_AMD            0x901F
-#endif /* GL_AMD_depth_clamp_separate */
-
-#ifndef GL_AMD_draw_buffers_blend
-#define GL_AMD_draw_buffers_blend 1
-typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst);
-typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode);
-typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst);
-GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode);
-GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-#endif
-#endif /* GL_AMD_draw_buffers_blend */
-
-#ifndef GL_AMD_gcn_shader
-#define GL_AMD_gcn_shader 1
-#endif /* GL_AMD_gcn_shader */
-
-#ifndef GL_AMD_gpu_shader_int64
-#define GL_AMD_gpu_shader_int64 1
-typedef int64_t GLint64EXT;
-#define GL_INT64_NV                       0x140E
-#define GL_UNSIGNED_INT64_NV              0x140F
-#define GL_INT8_NV                        0x8FE0
-#define GL_INT8_VEC2_NV                   0x8FE1
-#define GL_INT8_VEC3_NV                   0x8FE2
-#define GL_INT8_VEC4_NV                   0x8FE3
-#define GL_INT16_NV                       0x8FE4
-#define GL_INT16_VEC2_NV                  0x8FE5
-#define GL_INT16_VEC3_NV                  0x8FE6
-#define GL_INT16_VEC4_NV                  0x8FE7
-#define GL_INT64_VEC2_NV                  0x8FE9
-#define GL_INT64_VEC3_NV                  0x8FEA
-#define GL_INT64_VEC4_NV                  0x8FEB
-#define GL_UNSIGNED_INT8_NV               0x8FEC
-#define GL_UNSIGNED_INT8_VEC2_NV          0x8FED
-#define GL_UNSIGNED_INT8_VEC3_NV          0x8FEE
-#define GL_UNSIGNED_INT8_VEC4_NV          0x8FEF
-#define GL_UNSIGNED_INT16_NV              0x8FF0
-#define GL_UNSIGNED_INT16_VEC2_NV         0x8FF1
-#define GL_UNSIGNED_INT16_VEC3_NV         0x8FF2
-#define GL_UNSIGNED_INT16_VEC4_NV         0x8FF3
-#define GL_UNSIGNED_INT64_VEC2_NV         0x8FF5
-#define GL_UNSIGNED_INT64_VEC3_NV         0x8FF6
-#define GL_UNSIGNED_INT64_VEC4_NV         0x8FF7
-#define GL_FLOAT16_NV                     0x8FF8
-#define GL_FLOAT16_VEC2_NV                0x8FF9
-#define GL_FLOAT16_VEC3_NV                0x8FFA
-#define GL_FLOAT16_VEC4_NV                0x8FFB
-typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);
-typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
-typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
-typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
-typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
-typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
-typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
-typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
-typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);
-typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);
-typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
-typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
-typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
-typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
-typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
-typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
-typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params);
-typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x);
-GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y);
-GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
-GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
-GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
-GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
-GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
-GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
-GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x);
-GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y);
-GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
-GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
-GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
-GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
-GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
-GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
-GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params);
-GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params);
-GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x);
-GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
-GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
-GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
-GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x);
-GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
-GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
-GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
-GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-#endif
-#endif /* GL_AMD_gpu_shader_int64 */
-
-#ifndef GL_AMD_interleaved_elements
-#define GL_AMD_interleaved_elements 1
-#define GL_VERTEX_ELEMENT_SWIZZLE_AMD     0x91A4
-#define GL_VERTEX_ID_SWIZZLE_AMD          0x91A5
-typedef void (APIENTRYP PFNGLVERTEXATTRIBPARAMETERIAMDPROC) (GLuint index, GLenum pname, GLint param);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexAttribParameteriAMD (GLuint index, GLenum pname, GLint param);
-#endif
-#endif /* GL_AMD_interleaved_elements */
-
-#ifndef GL_AMD_multi_draw_indirect
-#define GL_AMD_multi_draw_indirect 1
-typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
-typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
-GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
-#endif
-#endif /* GL_AMD_multi_draw_indirect */
-
-#ifndef GL_AMD_name_gen_delete
-#define GL_AMD_name_gen_delete 1
-#define GL_DATA_BUFFER_AMD                0x9151
-#define GL_PERFORMANCE_MONITOR_AMD        0x9152
-#define GL_QUERY_OBJECT_AMD               0x9153
-#define GL_VERTEX_ARRAY_OBJECT_AMD        0x9154
-#define GL_SAMPLER_OBJECT_AMD             0x9155
-typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names);
-typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names);
-typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names);
-GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names);
-GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name);
-#endif
-#endif /* GL_AMD_name_gen_delete */
-
-#ifndef GL_AMD_occlusion_query_event
-#define GL_AMD_occlusion_query_event 1
-#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F
-#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001
-#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002
-#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004
-#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008
-#define GL_QUERY_ALL_EVENT_BITS_AMD       0xFFFFFFFF
-typedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param);
-#endif
-#endif /* GL_AMD_occlusion_query_event */
-
-#ifndef GL_AMD_performance_monitor
-#define GL_AMD_performance_monitor 1
-#define GL_COUNTER_TYPE_AMD               0x8BC0
-#define GL_COUNTER_RANGE_AMD              0x8BC1
-#define GL_UNSIGNED_INT64_AMD             0x8BC2
-#define GL_PERCENTAGE_AMD                 0x8BC3
-#define GL_PERFMON_RESULT_AVAILABLE_AMD   0x8BC4
-#define GL_PERFMON_RESULT_SIZE_AMD        0x8BC5
-#define GL_PERFMON_RESULT_AMD             0x8BC6
-typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
-typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
-typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
-GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
-GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
-GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor);
-GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#endif
-#endif /* GL_AMD_performance_monitor */
-
-#ifndef GL_AMD_pinned_memory
-#define GL_AMD_pinned_memory 1
-#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160
-#endif /* GL_AMD_pinned_memory */
-
-#ifndef GL_AMD_query_buffer_object
-#define GL_AMD_query_buffer_object 1
-#define GL_QUERY_BUFFER_AMD               0x9192
-#define GL_QUERY_BUFFER_BINDING_AMD       0x9193
-#define GL_QUERY_RESULT_NO_WAIT_AMD       0x9194
-#endif /* GL_AMD_query_buffer_object */
-
-#ifndef GL_AMD_sample_positions
-#define GL_AMD_sample_positions 1
-#define GL_SUBSAMPLE_DISTANCE_AMD         0x883F
-typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val);
-#endif
-#endif /* GL_AMD_sample_positions */
-
-#ifndef GL_AMD_seamless_cubemap_per_texture
-#define GL_AMD_seamless_cubemap_per_texture 1
-#endif /* GL_AMD_seamless_cubemap_per_texture */
-
-#ifndef GL_AMD_shader_atomic_counter_ops
-#define GL_AMD_shader_atomic_counter_ops 1
-#endif /* GL_AMD_shader_atomic_counter_ops */
-
-#ifndef GL_AMD_shader_stencil_export
-#define GL_AMD_shader_stencil_export 1
-#endif /* GL_AMD_shader_stencil_export */
-
-#ifndef GL_AMD_shader_trinary_minmax
-#define GL_AMD_shader_trinary_minmax 1
-#endif /* GL_AMD_shader_trinary_minmax */
-
-#ifndef GL_AMD_sparse_texture
-#define GL_AMD_sparse_texture 1
-#define GL_VIRTUAL_PAGE_SIZE_X_AMD        0x9195
-#define GL_VIRTUAL_PAGE_SIZE_Y_AMD        0x9196
-#define GL_VIRTUAL_PAGE_SIZE_Z_AMD        0x9197
-#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD    0x9198
-#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199
-#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A
-#define GL_MIN_SPARSE_LEVEL_AMD           0x919B
-#define GL_MIN_LOD_WARNING_AMD            0x919C
-#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001
-typedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
-typedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
-GLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
-#endif
-#endif /* GL_AMD_sparse_texture */
-
-#ifndef GL_AMD_stencil_operation_extended
-#define GL_AMD_stencil_operation_extended 1
-#define GL_SET_AMD                        0x874A
-#define GL_REPLACE_VALUE_AMD              0x874B
-#define GL_STENCIL_OP_VALUE_AMD           0x874C
-#define GL_STENCIL_BACK_OP_VALUE_AMD      0x874D
-typedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value);
-#endif
-#endif /* GL_AMD_stencil_operation_extended */
-
-#ifndef GL_AMD_texture_texture4
-#define GL_AMD_texture_texture4 1
-#endif /* GL_AMD_texture_texture4 */
-
-#ifndef GL_AMD_transform_feedback3_lines_triangles
-#define GL_AMD_transform_feedback3_lines_triangles 1
-#endif /* GL_AMD_transform_feedback3_lines_triangles */
-
-#ifndef GL_AMD_transform_feedback4
-#define GL_AMD_transform_feedback4 1
-#define GL_STREAM_RASTERIZATION_AMD       0x91A0
-#endif /* GL_AMD_transform_feedback4 */
-
-#ifndef GL_AMD_vertex_shader_layer
-#define GL_AMD_vertex_shader_layer 1
-#endif /* GL_AMD_vertex_shader_layer */
-
-#ifndef GL_AMD_vertex_shader_tessellator
-#define GL_AMD_vertex_shader_tessellator 1
-#define GL_SAMPLER_BUFFER_AMD             0x9001
-#define GL_INT_SAMPLER_BUFFER_AMD         0x9002
-#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003
-#define GL_TESSELLATION_MODE_AMD          0x9004
-#define GL_TESSELLATION_FACTOR_AMD        0x9005
-#define GL_DISCRETE_AMD                   0x9006
-#define GL_CONTINUOUS_AMD                 0x9007
-typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);
-typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor);
-GLAPI void APIENTRY glTessellationModeAMD (GLenum mode);
-#endif
-#endif /* GL_AMD_vertex_shader_tessellator */
-
-#ifndef GL_AMD_vertex_shader_viewport_index
-#define GL_AMD_vertex_shader_viewport_index 1
-#endif /* GL_AMD_vertex_shader_viewport_index */
-
-#ifndef GL_APPLE_aux_depth_stencil
-#define GL_APPLE_aux_depth_stencil 1
-#define GL_AUX_DEPTH_STENCIL_APPLE        0x8A14
-#endif /* GL_APPLE_aux_depth_stencil */
-
-#ifndef GL_APPLE_client_storage
-#define GL_APPLE_client_storage 1
-#define GL_UNPACK_CLIENT_STORAGE_APPLE    0x85B2
-#endif /* GL_APPLE_client_storage */
-
-#ifndef GL_APPLE_element_array
-#define GL_APPLE_element_array 1
-#define GL_ELEMENT_ARRAY_APPLE            0x8A0C
-#define GL_ELEMENT_ARRAY_TYPE_APPLE       0x8A0D
-#define GL_ELEMENT_ARRAY_POINTER_APPLE    0x8A0E
-typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void *pointer);
-typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
-typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
-typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const void *pointer);
-GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count);
-GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
-GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
-#endif
-#endif /* GL_APPLE_element_array */
-
-#ifndef GL_APPLE_fence
-#define GL_APPLE_fence 1
-#define GL_DRAW_PIXELS_APPLE              0x8A0A
-#define GL_FENCE_APPLE                    0x8A0B
-typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
-typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
-typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
-typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
-typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
-typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
-typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
-typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences);
-GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences);
-GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence);
-GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence);
-GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence);
-GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence);
-GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name);
-GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name);
-#endif
-#endif /* GL_APPLE_fence */
-
-#ifndef GL_APPLE_float_pixels
-#define GL_APPLE_float_pixels 1
-#define GL_HALF_APPLE                     0x140B
-#define GL_RGBA_FLOAT32_APPLE             0x8814
-#define GL_RGB_FLOAT32_APPLE              0x8815
-#define GL_ALPHA_FLOAT32_APPLE            0x8816
-#define GL_INTENSITY_FLOAT32_APPLE        0x8817
-#define GL_LUMINANCE_FLOAT32_APPLE        0x8818
-#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE  0x8819
-#define GL_RGBA_FLOAT16_APPLE             0x881A
-#define GL_RGB_FLOAT16_APPLE              0x881B
-#define GL_ALPHA_FLOAT16_APPLE            0x881C
-#define GL_INTENSITY_FLOAT16_APPLE        0x881D
-#define GL_LUMINANCE_FLOAT16_APPLE        0x881E
-#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE  0x881F
-#define GL_COLOR_FLOAT_APPLE              0x8A0F
-#endif /* GL_APPLE_float_pixels */
-
-#ifndef GL_APPLE_flush_buffer_range
-#define GL_APPLE_flush_buffer_range 1
-#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
-#define GL_BUFFER_FLUSHING_UNMAP_APPLE    0x8A13
-typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param);
-GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size);
-#endif
-#endif /* GL_APPLE_flush_buffer_range */
-
-#ifndef GL_APPLE_object_purgeable
-#define GL_APPLE_object_purgeable 1
-#define GL_BUFFER_OBJECT_APPLE            0x85B3
-#define GL_RELEASED_APPLE                 0x8A19
-#define GL_VOLATILE_APPLE                 0x8A1A
-#define GL_RETAINED_APPLE                 0x8A1B
-#define GL_UNDEFINED_APPLE                0x8A1C
-#define GL_PURGEABLE_APPLE                0x8A1D
-typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
-typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
-typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
-GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
-GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params);
-#endif
-#endif /* GL_APPLE_object_purgeable */
-
-#ifndef GL_APPLE_rgb_422
-#define GL_APPLE_rgb_422 1
-#define GL_RGB_422_APPLE                  0x8A1F
-#define GL_UNSIGNED_SHORT_8_8_APPLE       0x85BA
-#define GL_UNSIGNED_SHORT_8_8_REV_APPLE   0x85BB
-#define GL_RGB_RAW_422_APPLE              0x8A51
-#endif /* GL_APPLE_rgb_422 */
-
-#ifndef GL_APPLE_row_bytes
-#define GL_APPLE_row_bytes 1
-#define GL_PACK_ROW_BYTES_APPLE           0x8A15
-#define GL_UNPACK_ROW_BYTES_APPLE         0x8A16
-#endif /* GL_APPLE_row_bytes */
-
-#ifndef GL_APPLE_specular_vector
-#define GL_APPLE_specular_vector 1
-#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
-#endif /* GL_APPLE_specular_vector */
-
-#ifndef GL_APPLE_texture_range
-#define GL_APPLE_texture_range 1
-#define GL_TEXTURE_RANGE_LENGTH_APPLE     0x85B7
-#define GL_TEXTURE_RANGE_POINTER_APPLE    0x85B8
-#define GL_TEXTURE_STORAGE_HINT_APPLE     0x85BC
-#define GL_STORAGE_PRIVATE_APPLE          0x85BD
-#define GL_STORAGE_CACHED_APPLE           0x85BE
-#define GL_STORAGE_SHARED_APPLE           0x85BF
-typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const void *pointer);
-typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, void **params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const void *pointer);
-GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, void **params);
-#endif
-#endif /* GL_APPLE_texture_range */
-
-#ifndef GL_APPLE_transform_hint
-#define GL_APPLE_transform_hint 1
-#define GL_TRANSFORM_HINT_APPLE           0x85B1
-#endif /* GL_APPLE_transform_hint */
-
-#ifndef GL_APPLE_vertex_array_object
-#define GL_APPLE_vertex_array_object 1
-#define GL_VERTEX_ARRAY_BINDING_APPLE     0x85B5
-typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
-typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
-typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
-typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array);
-GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays);
-GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays);
-GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array);
-#endif
-#endif /* GL_APPLE_vertex_array_object */
-
-#ifndef GL_APPLE_vertex_array_range
-#define GL_APPLE_vertex_array_range 1
-#define GL_VERTEX_ARRAY_RANGE_APPLE       0x851D
-#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
-#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
-#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
-#define GL_STORAGE_CLIENT_APPLE           0x85B4
-typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
-typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
-typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, void *pointer);
-GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, void *pointer);
-GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param);
-#endif
-#endif /* GL_APPLE_vertex_array_range */
-
-#ifndef GL_APPLE_vertex_program_evaluators
-#define GL_APPLE_vertex_program_evaluators 1
-#define GL_VERTEX_ATTRIB_MAP1_APPLE       0x8A00
-#define GL_VERTEX_ATTRIB_MAP2_APPLE       0x8A01
-#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE  0x8A02
-#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03
-#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04
-#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05
-#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE  0x8A06
-#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07
-#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08
-#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09
-typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
-typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
-typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname);
-typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
-typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
-typedef 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);
-typedef 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);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname);
-GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname);
-GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname);
-GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
-GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
-GLAPI 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);
-GLAPI 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);
-#endif
-#endif /* GL_APPLE_vertex_program_evaluators */
-
-#ifndef GL_APPLE_ycbcr_422
-#define GL_APPLE_ycbcr_422 1
-#define GL_YCBCR_422_APPLE                0x85B9
-#endif /* GL_APPLE_ycbcr_422 */
-
-#ifndef GL_ATI_draw_buffers
-#define GL_ATI_draw_buffers 1
-#define GL_MAX_DRAW_BUFFERS_ATI           0x8824
-#define GL_DRAW_BUFFER0_ATI               0x8825
-#define GL_DRAW_BUFFER1_ATI               0x8826
-#define GL_DRAW_BUFFER2_ATI               0x8827
-#define GL_DRAW_BUFFER3_ATI               0x8828
-#define GL_DRAW_BUFFER4_ATI               0x8829
-#define GL_DRAW_BUFFER5_ATI               0x882A
-#define GL_DRAW_BUFFER6_ATI               0x882B
-#define GL_DRAW_BUFFER7_ATI               0x882C
-#define GL_DRAW_BUFFER8_ATI               0x882D
-#define GL_DRAW_BUFFER9_ATI               0x882E
-#define GL_DRAW_BUFFER10_ATI              0x882F
-#define GL_DRAW_BUFFER11_ATI              0x8830
-#define GL_DRAW_BUFFER12_ATI              0x8831
-#define GL_DRAW_BUFFER13_ATI              0x8832
-#define GL_DRAW_BUFFER14_ATI              0x8833
-#define GL_DRAW_BUFFER15_ATI              0x8834
-typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs);
-#endif
-#endif /* GL_ATI_draw_buffers */
-
-#ifndef GL_ATI_element_array
-#define GL_ATI_element_array 1
-#define GL_ELEMENT_ARRAY_ATI              0x8768
-#define GL_ELEMENT_ARRAY_TYPE_ATI         0x8769
-#define GL_ELEMENT_ARRAY_POINTER_ATI      0x876A
-typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void *pointer);
-typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
-typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glElementPointerATI (GLenum type, const void *pointer);
-GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count);
-GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count);
-#endif
-#endif /* GL_ATI_element_array */
-
-#ifndef GL_ATI_envmap_bumpmap
-#define GL_ATI_envmap_bumpmap 1
-#define GL_BUMP_ROT_MATRIX_ATI            0x8775
-#define GL_BUMP_ROT_MATRIX_SIZE_ATI       0x8776
-#define GL_BUMP_NUM_TEX_UNITS_ATI         0x8777
-#define GL_BUMP_TEX_UNITS_ATI             0x8778
-#define GL_DUDV_ATI                       0x8779
-#define GL_DU8DV8_ATI                     0x877A
-#define GL_BUMP_ENVMAP_ATI                0x877B
-#define GL_BUMP_TARGET_ATI                0x877C
-typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
-typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
-typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
-typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param);
-GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param);
-GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param);
-GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param);
-#endif
-#endif /* GL_ATI_envmap_bumpmap */
-
-#ifndef GL_ATI_fragment_shader
-#define GL_ATI_fragment_shader 1
-#define GL_FRAGMENT_SHADER_ATI            0x8920
-#define GL_REG_0_ATI                      0x8921
-#define GL_REG_1_ATI                      0x8922
-#define GL_REG_2_ATI                      0x8923
-#define GL_REG_3_ATI                      0x8924
-#define GL_REG_4_ATI                      0x8925
-#define GL_REG_5_ATI                      0x8926
-#define GL_REG_6_ATI                      0x8927
-#define GL_REG_7_ATI                      0x8928
-#define GL_REG_8_ATI                      0x8929
-#define GL_REG_9_ATI                      0x892A
-#define GL_REG_10_ATI                     0x892B
-#define GL_REG_11_ATI                     0x892C
-#define GL_REG_12_ATI                     0x892D
-#define GL_REG_13_ATI                     0x892E
-#define GL_REG_14_ATI                     0x892F
-#define GL_REG_15_ATI                     0x8930
-#define GL_REG_16_ATI                     0x8931
-#define GL_REG_17_ATI                     0x8932
-#define GL_REG_18_ATI                     0x8933
-#define GL_REG_19_ATI                     0x8934
-#define GL_REG_20_ATI                     0x8935
-#define GL_REG_21_ATI                     0x8936
-#define GL_REG_22_ATI                     0x8937
-#define GL_REG_23_ATI                     0x8938
-#define GL_REG_24_ATI                     0x8939
-#define GL_REG_25_ATI                     0x893A
-#define GL_REG_26_ATI                     0x893B
-#define GL_REG_27_ATI                     0x893C
-#define GL_REG_28_ATI                     0x893D
-#define GL_REG_29_ATI                     0x893E
-#define GL_REG_30_ATI                     0x893F
-#define GL_REG_31_ATI                     0x8940
-#define GL_CON_0_ATI                      0x8941
-#define GL_CON_1_ATI                      0x8942
-#define GL_CON_2_ATI                      0x8943
-#define GL_CON_3_ATI                      0x8944
-#define GL_CON_4_ATI                      0x8945
-#define GL_CON_5_ATI                      0x8946
-#define GL_CON_6_ATI                      0x8947
-#define GL_CON_7_ATI                      0x8948
-#define GL_CON_8_ATI                      0x8949
-#define GL_CON_9_ATI                      0x894A
-#define GL_CON_10_ATI                     0x894B
-#define GL_CON_11_ATI                     0x894C
-#define GL_CON_12_ATI                     0x894D
-#define GL_CON_13_ATI                     0x894E
-#define GL_CON_14_ATI                     0x894F
-#define GL_CON_15_ATI                     0x8950
-#define GL_CON_16_ATI                     0x8951
-#define GL_CON_17_ATI                     0x8952
-#define GL_CON_18_ATI                     0x8953
-#define GL_CON_19_ATI                     0x8954
-#define GL_CON_20_ATI                     0x8955
-#define GL_CON_21_ATI                     0x8956
-#define GL_CON_22_ATI                     0x8957
-#define GL_CON_23_ATI                     0x8958
-#define GL_CON_24_ATI                     0x8959
-#define GL_CON_25_ATI                     0x895A
-#define GL_CON_26_ATI                     0x895B
-#define GL_CON_27_ATI                     0x895C
-#define GL_CON_28_ATI                     0x895D
-#define GL_CON_29_ATI                     0x895E
-#define GL_CON_30_ATI                     0x895F
-#define GL_CON_31_ATI                     0x8960
-#define GL_MOV_ATI                        0x8961
-#define GL_ADD_ATI                        0x8963
-#define GL_MUL_ATI                        0x8964
-#define GL_SUB_ATI                        0x8965
-#define GL_DOT3_ATI                       0x8966
-#define GL_DOT4_ATI                       0x8967
-#define GL_MAD_ATI                        0x8968
-#define GL_LERP_ATI                       0x8969
-#define GL_CND_ATI                        0x896A
-#define GL_CND0_ATI                       0x896B
-#define GL_DOT2_ADD_ATI                   0x896C
-#define GL_SECONDARY_INTERPOLATOR_ATI     0x896D
-#define GL_NUM_FRAGMENT_REGISTERS_ATI     0x896E
-#define GL_NUM_FRAGMENT_CONSTANTS_ATI     0x896F
-#define GL_NUM_PASSES_ATI                 0x8970
-#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI  0x8971
-#define GL_NUM_INSTRUCTIONS_TOTAL_ATI     0x8972
-#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
-#define GL_NUM_LOOPBACK_COMPONENTS_ATI    0x8974
-#define GL_COLOR_ALPHA_PAIRING_ATI        0x8975
-#define GL_SWIZZLE_STR_ATI                0x8976
-#define GL_SWIZZLE_STQ_ATI                0x8977
-#define GL_SWIZZLE_STR_DR_ATI             0x8978
-#define GL_SWIZZLE_STQ_DQ_ATI             0x8979
-#define GL_SWIZZLE_STRQ_ATI               0x897A
-#define GL_SWIZZLE_STRQ_DQ_ATI            0x897B
-#define GL_RED_BIT_ATI                    0x00000001
-#define GL_GREEN_BIT_ATI                  0x00000002
-#define GL_BLUE_BIT_ATI                   0x00000004
-#define GL_2X_BIT_ATI                     0x00000001
-#define GL_4X_BIT_ATI                     0x00000002
-#define GL_8X_BIT_ATI                     0x00000004
-#define GL_HALF_BIT_ATI                   0x00000008
-#define GL_QUARTER_BIT_ATI                0x00000010
-#define GL_EIGHTH_BIT_ATI                 0x00000020
-#define GL_SATURATE_BIT_ATI               0x00000040
-#define GL_COMP_BIT_ATI                   0x00000002
-#define GL_NEGATE_BIT_ATI                 0x00000004
-#define GL_BIAS_BIT_ATI                   0x00000008
-typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
-typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
-typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
-typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
-typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
-typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
-typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
-typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
-typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
-typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
-typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
-typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
-typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
-typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range);
-GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id);
-GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id);
-GLAPI void APIENTRY glBeginFragmentShaderATI (void);
-GLAPI void APIENTRY glEndFragmentShaderATI (void);
-GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle);
-GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle);
-GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
-GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
-GLAPI 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);
-GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
-GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
-GLAPI 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);
-GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value);
-#endif
-#endif /* GL_ATI_fragment_shader */
-
-#ifndef GL_ATI_map_object_buffer
-#define GL_ATI_map_object_buffer 1
-typedef void *(APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
-typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void *APIENTRY glMapObjectBufferATI (GLuint buffer);
-GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer);
-#endif
-#endif /* GL_ATI_map_object_buffer */
-
-#ifndef GL_ATI_meminfo
-#define GL_ATI_meminfo 1
-#define GL_VBO_FREE_MEMORY_ATI            0x87FB
-#define GL_TEXTURE_FREE_MEMORY_ATI        0x87FC
-#define GL_RENDERBUFFER_FREE_MEMORY_ATI   0x87FD
-#endif /* GL_ATI_meminfo */
-
-#ifndef GL_ATI_pixel_format_float
-#define GL_ATI_pixel_format_float 1
-#define GL_RGBA_FLOAT_MODE_ATI            0x8820
-#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
-#endif /* GL_ATI_pixel_format_float */
-
-#ifndef GL_ATI_pn_triangles
-#define GL_ATI_pn_triangles 1
-#define GL_PN_TRIANGLES_ATI               0x87F0
-#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
-#define GL_PN_TRIANGLES_POINT_MODE_ATI    0x87F2
-#define GL_PN_TRIANGLES_NORMAL_MODE_ATI   0x87F3
-#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
-#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
-#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
-#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
-#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
-typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param);
-GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param);
-#endif
-#endif /* GL_ATI_pn_triangles */
-
-#ifndef GL_ATI_separate_stencil
-#define GL_ATI_separate_stencil 1
-#define GL_STENCIL_BACK_FUNC_ATI          0x8800
-#define GL_STENCIL_BACK_FAIL_ATI          0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
-typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
-#endif
-#endif /* GL_ATI_separate_stencil */
-
-#ifndef GL_ATI_text_fragment_shader
-#define GL_ATI_text_fragment_shader 1
-#define GL_TEXT_FRAGMENT_SHADER_ATI       0x8200
-#endif /* GL_ATI_text_fragment_shader */
-
-#ifndef GL_ATI_texture_env_combine3
-#define GL_ATI_texture_env_combine3 1
-#define GL_MODULATE_ADD_ATI               0x8744
-#define GL_MODULATE_SIGNED_ADD_ATI        0x8745
-#define GL_MODULATE_SUBTRACT_ATI          0x8746
-#endif /* GL_ATI_texture_env_combine3 */
-
-#ifndef GL_ATI_texture_float
-#define GL_ATI_texture_float 1
-#define GL_RGBA_FLOAT32_ATI               0x8814
-#define GL_RGB_FLOAT32_ATI                0x8815
-#define GL_ALPHA_FLOAT32_ATI              0x8816
-#define GL_INTENSITY_FLOAT32_ATI          0x8817
-#define GL_LUMINANCE_FLOAT32_ATI          0x8818
-#define GL_LUMINANCE_ALPHA_FLOAT32_ATI    0x8819
-#define GL_RGBA_FLOAT16_ATI               0x881A
-#define GL_RGB_FLOAT16_ATI                0x881B
-#define GL_ALPHA_FLOAT16_ATI              0x881C
-#define GL_INTENSITY_FLOAT16_ATI          0x881D
-#define GL_LUMINANCE_FLOAT16_ATI          0x881E
-#define GL_LUMINANCE_ALPHA_FLOAT16_ATI    0x881F
-#endif /* GL_ATI_texture_float */
-
-#ifndef GL_ATI_texture_mirror_once
-#define GL_ATI_texture_mirror_once 1
-#define GL_MIRROR_CLAMP_ATI               0x8742
-#define GL_MIRROR_CLAMP_TO_EDGE_ATI       0x8743
-#endif /* GL_ATI_texture_mirror_once */
-
-#ifndef GL_ATI_vertex_array_object
-#define GL_ATI_vertex_array_object 1
-#define GL_STATIC_ATI                     0x8760
-#define GL_DYNAMIC_ATI                    0x8761
-#define GL_PRESERVE_ATI                   0x8762
-#define GL_DISCARD_ATI                    0x8763
-#define GL_OBJECT_BUFFER_SIZE_ATI         0x8764
-#define GL_OBJECT_BUFFER_USAGE_ATI        0x8765
-#define GL_ARRAY_OBJECT_BUFFER_ATI        0x8766
-#define GL_ARRAY_OBJECT_OFFSET_ATI        0x8767
-typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void *pointer, GLenum usage);
-typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
-typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);
-typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
-typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
-typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
-typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const void *pointer, GLenum usage);
-GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer);
-GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);
-GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params);
-GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer);
-GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
-GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params);
-GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
-GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params);
-#endif
-#endif /* GL_ATI_vertex_array_object */
-
-#ifndef GL_ATI_vertex_attrib_array_object
-#define GL_ATI_vertex_attrib_array_object 1
-typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
-GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params);
-#endif
-#endif /* GL_ATI_vertex_attrib_array_object */
-
-#ifndef GL_ATI_vertex_streams
-#define GL_ATI_vertex_streams 1
-#define GL_MAX_VERTEX_STREAMS_ATI         0x876B
-#define GL_VERTEX_STREAM0_ATI             0x876C
-#define GL_VERTEX_STREAM1_ATI             0x876D
-#define GL_VERTEX_STREAM2_ATI             0x876E
-#define GL_VERTEX_STREAM3_ATI             0x876F
-#define GL_VERTEX_STREAM4_ATI             0x8770
-#define GL_VERTEX_STREAM5_ATI             0x8771
-#define GL_VERTEX_STREAM6_ATI             0x8772
-#define GL_VERTEX_STREAM7_ATI             0x8773
-#define GL_VERTEX_SOURCE_ATI              0x8774
-typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
-typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
-typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
-typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
-typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
-typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
-typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
-typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x);
-GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords);
-GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x);
-GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords);
-GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x);
-GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords);
-GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x);
-GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords);
-GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y);
-GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords);
-GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y);
-GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords);
-GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y);
-GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords);
-GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y);
-GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords);
-GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z);
-GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords);
-GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z);
-GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords);
-GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords);
-GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords);
-GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
-GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords);
-GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w);
-GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords);
-GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords);
-GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords);
-GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
-GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords);
-GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
-GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords);
-GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz);
-GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords);
-GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
-GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords);
-GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
-GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords);
-GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream);
-GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param);
-GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param);
-#endif
-#endif /* GL_ATI_vertex_streams */
-
-#ifndef GL_EXT_422_pixels
-#define GL_EXT_422_pixels 1
-#define GL_422_EXT                        0x80CC
-#define GL_422_REV_EXT                    0x80CD
-#define GL_422_AVERAGE_EXT                0x80CE
-#define GL_422_REV_AVERAGE_EXT            0x80CF
-#endif /* GL_EXT_422_pixels */
-
-#ifndef GL_EXT_abgr
-#define GL_EXT_abgr 1
-#define GL_ABGR_EXT                       0x8000
-#endif /* GL_EXT_abgr */
-
-#ifndef GL_EXT_bgra
-#define GL_EXT_bgra 1
-#define GL_BGR_EXT                        0x80E0
-#define GL_BGRA_EXT                       0x80E1
-#endif /* GL_EXT_bgra */
-
-#ifndef GL_EXT_bindable_uniform
-#define GL_EXT_bindable_uniform 1
-#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
-#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
-#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
-#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT  0x8DED
-#define GL_UNIFORM_BUFFER_EXT             0x8DEE
-#define GL_UNIFORM_BUFFER_BINDING_EXT     0x8DEF
-typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
-typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
-typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer);
-GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location);
-GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location);
-#endif
-#endif /* GL_EXT_bindable_uniform */
-
-#ifndef GL_EXT_blend_color
-#define GL_EXT_blend_color 1
-#define GL_CONSTANT_COLOR_EXT             0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR_EXT   0x8002
-#define GL_CONSTANT_ALPHA_EXT             0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT   0x8004
-#define GL_BLEND_COLOR_EXT                0x8005
-typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-#endif
-#endif /* GL_EXT_blend_color */
-
-#ifndef GL_EXT_blend_equation_separate
-#define GL_EXT_blend_equation_separate 1
-#define GL_BLEND_EQUATION_RGB_EXT         0x8009
-#define GL_BLEND_EQUATION_ALPHA_EXT       0x883D
-typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha);
-#endif
-#endif /* GL_EXT_blend_equation_separate */
-
-#ifndef GL_EXT_blend_func_separate
-#define GL_EXT_blend_func_separate 1
-#define GL_BLEND_DST_RGB_EXT              0x80C8
-#define GL_BLEND_SRC_RGB_EXT              0x80C9
-#define GL_BLEND_DST_ALPHA_EXT            0x80CA
-#define GL_BLEND_SRC_ALPHA_EXT            0x80CB
-typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-#endif
-#endif /* GL_EXT_blend_func_separate */
-
-#ifndef GL_EXT_blend_logic_op
-#define GL_EXT_blend_logic_op 1
-#endif /* GL_EXT_blend_logic_op */
-
-#ifndef GL_EXT_blend_minmax
-#define GL_EXT_blend_minmax 1
-#define GL_MIN_EXT                        0x8007
-#define GL_MAX_EXT                        0x8008
-#define GL_FUNC_ADD_EXT                   0x8006
-#define GL_BLEND_EQUATION_EXT             0x8009
-typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendEquationEXT (GLenum mode);
-#endif
-#endif /* GL_EXT_blend_minmax */
-
-#ifndef GL_EXT_blend_subtract
-#define GL_EXT_blend_subtract 1
-#define GL_FUNC_SUBTRACT_EXT              0x800A
-#define GL_FUNC_REVERSE_SUBTRACT_EXT      0x800B
-#endif /* GL_EXT_blend_subtract */
-
-#ifndef GL_EXT_clip_volume_hint
-#define GL_EXT_clip_volume_hint 1
-#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT  0x80F0
-#endif /* GL_EXT_clip_volume_hint */
-
-#ifndef GL_EXT_cmyka
-#define GL_EXT_cmyka 1
-#define GL_CMYK_EXT                       0x800C
-#define GL_CMYKA_EXT                      0x800D
-#define GL_PACK_CMYK_HINT_EXT             0x800E
-#define GL_UNPACK_CMYK_HINT_EXT           0x800F
-#endif /* GL_EXT_cmyka */
-
-#ifndef GL_EXT_color_subtable
-#define GL_EXT_color_subtable 1
-typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
-typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
-GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-#endif
-#endif /* GL_EXT_color_subtable */
-
-#ifndef GL_EXT_compiled_vertex_array
-#define GL_EXT_compiled_vertex_array 1
-#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT   0x81A8
-#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT   0x81A9
-typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
-typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count);
-GLAPI void APIENTRY glUnlockArraysEXT (void);
-#endif
-#endif /* GL_EXT_compiled_vertex_array */
-
-#ifndef GL_EXT_convolution
-#define GL_EXT_convolution 1
-#define GL_CONVOLUTION_1D_EXT             0x8010
-#define GL_CONVOLUTION_2D_EXT             0x8011
-#define GL_SEPARABLE_2D_EXT               0x8012
-#define GL_CONVOLUTION_BORDER_MODE_EXT    0x8013
-#define GL_CONVOLUTION_FILTER_SCALE_EXT   0x8014
-#define GL_CONVOLUTION_FILTER_BIAS_EXT    0x8015
-#define GL_REDUCE_EXT                     0x8016
-#define GL_CONVOLUTION_FORMAT_EXT         0x8017
-#define GL_CONVOLUTION_WIDTH_EXT          0x8018
-#define GL_CONVOLUTION_HEIGHT_EXT         0x8019
-#define GL_MAX_CONVOLUTION_WIDTH_EXT      0x801A
-#define GL_MAX_CONVOLUTION_HEIGHT_EXT     0x801B
-#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
-#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
-#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
-#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
-#define GL_POST_CONVOLUTION_RED_BIAS_EXT  0x8020
-#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
-#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
-#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
-typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
-typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
-typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
-typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
-typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *image);
-typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
-typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
-GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
-GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params);
-GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params);
-GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, void *image);
-GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
-GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
-#endif
-#endif /* GL_EXT_convolution */
-
-#ifndef GL_EXT_coordinate_frame
-#define GL_EXT_coordinate_frame 1
-#define GL_TANGENT_ARRAY_EXT              0x8439
-#define GL_BINORMAL_ARRAY_EXT             0x843A
-#define GL_CURRENT_TANGENT_EXT            0x843B
-#define GL_CURRENT_BINORMAL_EXT           0x843C
-#define GL_TANGENT_ARRAY_TYPE_EXT         0x843E
-#define GL_TANGENT_ARRAY_STRIDE_EXT       0x843F
-#define GL_BINORMAL_ARRAY_TYPE_EXT        0x8440
-#define GL_BINORMAL_ARRAY_STRIDE_EXT      0x8441
-#define GL_TANGENT_ARRAY_POINTER_EXT      0x8442
-#define GL_BINORMAL_ARRAY_POINTER_EXT     0x8443
-#define GL_MAP1_TANGENT_EXT               0x8444
-#define GL_MAP2_TANGENT_EXT               0x8445
-#define GL_MAP1_BINORMAL_EXT              0x8446
-#define GL_MAP2_BINORMAL_EXT              0x8447
-typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
-typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
-typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
-typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
-typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
-typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
-typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
-typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
-typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
-typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
-typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
-typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
-typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
-typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
-typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
-typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
-typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
-typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
-typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
-typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
-typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
-typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz);
-GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v);
-GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz);
-GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v);
-GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz);
-GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v);
-GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz);
-GLAPI void APIENTRY glTangent3ivEXT (const GLint *v);
-GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz);
-GLAPI void APIENTRY glTangent3svEXT (const GLshort *v);
-GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz);
-GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v);
-GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz);
-GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v);
-GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz);
-GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v);
-GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz);
-GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v);
-GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz);
-GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v);
-GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const void *pointer);
-GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const void *pointer);
-#endif
-#endif /* GL_EXT_coordinate_frame */
-
-#ifndef GL_EXT_copy_texture
-#define GL_EXT_copy_texture 1
-typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-#endif
-#endif /* GL_EXT_copy_texture */
-
-#ifndef GL_EXT_cull_vertex
-#define GL_EXT_cull_vertex 1
-#define GL_CULL_VERTEX_EXT                0x81AA
-#define GL_CULL_VERTEX_EYE_POSITION_EXT   0x81AB
-#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
-typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
-typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params);
-GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params);
-#endif
-#endif /* GL_EXT_cull_vertex */
-
-#ifndef GL_EXT_debug_label
-#define GL_EXT_debug_label 1
-#define GL_PROGRAM_PIPELINE_OBJECT_EXT    0x8A4F
-#define GL_PROGRAM_OBJECT_EXT             0x8B40
-#define GL_SHADER_OBJECT_EXT              0x8B48
-#define GL_BUFFER_OBJECT_EXT              0x9151
-#define GL_QUERY_OBJECT_EXT               0x9153
-#define GL_VERTEX_ARRAY_OBJECT_EXT        0x9154
-typedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-typedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-GLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-#endif
-#endif /* GL_EXT_debug_label */
-
-#ifndef GL_EXT_debug_marker
-#define GL_EXT_debug_marker 1
-typedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
-GLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
-GLAPI void APIENTRY glPopGroupMarkerEXT (void);
-#endif
-#endif /* GL_EXT_debug_marker */
-
-#ifndef GL_EXT_depth_bounds_test
-#define GL_EXT_depth_bounds_test 1
-#define GL_DEPTH_BOUNDS_TEST_EXT          0x8890
-#define GL_DEPTH_BOUNDS_EXT               0x8891
-typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax);
-#endif
-#endif /* GL_EXT_depth_bounds_test */
-
-#ifndef GL_EXT_direct_state_access
-#define GL_EXT_direct_state_access 1
-#define GL_PROGRAM_MATRIX_EXT             0x8E2D
-#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT   0x8E2E
-#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F
-typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m);
-typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m);
-typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m);
-typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m);
-typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode);
-typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode);
-typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode);
-typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
-typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
-typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
-typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture);
-typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);
-typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
-typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
-typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
-typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
-typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
-typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
-typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data);
-typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data);
-typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void **data);
-typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
-typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
-typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
-typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
-typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
-typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, void *img);
-typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
-typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
-typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
-typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
-typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
-typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
-typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, void *img);
-typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
-typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
-typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
-typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
-typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
-typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
-typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access);
-typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer);
-typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void **params);
-typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
-typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
-typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
-typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params);
-typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
-typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
-typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
-typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params);
-typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
-typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params);
-typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
-typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params);
-typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params);
-typedef void (APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
-typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
-typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params);
-typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params);
-typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);
-typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params);
-typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params);
-typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params);
-typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string);
-typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target);
-typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target);
-typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
-typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
-typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
-typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
-typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer);
-typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer);
-typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-typedef void (APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-typedef void (APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
-typedef void (APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
-typedef void (APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
-typedef void (APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-typedef void (APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-typedef void (APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
-typedef void (APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
-typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
-typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
-typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
-typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
-typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint *param);
-typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void **param);
-typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
-typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param);
-typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
-typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
-typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
-typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
-typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
-typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
-typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
-typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
-typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m);
-GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m);
-GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m);
-GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m);
-GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode);
-GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-GLAPI void APIENTRY glMatrixPopEXT (GLenum mode);
-GLAPI void APIENTRY glMatrixPushEXT (GLenum mode);
-GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask);
-GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask);
-GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param);
-GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
-GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
-GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
-GLAPI 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);
-GLAPI 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);
-GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture);
-GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);
-GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
-GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
-GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
-GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param);
-GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
-GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
-GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
-GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
-GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
-GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
-GLAPI 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);
-GLAPI 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);
-GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index);
-GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index);
-GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data);
-GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data);
-GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, void **data);
-GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index);
-GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index);
-GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index);
-GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data);
-GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data);
-GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
-GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
-GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
-GLAPI 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);
-GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
-GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
-GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, void *img);
-GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
-GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
-GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
-GLAPI 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);
-GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
-GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
-GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, void *img);
-GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m);
-GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m);
-GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m);
-GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m);
-GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
-GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
-GLAPI void *APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access);
-GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer);
-GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, void **params);
-GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
-GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);
-GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);
-GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);
-GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
-GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
-GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
-GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params);
-GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
-GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
-GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);
-GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);
-GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
-GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
-GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params);
-GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
-GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params);
-GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
-GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params);
-GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params);
-GLAPI void APIENTRY glEnableClientStateiEXT (GLenum array, GLuint index);
-GLAPI void APIENTRY glDisableClientStateiEXT (GLenum array, GLuint index);
-GLAPI void APIENTRY glGetFloati_vEXT (GLenum pname, GLuint index, GLfloat *params);
-GLAPI void APIENTRY glGetDoublei_vEXT (GLenum pname, GLuint index, GLdouble *params);
-GLAPI void APIENTRY glGetPointeri_vEXT (GLenum pname, GLuint index, void **params);
-GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);
-GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params);
-GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params);
-GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params);
-GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params);
-GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, void *string);
-GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params);
-GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
-GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target);
-GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target);
-GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target);
-GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode);
-GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs);
-GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode);
-GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
-GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
-GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
-GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
-GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer);
-GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer);
-GLAPI void APIENTRY glVertexArrayVertexOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-GLAPI void APIENTRY glVertexArrayColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-GLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
-GLAPI void APIENTRY glVertexArrayIndexOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
-GLAPI void APIENTRY glVertexArrayNormalOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
-GLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-GLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-GLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
-GLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-GLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
-GLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-GLAPI void APIENTRY glEnableVertexArrayEXT (GLuint vaobj, GLenum array);
-GLAPI void APIENTRY glDisableVertexArrayEXT (GLuint vaobj, GLenum array);
-GLAPI void APIENTRY glEnableVertexArrayAttribEXT (GLuint vaobj, GLuint index);
-GLAPI void APIENTRY glDisableVertexArrayAttribEXT (GLuint vaobj, GLuint index);
-GLAPI void APIENTRY glGetVertexArrayIntegervEXT (GLuint vaobj, GLenum pname, GLint *param);
-GLAPI void APIENTRY glGetVertexArrayPointervEXT (GLuint vaobj, GLenum pname, void **param);
-GLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
-GLAPI void APIENTRY glGetVertexArrayPointeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, void **param);
-GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
-GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length);
-GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
-GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
-GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
-GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param);
-GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
-GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x);
-GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y);
-GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
-GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor);
-GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-GLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
-GLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor);
-#endif
-#endif /* GL_EXT_direct_state_access */
-
-#ifndef GL_EXT_draw_buffers2
-#define GL_EXT_draw_buffers2 1
-typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-#endif
-#endif /* GL_EXT_draw_buffers2 */
-
-#ifndef GL_EXT_draw_instanced
-#define GL_EXT_draw_instanced 1
-typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
-typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
-GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-#endif
-#endif /* GL_EXT_draw_instanced */
-
-#ifndef GL_EXT_draw_range_elements
-#define GL_EXT_draw_range_elements 1
-#define GL_MAX_ELEMENTS_VERTICES_EXT      0x80E8
-#define GL_MAX_ELEMENTS_INDICES_EXT       0x80E9
-typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-#endif
-#endif /* GL_EXT_draw_range_elements */
-
-#ifndef GL_EXT_fog_coord
-#define GL_EXT_fog_coord 1
-#define GL_FOG_COORDINATE_SOURCE_EXT      0x8450
-#define GL_FOG_COORDINATE_EXT             0x8451
-#define GL_FRAGMENT_DEPTH_EXT             0x8452
-#define GL_CURRENT_FOG_COORDINATE_EXT     0x8453
-#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT  0x8454
-#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
-#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
-#define GL_FOG_COORDINATE_ARRAY_EXT       0x8457
-typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
-typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
-typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
-typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
-typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord);
-GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord);
-GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord);
-GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord);
-GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const void *pointer);
-#endif
-#endif /* GL_EXT_fog_coord */
-
-#ifndef GL_EXT_framebuffer_blit
-#define GL_EXT_framebuffer_blit 1
-#define GL_READ_FRAMEBUFFER_EXT           0x8CA8
-#define GL_DRAW_FRAMEBUFFER_EXT           0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_EXT   0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_EXT   0x8CAA
-typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
-#endif /* GL_EXT_framebuffer_blit */
-
-#ifndef GL_EXT_framebuffer_multisample
-#define GL_EXT_framebuffer_multisample 1
-#define GL_RENDERBUFFER_SAMPLES_EXT       0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
-#define GL_MAX_SAMPLES_EXT                0x8D57
-typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-#endif /* GL_EXT_framebuffer_multisample */
-
-#ifndef GL_EXT_framebuffer_multisample_blit_scaled
-#define GL_EXT_framebuffer_multisample_blit_scaled 1
-#define GL_SCALED_RESOLVE_FASTEST_EXT     0x90BA
-#define GL_SCALED_RESOLVE_NICEST_EXT      0x90BB
-#endif /* GL_EXT_framebuffer_multisample_blit_scaled */
-
-#ifndef GL_EXT_framebuffer_object
-#define GL_EXT_framebuffer_object 1
-#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
-#define GL_MAX_RENDERBUFFER_SIZE_EXT      0x84E8
-#define GL_FRAMEBUFFER_BINDING_EXT        0x8CA6
-#define GL_RENDERBUFFER_BINDING_EXT       0x8CA7
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
-#define GL_FRAMEBUFFER_COMPLETE_EXT       0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
-#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
-#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
-#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
-#define GL_FRAMEBUFFER_UNSUPPORTED_EXT    0x8CDD
-#define GL_MAX_COLOR_ATTACHMENTS_EXT      0x8CDF
-#define GL_COLOR_ATTACHMENT0_EXT          0x8CE0
-#define GL_COLOR_ATTACHMENT1_EXT          0x8CE1
-#define GL_COLOR_ATTACHMENT2_EXT          0x8CE2
-#define GL_COLOR_ATTACHMENT3_EXT          0x8CE3
-#define GL_COLOR_ATTACHMENT4_EXT          0x8CE4
-#define GL_COLOR_ATTACHMENT5_EXT          0x8CE5
-#define GL_COLOR_ATTACHMENT6_EXT          0x8CE6
-#define GL_COLOR_ATTACHMENT7_EXT          0x8CE7
-#define GL_COLOR_ATTACHMENT8_EXT          0x8CE8
-#define GL_COLOR_ATTACHMENT9_EXT          0x8CE9
-#define GL_COLOR_ATTACHMENT10_EXT         0x8CEA
-#define GL_COLOR_ATTACHMENT11_EXT         0x8CEB
-#define GL_COLOR_ATTACHMENT12_EXT         0x8CEC
-#define GL_COLOR_ATTACHMENT13_EXT         0x8CED
-#define GL_COLOR_ATTACHMENT14_EXT         0x8CEE
-#define GL_COLOR_ATTACHMENT15_EXT         0x8CEF
-#define GL_DEPTH_ATTACHMENT_EXT           0x8D00
-#define GL_STENCIL_ATTACHMENT_EXT         0x8D20
-#define GL_FRAMEBUFFER_EXT                0x8D40
-#define GL_RENDERBUFFER_EXT               0x8D41
-#define GL_RENDERBUFFER_WIDTH_EXT         0x8D42
-#define GL_RENDERBUFFER_HEIGHT_EXT        0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
-#define GL_STENCIL_INDEX1_EXT             0x8D46
-#define GL_STENCIL_INDEX4_EXT             0x8D47
-#define GL_STENCIL_INDEX8_EXT             0x8D48
-#define GL_STENCIL_INDEX16_EXT            0x8D49
-#define GL_RENDERBUFFER_RED_SIZE_EXT      0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE_EXT    0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE_EXT     0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE_EXT    0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE_EXT    0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE_EXT  0x8D55
-typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
-typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
-typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
-typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
-typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
-typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
-typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
-typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
-typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer);
-GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer);
-GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers);
-GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers);
-GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params);
-GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer);
-GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer);
-GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers);
-GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers);
-GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target);
-GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target);
-#endif
-#endif /* GL_EXT_framebuffer_object */
-
-#ifndef GL_EXT_framebuffer_sRGB
-#define GL_EXT_framebuffer_sRGB 1
-#define GL_FRAMEBUFFER_SRGB_EXT           0x8DB9
-#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT   0x8DBA
-#endif /* GL_EXT_framebuffer_sRGB */
-
-#ifndef GL_EXT_geometry_shader4
-#define GL_EXT_geometry_shader4 1
-#define GL_GEOMETRY_SHADER_EXT            0x8DD9
-#define GL_GEOMETRY_VERTICES_OUT_EXT      0x8DDA
-#define GL_GEOMETRY_INPUT_TYPE_EXT        0x8DDB
-#define GL_GEOMETRY_OUTPUT_TYPE_EXT       0x8DDC
-#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
-#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
-#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
-#define GL_MAX_VARYING_COMPONENTS_EXT     0x8B4B
-#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
-#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
-#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
-#define GL_LINES_ADJACENCY_EXT            0x000A
-#define GL_LINE_STRIP_ADJACENCY_EXT       0x000B
-#define GL_TRIANGLES_ADJACENCY_EXT        0x000C
-#define GL_TRIANGLE_STRIP_ADJACENCY_EXT   0x000D
-#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
-#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
-#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
-#define GL_PROGRAM_POINT_SIZE_EXT         0x8642
-typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
-#endif
-#endif /* GL_EXT_geometry_shader4 */
-
-#ifndef GL_EXT_gpu_program_parameters
-#define GL_EXT_gpu_program_parameters 1
-typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
-typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
-GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
-#endif
-#endif /* GL_EXT_gpu_program_parameters */
-
-#ifndef GL_EXT_gpu_shader4
-#define GL_EXT_gpu_shader4 1
-#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD
-#define GL_SAMPLER_1D_ARRAY_EXT           0x8DC0
-#define GL_SAMPLER_2D_ARRAY_EXT           0x8DC1
-#define GL_SAMPLER_BUFFER_EXT             0x8DC2
-#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT    0x8DC3
-#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT    0x8DC4
-#define GL_SAMPLER_CUBE_SHADOW_EXT        0x8DC5
-#define GL_UNSIGNED_INT_VEC2_EXT          0x8DC6
-#define GL_UNSIGNED_INT_VEC3_EXT          0x8DC7
-#define GL_UNSIGNED_INT_VEC4_EXT          0x8DC8
-#define GL_INT_SAMPLER_1D_EXT             0x8DC9
-#define GL_INT_SAMPLER_2D_EXT             0x8DCA
-#define GL_INT_SAMPLER_3D_EXT             0x8DCB
-#define GL_INT_SAMPLER_CUBE_EXT           0x8DCC
-#define GL_INT_SAMPLER_2D_RECT_EXT        0x8DCD
-#define GL_INT_SAMPLER_1D_ARRAY_EXT       0x8DCE
-#define GL_INT_SAMPLER_2D_ARRAY_EXT       0x8DCF
-#define GL_INT_SAMPLER_BUFFER_EXT         0x8DD0
-#define GL_UNSIGNED_INT_SAMPLER_1D_EXT    0x8DD1
-#define GL_UNSIGNED_INT_SAMPLER_2D_EXT    0x8DD2
-#define GL_UNSIGNED_INT_SAMPLER_3D_EXT    0x8DD3
-#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT  0x8DD4
-#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
-#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
-#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
-#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
-#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT   0x8904
-#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT   0x8905
-typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
-typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
-typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
-typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
-typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
-typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
-typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
-typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params);
-GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name);
-GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name);
-GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0);
-GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1);
-GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2);
-GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value);
-GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value);
-#endif
-#endif /* GL_EXT_gpu_shader4 */
-
-#ifndef GL_EXT_histogram
-#define GL_EXT_histogram 1
-#define GL_HISTOGRAM_EXT                  0x8024
-#define GL_PROXY_HISTOGRAM_EXT            0x8025
-#define GL_HISTOGRAM_WIDTH_EXT            0x8026
-#define GL_HISTOGRAM_FORMAT_EXT           0x8027
-#define GL_HISTOGRAM_RED_SIZE_EXT         0x8028
-#define GL_HISTOGRAM_GREEN_SIZE_EXT       0x8029
-#define GL_HISTOGRAM_BLUE_SIZE_EXT        0x802A
-#define GL_HISTOGRAM_ALPHA_SIZE_EXT       0x802B
-#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT   0x802C
-#define GL_HISTOGRAM_SINK_EXT             0x802D
-#define GL_MINMAX_EXT                     0x802E
-#define GL_MINMAX_FORMAT_EXT              0x802F
-#define GL_MINMAX_SINK_EXT                0x8030
-#define GL_TABLE_TOO_LARGE_EXT            0x8031
-typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
-typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
-typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink);
-GLAPI void APIENTRY glResetHistogramEXT (GLenum target);
-GLAPI void APIENTRY glResetMinmaxEXT (GLenum target);
-#endif
-#endif /* GL_EXT_histogram */
-
-#ifndef GL_EXT_index_array_formats
-#define GL_EXT_index_array_formats 1
-#define GL_IUI_V2F_EXT                    0x81AD
-#define GL_IUI_V3F_EXT                    0x81AE
-#define GL_IUI_N3F_V2F_EXT                0x81AF
-#define GL_IUI_N3F_V3F_EXT                0x81B0
-#define GL_T2F_IUI_V2F_EXT                0x81B1
-#define GL_T2F_IUI_V3F_EXT                0x81B2
-#define GL_T2F_IUI_N3F_V2F_EXT            0x81B3
-#define GL_T2F_IUI_N3F_V3F_EXT            0x81B4
-#endif /* GL_EXT_index_array_formats */
-
-#ifndef GL_EXT_index_func
-#define GL_EXT_index_func 1
-#define GL_INDEX_TEST_EXT                 0x81B5
-#define GL_INDEX_TEST_FUNC_EXT            0x81B6
-#define GL_INDEX_TEST_REF_EXT             0x81B7
-typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref);
-#endif
-#endif /* GL_EXT_index_func */
-
-#ifndef GL_EXT_index_material
-#define GL_EXT_index_material 1
-#define GL_INDEX_MATERIAL_EXT             0x81B8
-#define GL_INDEX_MATERIAL_PARAMETER_EXT   0x81B9
-#define GL_INDEX_MATERIAL_FACE_EXT        0x81BA
-typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode);
-#endif
-#endif /* GL_EXT_index_material */
-
-#ifndef GL_EXT_index_texture
-#define GL_EXT_index_texture 1
-#endif /* GL_EXT_index_texture */
-
-#ifndef GL_EXT_light_texture
-#define GL_EXT_light_texture 1
-#define GL_FRAGMENT_MATERIAL_EXT          0x8349
-#define GL_FRAGMENT_NORMAL_EXT            0x834A
-#define GL_FRAGMENT_COLOR_EXT             0x834C
-#define GL_ATTENUATION_EXT                0x834D
-#define GL_SHADOW_ATTENUATION_EXT         0x834E
-#define GL_TEXTURE_APPLICATION_MODE_EXT   0x834F
-#define GL_TEXTURE_LIGHT_EXT              0x8350
-#define GL_TEXTURE_MATERIAL_FACE_EXT      0x8351
-#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
-typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
-typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
-typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glApplyTextureEXT (GLenum mode);
-GLAPI void APIENTRY glTextureLightEXT (GLenum pname);
-GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode);
-#endif
-#endif /* GL_EXT_light_texture */
-
-#ifndef GL_EXT_misc_attribute
-#define GL_EXT_misc_attribute 1
-#endif /* GL_EXT_misc_attribute */
-
-#ifndef GL_EXT_multi_draw_arrays
-#define GL_EXT_multi_draw_arrays 1
-typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
-#endif
-#endif /* GL_EXT_multi_draw_arrays */
-
-#ifndef GL_EXT_multisample
-#define GL_EXT_multisample 1
-#define GL_MULTISAMPLE_EXT                0x809D
-#define GL_SAMPLE_ALPHA_TO_MASK_EXT       0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE_EXT        0x809F
-#define GL_SAMPLE_MASK_EXT                0x80A0
-#define GL_1PASS_EXT                      0x80A1
-#define GL_2PASS_0_EXT                    0x80A2
-#define GL_2PASS_1_EXT                    0x80A3
-#define GL_4PASS_0_EXT                    0x80A4
-#define GL_4PASS_1_EXT                    0x80A5
-#define GL_4PASS_2_EXT                    0x80A6
-#define GL_4PASS_3_EXT                    0x80A7
-#define GL_SAMPLE_BUFFERS_EXT             0x80A8
-#define GL_SAMPLES_EXT                    0x80A9
-#define GL_SAMPLE_MASK_VALUE_EXT          0x80AA
-#define GL_SAMPLE_MASK_INVERT_EXT         0x80AB
-#define GL_SAMPLE_PATTERN_EXT             0x80AC
-#define GL_MULTISAMPLE_BIT_EXT            0x20000000
-typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
-typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert);
-GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern);
-#endif
-#endif /* GL_EXT_multisample */
-
-#ifndef GL_EXT_packed_depth_stencil
-#define GL_EXT_packed_depth_stencil 1
-#define GL_DEPTH_STENCIL_EXT              0x84F9
-#define GL_UNSIGNED_INT_24_8_EXT          0x84FA
-#define GL_DEPTH24_STENCIL8_EXT           0x88F0
-#define GL_TEXTURE_STENCIL_SIZE_EXT       0x88F1
-#endif /* GL_EXT_packed_depth_stencil */
-
-#ifndef GL_EXT_packed_float
-#define GL_EXT_packed_float 1
-#define GL_R11F_G11F_B10F_EXT             0x8C3A
-#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
-#define GL_RGBA_SIGNED_COMPONENTS_EXT     0x8C3C
-#endif /* GL_EXT_packed_float */
-
-#ifndef GL_EXT_packed_pixels
-#define GL_EXT_packed_pixels 1
-#define GL_UNSIGNED_BYTE_3_3_2_EXT        0x8032
-#define GL_UNSIGNED_SHORT_4_4_4_4_EXT     0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1_EXT     0x8034
-#define GL_UNSIGNED_INT_8_8_8_8_EXT       0x8035
-#define GL_UNSIGNED_INT_10_10_10_2_EXT    0x8036
-#endif /* GL_EXT_packed_pixels */
-
-#ifndef GL_EXT_paletted_texture
-#define GL_EXT_paletted_texture 1
-#define GL_COLOR_INDEX1_EXT               0x80E2
-#define GL_COLOR_INDEX2_EXT               0x80E3
-#define GL_COLOR_INDEX4_EXT               0x80E4
-#define GL_COLOR_INDEX8_EXT               0x80E5
-#define GL_COLOR_INDEX12_EXT              0x80E6
-#define GL_COLOR_INDEX16_EXT              0x80E7
-#define GL_TEXTURE_INDEX_SIZE_EXT         0x80ED
-typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);
-typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void *data);
-typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);
-GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, void *data);
-GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
-#endif
-#endif /* GL_EXT_paletted_texture */
-
-#ifndef GL_EXT_pixel_buffer_object
-#define GL_EXT_pixel_buffer_object 1
-#define GL_PIXEL_PACK_BUFFER_EXT          0x88EB
-#define GL_PIXEL_UNPACK_BUFFER_EXT        0x88EC
-#define GL_PIXEL_PACK_BUFFER_BINDING_EXT  0x88ED
-#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
-#endif /* GL_EXT_pixel_buffer_object */
-
-#ifndef GL_EXT_pixel_transform
-#define GL_EXT_pixel_transform 1
-#define GL_PIXEL_TRANSFORM_2D_EXT         0x8330
-#define GL_PIXEL_MAG_FILTER_EXT           0x8331
-#define GL_PIXEL_MIN_FILTER_EXT           0x8332
-#define GL_PIXEL_CUBIC_WEIGHT_EXT         0x8333
-#define GL_CUBIC_EXT                      0x8334
-#define GL_AVERAGE_EXT                    0x8335
-#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
-#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
-#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT  0x8338
-typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param);
-GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
-#endif
-#endif /* GL_EXT_pixel_transform */
-
-#ifndef GL_EXT_pixel_transform_color_table
-#define GL_EXT_pixel_transform_color_table 1
-#endif /* GL_EXT_pixel_transform_color_table */
-
-#ifndef GL_EXT_point_parameters
-#define GL_EXT_point_parameters 1
-#define GL_POINT_SIZE_MIN_EXT             0x8126
-#define GL_POINT_SIZE_MAX_EXT             0x8127
-#define GL_POINT_FADE_THRESHOLD_SIZE_EXT  0x8128
-#define GL_DISTANCE_ATTENUATION_EXT       0x8129
-typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param);
-GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params);
-#endif
-#endif /* GL_EXT_point_parameters */
-
-#ifndef GL_EXT_polygon_offset
-#define GL_EXT_polygon_offset 1
-#define GL_POLYGON_OFFSET_EXT             0x8037
-#define GL_POLYGON_OFFSET_FACTOR_EXT      0x8038
-#define GL_POLYGON_OFFSET_BIAS_EXT        0x8039
-typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias);
-#endif
-#endif /* GL_EXT_polygon_offset */
-
-#ifndef GL_EXT_provoking_vertex
-#define GL_EXT_provoking_vertex 1
-#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C
-#define GL_FIRST_VERTEX_CONVENTION_EXT    0x8E4D
-#define GL_LAST_VERTEX_CONVENTION_EXT     0x8E4E
-#define GL_PROVOKING_VERTEX_EXT           0x8E4F
-typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode);
-#endif
-#endif /* GL_EXT_provoking_vertex */
-
-#ifndef GL_EXT_rescale_normal
-#define GL_EXT_rescale_normal 1
-#define GL_RESCALE_NORMAL_EXT             0x803A
-#endif /* GL_EXT_rescale_normal */
-
-#ifndef GL_EXT_secondary_color
-#define GL_EXT_secondary_color 1
-#define GL_COLOR_SUM_EXT                  0x8458
-#define GL_CURRENT_SECONDARY_COLOR_EXT    0x8459
-#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
-#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
-#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
-#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
-#define GL_SECONDARY_COLOR_ARRAY_EXT      0x845E
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
-typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue);
-GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v);
-GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue);
-GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v);
-GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue);
-GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v);
-GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue);
-GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v);
-GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue);
-GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v);
-GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue);
-GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v);
-GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue);
-GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v);
-GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue);
-GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v);
-GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);
-#endif
-#endif /* GL_EXT_secondary_color */
-
-#ifndef GL_EXT_separate_shader_objects
-#define GL_EXT_separate_shader_objects 1
-#define GL_ACTIVE_PROGRAM_EXT             0x8B8D
-typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program);
-typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program);
-typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program);
-GLAPI void APIENTRY glActiveProgramEXT (GLuint program);
-GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string);
-#endif
-#endif /* GL_EXT_separate_shader_objects */
-
-#ifndef GL_EXT_separate_specular_color
-#define GL_EXT_separate_specular_color 1
-#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT  0x81F8
-#define GL_SINGLE_COLOR_EXT               0x81F9
-#define GL_SEPARATE_SPECULAR_COLOR_EXT    0x81FA
-#endif /* GL_EXT_separate_specular_color */
-
-#ifndef GL_EXT_shader_image_load_formatted
-#define GL_EXT_shader_image_load_formatted 1
-#endif /* GL_EXT_shader_image_load_formatted */
-
-#ifndef GL_EXT_shader_image_load_store
-#define GL_EXT_shader_image_load_store 1
-#define GL_MAX_IMAGE_UNITS_EXT            0x8F38
-#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39
-#define GL_IMAGE_BINDING_NAME_EXT         0x8F3A
-#define GL_IMAGE_BINDING_LEVEL_EXT        0x8F3B
-#define GL_IMAGE_BINDING_LAYERED_EXT      0x8F3C
-#define GL_IMAGE_BINDING_LAYER_EXT        0x8F3D
-#define GL_IMAGE_BINDING_ACCESS_EXT       0x8F3E
-#define GL_IMAGE_1D_EXT                   0x904C
-#define GL_IMAGE_2D_EXT                   0x904D
-#define GL_IMAGE_3D_EXT                   0x904E
-#define GL_IMAGE_2D_RECT_EXT              0x904F
-#define GL_IMAGE_CUBE_EXT                 0x9050
-#define GL_IMAGE_BUFFER_EXT               0x9051
-#define GL_IMAGE_1D_ARRAY_EXT             0x9052
-#define GL_IMAGE_2D_ARRAY_EXT             0x9053
-#define GL_IMAGE_CUBE_MAP_ARRAY_EXT       0x9054
-#define GL_IMAGE_2D_MULTISAMPLE_EXT       0x9055
-#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056
-#define GL_INT_IMAGE_1D_EXT               0x9057
-#define GL_INT_IMAGE_2D_EXT               0x9058
-#define GL_INT_IMAGE_3D_EXT               0x9059
-#define GL_INT_IMAGE_2D_RECT_EXT          0x905A
-#define GL_INT_IMAGE_CUBE_EXT             0x905B
-#define GL_INT_IMAGE_BUFFER_EXT           0x905C
-#define GL_INT_IMAGE_1D_ARRAY_EXT         0x905D
-#define GL_INT_IMAGE_2D_ARRAY_EXT         0x905E
-#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT   0x905F
-#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT   0x9060
-#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061
-#define GL_UNSIGNED_INT_IMAGE_1D_EXT      0x9062
-#define GL_UNSIGNED_INT_IMAGE_2D_EXT      0x9063
-#define GL_UNSIGNED_INT_IMAGE_3D_EXT      0x9064
-#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065
-#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT    0x9066
-#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT  0x9067
-#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068
-#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069
-#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
-#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B
-#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C
-#define GL_MAX_IMAGE_SAMPLES_EXT          0x906D
-#define GL_IMAGE_BINDING_FORMAT_EXT       0x906E
-#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001
-#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT  0x00000002
-#define GL_UNIFORM_BARRIER_BIT_EXT        0x00000004
-#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT  0x00000008
-#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020
-#define GL_COMMAND_BARRIER_BIT_EXT        0x00000040
-#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT   0x00000080
-#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100
-#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT  0x00000200
-#define GL_FRAMEBUFFER_BARRIER_BIT_EXT    0x00000400
-#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800
-#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000
-#define GL_ALL_BARRIER_BITS_EXT           0xFFFFFFFF
-typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
-typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
-GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers);
-#endif
-#endif /* GL_EXT_shader_image_load_store */
-
-#ifndef GL_EXT_shader_integer_mix
-#define GL_EXT_shader_integer_mix 1
-#endif /* GL_EXT_shader_integer_mix */
-
-#ifndef GL_EXT_shadow_funcs
-#define GL_EXT_shadow_funcs 1
-#endif /* GL_EXT_shadow_funcs */
-
-#ifndef GL_EXT_shared_texture_palette
-#define GL_EXT_shared_texture_palette 1
-#define GL_SHARED_TEXTURE_PALETTE_EXT     0x81FB
-#endif /* GL_EXT_shared_texture_palette */
-
-#ifndef GL_EXT_stencil_clear_tag
-#define GL_EXT_stencil_clear_tag 1
-#define GL_STENCIL_TAG_BITS_EXT           0x88F2
-#define GL_STENCIL_CLEAR_TAG_VALUE_EXT    0x88F3
-typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag);
-#endif
-#endif /* GL_EXT_stencil_clear_tag */
-
-#ifndef GL_EXT_stencil_two_side
-#define GL_EXT_stencil_two_side 1
-#define GL_STENCIL_TEST_TWO_SIDE_EXT      0x8910
-#define GL_ACTIVE_STENCIL_FACE_EXT        0x8911
-typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face);
-#endif
-#endif /* GL_EXT_stencil_two_side */
-
-#ifndef GL_EXT_stencil_wrap
-#define GL_EXT_stencil_wrap 1
-#define GL_INCR_WRAP_EXT                  0x8507
-#define GL_DECR_WRAP_EXT                  0x8508
-#endif /* GL_EXT_stencil_wrap */
-
-#ifndef GL_EXT_subtexture
-#define GL_EXT_subtexture 1
-typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-#endif
-#endif /* GL_EXT_subtexture */
-
-#ifndef GL_EXT_texture
-#define GL_EXT_texture 1
-#define GL_ALPHA4_EXT                     0x803B
-#define GL_ALPHA8_EXT                     0x803C
-#define GL_ALPHA12_EXT                    0x803D
-#define GL_ALPHA16_EXT                    0x803E
-#define GL_LUMINANCE4_EXT                 0x803F
-#define GL_LUMINANCE8_EXT                 0x8040
-#define GL_LUMINANCE12_EXT                0x8041
-#define GL_LUMINANCE16_EXT                0x8042
-#define GL_LUMINANCE4_ALPHA4_EXT          0x8043
-#define GL_LUMINANCE6_ALPHA2_EXT          0x8044
-#define GL_LUMINANCE8_ALPHA8_EXT          0x8045
-#define GL_LUMINANCE12_ALPHA4_EXT         0x8046
-#define GL_LUMINANCE12_ALPHA12_EXT        0x8047
-#define GL_LUMINANCE16_ALPHA16_EXT        0x8048
-#define GL_INTENSITY_EXT                  0x8049
-#define GL_INTENSITY4_EXT                 0x804A
-#define GL_INTENSITY8_EXT                 0x804B
-#define GL_INTENSITY12_EXT                0x804C
-#define GL_INTENSITY16_EXT                0x804D
-#define GL_RGB2_EXT                       0x804E
-#define GL_RGB4_EXT                       0x804F
-#define GL_RGB5_EXT                       0x8050
-#define GL_RGB8_EXT                       0x8051
-#define GL_RGB10_EXT                      0x8052
-#define GL_RGB12_EXT                      0x8053
-#define GL_RGB16_EXT                      0x8054
-#define GL_RGBA2_EXT                      0x8055
-#define GL_RGBA4_EXT                      0x8056
-#define GL_RGB5_A1_EXT                    0x8057
-#define GL_RGBA8_EXT                      0x8058
-#define GL_RGB10_A2_EXT                   0x8059
-#define GL_RGBA12_EXT                     0x805A
-#define GL_RGBA16_EXT                     0x805B
-#define GL_TEXTURE_RED_SIZE_EXT           0x805C
-#define GL_TEXTURE_GREEN_SIZE_EXT         0x805D
-#define GL_TEXTURE_BLUE_SIZE_EXT          0x805E
-#define GL_TEXTURE_ALPHA_SIZE_EXT         0x805F
-#define GL_TEXTURE_LUMINANCE_SIZE_EXT     0x8060
-#define GL_TEXTURE_INTENSITY_SIZE_EXT     0x8061
-#define GL_REPLACE_EXT                    0x8062
-#define GL_PROXY_TEXTURE_1D_EXT           0x8063
-#define GL_PROXY_TEXTURE_2D_EXT           0x8064
-#define GL_TEXTURE_TOO_LARGE_EXT          0x8065
-#endif /* GL_EXT_texture */
-
-#ifndef GL_EXT_texture3D
-#define GL_EXT_texture3D 1
-#define GL_PACK_SKIP_IMAGES_EXT           0x806B
-#define GL_PACK_IMAGE_HEIGHT_EXT          0x806C
-#define GL_UNPACK_SKIP_IMAGES_EXT         0x806D
-#define GL_UNPACK_IMAGE_HEIGHT_EXT        0x806E
-#define GL_TEXTURE_3D_EXT                 0x806F
-#define GL_PROXY_TEXTURE_3D_EXT           0x8070
-#define GL_TEXTURE_DEPTH_EXT              0x8071
-#define GL_TEXTURE_WRAP_R_EXT             0x8072
-#define GL_MAX_3D_TEXTURE_SIZE_EXT        0x8073
-typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-GLAPI 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);
-#endif
-#endif /* GL_EXT_texture3D */
-
-#ifndef GL_EXT_texture_array
-#define GL_EXT_texture_array 1
-#define GL_TEXTURE_1D_ARRAY_EXT           0x8C18
-#define GL_PROXY_TEXTURE_1D_ARRAY_EXT     0x8C19
-#define GL_TEXTURE_2D_ARRAY_EXT           0x8C1A
-#define GL_PROXY_TEXTURE_2D_ARRAY_EXT     0x8C1B
-#define GL_TEXTURE_BINDING_1D_ARRAY_EXT   0x8C1C
-#define GL_TEXTURE_BINDING_2D_ARRAY_EXT   0x8C1D
-#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT   0x88FF
-#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
-#endif /* GL_EXT_texture_array */
-
-#ifndef GL_EXT_texture_buffer_object
-#define GL_EXT_texture_buffer_object 1
-#define GL_TEXTURE_BUFFER_EXT             0x8C2A
-#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT    0x8C2B
-#define GL_TEXTURE_BINDING_BUFFER_EXT     0x8C2C
-#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
-#define GL_TEXTURE_BUFFER_FORMAT_EXT      0x8C2E
-typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);
-#endif
-#endif /* GL_EXT_texture_buffer_object */
-
-#ifndef GL_EXT_texture_compression_latc
-#define GL_EXT_texture_compression_latc 1
-#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
-#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
-#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
-#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
-#endif /* GL_EXT_texture_compression_latc */
-
-#ifndef GL_EXT_texture_compression_rgtc
-#define GL_EXT_texture_compression_rgtc 1
-#define GL_COMPRESSED_RED_RGTC1_EXT       0x8DBB
-#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
-#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
-#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
-#endif /* GL_EXT_texture_compression_rgtc */
-
-#ifndef GL_EXT_texture_compression_s3tc
-#define GL_EXT_texture_compression_s3tc 1
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT   0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT  0x83F1
-#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT  0x83F2
-#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT  0x83F3
-#endif /* GL_EXT_texture_compression_s3tc */
-
-#ifndef GL_EXT_texture_cube_map
-#define GL_EXT_texture_cube_map 1
-#define GL_NORMAL_MAP_EXT                 0x8511
-#define GL_REFLECTION_MAP_EXT             0x8512
-#define GL_TEXTURE_CUBE_MAP_EXT           0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP_EXT   0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
-#define GL_PROXY_TEXTURE_CUBE_MAP_EXT     0x851B
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT  0x851C
-#endif /* GL_EXT_texture_cube_map */
-
-#ifndef GL_EXT_texture_env_add
-#define GL_EXT_texture_env_add 1
-#endif /* GL_EXT_texture_env_add */
-
-#ifndef GL_EXT_texture_env_combine
-#define GL_EXT_texture_env_combine 1
-#define GL_COMBINE_EXT                    0x8570
-#define GL_COMBINE_RGB_EXT                0x8571
-#define GL_COMBINE_ALPHA_EXT              0x8572
-#define GL_RGB_SCALE_EXT                  0x8573
-#define GL_ADD_SIGNED_EXT                 0x8574
-#define GL_INTERPOLATE_EXT                0x8575
-#define GL_CONSTANT_EXT                   0x8576
-#define GL_PRIMARY_COLOR_EXT              0x8577
-#define GL_PREVIOUS_EXT                   0x8578
-#define GL_SOURCE0_RGB_EXT                0x8580
-#define GL_SOURCE1_RGB_EXT                0x8581
-#define GL_SOURCE2_RGB_EXT                0x8582
-#define GL_SOURCE0_ALPHA_EXT              0x8588
-#define GL_SOURCE1_ALPHA_EXT              0x8589
-#define GL_SOURCE2_ALPHA_EXT              0x858A
-#define GL_OPERAND0_RGB_EXT               0x8590
-#define GL_OPERAND1_RGB_EXT               0x8591
-#define GL_OPERAND2_RGB_EXT               0x8592
-#define GL_OPERAND0_ALPHA_EXT             0x8598
-#define GL_OPERAND1_ALPHA_EXT             0x8599
-#define GL_OPERAND2_ALPHA_EXT             0x859A
-#endif /* GL_EXT_texture_env_combine */
-
-#ifndef GL_EXT_texture_env_dot3
-#define GL_EXT_texture_env_dot3 1
-#define GL_DOT3_RGB_EXT                   0x8740
-#define GL_DOT3_RGBA_EXT                  0x8741
-#endif /* GL_EXT_texture_env_dot3 */
-
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_EXT_texture_filter_anisotropic 1
-#define GL_TEXTURE_MAX_ANISOTROPY_EXT     0x84FE
-#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
-#endif /* GL_EXT_texture_filter_anisotropic */
-
-#ifndef GL_EXT_texture_integer
-#define GL_EXT_texture_integer 1
-#define GL_RGBA32UI_EXT                   0x8D70
-#define GL_RGB32UI_EXT                    0x8D71
-#define GL_ALPHA32UI_EXT                  0x8D72
-#define GL_INTENSITY32UI_EXT              0x8D73
-#define GL_LUMINANCE32UI_EXT              0x8D74
-#define GL_LUMINANCE_ALPHA32UI_EXT        0x8D75
-#define GL_RGBA16UI_EXT                   0x8D76
-#define GL_RGB16UI_EXT                    0x8D77
-#define GL_ALPHA16UI_EXT                  0x8D78
-#define GL_INTENSITY16UI_EXT              0x8D79
-#define GL_LUMINANCE16UI_EXT              0x8D7A
-#define GL_LUMINANCE_ALPHA16UI_EXT        0x8D7B
-#define GL_RGBA8UI_EXT                    0x8D7C
-#define GL_RGB8UI_EXT                     0x8D7D
-#define GL_ALPHA8UI_EXT                   0x8D7E
-#define GL_INTENSITY8UI_EXT               0x8D7F
-#define GL_LUMINANCE8UI_EXT               0x8D80
-#define GL_LUMINANCE_ALPHA8UI_EXT         0x8D81
-#define GL_RGBA32I_EXT                    0x8D82
-#define GL_RGB32I_EXT                     0x8D83
-#define GL_ALPHA32I_EXT                   0x8D84
-#define GL_INTENSITY32I_EXT               0x8D85
-#define GL_LUMINANCE32I_EXT               0x8D86
-#define GL_LUMINANCE_ALPHA32I_EXT         0x8D87
-#define GL_RGBA16I_EXT                    0x8D88
-#define GL_RGB16I_EXT                     0x8D89
-#define GL_ALPHA16I_EXT                   0x8D8A
-#define GL_INTENSITY16I_EXT               0x8D8B
-#define GL_LUMINANCE16I_EXT               0x8D8C
-#define GL_LUMINANCE_ALPHA16I_EXT         0x8D8D
-#define GL_RGBA8I_EXT                     0x8D8E
-#define GL_RGB8I_EXT                      0x8D8F
-#define GL_ALPHA8I_EXT                    0x8D90
-#define GL_INTENSITY8I_EXT                0x8D91
-#define GL_LUMINANCE8I_EXT                0x8D92
-#define GL_LUMINANCE_ALPHA8I_EXT          0x8D93
-#define GL_RED_INTEGER_EXT                0x8D94
-#define GL_GREEN_INTEGER_EXT              0x8D95
-#define GL_BLUE_INTEGER_EXT               0x8D96
-#define GL_ALPHA_INTEGER_EXT              0x8D97
-#define GL_RGB_INTEGER_EXT                0x8D98
-#define GL_RGBA_INTEGER_EXT               0x8D99
-#define GL_BGR_INTEGER_EXT                0x8D9A
-#define GL_BGRA_INTEGER_EXT               0x8D9B
-#define GL_LUMINANCE_INTEGER_EXT          0x8D9C
-#define GL_LUMINANCE_ALPHA_INTEGER_EXT    0x8D9D
-#define GL_RGBA_INTEGER_MODE_EXT          0x8D9E
-typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
-typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
-typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
-typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);
-GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);
-GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha);
-GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha);
-#endif
-#endif /* GL_EXT_texture_integer */
-
-#ifndef GL_EXT_texture_lod_bias
-#define GL_EXT_texture_lod_bias 1
-#define GL_MAX_TEXTURE_LOD_BIAS_EXT       0x84FD
-#define GL_TEXTURE_FILTER_CONTROL_EXT     0x8500
-#define GL_TEXTURE_LOD_BIAS_EXT           0x8501
-#endif /* GL_EXT_texture_lod_bias */
-
-#ifndef GL_EXT_texture_mirror_clamp
-#define GL_EXT_texture_mirror_clamp 1
-#define GL_MIRROR_CLAMP_EXT               0x8742
-#define GL_MIRROR_CLAMP_TO_EDGE_EXT       0x8743
-#define GL_MIRROR_CLAMP_TO_BORDER_EXT     0x8912
-#endif /* GL_EXT_texture_mirror_clamp */
-
-#ifndef GL_EXT_texture_object
-#define GL_EXT_texture_object 1
-#define GL_TEXTURE_PRIORITY_EXT           0x8066
-#define GL_TEXTURE_RESIDENT_EXT           0x8067
-#define GL_TEXTURE_1D_BINDING_EXT         0x8068
-#define GL_TEXTURE_2D_BINDING_EXT         0x8069
-#define GL_TEXTURE_3D_BINDING_EXT         0x806A
-typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
-typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
-typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
-typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
-typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
-typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences);
-GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture);
-GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures);
-GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures);
-GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture);
-GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities);
-#endif
-#endif /* GL_EXT_texture_object */
-
-#ifndef GL_EXT_texture_perturb_normal
-#define GL_EXT_texture_perturb_normal 1
-#define GL_PERTURB_EXT                    0x85AE
-#define GL_TEXTURE_NORMAL_EXT             0x85AF
-typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTextureNormalEXT (GLenum mode);
-#endif
-#endif /* GL_EXT_texture_perturb_normal */
-
-#ifndef GL_EXT_texture_sRGB
-#define GL_EXT_texture_sRGB 1
-#define GL_SRGB_EXT                       0x8C40
-#define GL_SRGB8_EXT                      0x8C41
-#define GL_SRGB_ALPHA_EXT                 0x8C42
-#define GL_SRGB8_ALPHA8_EXT               0x8C43
-#define GL_SLUMINANCE_ALPHA_EXT           0x8C44
-#define GL_SLUMINANCE8_ALPHA8_EXT         0x8C45
-#define GL_SLUMINANCE_EXT                 0x8C46
-#define GL_SLUMINANCE8_EXT                0x8C47
-#define GL_COMPRESSED_SRGB_EXT            0x8C48
-#define GL_COMPRESSED_SRGB_ALPHA_EXT      0x8C49
-#define GL_COMPRESSED_SLUMINANCE_EXT      0x8C4A
-#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
-#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT  0x8C4C
-#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
-#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
-#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
-#endif /* GL_EXT_texture_sRGB */
-
-#ifndef GL_EXT_texture_sRGB_decode
-#define GL_EXT_texture_sRGB_decode 1
-#define GL_TEXTURE_SRGB_DECODE_EXT        0x8A48
-#define GL_DECODE_EXT                     0x8A49
-#define GL_SKIP_DECODE_EXT                0x8A4A
-#endif /* GL_EXT_texture_sRGB_decode */
-
-#ifndef GL_EXT_texture_shared_exponent
-#define GL_EXT_texture_shared_exponent 1
-#define GL_RGB9_E5_EXT                    0x8C3D
-#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT   0x8C3E
-#define GL_TEXTURE_SHARED_SIZE_EXT        0x8C3F
-#endif /* GL_EXT_texture_shared_exponent */
-
-#ifndef GL_EXT_texture_snorm
-#define GL_EXT_texture_snorm 1
-#define GL_ALPHA_SNORM                    0x9010
-#define GL_LUMINANCE_SNORM                0x9011
-#define GL_LUMINANCE_ALPHA_SNORM          0x9012
-#define GL_INTENSITY_SNORM                0x9013
-#define GL_ALPHA8_SNORM                   0x9014
-#define GL_LUMINANCE8_SNORM               0x9015
-#define GL_LUMINANCE8_ALPHA8_SNORM        0x9016
-#define GL_INTENSITY8_SNORM               0x9017
-#define GL_ALPHA16_SNORM                  0x9018
-#define GL_LUMINANCE16_SNORM              0x9019
-#define GL_LUMINANCE16_ALPHA16_SNORM      0x901A
-#define GL_INTENSITY16_SNORM              0x901B
-#define GL_RED_SNORM                      0x8F90
-#define GL_RG_SNORM                       0x8F91
-#define GL_RGB_SNORM                      0x8F92
-#define GL_RGBA_SNORM                     0x8F93
-#endif /* GL_EXT_texture_snorm */
-
-#ifndef GL_EXT_texture_swizzle
-#define GL_EXT_texture_swizzle 1
-#define GL_TEXTURE_SWIZZLE_R_EXT          0x8E42
-#define GL_TEXTURE_SWIZZLE_G_EXT          0x8E43
-#define GL_TEXTURE_SWIZZLE_B_EXT          0x8E44
-#define GL_TEXTURE_SWIZZLE_A_EXT          0x8E45
-#define GL_TEXTURE_SWIZZLE_RGBA_EXT       0x8E46
-#endif /* GL_EXT_texture_swizzle */
-
-#ifndef GL_EXT_timer_query
-#define GL_EXT_timer_query 1
-#define GL_TIME_ELAPSED_EXT               0x88BF
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
-GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
-#endif
-#endif /* GL_EXT_timer_query */
-
-#ifndef GL_EXT_transform_feedback
-#define GL_EXT_transform_feedback 1
-#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT  0x8C8E
-#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84
-#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85
-#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F
-#define GL_INTERLEAVED_ATTRIBS_EXT        0x8C8C
-#define GL_SEPARATE_ATTRIBS_EXT           0x8C8D
-#define GL_PRIMITIVES_GENERATED_EXT       0x8C87
-#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88
-#define GL_RASTERIZER_DISCARD_EXT         0x8C89
-#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80
-#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83
-#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F
-#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76
-typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);
-typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);
-typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
-typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);
-typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode);
-GLAPI void APIENTRY glEndTransformFeedbackEXT (void);
-GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
-GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer);
-GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-#endif
-#endif /* GL_EXT_transform_feedback */
-
-#ifndef GL_EXT_vertex_array
-#define GL_EXT_vertex_array 1
-#define GL_VERTEX_ARRAY_EXT               0x8074
-#define GL_NORMAL_ARRAY_EXT               0x8075
-#define GL_COLOR_ARRAY_EXT                0x8076
-#define GL_INDEX_ARRAY_EXT                0x8077
-#define GL_TEXTURE_COORD_ARRAY_EXT        0x8078
-#define GL_EDGE_FLAG_ARRAY_EXT            0x8079
-#define GL_VERTEX_ARRAY_SIZE_EXT          0x807A
-#define GL_VERTEX_ARRAY_TYPE_EXT          0x807B
-#define GL_VERTEX_ARRAY_STRIDE_EXT        0x807C
-#define GL_VERTEX_ARRAY_COUNT_EXT         0x807D
-#define GL_NORMAL_ARRAY_TYPE_EXT          0x807E
-#define GL_NORMAL_ARRAY_STRIDE_EXT        0x807F
-#define GL_NORMAL_ARRAY_COUNT_EXT         0x8080
-#define GL_COLOR_ARRAY_SIZE_EXT           0x8081
-#define GL_COLOR_ARRAY_TYPE_EXT           0x8082
-#define GL_COLOR_ARRAY_STRIDE_EXT         0x8083
-#define GL_COLOR_ARRAY_COUNT_EXT          0x8084
-#define GL_INDEX_ARRAY_TYPE_EXT           0x8085
-#define GL_INDEX_ARRAY_STRIDE_EXT         0x8086
-#define GL_INDEX_ARRAY_COUNT_EXT          0x8087
-#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT   0x8088
-#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT   0x8089
-#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
-#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT  0x808B
-#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT     0x808C
-#define GL_EDGE_FLAG_ARRAY_COUNT_EXT      0x808D
-#define GL_VERTEX_ARRAY_POINTER_EXT       0x808E
-#define GL_NORMAL_ARRAY_POINTER_EXT       0x808F
-#define GL_COLOR_ARRAY_POINTER_EXT        0x8090
-#define GL_INDEX_ARRAY_POINTER_EXT        0x8091
-#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
-#define GL_EDGE_FLAG_ARRAY_POINTER_EXT    0x8093
-typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
-typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
-typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
-typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, void **params);
-typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glArrayElementEXT (GLint i);
-GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count);
-GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer);
-GLAPI void APIENTRY glGetPointervEXT (GLenum pname, void **params);
-GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-#endif
-#endif /* GL_EXT_vertex_array */
-
-#ifndef GL_EXT_vertex_array_bgra
-#define GL_EXT_vertex_array_bgra 1
-#endif /* GL_EXT_vertex_array_bgra */
-
-#ifndef GL_EXT_vertex_attrib_64bit
-#define GL_EXT_vertex_attrib_64bit 1
-#define GL_DOUBLE_VEC2_EXT                0x8FFC
-#define GL_DOUBLE_VEC3_EXT                0x8FFD
-#define GL_DOUBLE_VEC4_EXT                0x8FFE
-#define GL_DOUBLE_MAT2_EXT                0x8F46
-#define GL_DOUBLE_MAT3_EXT                0x8F47
-#define GL_DOUBLE_MAT4_EXT                0x8F48
-#define GL_DOUBLE_MAT2x3_EXT              0x8F49
-#define GL_DOUBLE_MAT2x4_EXT              0x8F4A
-#define GL_DOUBLE_MAT3x2_EXT              0x8F4B
-#define GL_DOUBLE_MAT3x4_EXT              0x8F4C
-#define GL_DOUBLE_MAT4x2_EXT              0x8F4D
-#define GL_DOUBLE_MAT4x3_EXT              0x8F4E
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x);
-GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y);
-GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params);
-#endif
-#endif /* GL_EXT_vertex_attrib_64bit */
-
-#ifndef GL_EXT_vertex_shader
-#define GL_EXT_vertex_shader 1
-#define GL_VERTEX_SHADER_EXT              0x8780
-#define GL_VERTEX_SHADER_BINDING_EXT      0x8781
-#define GL_OP_INDEX_EXT                   0x8782
-#define GL_OP_NEGATE_EXT                  0x8783
-#define GL_OP_DOT3_EXT                    0x8784
-#define GL_OP_DOT4_EXT                    0x8785
-#define GL_OP_MUL_EXT                     0x8786
-#define GL_OP_ADD_EXT                     0x8787
-#define GL_OP_MADD_EXT                    0x8788
-#define GL_OP_FRAC_EXT                    0x8789
-#define GL_OP_MAX_EXT                     0x878A
-#define GL_OP_MIN_EXT                     0x878B
-#define GL_OP_SET_GE_EXT                  0x878C
-#define GL_OP_SET_LT_EXT                  0x878D
-#define GL_OP_CLAMP_EXT                   0x878E
-#define GL_OP_FLOOR_EXT                   0x878F
-#define GL_OP_ROUND_EXT                   0x8790
-#define GL_OP_EXP_BASE_2_EXT              0x8791
-#define GL_OP_LOG_BASE_2_EXT              0x8792
-#define GL_OP_POWER_EXT                   0x8793
-#define GL_OP_RECIP_EXT                   0x8794
-#define GL_OP_RECIP_SQRT_EXT              0x8795
-#define GL_OP_SUB_EXT                     0x8796
-#define GL_OP_CROSS_PRODUCT_EXT           0x8797
-#define GL_OP_MULTIPLY_MATRIX_EXT         0x8798
-#define GL_OP_MOV_EXT                     0x8799
-#define GL_OUTPUT_VERTEX_EXT              0x879A
-#define GL_OUTPUT_COLOR0_EXT              0x879B
-#define GL_OUTPUT_COLOR1_EXT              0x879C
-#define GL_OUTPUT_TEXTURE_COORD0_EXT      0x879D
-#define GL_OUTPUT_TEXTURE_COORD1_EXT      0x879E
-#define GL_OUTPUT_TEXTURE_COORD2_EXT      0x879F
-#define GL_OUTPUT_TEXTURE_COORD3_EXT      0x87A0
-#define GL_OUTPUT_TEXTURE_COORD4_EXT      0x87A1
-#define GL_OUTPUT_TEXTURE_COORD5_EXT      0x87A2
-#define GL_OUTPUT_TEXTURE_COORD6_EXT      0x87A3
-#define GL_OUTPUT_TEXTURE_COORD7_EXT      0x87A4
-#define GL_OUTPUT_TEXTURE_COORD8_EXT      0x87A5
-#define GL_OUTPUT_TEXTURE_COORD9_EXT      0x87A6
-#define GL_OUTPUT_TEXTURE_COORD10_EXT     0x87A7
-#define GL_OUTPUT_TEXTURE_COORD11_EXT     0x87A8
-#define GL_OUTPUT_TEXTURE_COORD12_EXT     0x87A9
-#define GL_OUTPUT_TEXTURE_COORD13_EXT     0x87AA
-#define GL_OUTPUT_TEXTURE_COORD14_EXT     0x87AB
-#define GL_OUTPUT_TEXTURE_COORD15_EXT     0x87AC
-#define GL_OUTPUT_TEXTURE_COORD16_EXT     0x87AD
-#define GL_OUTPUT_TEXTURE_COORD17_EXT     0x87AE
-#define GL_OUTPUT_TEXTURE_COORD18_EXT     0x87AF
-#define GL_OUTPUT_TEXTURE_COORD19_EXT     0x87B0
-#define GL_OUTPUT_TEXTURE_COORD20_EXT     0x87B1
-#define GL_OUTPUT_TEXTURE_COORD21_EXT     0x87B2
-#define GL_OUTPUT_TEXTURE_COORD22_EXT     0x87B3
-#define GL_OUTPUT_TEXTURE_COORD23_EXT     0x87B4
-#define GL_OUTPUT_TEXTURE_COORD24_EXT     0x87B5
-#define GL_OUTPUT_TEXTURE_COORD25_EXT     0x87B6
-#define GL_OUTPUT_TEXTURE_COORD26_EXT     0x87B7
-#define GL_OUTPUT_TEXTURE_COORD27_EXT     0x87B8
-#define GL_OUTPUT_TEXTURE_COORD28_EXT     0x87B9
-#define GL_OUTPUT_TEXTURE_COORD29_EXT     0x87BA
-#define GL_OUTPUT_TEXTURE_COORD30_EXT     0x87BB
-#define GL_OUTPUT_TEXTURE_COORD31_EXT     0x87BC
-#define GL_OUTPUT_FOG_EXT                 0x87BD
-#define GL_SCALAR_EXT                     0x87BE
-#define GL_VECTOR_EXT                     0x87BF
-#define GL_MATRIX_EXT                     0x87C0
-#define GL_VARIANT_EXT                    0x87C1
-#define GL_INVARIANT_EXT                  0x87C2
-#define GL_LOCAL_CONSTANT_EXT             0x87C3
-#define GL_LOCAL_EXT                      0x87C4
-#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
-#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
-#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
-#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
-#define GL_MAX_VERTEX_SHADER_LOCALS_EXT   0x87C9
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
-#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
-#define GL_VERTEX_SHADER_VARIANTS_EXT     0x87D0
-#define GL_VERTEX_SHADER_INVARIANTS_EXT   0x87D1
-#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
-#define GL_VERTEX_SHADER_LOCALS_EXT       0x87D3
-#define GL_VERTEX_SHADER_OPTIMIZED_EXT    0x87D4
-#define GL_X_EXT                          0x87D5
-#define GL_Y_EXT                          0x87D6
-#define GL_Z_EXT                          0x87D7
-#define GL_W_EXT                          0x87D8
-#define GL_NEGATIVE_X_EXT                 0x87D9
-#define GL_NEGATIVE_Y_EXT                 0x87DA
-#define GL_NEGATIVE_Z_EXT                 0x87DB
-#define GL_NEGATIVE_W_EXT                 0x87DC
-#define GL_ZERO_EXT                       0x87DD
-#define GL_ONE_EXT                        0x87DE
-#define GL_NEGATIVE_ONE_EXT               0x87DF
-#define GL_NORMALIZED_RANGE_EXT           0x87E0
-#define GL_FULL_RANGE_EXT                 0x87E1
-#define GL_CURRENT_VERTEX_EXT             0x87E2
-#define GL_MVP_MATRIX_EXT                 0x87E3
-#define GL_VARIANT_VALUE_EXT              0x87E4
-#define GL_VARIANT_DATATYPE_EXT           0x87E5
-#define GL_VARIANT_ARRAY_STRIDE_EXT       0x87E6
-#define GL_VARIANT_ARRAY_TYPE_EXT         0x87E7
-#define GL_VARIANT_ARRAY_EXT              0x87E8
-#define GL_VARIANT_ARRAY_POINTER_EXT      0x87E9
-#define GL_INVARIANT_VALUE_EXT            0x87EA
-#define GL_INVARIANT_DATATYPE_EXT         0x87EB
-#define GL_LOCAL_CONSTANT_VALUE_EXT       0x87EC
-#define GL_LOCAL_CONSTANT_DATATYPE_EXT    0x87ED
-typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
-typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
-typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
-typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
-typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
-typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
-typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
-typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
-typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
-typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
-typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
-typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
-typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
-typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr);
-typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr);
-typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
-typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
-typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
-typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
-typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
-typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
-typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
-typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
-typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr);
-typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
-typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
-typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
-typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
-typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
-typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
-typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
-typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
-typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
-typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
-typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
-typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, void **data);
-typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
-typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
-typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
-typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
-typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
-typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBeginVertexShaderEXT (void);
-GLAPI void APIENTRY glEndVertexShaderEXT (void);
-GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id);
-GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range);
-GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id);
-GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1);
-GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
-GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
-GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
-GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
-GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num);
-GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num);
-GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
-GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const void *addr);
-GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const void *addr);
-GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr);
-GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr);
-GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr);
-GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr);
-GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr);
-GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr);
-GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr);
-GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr);
-GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const void *addr);
-GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id);
-GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id);
-GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value);
-GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value);
-GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value);
-GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value);
-GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value);
-GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap);
-GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
-GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data);
-GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
-GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, void **data);
-GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
-GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data);
-GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
-GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
-GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data);
-GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
-#endif
-#endif /* GL_EXT_vertex_shader */
-
-#ifndef GL_EXT_vertex_weighting
-#define GL_EXT_vertex_weighting 1
-#define GL_MODELVIEW0_STACK_DEPTH_EXT     0x0BA3
-#define GL_MODELVIEW1_STACK_DEPTH_EXT     0x8502
-#define GL_MODELVIEW0_MATRIX_EXT          0x0BA6
-#define GL_MODELVIEW1_MATRIX_EXT          0x8506
-#define GL_VERTEX_WEIGHTING_EXT           0x8509
-#define GL_MODELVIEW0_EXT                 0x1700
-#define GL_MODELVIEW1_EXT                 0x850A
-#define GL_CURRENT_VERTEX_WEIGHT_EXT      0x850B
-#define GL_VERTEX_WEIGHT_ARRAY_EXT        0x850C
-#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT   0x850D
-#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT   0x850E
-#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
-#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
-typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
-typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
-typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight);
-GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight);
-GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);
-#endif
-#endif /* GL_EXT_vertex_weighting */
-
-#ifndef GL_EXT_x11_sync_object
-#define GL_EXT_x11_sync_object 1
-#define GL_SYNC_X11_FENCE_EXT             0x90E1
-typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
-#endif
-#endif /* GL_EXT_x11_sync_object */
-
-#ifndef GL_GREMEDY_frame_terminator
-#define GL_GREMEDY_frame_terminator 1
-typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFrameTerminatorGREMEDY (void);
-#endif
-#endif /* GL_GREMEDY_frame_terminator */
-
-#ifndef GL_GREMEDY_string_marker
-#define GL_GREMEDY_string_marker 1
-typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void *string);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const void *string);
-#endif
-#endif /* GL_GREMEDY_string_marker */
-
-#ifndef GL_HP_convolution_border_modes
-#define GL_HP_convolution_border_modes 1
-#define GL_IGNORE_BORDER_HP               0x8150
-#define GL_CONSTANT_BORDER_HP             0x8151
-#define GL_REPLICATE_BORDER_HP            0x8153
-#define GL_CONVOLUTION_BORDER_COLOR_HP    0x8154
-#endif /* GL_HP_convolution_border_modes */
-
-#ifndef GL_HP_image_transform
-#define GL_HP_image_transform 1
-#define GL_IMAGE_SCALE_X_HP               0x8155
-#define GL_IMAGE_SCALE_Y_HP               0x8156
-#define GL_IMAGE_TRANSLATE_X_HP           0x8157
-#define GL_IMAGE_TRANSLATE_Y_HP           0x8158
-#define GL_IMAGE_ROTATE_ANGLE_HP          0x8159
-#define GL_IMAGE_ROTATE_ORIGIN_X_HP       0x815A
-#define GL_IMAGE_ROTATE_ORIGIN_Y_HP       0x815B
-#define GL_IMAGE_MAG_FILTER_HP            0x815C
-#define GL_IMAGE_MIN_FILTER_HP            0x815D
-#define GL_IMAGE_CUBIC_WEIGHT_HP          0x815E
-#define GL_CUBIC_HP                       0x815F
-#define GL_AVERAGE_HP                     0x8160
-#define GL_IMAGE_TRANSFORM_2D_HP          0x8161
-#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
-#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
-typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param);
-GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params);
-#endif
-#endif /* GL_HP_image_transform */
-
-#ifndef GL_HP_occlusion_test
-#define GL_HP_occlusion_test 1
-#define GL_OCCLUSION_TEST_HP              0x8165
-#define GL_OCCLUSION_TEST_RESULT_HP       0x8166
-#endif /* GL_HP_occlusion_test */
-
-#ifndef GL_HP_texture_lighting
-#define GL_HP_texture_lighting 1
-#define GL_TEXTURE_LIGHTING_MODE_HP       0x8167
-#define GL_TEXTURE_POST_SPECULAR_HP       0x8168
-#define GL_TEXTURE_PRE_SPECULAR_HP        0x8169
-#endif /* GL_HP_texture_lighting */
-
-#ifndef GL_IBM_cull_vertex
-#define GL_IBM_cull_vertex 1
-#define GL_CULL_VERTEX_IBM                103050
-#endif /* GL_IBM_cull_vertex */
-
-#ifndef GL_IBM_multimode_draw_arrays
-#define GL_IBM_multimode_draw_arrays 1
-typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
-typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
-GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);
-#endif
-#endif /* GL_IBM_multimode_draw_arrays */
-
-#ifndef GL_IBM_rasterpos_clip
-#define GL_IBM_rasterpos_clip 1
-#define GL_RASTER_POSITION_UNCLIPPED_IBM  0x19262
-#endif /* GL_IBM_rasterpos_clip */
-
-#ifndef GL_IBM_static_data
-#define GL_IBM_static_data 1
-#define GL_ALL_STATIC_DATA_IBM            103060
-#define GL_STATIC_VERTEX_ARRAY_IBM        103061
-typedef void (APIENTRYP PFNGLFLUSHSTATICDATAIBMPROC) (GLenum target);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFlushStaticDataIBM (GLenum target);
-#endif
-#endif /* GL_IBM_static_data */
-
-#ifndef GL_IBM_texture_mirrored_repeat
-#define GL_IBM_texture_mirrored_repeat 1
-#define GL_MIRRORED_REPEAT_IBM            0x8370
-#endif /* GL_IBM_texture_mirrored_repeat */
-
-#ifndef GL_IBM_vertex_array_lists
-#define GL_IBM_vertex_array_lists 1
-#define GL_VERTEX_ARRAY_LIST_IBM          103070
-#define GL_NORMAL_ARRAY_LIST_IBM          103071
-#define GL_COLOR_ARRAY_LIST_IBM           103072
-#define GL_INDEX_ARRAY_LIST_IBM           103073
-#define GL_TEXTURE_COORD_ARRAY_LIST_IBM   103074
-#define GL_EDGE_FLAG_ARRAY_LIST_IBM       103075
-#define GL_FOG_COORDINATE_ARRAY_LIST_IBM  103076
-#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
-#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM   103080
-#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM   103081
-#define GL_COLOR_ARRAY_LIST_STRIDE_IBM    103082
-#define GL_INDEX_ARRAY_LIST_STRIDE_IBM    103083
-#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
-#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
-#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
-#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
-typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean **pointer, GLint ptrstride);
-typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean **pointer, GLint ptrstride);
-GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-#endif
-#endif /* GL_IBM_vertex_array_lists */
-
-#ifndef GL_INGR_blend_func_separate
-#define GL_INGR_blend_func_separate 1
-typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-#endif
-#endif /* GL_INGR_blend_func_separate */
-
-#ifndef GL_INGR_color_clamp
-#define GL_INGR_color_clamp 1
-#define GL_RED_MIN_CLAMP_INGR             0x8560
-#define GL_GREEN_MIN_CLAMP_INGR           0x8561
-#define GL_BLUE_MIN_CLAMP_INGR            0x8562
-#define GL_ALPHA_MIN_CLAMP_INGR           0x8563
-#define GL_RED_MAX_CLAMP_INGR             0x8564
-#define GL_GREEN_MAX_CLAMP_INGR           0x8565
-#define GL_BLUE_MAX_CLAMP_INGR            0x8566
-#define GL_ALPHA_MAX_CLAMP_INGR           0x8567
-#endif /* GL_INGR_color_clamp */
-
-#ifndef GL_INGR_interlace_read
-#define GL_INGR_interlace_read 1
-#define GL_INTERLACE_READ_INGR            0x8568
-#endif /* GL_INGR_interlace_read */
-
-#ifndef GL_INTEL_fragment_shader_ordering
-#define GL_INTEL_fragment_shader_ordering 1
-#endif /* GL_INTEL_fragment_shader_ordering */
-
-#ifndef GL_INTEL_map_texture
-#define GL_INTEL_map_texture 1
-#define GL_TEXTURE_MEMORY_LAYOUT_INTEL    0x83FF
-#define GL_LAYOUT_DEFAULT_INTEL           0
-#define GL_LAYOUT_LINEAR_INTEL            1
-#define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2
-typedef void (APIENTRYP PFNGLSYNCTEXTUREINTELPROC) (GLuint texture);
-typedef void (APIENTRYP PFNGLUNMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level);
-typedef void *(APIENTRYP PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSyncTextureINTEL (GLuint texture);
-GLAPI void APIENTRY glUnmapTexture2DINTEL (GLuint texture, GLint level);
-GLAPI void *APIENTRY glMapTexture2DINTEL (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);
-#endif
-#endif /* GL_INTEL_map_texture */
-
-#ifndef GL_INTEL_parallel_arrays
-#define GL_INTEL_parallel_arrays 1
-#define GL_PARALLEL_ARRAYS_INTEL          0x83F4
-#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
-#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
-#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
-#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
-typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
-typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void **pointer);
-typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
-typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const void **pointer);
-GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const void **pointer);
-GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const void **pointer);
-GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void **pointer);
-#endif
-#endif /* GL_INTEL_parallel_arrays */
-
-#ifndef GL_INTEL_performance_query
-#define GL_INTEL_performance_query 1
-#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000
-#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001
-#define GL_PERFQUERY_WAIT_INTEL           0x83FB
-#define GL_PERFQUERY_FLUSH_INTEL          0x83FA
-#define GL_PERFQUERY_DONOT_FLUSH_INTEL    0x83F9
-#define GL_PERFQUERY_COUNTER_EVENT_INTEL  0x94F0
-#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1
-#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2
-#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3
-#define GL_PERFQUERY_COUNTER_RAW_INTEL    0x94F4
-#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5
-#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8
-#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9
-#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA
-#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB
-#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC
-#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD
-#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE
-#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF
-#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500
-typedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);
-typedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);
-typedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);
-typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);
-typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);
-typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);
-typedef 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);
-typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
-typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);
-typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);
-GLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);
-GLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);
-GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);
-GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);
-GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);
-GLAPI 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);
-GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
-GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);
-GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
-#endif
-#endif /* GL_INTEL_performance_query */
-
-#ifndef GL_MESAX_texture_stack
-#define GL_MESAX_texture_stack 1
-#define GL_TEXTURE_1D_STACK_MESAX         0x8759
-#define GL_TEXTURE_2D_STACK_MESAX         0x875A
-#define GL_PROXY_TEXTURE_1D_STACK_MESAX   0x875B
-#define GL_PROXY_TEXTURE_2D_STACK_MESAX   0x875C
-#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
-#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
-#endif /* GL_MESAX_texture_stack */
-
-#ifndef GL_MESA_pack_invert
-#define GL_MESA_pack_invert 1
-#define GL_PACK_INVERT_MESA               0x8758
-#endif /* GL_MESA_pack_invert */
-
-#ifndef GL_MESA_resize_buffers
-#define GL_MESA_resize_buffers 1
-typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glResizeBuffersMESA (void);
-#endif
-#endif /* GL_MESA_resize_buffers */
-
-#ifndef GL_MESA_window_pos
-#define GL_MESA_window_pos 1
-typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
-typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
-typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
-typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
-typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
-typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
-typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
-typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
-typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y);
-GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v);
-GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y);
-GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v);
-GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y);
-GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v);
-GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y);
-GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v);
-GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v);
-GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v);
-GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z);
-GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v);
-GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z);
-GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v);
-GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v);
-GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v);
-GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w);
-GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v);
-GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w);
-GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v);
-#endif
-#endif /* GL_MESA_window_pos */
-
-#ifndef GL_MESA_ycbcr_texture
-#define GL_MESA_ycbcr_texture 1
-#define GL_UNSIGNED_SHORT_8_8_MESA        0x85BA
-#define GL_UNSIGNED_SHORT_8_8_REV_MESA    0x85BB
-#define GL_YCBCR_MESA                     0x8757
-#endif /* GL_MESA_ycbcr_texture */
-
-#ifndef GL_NVX_conditional_render
-#define GL_NVX_conditional_render 1
-typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id);
-typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVXPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBeginConditionalRenderNVX (GLuint id);
-GLAPI void APIENTRY glEndConditionalRenderNVX (void);
-#endif
-#endif /* GL_NVX_conditional_render */
-
-#ifndef GL_NVX_gpu_memory_info
-#define GL_NVX_gpu_memory_info 1
-#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
-#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
-#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049
-#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
-#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
-#endif /* GL_NVX_gpu_memory_info */
-
-#ifndef GL_NV_bindless_multi_draw_indirect
-#define GL_NV_bindless_multi_draw_indirect 1
-typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
-typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
-GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
-#endif
-#endif /* GL_NV_bindless_multi_draw_indirect */
-
-#ifndef GL_NV_bindless_texture
-#define GL_NV_bindless_texture 1
-typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);
-typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);
-typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
-typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle);
-typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
-typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access);
-typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle);
-typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value);
-typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
-typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
-typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture);
-GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler);
-GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle);
-GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle);
-GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
-GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access);
-GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle);
-GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value);
-GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value);
-GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value);
-GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
-GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle);
-GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
-#endif
-#endif /* GL_NV_bindless_texture */
-
-#ifndef GL_NV_blend_equation_advanced
-#define GL_NV_blend_equation_advanced 1
-#define GL_BLEND_OVERLAP_NV               0x9281
-#define GL_BLEND_PREMULTIPLIED_SRC_NV     0x9280
-#define GL_BLUE_NV                        0x1905
-#define GL_COLORBURN_NV                   0x929A
-#define GL_COLORDODGE_NV                  0x9299
-#define GL_CONJOINT_NV                    0x9284
-#define GL_CONTRAST_NV                    0x92A1
-#define GL_DARKEN_NV                      0x9297
-#define GL_DIFFERENCE_NV                  0x929E
-#define GL_DISJOINT_NV                    0x9283
-#define GL_DST_ATOP_NV                    0x928F
-#define GL_DST_IN_NV                      0x928B
-#define GL_DST_NV                         0x9287
-#define GL_DST_OUT_NV                     0x928D
-#define GL_DST_OVER_NV                    0x9289
-#define GL_EXCLUSION_NV                   0x92A0
-#define GL_GREEN_NV                       0x1904
-#define GL_HARDLIGHT_NV                   0x929B
-#define GL_HARDMIX_NV                     0x92A9
-#define GL_HSL_COLOR_NV                   0x92AF
-#define GL_HSL_HUE_NV                     0x92AD
-#define GL_HSL_LUMINOSITY_NV              0x92B0
-#define GL_HSL_SATURATION_NV              0x92AE
-#define GL_INVERT_OVG_NV                  0x92B4
-#define GL_INVERT_RGB_NV                  0x92A3
-#define GL_LIGHTEN_NV                     0x9298
-#define GL_LINEARBURN_NV                  0x92A5
-#define GL_LINEARDODGE_NV                 0x92A4
-#define GL_LINEARLIGHT_NV                 0x92A7
-#define GL_MINUS_CLAMPED_NV               0x92B3
-#define GL_MINUS_NV                       0x929F
-#define GL_MULTIPLY_NV                    0x9294
-#define GL_OVERLAY_NV                     0x9296
-#define GL_PINLIGHT_NV                    0x92A8
-#define GL_PLUS_CLAMPED_ALPHA_NV          0x92B2
-#define GL_PLUS_CLAMPED_NV                0x92B1
-#define GL_PLUS_DARKER_NV                 0x9292
-#define GL_PLUS_NV                        0x9291
-#define GL_RED_NV                         0x1903
-#define GL_SCREEN_NV                      0x9295
-#define GL_SOFTLIGHT_NV                   0x929C
-#define GL_SRC_ATOP_NV                    0x928E
-#define GL_SRC_IN_NV                      0x928A
-#define GL_SRC_NV                         0x9286
-#define GL_SRC_OUT_NV                     0x928C
-#define GL_SRC_OVER_NV                    0x9288
-#define GL_UNCORRELATED_NV                0x9282
-#define GL_VIVIDLIGHT_NV                  0x92A6
-#define GL_XOR_NV                         0x1506
-typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);
-typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendParameteriNV (GLenum pname, GLint value);
-GLAPI void APIENTRY glBlendBarrierNV (void);
-#endif
-#endif /* GL_NV_blend_equation_advanced */
-
-#ifndef GL_NV_blend_equation_advanced_coherent
-#define GL_NV_blend_equation_advanced_coherent 1
-#define GL_BLEND_ADVANCED_COHERENT_NV     0x9285
-#endif /* GL_NV_blend_equation_advanced_coherent */
-
-#ifndef GL_NV_blend_square
-#define GL_NV_blend_square 1
-#endif /* GL_NV_blend_square */
-
-#ifndef GL_NV_compute_program5
-#define GL_NV_compute_program5 1
-#define GL_COMPUTE_PROGRAM_NV             0x90FB
-#define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC
-#endif /* GL_NV_compute_program5 */
-
-#ifndef GL_NV_conditional_render
-#define GL_NV_conditional_render 1
-#define GL_QUERY_WAIT_NV                  0x8E13
-#define GL_QUERY_NO_WAIT_NV               0x8E14
-#define GL_QUERY_BY_REGION_WAIT_NV        0x8E15
-#define GL_QUERY_BY_REGION_NO_WAIT_NV     0x8E16
-typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);
-typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode);
-GLAPI void APIENTRY glEndConditionalRenderNV (void);
-#endif
-#endif /* GL_NV_conditional_render */
-
-#ifndef GL_NV_copy_depth_to_color
-#define GL_NV_copy_depth_to_color 1
-#define GL_DEPTH_STENCIL_TO_RGBA_NV       0x886E
-#define GL_DEPTH_STENCIL_TO_BGRA_NV       0x886F
-#endif /* GL_NV_copy_depth_to_color */
-
-#ifndef GL_NV_copy_image
-#define GL_NV_copy_image 1
-typedef 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);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI 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);
-#endif
-#endif /* GL_NV_copy_image */
-
-#ifndef GL_NV_deep_texture3D
-#define GL_NV_deep_texture3D 1
-#define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0
-#define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV   0x90D1
-#endif /* GL_NV_deep_texture3D */
-
-#ifndef GL_NV_depth_buffer_float
-#define GL_NV_depth_buffer_float 1
-#define GL_DEPTH_COMPONENT32F_NV          0x8DAB
-#define GL_DEPTH32F_STENCIL8_NV           0x8DAC
-#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
-#define GL_DEPTH_BUFFER_FLOAT_MODE_NV     0x8DAF
-typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
-typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
-typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar);
-GLAPI void APIENTRY glClearDepthdNV (GLdouble depth);
-GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax);
-#endif
-#endif /* GL_NV_depth_buffer_float */
-
-#ifndef GL_NV_depth_clamp
-#define GL_NV_depth_clamp 1
-#define GL_DEPTH_CLAMP_NV                 0x864F
-#endif /* GL_NV_depth_clamp */
-
-#ifndef GL_NV_draw_texture
-#define GL_NV_draw_texture 1
-typedef 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);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI 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);
-#endif
-#endif /* GL_NV_draw_texture */
-
-#ifndef GL_NV_evaluators
-#define GL_NV_evaluators 1
-#define GL_EVAL_2D_NV                     0x86C0
-#define GL_EVAL_TRIANGULAR_2D_NV          0x86C1
-#define GL_MAP_TESSELLATION_NV            0x86C2
-#define GL_MAP_ATTRIB_U_ORDER_NV          0x86C3
-#define GL_MAP_ATTRIB_V_ORDER_NV          0x86C4
-#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
-#define GL_EVAL_VERTEX_ATTRIB0_NV         0x86C6
-#define GL_EVAL_VERTEX_ATTRIB1_NV         0x86C7
-#define GL_EVAL_VERTEX_ATTRIB2_NV         0x86C8
-#define GL_EVAL_VERTEX_ATTRIB3_NV         0x86C9
-#define GL_EVAL_VERTEX_ATTRIB4_NV         0x86CA
-#define GL_EVAL_VERTEX_ATTRIB5_NV         0x86CB
-#define GL_EVAL_VERTEX_ATTRIB6_NV         0x86CC
-#define GL_EVAL_VERTEX_ATTRIB7_NV         0x86CD
-#define GL_EVAL_VERTEX_ATTRIB8_NV         0x86CE
-#define GL_EVAL_VERTEX_ATTRIB9_NV         0x86CF
-#define GL_EVAL_VERTEX_ATTRIB10_NV        0x86D0
-#define GL_EVAL_VERTEX_ATTRIB11_NV        0x86D1
-#define GL_EVAL_VERTEX_ATTRIB12_NV        0x86D2
-#define GL_EVAL_VERTEX_ATTRIB13_NV        0x86D3
-#define GL_EVAL_VERTEX_ATTRIB14_NV        0x86D4
-#define GL_EVAL_VERTEX_ATTRIB15_NV        0x86D5
-#define GL_MAX_MAP_TESSELLATION_NV        0x86D6
-#define GL_MAX_RATIONAL_EVAL_ORDER_NV     0x86D7
-typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);
-typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);
-typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);
-GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);
-GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode);
-#endif
-#endif /* GL_NV_evaluators */
-
-#ifndef GL_NV_explicit_multisample
-#define GL_NV_explicit_multisample 1
-#define GL_SAMPLE_POSITION_NV             0x8E50
-#define GL_SAMPLE_MASK_NV                 0x8E51
-#define GL_SAMPLE_MASK_VALUE_NV           0x8E52
-#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53
-#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54
-#define GL_TEXTURE_RENDERBUFFER_NV        0x8E55
-#define GL_SAMPLER_RENDERBUFFER_NV        0x8E56
-#define GL_INT_SAMPLER_RENDERBUFFER_NV    0x8E57
-#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58
-#define GL_MAX_SAMPLE_MASK_WORDS_NV       0x8E59
-typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val);
-typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask);
-typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val);
-GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask);
-GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer);
-#endif
-#endif /* GL_NV_explicit_multisample */
-
-#ifndef GL_NV_fence
-#define GL_NV_fence 1
-#define GL_ALL_COMPLETED_NV               0x84F2
-#define GL_FENCE_STATUS_NV                0x84F3
-#define GL_FENCE_CONDITION_NV             0x84F4
-typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
-typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
-typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
-typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
-typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
-typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
-GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
-GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence);
-GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence);
-GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
-GLAPI void APIENTRY glFinishFenceNV (GLuint fence);
-GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
-#endif
-#endif /* GL_NV_fence */
-
-#ifndef GL_NV_float_buffer
-#define GL_NV_float_buffer 1
-#define GL_FLOAT_R_NV                     0x8880
-#define GL_FLOAT_RG_NV                    0x8881
-#define GL_FLOAT_RGB_NV                   0x8882
-#define GL_FLOAT_RGBA_NV                  0x8883
-#define GL_FLOAT_R16_NV                   0x8884
-#define GL_FLOAT_R32_NV                   0x8885
-#define GL_FLOAT_RG16_NV                  0x8886
-#define GL_FLOAT_RG32_NV                  0x8887
-#define GL_FLOAT_RGB16_NV                 0x8888
-#define GL_FLOAT_RGB32_NV                 0x8889
-#define GL_FLOAT_RGBA16_NV                0x888A
-#define GL_FLOAT_RGBA32_NV                0x888B
-#define GL_TEXTURE_FLOAT_COMPONENTS_NV    0x888C
-#define GL_FLOAT_CLEAR_COLOR_VALUE_NV     0x888D
-#define GL_FLOAT_RGBA_MODE_NV             0x888E
-#endif /* GL_NV_float_buffer */
-
-#ifndef GL_NV_fog_distance
-#define GL_NV_fog_distance 1
-#define GL_FOG_DISTANCE_MODE_NV           0x855A
-#define GL_EYE_RADIAL_NV                  0x855B
-#define GL_EYE_PLANE_ABSOLUTE_NV          0x855C
-#endif /* GL_NV_fog_distance */
-
-#ifndef GL_NV_fragment_program
-#define GL_NV_fragment_program 1
-#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
-#define GL_FRAGMENT_PROGRAM_NV            0x8870
-#define GL_MAX_TEXTURE_COORDS_NV          0x8871
-#define GL_MAX_TEXTURE_IMAGE_UNITS_NV     0x8872
-#define GL_FRAGMENT_PROGRAM_BINDING_NV    0x8873
-#define GL_PROGRAM_ERROR_STRING_NV        0x8874
-typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
-typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
-typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
-GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
-GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
-GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
-#endif
-#endif /* GL_NV_fragment_program */
-
-#ifndef GL_NV_fragment_program2
-#define GL_NV_fragment_program2 1
-#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
-#define GL_MAX_PROGRAM_CALL_DEPTH_NV      0x88F5
-#define GL_MAX_PROGRAM_IF_DEPTH_NV        0x88F6
-#define GL_MAX_PROGRAM_LOOP_DEPTH_NV      0x88F7
-#define GL_MAX_PROGRAM_LOOP_COUNT_NV      0x88F8
-#endif /* GL_NV_fragment_program2 */
-
-#ifndef GL_NV_fragment_program4
-#define GL_NV_fragment_program4 1
-#endif /* GL_NV_fragment_program4 */
-
-#ifndef GL_NV_fragment_program_option
-#define GL_NV_fragment_program_option 1
-#endif /* GL_NV_fragment_program_option */
-
-#ifndef GL_NV_framebuffer_multisample_coverage
-#define GL_NV_framebuffer_multisample_coverage 1
-#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
-#define GL_RENDERBUFFER_COLOR_SAMPLES_NV  0x8E10
-#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
-#define GL_MULTISAMPLE_COVERAGE_MODES_NV  0x8E12
-typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-#endif /* GL_NV_framebuffer_multisample_coverage */
-
-#ifndef GL_NV_geometry_program4
-#define GL_NV_geometry_program4 1
-#define GL_GEOMETRY_PROGRAM_NV            0x8C26
-#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
-#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
-typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit);
-GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);
-GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
-#endif
-#endif /* GL_NV_geometry_program4 */
-
-#ifndef GL_NV_geometry_shader4
-#define GL_NV_geometry_shader4 1
-#endif /* GL_NV_geometry_shader4 */
-
-#ifndef GL_NV_gpu_program4
-#define GL_NV_gpu_program4 1
-#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV    0x8904
-#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV    0x8905
-#define GL_PROGRAM_ATTRIB_COMPONENTS_NV   0x8906
-#define GL_PROGRAM_RESULT_COMPONENTS_NV   0x8907
-#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
-#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
-#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
-#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
-typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
-typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
-typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
-typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
-typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
-typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
-typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
-typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
-typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
-typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
-GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
-GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
-GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
-GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
-GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
-GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
-GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
-GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
-GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
-GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params);
-GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params);
-GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params);
-GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params);
-#endif
-#endif /* GL_NV_gpu_program4 */
-
-#ifndef GL_NV_gpu_program5
-#define GL_NV_gpu_program5 1
-#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A
-#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B
-#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C
-#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D
-#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E
-#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F
-#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44
-#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV  0x8F45
-typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params);
-GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param);
-#endif
-#endif /* GL_NV_gpu_program5 */
-
-#ifndef GL_NV_gpu_program5_mem_extended
-#define GL_NV_gpu_program5_mem_extended 1
-#endif /* GL_NV_gpu_program5_mem_extended */
-
-#ifndef GL_NV_gpu_shader5
-#define GL_NV_gpu_shader5 1
-#endif /* GL_NV_gpu_shader5 */
-
-#ifndef GL_NV_half_float
-#define GL_NV_half_float 1
-typedef unsigned short GLhalfNV;
-#define GL_HALF_FLOAT_NV                  0x140B
-typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
-typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
-typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
-typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
-typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
-typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
-typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
-typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
-typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
-typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
-typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
-typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
-typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y);
-GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v);
-GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z);
-GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v);
-GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
-GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v);
-GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
-GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v);
-GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
-GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v);
-GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
-GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v);
-GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s);
-GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v);
-GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t);
-GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v);
-GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r);
-GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v);
-GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
-GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v);
-GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s);
-GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v);
-GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t);
-GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v);
-GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
-GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v);
-GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
-GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v);
-GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog);
-GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog);
-GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
-GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v);
-GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight);
-GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight);
-GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x);
-GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v);
-GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y);
-GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v);
-GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
-GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v);
-GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
-GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v);
-GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
-GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
-GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
-GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
-#endif
-#endif /* GL_NV_half_float */
-
-#ifndef GL_NV_light_max_exponent
-#define GL_NV_light_max_exponent 1
-#define GL_MAX_SHININESS_NV               0x8504
-#define GL_MAX_SPOT_EXPONENT_NV           0x8505
-#endif /* GL_NV_light_max_exponent */
-
-#ifndef GL_NV_multisample_coverage
-#define GL_NV_multisample_coverage 1
-#define GL_COLOR_SAMPLES_NV               0x8E20
-#endif /* GL_NV_multisample_coverage */
-
-#ifndef GL_NV_multisample_filter_hint
-#define GL_NV_multisample_filter_hint 1
-#define GL_MULTISAMPLE_FILTER_HINT_NV     0x8534
-#endif /* GL_NV_multisample_filter_hint */
-
-#ifndef GL_NV_occlusion_query
-#define GL_NV_occlusion_query 1
-#define GL_PIXEL_COUNTER_BITS_NV          0x8864
-#define GL_CURRENT_OCCLUSION_QUERY_ID_NV  0x8865
-#define GL_PIXEL_COUNT_NV                 0x8866
-#define GL_PIXEL_COUNT_AVAILABLE_NV       0x8867
-typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
-typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
-typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
-typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
-typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
-typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids);
-GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids);
-GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id);
-GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id);
-GLAPI void APIENTRY glEndOcclusionQueryNV (void);
-GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params);
-#endif
-#endif /* GL_NV_occlusion_query */
-
-#ifndef GL_NV_packed_depth_stencil
-#define GL_NV_packed_depth_stencil 1
-#define GL_DEPTH_STENCIL_NV               0x84F9
-#define GL_UNSIGNED_INT_24_8_NV           0x84FA
-#endif /* GL_NV_packed_depth_stencil */
-
-#ifndef GL_NV_parameter_buffer_object
-#define GL_NV_parameter_buffer_object 1
-#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
-#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
-#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
-#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
-#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
-typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);
-typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);
-typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);
-GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);
-GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);
-#endif
-#endif /* GL_NV_parameter_buffer_object */
-
-#ifndef GL_NV_parameter_buffer_object2
-#define GL_NV_parameter_buffer_object2 1
-#endif /* GL_NV_parameter_buffer_object2 */
-
-#ifndef GL_NV_path_rendering
-#define GL_NV_path_rendering 1
-#define GL_PATH_FORMAT_SVG_NV             0x9070
-#define GL_PATH_FORMAT_PS_NV              0x9071
-#define GL_STANDARD_FONT_NAME_NV          0x9072
-#define GL_SYSTEM_FONT_NAME_NV            0x9073
-#define GL_FILE_NAME_NV                   0x9074
-#define GL_PATH_STROKE_WIDTH_NV           0x9075
-#define GL_PATH_END_CAPS_NV               0x9076
-#define GL_PATH_INITIAL_END_CAP_NV        0x9077
-#define GL_PATH_TERMINAL_END_CAP_NV       0x9078
-#define GL_PATH_JOIN_STYLE_NV             0x9079
-#define GL_PATH_MITER_LIMIT_NV            0x907A
-#define GL_PATH_DASH_CAPS_NV              0x907B
-#define GL_PATH_INITIAL_DASH_CAP_NV       0x907C
-#define GL_PATH_TERMINAL_DASH_CAP_NV      0x907D
-#define GL_PATH_DASH_OFFSET_NV            0x907E
-#define GL_PATH_CLIENT_LENGTH_NV          0x907F
-#define GL_PATH_FILL_MODE_NV              0x9080
-#define GL_PATH_FILL_MASK_NV              0x9081
-#define GL_PATH_FILL_COVER_MODE_NV        0x9082
-#define GL_PATH_STROKE_COVER_MODE_NV      0x9083
-#define GL_PATH_STROKE_MASK_NV            0x9084
-#define GL_COUNT_UP_NV                    0x9088
-#define GL_COUNT_DOWN_NV                  0x9089
-#define GL_PATH_OBJECT_BOUNDING_BOX_NV    0x908A
-#define GL_CONVEX_HULL_NV                 0x908B
-#define GL_BOUNDING_BOX_NV                0x908D
-#define GL_TRANSLATE_X_NV                 0x908E
-#define GL_TRANSLATE_Y_NV                 0x908F
-#define GL_TRANSLATE_2D_NV                0x9090
-#define GL_TRANSLATE_3D_NV                0x9091
-#define GL_AFFINE_2D_NV                   0x9092
-#define GL_AFFINE_3D_NV                   0x9094
-#define GL_TRANSPOSE_AFFINE_2D_NV         0x9096
-#define GL_TRANSPOSE_AFFINE_3D_NV         0x9098
-#define GL_UTF8_NV                        0x909A
-#define GL_UTF16_NV                       0x909B
-#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C
-#define GL_PATH_COMMAND_COUNT_NV          0x909D
-#define GL_PATH_COORD_COUNT_NV            0x909E
-#define GL_PATH_DASH_ARRAY_COUNT_NV       0x909F
-#define GL_PATH_COMPUTED_LENGTH_NV        0x90A0
-#define GL_PATH_FILL_BOUNDING_BOX_NV      0x90A1
-#define GL_PATH_STROKE_BOUNDING_BOX_NV    0x90A2
-#define GL_SQUARE_NV                      0x90A3
-#define GL_ROUND_NV                       0x90A4
-#define GL_TRIANGULAR_NV                  0x90A5
-#define GL_BEVEL_NV                       0x90A6
-#define GL_MITER_REVERT_NV                0x90A7
-#define GL_MITER_TRUNCATE_NV              0x90A8
-#define GL_SKIP_MISSING_GLYPH_NV          0x90A9
-#define GL_USE_MISSING_GLYPH_NV           0x90AA
-#define GL_PATH_ERROR_POSITION_NV         0x90AB
-#define GL_PATH_FOG_GEN_MODE_NV           0x90AC
-#define GL_ACCUM_ADJACENT_PAIRS_NV        0x90AD
-#define GL_ADJACENT_PAIRS_NV              0x90AE
-#define GL_FIRST_TO_REST_NV               0x90AF
-#define GL_PATH_GEN_MODE_NV               0x90B0
-#define GL_PATH_GEN_COEFF_NV              0x90B1
-#define GL_PATH_GEN_COLOR_FORMAT_NV       0x90B2
-#define GL_PATH_GEN_COMPONENTS_NV         0x90B3
-#define GL_PATH_STENCIL_FUNC_NV           0x90B7
-#define GL_PATH_STENCIL_REF_NV            0x90B8
-#define GL_PATH_STENCIL_VALUE_MASK_NV     0x90B9
-#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD
-#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE
-#define GL_PATH_COVER_DEPTH_FUNC_NV       0x90BF
-#define GL_PATH_DASH_OFFSET_RESET_NV      0x90B4
-#define GL_MOVE_TO_RESETS_NV              0x90B5
-#define GL_MOVE_TO_CONTINUES_NV           0x90B6
-#define GL_CLOSE_PATH_NV                  0x00
-#define GL_MOVE_TO_NV                     0x02
-#define GL_RELATIVE_MOVE_TO_NV            0x03
-#define GL_LINE_TO_NV                     0x04
-#define GL_RELATIVE_LINE_TO_NV            0x05
-#define GL_HORIZONTAL_LINE_TO_NV          0x06
-#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07
-#define GL_VERTICAL_LINE_TO_NV            0x08
-#define GL_RELATIVE_VERTICAL_LINE_TO_NV   0x09
-#define GL_QUADRATIC_CURVE_TO_NV          0x0A
-#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B
-#define GL_CUBIC_CURVE_TO_NV              0x0C
-#define GL_RELATIVE_CUBIC_CURVE_TO_NV     0x0D
-#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV   0x0E
-#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F
-#define GL_SMOOTH_CUBIC_CURVE_TO_NV       0x10
-#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11
-#define GL_SMALL_CCW_ARC_TO_NV            0x12
-#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV   0x13
-#define GL_SMALL_CW_ARC_TO_NV             0x14
-#define GL_RELATIVE_SMALL_CW_ARC_TO_NV    0x15
-#define GL_LARGE_CCW_ARC_TO_NV            0x16
-#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV   0x17
-#define GL_LARGE_CW_ARC_TO_NV             0x18
-#define GL_RELATIVE_LARGE_CW_ARC_TO_NV    0x19
-#define GL_RESTART_PATH_NV                0xF0
-#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV    0xF2
-#define GL_DUP_LAST_CUBIC_CURVE_TO_NV     0xF4
-#define GL_RECT_NV                        0xF6
-#define GL_CIRCULAR_CCW_ARC_TO_NV         0xF8
-#define GL_CIRCULAR_CW_ARC_TO_NV          0xFA
-#define GL_CIRCULAR_TANGENT_ARC_TO_NV     0xFC
-#define GL_ARC_TO_NV                      0xFE
-#define GL_RELATIVE_ARC_TO_NV             0xFF
-#define GL_BOLD_BIT_NV                    0x01
-#define GL_ITALIC_BIT_NV                  0x02
-#define GL_GLYPH_WIDTH_BIT_NV             0x01
-#define GL_GLYPH_HEIGHT_BIT_NV            0x02
-#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04
-#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08
-#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10
-#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20
-#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40
-#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80
-#define GL_GLYPH_HAS_KERNING_BIT_NV       0x100
-#define GL_FONT_X_MIN_BOUNDS_BIT_NV       0x00010000
-#define GL_FONT_Y_MIN_BOUNDS_BIT_NV       0x00020000
-#define GL_FONT_X_MAX_BOUNDS_BIT_NV       0x00040000
-#define GL_FONT_Y_MAX_BOUNDS_BIT_NV       0x00080000
-#define GL_FONT_UNITS_PER_EM_BIT_NV       0x00100000
-#define GL_FONT_ASCENDER_BIT_NV           0x00200000
-#define GL_FONT_DESCENDER_BIT_NV          0x00400000
-#define GL_FONT_HEIGHT_BIT_NV             0x00800000
-#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV  0x01000000
-#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000
-#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000
-#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000
-#define GL_FONT_HAS_KERNING_BIT_NV        0x10000000
-#define GL_PRIMARY_COLOR_NV               0x852C
-#define GL_SECONDARY_COLOR_NV             0x852D
-typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range);
-typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);
-typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path);
-typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
-typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
-typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
-typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
-typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString);
-typedef 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);
-typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
-typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);
-typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
-typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
-typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value);
-typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);
-typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value);
-typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);
-typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
-typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);
-typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units);
-typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);
-typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);
-typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
-typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
-typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);
-typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
-typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
-typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode);
-typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);
-typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);
-typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value);
-typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value);
-typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands);
-typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords);
-typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray);
-typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
-typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
-typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
-typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value);
-typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value);
-typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value);
-typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value);
-typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);
-typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);
-typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
-typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range);
-GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range);
-GLAPI GLboolean APIENTRY glIsPathNV (GLuint path);
-GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
-GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
-GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
-GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
-GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString);
-GLAPI 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);
-GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
-GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath);
-GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
-GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
-GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value);
-GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value);
-GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value);
-GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value);
-GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
-GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask);
-GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units);
-GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask);
-GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask);
-GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
-GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
-GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func);
-GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
-GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
-GLAPI void APIENTRY glPathFogGenNV (GLenum genMode);
-GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode);
-GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode);
-GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value);
-GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value);
-GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands);
-GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords);
-GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray);
-GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
-GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
-GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
-GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value);
-GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value);
-GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value);
-GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value);
-GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y);
-GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y);
-GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments);
-GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
-#endif
-#endif /* GL_NV_path_rendering */
-
-#ifndef GL_NV_pixel_data_range
-#define GL_NV_pixel_data_range 1
-#define GL_WRITE_PIXEL_DATA_RANGE_NV      0x8878
-#define GL_READ_PIXEL_DATA_RANGE_NV       0x8879
-#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
-#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
-#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
-#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
-typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const void *pointer);
-typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const void *pointer);
-GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target);
-#endif
-#endif /* GL_NV_pixel_data_range */
-
-#ifndef GL_NV_point_sprite
-#define GL_NV_point_sprite 1
-#define GL_POINT_SPRITE_NV                0x8861
-#define GL_COORD_REPLACE_NV               0x8862
-#define GL_POINT_SPRITE_R_MODE_NV         0x8863
-typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param);
-GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params);
-#endif
-#endif /* GL_NV_point_sprite */
-
-#ifndef GL_NV_present_video
-#define GL_NV_present_video 1
-#define GL_FRAME_NV                       0x8E26
-#define GL_FIELDS_NV                      0x8E27
-#define GL_CURRENT_TIME_NV                0x8E28
-#define GL_NUM_FILL_STREAMS_NV            0x8E29
-#define GL_PRESENT_TIME_NV                0x8E2A
-#define GL_PRESENT_DURATION_NV            0x8E2B
-typedef 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);
-typedef 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);
-typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params);
-typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params);
-typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI 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);
-GLAPI 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);
-GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params);
-GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params);
-GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params);
-#endif
-#endif /* GL_NV_present_video */
-
-#ifndef GL_NV_primitive_restart
-#define GL_NV_primitive_restart 1
-#define GL_PRIMITIVE_RESTART_NV           0x8558
-#define GL_PRIMITIVE_RESTART_INDEX_NV     0x8559
-typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
-typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPrimitiveRestartNV (void);
-GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index);
-#endif
-#endif /* GL_NV_primitive_restart */
-
-#ifndef GL_NV_register_combiners
-#define GL_NV_register_combiners 1
-#define GL_REGISTER_COMBINERS_NV          0x8522
-#define GL_VARIABLE_A_NV                  0x8523
-#define GL_VARIABLE_B_NV                  0x8524
-#define GL_VARIABLE_C_NV                  0x8525
-#define GL_VARIABLE_D_NV                  0x8526
-#define GL_VARIABLE_E_NV                  0x8527
-#define GL_VARIABLE_F_NV                  0x8528
-#define GL_VARIABLE_G_NV                  0x8529
-#define GL_CONSTANT_COLOR0_NV             0x852A
-#define GL_CONSTANT_COLOR1_NV             0x852B
-#define GL_SPARE0_NV                      0x852E
-#define GL_SPARE1_NV                      0x852F
-#define GL_DISCARD_NV                     0x8530
-#define GL_E_TIMES_F_NV                   0x8531
-#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
-#define GL_UNSIGNED_IDENTITY_NV           0x8536
-#define GL_UNSIGNED_INVERT_NV             0x8537
-#define GL_EXPAND_NORMAL_NV               0x8538
-#define GL_EXPAND_NEGATE_NV               0x8539
-#define GL_HALF_BIAS_NORMAL_NV            0x853A
-#define GL_HALF_BIAS_NEGATE_NV            0x853B
-#define GL_SIGNED_IDENTITY_NV             0x853C
-#define GL_SIGNED_NEGATE_NV               0x853D
-#define GL_SCALE_BY_TWO_NV                0x853E
-#define GL_SCALE_BY_FOUR_NV               0x853F
-#define GL_SCALE_BY_ONE_HALF_NV           0x8540
-#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV   0x8541
-#define GL_COMBINER_INPUT_NV              0x8542
-#define GL_COMBINER_MAPPING_NV            0x8543
-#define GL_COMBINER_COMPONENT_USAGE_NV    0x8544
-#define GL_COMBINER_AB_DOT_PRODUCT_NV     0x8545
-#define GL_COMBINER_CD_DOT_PRODUCT_NV     0x8546
-#define GL_COMBINER_MUX_SUM_NV            0x8547
-#define GL_COMBINER_SCALE_NV              0x8548
-#define GL_COMBINER_BIAS_NV               0x8549
-#define GL_COMBINER_AB_OUTPUT_NV          0x854A
-#define GL_COMBINER_CD_OUTPUT_NV          0x854B
-#define GL_COMBINER_SUM_OUTPUT_NV         0x854C
-#define GL_MAX_GENERAL_COMBINERS_NV       0x854D
-#define GL_NUM_GENERAL_COMBINERS_NV       0x854E
-#define GL_COLOR_SUM_CLAMP_NV             0x854F
-#define GL_COMBINER0_NV                   0x8550
-#define GL_COMBINER1_NV                   0x8551
-#define GL_COMBINER2_NV                   0x8552
-#define GL_COMBINER3_NV                   0x8553
-#define GL_COMBINER4_NV                   0x8554
-#define GL_COMBINER5_NV                   0x8555
-#define GL_COMBINER6_NV                   0x8556
-#define GL_COMBINER7_NV                   0x8557
-typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
-typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
-typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
-typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param);
-GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params);
-GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param);
-GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
-GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
-GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
-GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params);
-#endif
-#endif /* GL_NV_register_combiners */
-
-#ifndef GL_NV_register_combiners2
-#define GL_NV_register_combiners2 1
-#define GL_PER_STAGE_CONSTANTS_NV         0x8535
-typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params);
-#endif
-#endif /* GL_NV_register_combiners2 */
-
-#ifndef GL_NV_shader_atomic_counters
-#define GL_NV_shader_atomic_counters 1
-#endif /* GL_NV_shader_atomic_counters */
-
-#ifndef GL_NV_shader_atomic_float
-#define GL_NV_shader_atomic_float 1
-#endif /* GL_NV_shader_atomic_float */
-
-#ifndef GL_NV_shader_buffer_load
-#define GL_NV_shader_buffer_load 1
-#define GL_BUFFER_GPU_ADDRESS_NV          0x8F1D
-#define GL_GPU_ADDRESS_NV                 0x8F34
-#define GL_MAX_SHADER_BUFFER_ADDRESS_NV   0x8F35
-typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);
-typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target);
-typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target);
-typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);
-typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer);
-typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer);
-typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params);
-typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params);
-typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result);
-typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);
-typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);
-typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access);
-GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target);
-GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target);
-GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access);
-GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer);
-GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer);
-GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params);
-GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params);
-GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result);
-GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value);
-GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
-GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value);
-GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-#endif
-#endif /* GL_NV_shader_buffer_load */
-
-#ifndef GL_NV_shader_buffer_store
-#define GL_NV_shader_buffer_store 1
-#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010
-#endif /* GL_NV_shader_buffer_store */
-
-#ifndef GL_NV_shader_storage_buffer_object
-#define GL_NV_shader_storage_buffer_object 1
-#endif /* GL_NV_shader_storage_buffer_object */
-
-#ifndef GL_NV_shader_thread_group
-#define GL_NV_shader_thread_group 1
-#define GL_WARP_SIZE_NV                   0x9339
-#define GL_WARPS_PER_SM_NV                0x933A
-#define GL_SM_COUNT_NV                    0x933B
-#endif /* GL_NV_shader_thread_group */
-
-#ifndef GL_NV_shader_thread_shuffle
-#define GL_NV_shader_thread_shuffle 1
-#endif /* GL_NV_shader_thread_shuffle */
-
-#ifndef GL_NV_tessellation_program5
-#define GL_NV_tessellation_program5 1
-#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV   0x86D8
-#define GL_TESS_CONTROL_PROGRAM_NV        0x891E
-#define GL_TESS_EVALUATION_PROGRAM_NV     0x891F
-#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74
-#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75
-#endif /* GL_NV_tessellation_program5 */
-
-#ifndef GL_NV_texgen_emboss
-#define GL_NV_texgen_emboss 1
-#define GL_EMBOSS_LIGHT_NV                0x855D
-#define GL_EMBOSS_CONSTANT_NV             0x855E
-#define GL_EMBOSS_MAP_NV                  0x855F
-#endif /* GL_NV_texgen_emboss */
-
-#ifndef GL_NV_texgen_reflection
-#define GL_NV_texgen_reflection 1
-#define GL_NORMAL_MAP_NV                  0x8511
-#define GL_REFLECTION_MAP_NV              0x8512
-#endif /* GL_NV_texgen_reflection */
-
-#ifndef GL_NV_texture_barrier
-#define GL_NV_texture_barrier 1
-typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTextureBarrierNV (void);
-#endif
-#endif /* GL_NV_texture_barrier */
-
-#ifndef GL_NV_texture_compression_vtc
-#define GL_NV_texture_compression_vtc 1
-#endif /* GL_NV_texture_compression_vtc */
-
-#ifndef GL_NV_texture_env_combine4
-#define GL_NV_texture_env_combine4 1
-#define GL_COMBINE4_NV                    0x8503
-#define GL_SOURCE3_RGB_NV                 0x8583
-#define GL_SOURCE3_ALPHA_NV               0x858B
-#define GL_OPERAND3_RGB_NV                0x8593
-#define GL_OPERAND3_ALPHA_NV              0x859B
-#endif /* GL_NV_texture_env_combine4 */
-
-#ifndef GL_NV_texture_expand_normal
-#define GL_NV_texture_expand_normal 1
-#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
-#endif /* GL_NV_texture_expand_normal */
-
-#ifndef GL_NV_texture_multisample
-#define GL_NV_texture_multisample 1
-#define GL_TEXTURE_COVERAGE_SAMPLES_NV    0x9045
-#define GL_TEXTURE_COLOR_SAMPLES_NV       0x9046
-typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
-typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
-typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
-typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
-typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
-typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
-GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
-GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
-GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
-GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
-GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
-#endif
-#endif /* GL_NV_texture_multisample */
-
-#ifndef GL_NV_texture_rectangle
-#define GL_NV_texture_rectangle 1
-#define GL_TEXTURE_RECTANGLE_NV           0x84F5
-#define GL_TEXTURE_BINDING_RECTANGLE_NV   0x84F6
-#define GL_PROXY_TEXTURE_RECTANGLE_NV     0x84F7
-#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV  0x84F8
-#endif /* GL_NV_texture_rectangle */
-
-#ifndef GL_NV_texture_shader
-#define GL_NV_texture_shader 1
-#define GL_OFFSET_TEXTURE_RECTANGLE_NV    0x864C
-#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
-#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
-#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
-#define GL_UNSIGNED_INT_S8_S8_8_8_NV      0x86DA
-#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV  0x86DB
-#define GL_DSDT_MAG_INTENSITY_NV          0x86DC
-#define GL_SHADER_CONSISTENT_NV           0x86DD
-#define GL_TEXTURE_SHADER_NV              0x86DE
-#define GL_SHADER_OPERATION_NV            0x86DF
-#define GL_CULL_MODES_NV                  0x86E0
-#define GL_OFFSET_TEXTURE_MATRIX_NV       0x86E1
-#define GL_OFFSET_TEXTURE_SCALE_NV        0x86E2
-#define GL_OFFSET_TEXTURE_BIAS_NV         0x86E3
-#define GL_OFFSET_TEXTURE_2D_MATRIX_NV    0x86E1
-#define GL_OFFSET_TEXTURE_2D_SCALE_NV     0x86E2
-#define GL_OFFSET_TEXTURE_2D_BIAS_NV      0x86E3
-#define GL_PREVIOUS_TEXTURE_INPUT_NV      0x86E4
-#define GL_CONST_EYE_NV                   0x86E5
-#define GL_PASS_THROUGH_NV                0x86E6
-#define GL_CULL_FRAGMENT_NV               0x86E7
-#define GL_OFFSET_TEXTURE_2D_NV           0x86E8
-#define GL_DEPENDENT_AR_TEXTURE_2D_NV     0x86E9
-#define GL_DEPENDENT_GB_TEXTURE_2D_NV     0x86EA
-#define GL_DOT_PRODUCT_NV                 0x86EC
-#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV   0x86ED
-#define GL_DOT_PRODUCT_TEXTURE_2D_NV      0x86EE
-#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
-#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
-#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
-#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
-#define GL_HILO_NV                        0x86F4
-#define GL_DSDT_NV                        0x86F5
-#define GL_DSDT_MAG_NV                    0x86F6
-#define GL_DSDT_MAG_VIB_NV                0x86F7
-#define GL_HILO16_NV                      0x86F8
-#define GL_SIGNED_HILO_NV                 0x86F9
-#define GL_SIGNED_HILO16_NV               0x86FA
-#define GL_SIGNED_RGBA_NV                 0x86FB
-#define GL_SIGNED_RGBA8_NV                0x86FC
-#define GL_SIGNED_RGB_NV                  0x86FE
-#define GL_SIGNED_RGB8_NV                 0x86FF
-#define GL_SIGNED_LUMINANCE_NV            0x8701
-#define GL_SIGNED_LUMINANCE8_NV           0x8702
-#define GL_SIGNED_LUMINANCE_ALPHA_NV      0x8703
-#define GL_SIGNED_LUMINANCE8_ALPHA8_NV    0x8704
-#define GL_SIGNED_ALPHA_NV                0x8705
-#define GL_SIGNED_ALPHA8_NV               0x8706
-#define GL_SIGNED_INTENSITY_NV            0x8707
-#define GL_SIGNED_INTENSITY8_NV           0x8708
-#define GL_DSDT8_NV                       0x8709
-#define GL_DSDT8_MAG8_NV                  0x870A
-#define GL_DSDT8_MAG8_INTENSITY8_NV       0x870B
-#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV   0x870C
-#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
-#define GL_HI_SCALE_NV                    0x870E
-#define GL_LO_SCALE_NV                    0x870F
-#define GL_DS_SCALE_NV                    0x8710
-#define GL_DT_SCALE_NV                    0x8711
-#define GL_MAGNITUDE_SCALE_NV             0x8712
-#define GL_VIBRANCE_SCALE_NV              0x8713
-#define GL_HI_BIAS_NV                     0x8714
-#define GL_LO_BIAS_NV                     0x8715
-#define GL_DS_BIAS_NV                     0x8716
-#define GL_DT_BIAS_NV                     0x8717
-#define GL_MAGNITUDE_BIAS_NV              0x8718
-#define GL_VIBRANCE_BIAS_NV               0x8719
-#define GL_TEXTURE_BORDER_VALUES_NV       0x871A
-#define GL_TEXTURE_HI_SIZE_NV             0x871B
-#define GL_TEXTURE_LO_SIZE_NV             0x871C
-#define GL_TEXTURE_DS_SIZE_NV             0x871D
-#define GL_TEXTURE_DT_SIZE_NV             0x871E
-#define GL_TEXTURE_MAG_SIZE_NV            0x871F
-#endif /* GL_NV_texture_shader */
-
-#ifndef GL_NV_texture_shader2
-#define GL_NV_texture_shader2 1
-#define GL_DOT_PRODUCT_TEXTURE_3D_NV      0x86EF
-#endif /* GL_NV_texture_shader2 */
-
-#ifndef GL_NV_texture_shader3
-#define GL_NV_texture_shader3 1
-#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
-#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
-#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
-#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
-#define GL_OFFSET_HILO_TEXTURE_2D_NV      0x8854
-#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
-#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
-#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
-#define GL_DEPENDENT_HILO_TEXTURE_2D_NV   0x8858
-#define GL_DEPENDENT_RGB_TEXTURE_3D_NV    0x8859
-#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
-#define GL_DOT_PRODUCT_PASS_THROUGH_NV    0x885B
-#define GL_DOT_PRODUCT_TEXTURE_1D_NV      0x885C
-#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
-#define GL_HILO8_NV                       0x885E
-#define GL_SIGNED_HILO8_NV                0x885F
-#define GL_FORCE_BLUE_TO_ONE_NV           0x8860
-#endif /* GL_NV_texture_shader3 */
-
-#ifndef GL_NV_transform_feedback
-#define GL_NV_transform_feedback 1
-#define GL_BACK_PRIMARY_COLOR_NV          0x8C77
-#define GL_BACK_SECONDARY_COLOR_NV        0x8C78
-#define GL_TEXTURE_COORD_NV               0x8C79
-#define GL_CLIP_DISTANCE_NV               0x8C7A
-#define GL_VERTEX_ID_NV                   0x8C7B
-#define GL_PRIMITIVE_ID_NV                0x8C7C
-#define GL_GENERIC_ATTRIB_NV              0x8C7D
-#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV  0x8C7E
-#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
-#define GL_ACTIVE_VARYINGS_NV             0x8C81
-#define GL_ACTIVE_VARYING_MAX_LENGTH_NV   0x8C82
-#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
-#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
-#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
-#define GL_TRANSFORM_FEEDBACK_RECORD_NV   0x8C86
-#define GL_PRIMITIVES_GENERATED_NV        0x8C87
-#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
-#define GL_RASTERIZER_DISCARD_NV          0x8C89
-#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
-#define GL_INTERLEAVED_ATTRIBS_NV         0x8C8C
-#define GL_SEPARATE_ATTRIBS_NV            0x8C8D
-#define GL_TRANSFORM_FEEDBACK_BUFFER_NV   0x8C8E
-#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
-#define GL_LAYER_NV                       0x8DAA
-#define GL_NEXT_BUFFER_NV                 -2
-#define GL_SKIP_COMPONENTS4_NV            -3
-#define GL_SKIP_COMPONENTS3_NV            -4
-#define GL_SKIP_COMPONENTS2_NV            -5
-#define GL_SKIP_COMPONENTS1_NV            -6
-typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
-typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
-typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
-typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
-typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
-typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
-typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
-typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
-typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
-typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode);
-GLAPI void APIENTRY glEndTransformFeedbackNV (void);
-GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode);
-GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
-GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer);
-GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
-GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name);
-GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name);
-GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location);
-GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
-#endif
-#endif /* GL_NV_transform_feedback */
-
-#ifndef GL_NV_transform_feedback2
-#define GL_NV_transform_feedback2 1
-#define GL_TRANSFORM_FEEDBACK_NV          0x8E22
-#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23
-#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24
-#define GL_TRANSFORM_FEEDBACK_BINDING_NV  0x8E25
-typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id);
-typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids);
-typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids);
-typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id);
-typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void);
-typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);
-typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id);
-GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids);
-GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids);
-GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id);
-GLAPI void APIENTRY glPauseTransformFeedbackNV (void);
-GLAPI void APIENTRY glResumeTransformFeedbackNV (void);
-GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id);
-#endif
-#endif /* GL_NV_transform_feedback2 */
-
-#ifndef GL_NV_vdpau_interop
-#define GL_NV_vdpau_interop 1
-typedef GLintptr GLvdpauSurfaceNV;
-#define GL_SURFACE_STATE_NV               0x86EB
-#define GL_SURFACE_REGISTERED_NV          0x86FD
-#define GL_SURFACE_MAPPED_NV              0x8700
-#define GL_WRITE_DISCARD_NV               0x88BE
-typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const void *vdpDevice, const void *getProcAddress);
-typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void);
-typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
-typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
-typedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface);
-typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface);
-typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access);
-typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
-typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVDPAUInitNV (const void *vdpDevice, const void *getProcAddress);
-GLAPI void APIENTRY glVDPAUFiniNV (void);
-GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
-GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
-GLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface);
-GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface);
-GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access);
-GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
-GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
-#endif
-#endif /* GL_NV_vdpau_interop */
-
-#ifndef GL_NV_vertex_array_range
-#define GL_NV_vertex_array_range 1
-#define GL_VERTEX_ARRAY_RANGE_NV          0x851D
-#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV   0x851E
-#define GL_VERTEX_ARRAY_RANGE_VALID_NV    0x851F
-#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
-#define GL_VERTEX_ARRAY_RANGE_POINTER_NV  0x8521
-typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
-typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const void *pointer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
-GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const void *pointer);
-#endif
-#endif /* GL_NV_vertex_array_range */
-
-#ifndef GL_NV_vertex_array_range2
-#define GL_NV_vertex_array_range2 1
-#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
-#endif /* GL_NV_vertex_array_range2 */
-
-#ifndef GL_NV_vertex_attrib_integer_64bit
-#define GL_NV_vertex_attrib_integer_64bit 1
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x);
-GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y);
-GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
-GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
-GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v);
-GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v);
-GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v);
-GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v);
-GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x);
-GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y);
-GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
-GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
-GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v);
-GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v);
-GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v);
-GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v);
-GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params);
-GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params);
-GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
-#endif
-#endif /* GL_NV_vertex_attrib_integer_64bit */
-
-#ifndef GL_NV_vertex_buffer_unified_memory
-#define GL_NV_vertex_buffer_unified_memory 1
-#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E
-#define GL_ELEMENT_ARRAY_UNIFIED_NV       0x8F1F
-#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20
-#define GL_VERTEX_ARRAY_ADDRESS_NV        0x8F21
-#define GL_NORMAL_ARRAY_ADDRESS_NV        0x8F22
-#define GL_COLOR_ARRAY_ADDRESS_NV         0x8F23
-#define GL_INDEX_ARRAY_ADDRESS_NV         0x8F24
-#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25
-#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV     0x8F26
-#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27
-#define GL_FOG_COORD_ARRAY_ADDRESS_NV     0x8F28
-#define GL_ELEMENT_ARRAY_ADDRESS_NV       0x8F29
-#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV  0x8F2A
-#define GL_VERTEX_ARRAY_LENGTH_NV         0x8F2B
-#define GL_NORMAL_ARRAY_LENGTH_NV         0x8F2C
-#define GL_COLOR_ARRAY_LENGTH_NV          0x8F2D
-#define GL_INDEX_ARRAY_LENGTH_NV          0x8F2E
-#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV  0x8F2F
-#define GL_EDGE_FLAG_ARRAY_LENGTH_NV      0x8F30
-#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31
-#define GL_FOG_COORD_ARRAY_LENGTH_NV      0x8F32
-#define GL_ELEMENT_ARRAY_LENGTH_NV        0x8F33
-#define GL_DRAW_INDIRECT_UNIFIED_NV       0x8F40
-#define GL_DRAW_INDIRECT_ADDRESS_NV       0x8F41
-#define GL_DRAW_INDIRECT_LENGTH_NV        0x8F42
-typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
-typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
-typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride);
-typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
-typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride);
-typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
-typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride);
-typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
-typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
-typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
-GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride);
-GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride);
-GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride);
-GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride);
-GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride);
-GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride);
-GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride);
-GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride);
-GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
-GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
-GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result);
-#endif
-#endif /* GL_NV_vertex_buffer_unified_memory */
-
-#ifndef GL_NV_vertex_program
-#define GL_NV_vertex_program 1
-#define GL_VERTEX_PROGRAM_NV              0x8620
-#define GL_VERTEX_STATE_PROGRAM_NV        0x8621
-#define GL_ATTRIB_ARRAY_SIZE_NV           0x8623
-#define GL_ATTRIB_ARRAY_STRIDE_NV         0x8624
-#define GL_ATTRIB_ARRAY_TYPE_NV           0x8625
-#define GL_CURRENT_ATTRIB_NV              0x8626
-#define GL_PROGRAM_LENGTH_NV              0x8627
-#define GL_PROGRAM_STRING_NV              0x8628
-#define GL_MODELVIEW_PROJECTION_NV        0x8629
-#define GL_IDENTITY_NV                    0x862A
-#define GL_INVERSE_NV                     0x862B
-#define GL_TRANSPOSE_NV                   0x862C
-#define GL_INVERSE_TRANSPOSE_NV           0x862D
-#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
-#define GL_MAX_TRACK_MATRICES_NV          0x862F
-#define GL_MATRIX0_NV                     0x8630
-#define GL_MATRIX1_NV                     0x8631
-#define GL_MATRIX2_NV                     0x8632
-#define GL_MATRIX3_NV                     0x8633
-#define GL_MATRIX4_NV                     0x8634
-#define GL_MATRIX5_NV                     0x8635
-#define GL_MATRIX6_NV                     0x8636
-#define GL_MATRIX7_NV                     0x8637
-#define GL_CURRENT_MATRIX_STACK_DEPTH_NV  0x8640
-#define GL_CURRENT_MATRIX_NV              0x8641
-#define GL_VERTEX_PROGRAM_POINT_SIZE_NV   0x8642
-#define GL_VERTEX_PROGRAM_TWO_SIDE_NV     0x8643
-#define GL_PROGRAM_PARAMETER_NV           0x8644
-#define GL_ATTRIB_ARRAY_POINTER_NV        0x8645
-#define GL_PROGRAM_TARGET_NV              0x8646
-#define GL_PROGRAM_RESIDENT_NV            0x8647
-#define GL_TRACK_MATRIX_NV                0x8648
-#define GL_TRACK_MATRIX_TRANSFORM_NV      0x8649
-#define GL_VERTEX_PROGRAM_BINDING_NV      0x864A
-#define GL_PROGRAM_ERROR_POSITION_NV      0x864B
-#define GL_VERTEX_ATTRIB_ARRAY0_NV        0x8650
-#define GL_VERTEX_ATTRIB_ARRAY1_NV        0x8651
-#define GL_VERTEX_ATTRIB_ARRAY2_NV        0x8652
-#define GL_VERTEX_ATTRIB_ARRAY3_NV        0x8653
-#define GL_VERTEX_ATTRIB_ARRAY4_NV        0x8654
-#define GL_VERTEX_ATTRIB_ARRAY5_NV        0x8655
-#define GL_VERTEX_ATTRIB_ARRAY6_NV        0x8656
-#define GL_VERTEX_ATTRIB_ARRAY7_NV        0x8657
-#define GL_VERTEX_ATTRIB_ARRAY8_NV        0x8658
-#define GL_VERTEX_ATTRIB_ARRAY9_NV        0x8659
-#define GL_VERTEX_ATTRIB_ARRAY10_NV       0x865A
-#define GL_VERTEX_ATTRIB_ARRAY11_NV       0x865B
-#define GL_VERTEX_ATTRIB_ARRAY12_NV       0x865C
-#define GL_VERTEX_ATTRIB_ARRAY13_NV       0x865D
-#define GL_VERTEX_ATTRIB_ARRAY14_NV       0x865E
-#define GL_VERTEX_ATTRIB_ARRAY15_NV       0x865F
-#define GL_MAP1_VERTEX_ATTRIB0_4_NV       0x8660
-#define GL_MAP1_VERTEX_ATTRIB1_4_NV       0x8661
-#define GL_MAP1_VERTEX_ATTRIB2_4_NV       0x8662
-#define GL_MAP1_VERTEX_ATTRIB3_4_NV       0x8663
-#define GL_MAP1_VERTEX_ATTRIB4_4_NV       0x8664
-#define GL_MAP1_VERTEX_ATTRIB5_4_NV       0x8665
-#define GL_MAP1_VERTEX_ATTRIB6_4_NV       0x8666
-#define GL_MAP1_VERTEX_ATTRIB7_4_NV       0x8667
-#define GL_MAP1_VERTEX_ATTRIB8_4_NV       0x8668
-#define GL_MAP1_VERTEX_ATTRIB9_4_NV       0x8669
-#define GL_MAP1_VERTEX_ATTRIB10_4_NV      0x866A
-#define GL_MAP1_VERTEX_ATTRIB11_4_NV      0x866B
-#define GL_MAP1_VERTEX_ATTRIB12_4_NV      0x866C
-#define GL_MAP1_VERTEX_ATTRIB13_4_NV      0x866D
-#define GL_MAP1_VERTEX_ATTRIB14_4_NV      0x866E
-#define GL_MAP1_VERTEX_ATTRIB15_4_NV      0x866F
-#define GL_MAP2_VERTEX_ATTRIB0_4_NV       0x8670
-#define GL_MAP2_VERTEX_ATTRIB1_4_NV       0x8671
-#define GL_MAP2_VERTEX_ATTRIB2_4_NV       0x8672
-#define GL_MAP2_VERTEX_ATTRIB3_4_NV       0x8673
-#define GL_MAP2_VERTEX_ATTRIB4_4_NV       0x8674
-#define GL_MAP2_VERTEX_ATTRIB5_4_NV       0x8675
-#define GL_MAP2_VERTEX_ATTRIB6_4_NV       0x8676
-#define GL_MAP2_VERTEX_ATTRIB7_4_NV       0x8677
-#define GL_MAP2_VERTEX_ATTRIB8_4_NV       0x8678
-#define GL_MAP2_VERTEX_ATTRIB9_4_NV       0x8679
-#define GL_MAP2_VERTEX_ATTRIB10_4_NV      0x867A
-#define GL_MAP2_VERTEX_ATTRIB11_4_NV      0x867B
-#define GL_MAP2_VERTEX_ATTRIB12_4_NV      0x867C
-#define GL_MAP2_VERTEX_ATTRIB13_4_NV      0x867D
-#define GL_MAP2_VERTEX_ATTRIB14_4_NV      0x867E
-#define GL_MAP2_VERTEX_ATTRIB15_4_NV      0x867F
-typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
-typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
-typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
-typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
-typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
-typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
-typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, void **pointer);
-typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
-typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
-typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v);
-typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v);
-typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
-typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences);
-GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id);
-GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs);
-GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params);
-GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs);
-GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params);
-GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program);
-GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params);
-GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, void **pointer);
-GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id);
-GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
-GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v);
-GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v);
-GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs);
-GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform);
-GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);
-GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x);
-GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x);
-GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x);
-GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y);
-GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y);
-GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y);
-GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z);
-GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v);
-GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v);
-GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v);
-GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v);
-GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v);
-GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v);
-GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v);
-GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v);
-#endif
-#endif /* GL_NV_vertex_program */
-
-#ifndef GL_NV_vertex_program1_1
-#define GL_NV_vertex_program1_1 1
-#endif /* GL_NV_vertex_program1_1 */
-
-#ifndef GL_NV_vertex_program2
-#define GL_NV_vertex_program2 1
-#endif /* GL_NV_vertex_program2 */
-
-#ifndef GL_NV_vertex_program2_option
-#define GL_NV_vertex_program2_option 1
-#endif /* GL_NV_vertex_program2_option */
-
-#ifndef GL_NV_vertex_program3
-#define GL_NV_vertex_program3 1
-#endif /* GL_NV_vertex_program3 */
-
-#ifndef GL_NV_vertex_program4
-#define GL_NV_vertex_program4 1
-#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x);
-GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y);
-GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z);
-GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w);
-GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x);
-GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y);
-GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z);
-GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v);
-GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v);
-GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v);
-GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v);
-GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v);
-GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v);
-GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v);
-GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v);
-GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v);
-GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v);
-GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v);
-GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v);
-GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params);
-#endif
-#endif /* GL_NV_vertex_program4 */
-
-#ifndef GL_NV_video_capture
-#define GL_NV_video_capture 1
-#define GL_VIDEO_BUFFER_NV                0x9020
-#define GL_VIDEO_BUFFER_BINDING_NV        0x9021
-#define GL_FIELD_UPPER_NV                 0x9022
-#define GL_FIELD_LOWER_NV                 0x9023
-#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV   0x9024
-#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025
-#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026
-#define GL_LAST_VIDEO_CAPTURE_STATUS_NV   0x9027
-#define GL_VIDEO_BUFFER_PITCH_NV          0x9028
-#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029
-#define GL_VIDEO_COLOR_CONVERSION_MAX_NV  0x902A
-#define GL_VIDEO_COLOR_CONVERSION_MIN_NV  0x902B
-#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C
-#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D
-#define GL_PARTIAL_SUCCESS_NV             0x902E
-#define GL_SUCCESS_NV                     0x902F
-#define GL_FAILURE_NV                     0x9030
-#define GL_YCBYCR8_422_NV                 0x9031
-#define GL_YCBAYCR8A_4224_NV              0x9032
-#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV  0x9033
-#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034
-#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV  0x9035
-#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036
-#define GL_Z4Y12Z4CB12Z4CR12_444_NV       0x9037
-#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV   0x9038
-#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV  0x9039
-#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A
-#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B
-#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C
-typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
-typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
-typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
-typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
-typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
-typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
-typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot);
-GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
-GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
-GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot);
-GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
-GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
-GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
-#endif
-#endif /* GL_NV_video_capture */
-
-#ifndef GL_OML_interlace
-#define GL_OML_interlace 1
-#define GL_INTERLACE_OML                  0x8980
-#define GL_INTERLACE_READ_OML             0x8981
-#endif /* GL_OML_interlace */
-
-#ifndef GL_OML_resample
-#define GL_OML_resample 1
-#define GL_PACK_RESAMPLE_OML              0x8984
-#define GL_UNPACK_RESAMPLE_OML            0x8985
-#define GL_RESAMPLE_REPLICATE_OML         0x8986
-#define GL_RESAMPLE_ZERO_FILL_OML         0x8987
-#define GL_RESAMPLE_AVERAGE_OML           0x8988
-#define GL_RESAMPLE_DECIMATE_OML          0x8989
-#endif /* GL_OML_resample */
-
-#ifndef GL_OML_subsample
-#define GL_OML_subsample 1
-#define GL_FORMAT_SUBSAMPLE_24_24_OML     0x8982
-#define GL_FORMAT_SUBSAMPLE_244_244_OML   0x8983
-#endif /* GL_OML_subsample */
-
-#ifndef GL_PGI_misc_hints
-#define GL_PGI_misc_hints 1
-#define GL_PREFER_DOUBLEBUFFER_HINT_PGI   0x1A1F8
-#define GL_CONSERVE_MEMORY_HINT_PGI       0x1A1FD
-#define GL_RECLAIM_MEMORY_HINT_PGI        0x1A1FE
-#define GL_NATIVE_GRAPHICS_HANDLE_PGI     0x1A202
-#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
-#define GL_NATIVE_GRAPHICS_END_HINT_PGI   0x1A204
-#define GL_ALWAYS_FAST_HINT_PGI           0x1A20C
-#define GL_ALWAYS_SOFT_HINT_PGI           0x1A20D
-#define GL_ALLOW_DRAW_OBJ_HINT_PGI        0x1A20E
-#define GL_ALLOW_DRAW_WIN_HINT_PGI        0x1A20F
-#define GL_ALLOW_DRAW_FRG_HINT_PGI        0x1A210
-#define GL_ALLOW_DRAW_MEM_HINT_PGI        0x1A211
-#define GL_STRICT_DEPTHFUNC_HINT_PGI      0x1A216
-#define GL_STRICT_LIGHTING_HINT_PGI       0x1A217
-#define GL_STRICT_SCISSOR_HINT_PGI        0x1A218
-#define GL_FULL_STIPPLE_HINT_PGI          0x1A219
-#define GL_CLIP_NEAR_HINT_PGI             0x1A220
-#define GL_CLIP_FAR_HINT_PGI              0x1A221
-#define GL_WIDE_LINE_HINT_PGI             0x1A222
-#define GL_BACK_NORMALS_HINT_PGI          0x1A223
-typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode);
-#endif
-#endif /* GL_PGI_misc_hints */
-
-#ifndef GL_PGI_vertex_hints
-#define GL_PGI_vertex_hints 1
-#define GL_VERTEX_DATA_HINT_PGI           0x1A22A
-#define GL_VERTEX_CONSISTENT_HINT_PGI     0x1A22B
-#define GL_MATERIAL_SIDE_HINT_PGI         0x1A22C
-#define GL_MAX_VERTEX_HINT_PGI            0x1A22D
-#define GL_COLOR3_BIT_PGI                 0x00010000
-#define GL_COLOR4_BIT_PGI                 0x00020000
-#define GL_EDGEFLAG_BIT_PGI               0x00040000
-#define GL_INDEX_BIT_PGI                  0x00080000
-#define GL_MAT_AMBIENT_BIT_PGI            0x00100000
-#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
-#define GL_MAT_DIFFUSE_BIT_PGI            0x00400000
-#define GL_MAT_EMISSION_BIT_PGI           0x00800000
-#define GL_MAT_COLOR_INDEXES_BIT_PGI      0x01000000
-#define GL_MAT_SHININESS_BIT_PGI          0x02000000
-#define GL_MAT_SPECULAR_BIT_PGI           0x04000000
-#define GL_NORMAL_BIT_PGI                 0x08000000
-#define GL_TEXCOORD1_BIT_PGI              0x10000000
-#define GL_TEXCOORD2_BIT_PGI              0x20000000
-#define GL_TEXCOORD3_BIT_PGI              0x40000000
-#define GL_TEXCOORD4_BIT_PGI              0x80000000
-#define GL_VERTEX23_BIT_PGI               0x00000004
-#define GL_VERTEX4_BIT_PGI                0x00000008
-#endif /* GL_PGI_vertex_hints */
-
-#ifndef GL_REND_screen_coordinates
-#define GL_REND_screen_coordinates 1
-#define GL_SCREEN_COORDINATES_REND        0x8490
-#define GL_INVERTED_SCREEN_W_REND         0x8491
-#endif /* GL_REND_screen_coordinates */
-
-#ifndef GL_S3_s3tc
-#define GL_S3_s3tc 1
-#define GL_RGB_S3TC                       0x83A0
-#define GL_RGB4_S3TC                      0x83A1
-#define GL_RGBA_S3TC                      0x83A2
-#define GL_RGBA4_S3TC                     0x83A3
-#define GL_RGBA_DXT5_S3TC                 0x83A4
-#define GL_RGBA4_DXT5_S3TC                0x83A5
-#endif /* GL_S3_s3tc */
-
-#ifndef GL_SGIS_detail_texture
-#define GL_SGIS_detail_texture 1
-#define GL_DETAIL_TEXTURE_2D_SGIS         0x8095
-#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
-#define GL_LINEAR_DETAIL_SGIS             0x8097
-#define GL_LINEAR_DETAIL_ALPHA_SGIS       0x8098
-#define GL_LINEAR_DETAIL_COLOR_SGIS       0x8099
-#define GL_DETAIL_TEXTURE_LEVEL_SGIS      0x809A
-#define GL_DETAIL_TEXTURE_MODE_SGIS       0x809B
-#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
-typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
-typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
-GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points);
-#endif
-#endif /* GL_SGIS_detail_texture */
-
-#ifndef GL_SGIS_fog_function
-#define GL_SGIS_fog_function 1
-#define GL_FOG_FUNC_SGIS                  0x812A
-#define GL_FOG_FUNC_POINTS_SGIS           0x812B
-#define GL_MAX_FOG_FUNC_POINTS_SGIS       0x812C
-typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
-typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points);
-GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points);
-#endif
-#endif /* GL_SGIS_fog_function */
-
-#ifndef GL_SGIS_generate_mipmap
-#define GL_SGIS_generate_mipmap 1
-#define GL_GENERATE_MIPMAP_SGIS           0x8191
-#define GL_GENERATE_MIPMAP_HINT_SGIS      0x8192
-#endif /* GL_SGIS_generate_mipmap */
-
-#ifndef GL_SGIS_multisample
-#define GL_SGIS_multisample 1
-#define GL_MULTISAMPLE_SGIS               0x809D
-#define GL_SAMPLE_ALPHA_TO_MASK_SGIS      0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE_SGIS       0x809F
-#define GL_SAMPLE_MASK_SGIS               0x80A0
-#define GL_1PASS_SGIS                     0x80A1
-#define GL_2PASS_0_SGIS                   0x80A2
-#define GL_2PASS_1_SGIS                   0x80A3
-#define GL_4PASS_0_SGIS                   0x80A4
-#define GL_4PASS_1_SGIS                   0x80A5
-#define GL_4PASS_2_SGIS                   0x80A6
-#define GL_4PASS_3_SGIS                   0x80A7
-#define GL_SAMPLE_BUFFERS_SGIS            0x80A8
-#define GL_SAMPLES_SGIS                   0x80A9
-#define GL_SAMPLE_MASK_VALUE_SGIS         0x80AA
-#define GL_SAMPLE_MASK_INVERT_SGIS        0x80AB
-#define GL_SAMPLE_PATTERN_SGIS            0x80AC
-typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
-typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert);
-GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern);
-#endif
-#endif /* GL_SGIS_multisample */
-
-#ifndef GL_SGIS_pixel_texture
-#define GL_SGIS_pixel_texture 1
-#define GL_PIXEL_TEXTURE_SGIS             0x8353
-#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
-#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
-#define GL_PIXEL_GROUP_COLOR_SGIS         0x8356
-typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param);
-GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params);
-GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param);
-GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params);
-#endif
-#endif /* GL_SGIS_pixel_texture */
-
-#ifndef GL_SGIS_point_line_texgen
-#define GL_SGIS_point_line_texgen 1
-#define GL_EYE_DISTANCE_TO_POINT_SGIS     0x81F0
-#define GL_OBJECT_DISTANCE_TO_POINT_SGIS  0x81F1
-#define GL_EYE_DISTANCE_TO_LINE_SGIS      0x81F2
-#define GL_OBJECT_DISTANCE_TO_LINE_SGIS   0x81F3
-#define GL_EYE_POINT_SGIS                 0x81F4
-#define GL_OBJECT_POINT_SGIS              0x81F5
-#define GL_EYE_LINE_SGIS                  0x81F6
-#define GL_OBJECT_LINE_SGIS               0x81F7
-#endif /* GL_SGIS_point_line_texgen */
-
-#ifndef GL_SGIS_point_parameters
-#define GL_SGIS_point_parameters 1
-#define GL_POINT_SIZE_MIN_SGIS            0x8126
-#define GL_POINT_SIZE_MAX_SGIS            0x8127
-#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
-#define GL_DISTANCE_ATTENUATION_SGIS      0x8129
-typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param);
-GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params);
-#endif
-#endif /* GL_SGIS_point_parameters */
-
-#ifndef GL_SGIS_sharpen_texture
-#define GL_SGIS_sharpen_texture 1
-#define GL_LINEAR_SHARPEN_SGIS            0x80AD
-#define GL_LINEAR_SHARPEN_ALPHA_SGIS      0x80AE
-#define GL_LINEAR_SHARPEN_COLOR_SGIS      0x80AF
-#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
-typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
-typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
-GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points);
-#endif
-#endif /* GL_SGIS_sharpen_texture */
-
-#ifndef GL_SGIS_texture4D
-#define GL_SGIS_texture4D 1
-#define GL_PACK_SKIP_VOLUMES_SGIS         0x8130
-#define GL_PACK_IMAGE_DEPTH_SGIS          0x8131
-#define GL_UNPACK_SKIP_VOLUMES_SGIS       0x8132
-#define GL_UNPACK_IMAGE_DEPTH_SGIS        0x8133
-#define GL_TEXTURE_4D_SGIS                0x8134
-#define GL_PROXY_TEXTURE_4D_SGIS          0x8135
-#define GL_TEXTURE_4DSIZE_SGIS            0x8136
-#define GL_TEXTURE_WRAP_Q_SGIS            0x8137
-#define GL_MAX_4D_TEXTURE_SIZE_SGIS       0x8138
-#define GL_TEXTURE_4D_BINDING_SGIS        0x814F
-typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI 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);
-GLAPI 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);
-#endif
-#endif /* GL_SGIS_texture4D */
-
-#ifndef GL_SGIS_texture_border_clamp
-#define GL_SGIS_texture_border_clamp 1
-#define GL_CLAMP_TO_BORDER_SGIS           0x812D
-#endif /* GL_SGIS_texture_border_clamp */
-
-#ifndef GL_SGIS_texture_color_mask
-#define GL_SGIS_texture_color_mask 1
-#define GL_TEXTURE_COLOR_WRITEMASK_SGIS   0x81EF
-typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-#endif
-#endif /* GL_SGIS_texture_color_mask */
-
-#ifndef GL_SGIS_texture_edge_clamp
-#define GL_SGIS_texture_edge_clamp 1
-#define GL_CLAMP_TO_EDGE_SGIS             0x812F
-#endif /* GL_SGIS_texture_edge_clamp */
-
-#ifndef GL_SGIS_texture_filter4
-#define GL_SGIS_texture_filter4 1
-#define GL_FILTER4_SGIS                   0x8146
-#define GL_TEXTURE_FILTER4_SIZE_SGIS      0x8147
-typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
-typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights);
-GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
-#endif
-#endif /* GL_SGIS_texture_filter4 */
-
-#ifndef GL_SGIS_texture_lod
-#define GL_SGIS_texture_lod 1
-#define GL_TEXTURE_MIN_LOD_SGIS           0x813A
-#define GL_TEXTURE_MAX_LOD_SGIS           0x813B
-#define GL_TEXTURE_BASE_LEVEL_SGIS        0x813C
-#define GL_TEXTURE_MAX_LEVEL_SGIS         0x813D
-#endif /* GL_SGIS_texture_lod */
-
-#ifndef GL_SGIS_texture_select
-#define GL_SGIS_texture_select 1
-#define GL_DUAL_ALPHA4_SGIS               0x8110
-#define GL_DUAL_ALPHA8_SGIS               0x8111
-#define GL_DUAL_ALPHA12_SGIS              0x8112
-#define GL_DUAL_ALPHA16_SGIS              0x8113
-#define GL_DUAL_LUMINANCE4_SGIS           0x8114
-#define GL_DUAL_LUMINANCE8_SGIS           0x8115
-#define GL_DUAL_LUMINANCE12_SGIS          0x8116
-#define GL_DUAL_LUMINANCE16_SGIS          0x8117
-#define GL_DUAL_INTENSITY4_SGIS           0x8118
-#define GL_DUAL_INTENSITY8_SGIS           0x8119
-#define GL_DUAL_INTENSITY12_SGIS          0x811A
-#define GL_DUAL_INTENSITY16_SGIS          0x811B
-#define GL_DUAL_LUMINANCE_ALPHA4_SGIS     0x811C
-#define GL_DUAL_LUMINANCE_ALPHA8_SGIS     0x811D
-#define GL_QUAD_ALPHA4_SGIS               0x811E
-#define GL_QUAD_ALPHA8_SGIS               0x811F
-#define GL_QUAD_LUMINANCE4_SGIS           0x8120
-#define GL_QUAD_LUMINANCE8_SGIS           0x8121
-#define GL_QUAD_INTENSITY4_SGIS           0x8122
-#define GL_QUAD_INTENSITY8_SGIS           0x8123
-#define GL_DUAL_TEXTURE_SELECT_SGIS       0x8124
-#define GL_QUAD_TEXTURE_SELECT_SGIS       0x8125
-#endif /* GL_SGIS_texture_select */
-
-#ifndef GL_SGIX_async
-#define GL_SGIX_async 1
-#define GL_ASYNC_MARKER_SGIX              0x8329
-typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
-typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
-typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
-typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
-typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
-typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker);
-GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp);
-GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp);
-GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range);
-GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range);
-GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker);
-#endif
-#endif /* GL_SGIX_async */
-
-#ifndef GL_SGIX_async_histogram
-#define GL_SGIX_async_histogram 1
-#define GL_ASYNC_HISTOGRAM_SGIX           0x832C
-#define GL_MAX_ASYNC_HISTOGRAM_SGIX       0x832D
-#endif /* GL_SGIX_async_histogram */
-
-#ifndef GL_SGIX_async_pixel
-#define GL_SGIX_async_pixel 1
-#define GL_ASYNC_TEX_IMAGE_SGIX           0x835C
-#define GL_ASYNC_DRAW_PIXELS_SGIX         0x835D
-#define GL_ASYNC_READ_PIXELS_SGIX         0x835E
-#define GL_MAX_ASYNC_TEX_IMAGE_SGIX       0x835F
-#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX     0x8360
-#define GL_MAX_ASYNC_READ_PIXELS_SGIX     0x8361
-#endif /* GL_SGIX_async_pixel */
-
-#ifndef GL_SGIX_blend_alpha_minmax
-#define GL_SGIX_blend_alpha_minmax 1
-#define GL_ALPHA_MIN_SGIX                 0x8320
-#define GL_ALPHA_MAX_SGIX                 0x8321
-#endif /* GL_SGIX_blend_alpha_minmax */
-
-#ifndef GL_SGIX_calligraphic_fragment
-#define GL_SGIX_calligraphic_fragment 1
-#define GL_CALLIGRAPHIC_FRAGMENT_SGIX     0x8183
-#endif /* GL_SGIX_calligraphic_fragment */
-
-#ifndef GL_SGIX_clipmap
-#define GL_SGIX_clipmap 1
-#define GL_LINEAR_CLIPMAP_LINEAR_SGIX     0x8170
-#define GL_TEXTURE_CLIPMAP_CENTER_SGIX    0x8171
-#define GL_TEXTURE_CLIPMAP_FRAME_SGIX     0x8172
-#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX    0x8173
-#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
-#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
-#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX     0x8176
-#define GL_MAX_CLIPMAP_DEPTH_SGIX         0x8177
-#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
-#define GL_NEAREST_CLIPMAP_NEAREST_SGIX   0x844D
-#define GL_NEAREST_CLIPMAP_LINEAR_SGIX    0x844E
-#define GL_LINEAR_CLIPMAP_NEAREST_SGIX    0x844F
-#endif /* GL_SGIX_clipmap */
-
-#ifndef GL_SGIX_convolution_accuracy
-#define GL_SGIX_convolution_accuracy 1
-#define GL_CONVOLUTION_HINT_SGIX          0x8316
-#endif /* GL_SGIX_convolution_accuracy */
-
-#ifndef GL_SGIX_depth_pass_instrument
-#define GL_SGIX_depth_pass_instrument 1
-#endif /* GL_SGIX_depth_pass_instrument */
-
-#ifndef GL_SGIX_depth_texture
-#define GL_SGIX_depth_texture 1
-#define GL_DEPTH_COMPONENT16_SGIX         0x81A5
-#define GL_DEPTH_COMPONENT24_SGIX         0x81A6
-#define GL_DEPTH_COMPONENT32_SGIX         0x81A7
-#endif /* GL_SGIX_depth_texture */
-
-#ifndef GL_SGIX_flush_raster
-#define GL_SGIX_flush_raster 1
-typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFlushRasterSGIX (void);
-#endif
-#endif /* GL_SGIX_flush_raster */
-
-#ifndef GL_SGIX_fog_offset
-#define GL_SGIX_fog_offset 1
-#define GL_FOG_OFFSET_SGIX                0x8198
-#define GL_FOG_OFFSET_VALUE_SGIX          0x8199
-#endif /* GL_SGIX_fog_offset */
-
-#ifndef GL_SGIX_fragment_lighting
-#define GL_SGIX_fragment_lighting 1
-#define GL_FRAGMENT_LIGHTING_SGIX         0x8400
-#define GL_FRAGMENT_COLOR_MATERIAL_SGIX   0x8401
-#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
-#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
-#define GL_MAX_FRAGMENT_LIGHTS_SGIX       0x8404
-#define GL_MAX_ACTIVE_LIGHTS_SGIX         0x8405
-#define GL_CURRENT_RASTER_NORMAL_SGIX     0x8406
-#define GL_LIGHT_ENV_MODE_SGIX            0x8407
-#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
-#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
-#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
-#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
-#define GL_FRAGMENT_LIGHT0_SGIX           0x840C
-#define GL_FRAGMENT_LIGHT1_SGIX           0x840D
-#define GL_FRAGMENT_LIGHT2_SGIX           0x840E
-#define GL_FRAGMENT_LIGHT3_SGIX           0x840F
-#define GL_FRAGMENT_LIGHT4_SGIX           0x8410
-#define GL_FRAGMENT_LIGHT5_SGIX           0x8411
-#define GL_FRAGMENT_LIGHT6_SGIX           0x8412
-#define GL_FRAGMENT_LIGHT7_SGIX           0x8413
-typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
-typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode);
-GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param);
-GLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param);
-GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param);
-GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params);
-GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param);
-GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params);
-GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param);
-#endif
-#endif /* GL_SGIX_fragment_lighting */
-
-#ifndef GL_SGIX_framezoom
-#define GL_SGIX_framezoom 1
-#define GL_FRAMEZOOM_SGIX                 0x818B
-#define GL_FRAMEZOOM_FACTOR_SGIX          0x818C
-#define GL_MAX_FRAMEZOOM_FACTOR_SGIX      0x818D
-typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFrameZoomSGIX (GLint factor);
-#endif
-#endif /* GL_SGIX_framezoom */
-
-#ifndef GL_SGIX_igloo_interface
-#define GL_SGIX_igloo_interface 1
-typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const void *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const void *params);
-#endif
-#endif /* GL_SGIX_igloo_interface */
-
-#ifndef GL_SGIX_instruments
-#define GL_SGIX_instruments 1
-#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
-#define GL_INSTRUMENT_MEASUREMENTS_SGIX   0x8181
-typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
-typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
-typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
-typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
-typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
-typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
-GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer);
-GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p);
-GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker);
-GLAPI void APIENTRY glStartInstrumentsSGIX (void);
-GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker);
-#endif
-#endif /* GL_SGIX_instruments */
-
-#ifndef GL_SGIX_interlace
-#define GL_SGIX_interlace 1
-#define GL_INTERLACE_SGIX                 0x8094
-#endif /* GL_SGIX_interlace */
-
-#ifndef GL_SGIX_ir_instrument1
-#define GL_SGIX_ir_instrument1 1
-#define GL_IR_INSTRUMENT1_SGIX            0x817F
-#endif /* GL_SGIX_ir_instrument1 */
-
-#ifndef GL_SGIX_list_priority
-#define GL_SGIX_list_priority 1
-#define GL_LIST_PRIORITY_SGIX             0x8182
-typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params);
-GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param);
-GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params);
-#endif
-#endif /* GL_SGIX_list_priority */
-
-#ifndef GL_SGIX_pixel_texture
-#define GL_SGIX_pixel_texture 1
-#define GL_PIXEL_TEX_GEN_SGIX             0x8139
-#define GL_PIXEL_TEX_GEN_MODE_SGIX        0x832B
-typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode);
-#endif
-#endif /* GL_SGIX_pixel_texture */
-
-#ifndef GL_SGIX_pixel_tiles
-#define GL_SGIX_pixel_tiles 1
-#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
-#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
-#define GL_PIXEL_TILE_WIDTH_SGIX          0x8140
-#define GL_PIXEL_TILE_HEIGHT_SGIX         0x8141
-#define GL_PIXEL_TILE_GRID_WIDTH_SGIX     0x8142
-#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX    0x8143
-#define GL_PIXEL_TILE_GRID_DEPTH_SGIX     0x8144
-#define GL_PIXEL_TILE_CACHE_SIZE_SGIX     0x8145
-#endif /* GL_SGIX_pixel_tiles */
-
-#ifndef GL_SGIX_polynomial_ffd
-#define GL_SGIX_polynomial_ffd 1
-#define GL_TEXTURE_DEFORMATION_BIT_SGIX   0x00000001
-#define GL_GEOMETRY_DEFORMATION_BIT_SGIX  0x00000002
-#define GL_GEOMETRY_DEFORMATION_SGIX      0x8194
-#define GL_TEXTURE_DEFORMATION_SGIX       0x8195
-#define GL_DEFORMATIONS_MASK_SGIX         0x8196
-#define GL_MAX_DEFORMATION_ORDER_SGIX     0x8197
-typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
-typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
-typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
-typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI 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);
-GLAPI 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);
-GLAPI void APIENTRY glDeformSGIX (GLbitfield mask);
-GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask);
-#endif
-#endif /* GL_SGIX_polynomial_ffd */
-
-#ifndef GL_SGIX_reference_plane
-#define GL_SGIX_reference_plane 1
-#define GL_REFERENCE_PLANE_SGIX           0x817D
-#define GL_REFERENCE_PLANE_EQUATION_SGIX  0x817E
-typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation);
-#endif
-#endif /* GL_SGIX_reference_plane */
-
-#ifndef GL_SGIX_resample
-#define GL_SGIX_resample 1
-#define GL_PACK_RESAMPLE_SGIX             0x842C
-#define GL_UNPACK_RESAMPLE_SGIX           0x842D
-#define GL_RESAMPLE_REPLICATE_SGIX        0x842E
-#define GL_RESAMPLE_ZERO_FILL_SGIX        0x842F
-#define GL_RESAMPLE_DECIMATE_SGIX         0x8430
-#endif /* GL_SGIX_resample */
-
-#ifndef GL_SGIX_scalebias_hint
-#define GL_SGIX_scalebias_hint 1
-#define GL_SCALEBIAS_HINT_SGIX            0x8322
-#endif /* GL_SGIX_scalebias_hint */
-
-#ifndef GL_SGIX_shadow
-#define GL_SGIX_shadow 1
-#define GL_TEXTURE_COMPARE_SGIX           0x819A
-#define GL_TEXTURE_COMPARE_OPERATOR_SGIX  0x819B
-#define GL_TEXTURE_LEQUAL_R_SGIX          0x819C
-#define GL_TEXTURE_GEQUAL_R_SGIX          0x819D
-#endif /* GL_SGIX_shadow */
-
-#ifndef GL_SGIX_shadow_ambient
-#define GL_SGIX_shadow_ambient 1
-#define GL_SHADOW_AMBIENT_SGIX            0x80BF
-#endif /* GL_SGIX_shadow_ambient */
-
-#ifndef GL_SGIX_sprite
-#define GL_SGIX_sprite 1
-#define GL_SPRITE_SGIX                    0x8148
-#define GL_SPRITE_MODE_SGIX               0x8149
-#define GL_SPRITE_AXIS_SGIX               0x814A
-#define GL_SPRITE_TRANSLATION_SGIX        0x814B
-#define GL_SPRITE_AXIAL_SGIX              0x814C
-#define GL_SPRITE_OBJECT_ALIGNED_SGIX     0x814D
-#define GL_SPRITE_EYE_ALIGNED_SGIX        0x814E
-typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param);
-GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param);
-GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params);
-#endif
-#endif /* GL_SGIX_sprite */
-
-#ifndef GL_SGIX_subsample
-#define GL_SGIX_subsample 1
-#define GL_PACK_SUBSAMPLE_RATE_SGIX       0x85A0
-#define GL_UNPACK_SUBSAMPLE_RATE_SGIX     0x85A1
-#define GL_PIXEL_SUBSAMPLE_4444_SGIX      0x85A2
-#define GL_PIXEL_SUBSAMPLE_2424_SGIX      0x85A3
-#define GL_PIXEL_SUBSAMPLE_4242_SGIX      0x85A4
-#endif /* GL_SGIX_subsample */
-
-#ifndef GL_SGIX_tag_sample_buffer
-#define GL_SGIX_tag_sample_buffer 1
-typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTagSampleBufferSGIX (void);
-#endif
-#endif /* GL_SGIX_tag_sample_buffer */
-
-#ifndef GL_SGIX_texture_add_env
-#define GL_SGIX_texture_add_env 1
-#define GL_TEXTURE_ENV_BIAS_SGIX          0x80BE
-#endif /* GL_SGIX_texture_add_env */
-
-#ifndef GL_SGIX_texture_coordinate_clamp
-#define GL_SGIX_texture_coordinate_clamp 1
-#define GL_TEXTURE_MAX_CLAMP_S_SGIX       0x8369
-#define GL_TEXTURE_MAX_CLAMP_T_SGIX       0x836A
-#define GL_TEXTURE_MAX_CLAMP_R_SGIX       0x836B
-#endif /* GL_SGIX_texture_coordinate_clamp */
-
-#ifndef GL_SGIX_texture_lod_bias
-#define GL_SGIX_texture_lod_bias 1
-#define GL_TEXTURE_LOD_BIAS_S_SGIX        0x818E
-#define GL_TEXTURE_LOD_BIAS_T_SGIX        0x818F
-#define GL_TEXTURE_LOD_BIAS_R_SGIX        0x8190
-#endif /* GL_SGIX_texture_lod_bias */
-
-#ifndef GL_SGIX_texture_multi_buffer
-#define GL_SGIX_texture_multi_buffer 1
-#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
-#endif /* GL_SGIX_texture_multi_buffer */
-
-#ifndef GL_SGIX_texture_scale_bias
-#define GL_SGIX_texture_scale_bias 1
-#define GL_POST_TEXTURE_FILTER_BIAS_SGIX  0x8179
-#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
-#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
-#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
-#endif /* GL_SGIX_texture_scale_bias */
-
-#ifndef GL_SGIX_vertex_preclip
-#define GL_SGIX_vertex_preclip 1
-#define GL_VERTEX_PRECLIP_SGIX            0x83EE
-#define GL_VERTEX_PRECLIP_HINT_SGIX       0x83EF
-#endif /* GL_SGIX_vertex_preclip */
-
-#ifndef GL_SGIX_ycrcb
-#define GL_SGIX_ycrcb 1
-#define GL_YCRCB_422_SGIX                 0x81BB
-#define GL_YCRCB_444_SGIX                 0x81BC
-#endif /* GL_SGIX_ycrcb */
-
-#ifndef GL_SGIX_ycrcb_subsample
-#define GL_SGIX_ycrcb_subsample 1
-#endif /* GL_SGIX_ycrcb_subsample */
-
-#ifndef GL_SGIX_ycrcba
-#define GL_SGIX_ycrcba 1
-#define GL_YCRCB_SGIX                     0x8318
-#define GL_YCRCBA_SGIX                    0x8319
-#endif /* GL_SGIX_ycrcba */
-
-#ifndef GL_SGI_color_matrix
-#define GL_SGI_color_matrix 1
-#define GL_COLOR_MATRIX_SGI               0x80B1
-#define GL_COLOR_MATRIX_STACK_DEPTH_SGI   0x80B2
-#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
-#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
-#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
-#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
-#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
-#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
-#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
-#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
-#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
-#endif /* GL_SGI_color_matrix */
-
-#ifndef GL_SGI_color_table
-#define GL_SGI_color_table 1
-#define GL_COLOR_TABLE_SGI                0x80D0
-#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
-#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
-#define GL_PROXY_COLOR_TABLE_SGI          0x80D3
-#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
-#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
-#define GL_COLOR_TABLE_SCALE_SGI          0x80D6
-#define GL_COLOR_TABLE_BIAS_SGI           0x80D7
-#define GL_COLOR_TABLE_FORMAT_SGI         0x80D8
-#define GL_COLOR_TABLE_WIDTH_SGI          0x80D9
-#define GL_COLOR_TABLE_RED_SIZE_SGI       0x80DA
-#define GL_COLOR_TABLE_GREEN_SIZE_SGI     0x80DB
-#define GL_COLOR_TABLE_BLUE_SIZE_SGI      0x80DC
-#define GL_COLOR_TABLE_ALPHA_SIZE_SGI     0x80DD
-#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
-#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
-typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
-typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void *table);
-typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
-GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, void *table);
-GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params);
-#endif
-#endif /* GL_SGI_color_table */
-
-#ifndef GL_SGI_texture_color_table
-#define GL_SGI_texture_color_table 1
-#define GL_TEXTURE_COLOR_TABLE_SGI        0x80BC
-#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI  0x80BD
-#endif /* GL_SGI_texture_color_table */
-
-#ifndef GL_SUNX_constant_data
-#define GL_SUNX_constant_data 1
-#define GL_UNPACK_CONSTANT_DATA_SUNX      0x81D5
-#define GL_TEXTURE_CONSTANT_DATA_SUNX     0x81D6
-typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFinishTextureSUNX (void);
-#endif
-#endif /* GL_SUNX_constant_data */
-
-#ifndef GL_SUN_convolution_border_modes
-#define GL_SUN_convolution_border_modes 1
-#define GL_WRAP_BORDER_SUN                0x81D4
-#endif /* GL_SUN_convolution_border_modes */
-
-#ifndef GL_SUN_global_alpha
-#define GL_SUN_global_alpha 1
-#define GL_GLOBAL_ALPHA_SUN               0x81D9
-#define GL_GLOBAL_ALPHA_FACTOR_SUN        0x81DA
-typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
-typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
-typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
-typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
-typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
-typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
-typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
-typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor);
-GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor);
-GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor);
-GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor);
-GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor);
-GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor);
-GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor);
-GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor);
-#endif
-#endif /* GL_SUN_global_alpha */
-
-#ifndef GL_SUN_mesh_array
-#define GL_SUN_mesh_array 1
-#define GL_QUAD_MESH_SUN                  0x8614
-#define GL_TRIANGLE_MESH_SUN              0x8615
-typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width);
-#endif
-#endif /* GL_SUN_mesh_array */
-
-#ifndef GL_SUN_slice_accum
-#define GL_SUN_slice_accum 1
-#define GL_SLICE_ACCUM_SUN                0x85CC
-#endif /* GL_SUN_slice_accum */
-
-#ifndef GL_SUN_triangle_list
-#define GL_SUN_triangle_list 1
-#define GL_RESTART_SUN                    0x0001
-#define GL_REPLACE_MIDDLE_SUN             0x0002
-#define GL_REPLACE_OLDEST_SUN             0x0003
-#define GL_TRIANGLE_LIST_SUN              0x81D7
-#define GL_REPLACEMENT_CODE_SUN           0x81D8
-#define GL_REPLACEMENT_CODE_ARRAY_SUN     0x85C0
-#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
-#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
-#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
-#define GL_R1UI_V3F_SUN                   0x85C4
-#define GL_R1UI_C4UB_V3F_SUN              0x85C5
-#define GL_R1UI_C3F_V3F_SUN               0x85C6
-#define GL_R1UI_N3F_V3F_SUN               0x85C7
-#define GL_R1UI_C4F_N3F_V3F_SUN           0x85C8
-#define GL_R1UI_T2F_V3F_SUN               0x85C9
-#define GL_R1UI_T2F_N3F_V3F_SUN           0x85CA
-#define GL_R1UI_T2F_C4F_N3F_V3F_SUN       0x85CB
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void **pointer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code);
-GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code);
-GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code);
-GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code);
-GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code);
-GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code);
-GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const void **pointer);
-#endif
-#endif /* GL_SUN_triangle_list */
-
-#ifndef GL_SUN_vertex
-#define GL_SUN_vertex 1
-typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
-typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
-typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
-typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
-typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
-typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
-typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
-typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
-typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
-GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v);
-GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v);
-GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v);
-GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v);
-GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v);
-GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v);
-GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v);
-GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
-GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
-GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
-GLAPI 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);
-GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-GLAPI 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);
-GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v);
-GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v);
-GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v);
-GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v);
-GLAPI 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);
-GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
-GLAPI 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);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-#endif
-#endif /* GL_SUN_vertex */
-
-#ifndef GL_WIN_phong_shading
-#define GL_WIN_phong_shading 1
-#define GL_PHONG_WIN                      0x80EA
-#define GL_PHONG_HINT_WIN                 0x80EB
-#endif /* GL_WIN_phong_shading */
-
-#ifndef GL_WIN_specular_fog
-#define GL_WIN_specular_fog 1
-#define GL_FOG_SPECULAR_TEXTURE_WIN       0x80EC
-#endif /* GL_WIN_specular_fog */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles.h
deleted file mode 100644 (file)
index 8511b96..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_opengles.h
- *
- *  This is a simple file to encapsulate the OpenGL ES 1.X API headers.
- */
-#include "SDL_config.h"
-
-#ifdef __IPHONEOS__
-#include <OpenGLES/ES1/gl.h>
-#include <OpenGLES/ES1/glext.h>
-#else
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-#endif
-
-#ifndef APIENTRY
-#define APIENTRY
-#endif
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2.h
deleted file mode 100644 (file)
index 172fcb3..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_opengles2.h
- *
- *  This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
- */
-#include "SDL_config.h"
-
-#if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
-
-#ifdef __IPHONEOS__
-#include <OpenGLES/ES2/gl.h>
-#include <OpenGLES/ES2/glext.h>
-#else
-#include <GLES2/gl2platform.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-#endif
-
-#else /* _MSC_VER */
-
-/* OpenGL ES2 headers for Visual Studio */
-#include "SDL_opengles2_khrplatform.h"
-#include "SDL_opengles2_gl2platform.h"
-#include "SDL_opengles2_gl2.h"
-#include "SDL_opengles2_gl2ext.h"
-
-#endif /* _MSC_VER */
-
-#ifndef APIENTRY
-#define APIENTRY GL_APIENTRY
-#endif
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_gl2.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_gl2.h
deleted file mode 100644 (file)
index c62fb0a..0000000
+++ /dev/null
@@ -1,621 +0,0 @@
-#ifndef __gl2_h_
-#define __gl2_h_
-
-/* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */
-
-/*#include <GLES2/gl2platform.h>*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/*-------------------------------------------------------------------------
- * Data type definitions
- *-----------------------------------------------------------------------*/
-
-typedef void             GLvoid;
-typedef char             GLchar;
-typedef unsigned int     GLenum;
-typedef unsigned char    GLboolean;
-typedef unsigned int     GLbitfield;
-typedef khronos_int8_t   GLbyte;
-typedef short            GLshort;
-typedef int              GLint;
-typedef int              GLsizei;
-typedef khronos_uint8_t  GLubyte;
-typedef unsigned short   GLushort;
-typedef unsigned int     GLuint;
-typedef khronos_float_t  GLfloat;
-typedef khronos_float_t  GLclampf;
-typedef khronos_int32_t  GLfixed;
-
-/* GL types for handling large vertex buffer objects */
-typedef khronos_intptr_t GLintptr;
-typedef khronos_ssize_t  GLsizeiptr;
-
-/* OpenGL ES core versions */
-#define GL_ES_VERSION_2_0                 1
-
-/* ClearBufferMask */
-#define GL_DEPTH_BUFFER_BIT               0x00000100
-#define GL_STENCIL_BUFFER_BIT             0x00000400
-#define GL_COLOR_BUFFER_BIT               0x00004000
-
-/* Boolean */
-#define GL_FALSE                          0
-#define GL_TRUE                           1
-
-/* BeginMode */
-#define GL_POINTS                         0x0000
-#define GL_LINES                          0x0001
-#define GL_LINE_LOOP                      0x0002
-#define GL_LINE_STRIP                     0x0003
-#define GL_TRIANGLES                      0x0004
-#define GL_TRIANGLE_STRIP                 0x0005
-#define GL_TRIANGLE_FAN                   0x0006
-
-/* AlphaFunction (not supported in ES20) */
-/*      GL_NEVER */
-/*      GL_LESS */
-/*      GL_EQUAL */
-/*      GL_LEQUAL */
-/*      GL_GREATER */
-/*      GL_NOTEQUAL */
-/*      GL_GEQUAL */
-/*      GL_ALWAYS */
-
-/* BlendingFactorDest */
-#define GL_ZERO                           0
-#define GL_ONE                            1
-#define GL_SRC_COLOR                      0x0300
-#define GL_ONE_MINUS_SRC_COLOR            0x0301
-#define GL_SRC_ALPHA                      0x0302
-#define GL_ONE_MINUS_SRC_ALPHA            0x0303
-#define GL_DST_ALPHA                      0x0304
-#define GL_ONE_MINUS_DST_ALPHA            0x0305
-
-/* BlendingFactorSrc */
-/*      GL_ZERO */
-/*      GL_ONE */
-#define GL_DST_COLOR                      0x0306
-#define GL_ONE_MINUS_DST_COLOR            0x0307
-#define GL_SRC_ALPHA_SATURATE             0x0308
-/*      GL_SRC_ALPHA */
-/*      GL_ONE_MINUS_SRC_ALPHA */
-/*      GL_DST_ALPHA */
-/*      GL_ONE_MINUS_DST_ALPHA */
-
-/* BlendEquationSeparate */
-#define GL_FUNC_ADD                       0x8006
-#define GL_BLEND_EQUATION                 0x8009
-#define GL_BLEND_EQUATION_RGB             0x8009    /* same as BLEND_EQUATION */
-#define GL_BLEND_EQUATION_ALPHA           0x883D
-
-/* BlendSubtract */
-#define GL_FUNC_SUBTRACT                  0x800A
-#define GL_FUNC_REVERSE_SUBTRACT          0x800B
-
-/* Separate Blend Functions */
-#define GL_BLEND_DST_RGB                  0x80C8
-#define GL_BLEND_SRC_RGB                  0x80C9
-#define GL_BLEND_DST_ALPHA                0x80CA
-#define GL_BLEND_SRC_ALPHA                0x80CB
-#define GL_CONSTANT_COLOR                 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002
-#define GL_CONSTANT_ALPHA                 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
-#define GL_BLEND_COLOR                    0x8005
-
-/* Buffer Objects */
-#define GL_ARRAY_BUFFER                   0x8892
-#define GL_ELEMENT_ARRAY_BUFFER           0x8893
-#define GL_ARRAY_BUFFER_BINDING           0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
-
-#define GL_STREAM_DRAW                    0x88E0
-#define GL_STATIC_DRAW                    0x88E4
-#define GL_DYNAMIC_DRAW                   0x88E8
-
-#define GL_BUFFER_SIZE                    0x8764
-#define GL_BUFFER_USAGE                   0x8765
-
-#define GL_CURRENT_VERTEX_ATTRIB          0x8626
-
-/* CullFaceMode */
-#define GL_FRONT                          0x0404
-#define GL_BACK                           0x0405
-#define GL_FRONT_AND_BACK                 0x0408
-
-/* DepthFunction */
-/*      GL_NEVER */
-/*      GL_LESS */
-/*      GL_EQUAL */
-/*      GL_LEQUAL */
-/*      GL_GREATER */
-/*      GL_NOTEQUAL */
-/*      GL_GEQUAL */
-/*      GL_ALWAYS */
-
-/* EnableCap */
-#define GL_TEXTURE_2D                     0x0DE1
-#define GL_CULL_FACE                      0x0B44
-#define GL_BLEND                          0x0BE2
-#define GL_DITHER                         0x0BD0
-#define GL_STENCIL_TEST                   0x0B90
-#define GL_DEPTH_TEST                     0x0B71
-#define GL_SCISSOR_TEST                   0x0C11
-#define GL_POLYGON_OFFSET_FILL            0x8037
-#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
-#define GL_SAMPLE_COVERAGE                0x80A0
-
-/* ErrorCode */
-#define GL_NO_ERROR                       0
-#define GL_INVALID_ENUM                   0x0500
-#define GL_INVALID_VALUE                  0x0501
-#define GL_INVALID_OPERATION              0x0502
-#define GL_OUT_OF_MEMORY                  0x0505
-
-/* FrontFaceDirection */
-#define GL_CW                             0x0900
-#define GL_CCW                            0x0901
-
-/* GetPName */
-#define GL_LINE_WIDTH                     0x0B21
-#define GL_ALIASED_POINT_SIZE_RANGE       0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
-#define GL_CULL_FACE_MODE                 0x0B45
-#define GL_FRONT_FACE                     0x0B46
-#define GL_DEPTH_RANGE                    0x0B70
-#define GL_DEPTH_WRITEMASK                0x0B72
-#define GL_DEPTH_CLEAR_VALUE              0x0B73
-#define GL_DEPTH_FUNC                     0x0B74
-#define GL_STENCIL_CLEAR_VALUE            0x0B91
-#define GL_STENCIL_FUNC                   0x0B92
-#define GL_STENCIL_FAIL                   0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL        0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS        0x0B96
-#define GL_STENCIL_REF                    0x0B97
-#define GL_STENCIL_VALUE_MASK             0x0B93
-#define GL_STENCIL_WRITEMASK              0x0B98
-#define GL_STENCIL_BACK_FUNC              0x8800
-#define GL_STENCIL_BACK_FAIL              0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
-#define GL_STENCIL_BACK_REF               0x8CA3
-#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
-#define GL_STENCIL_BACK_WRITEMASK         0x8CA5
-#define GL_VIEWPORT                       0x0BA2
-#define GL_SCISSOR_BOX                    0x0C10
-/*      GL_SCISSOR_TEST */
-#define GL_COLOR_CLEAR_VALUE              0x0C22
-#define GL_COLOR_WRITEMASK                0x0C23
-#define GL_UNPACK_ALIGNMENT               0x0CF5
-#define GL_PACK_ALIGNMENT                 0x0D05
-#define GL_MAX_TEXTURE_SIZE               0x0D33
-#define GL_MAX_VIEWPORT_DIMS              0x0D3A
-#define GL_SUBPIXEL_BITS                  0x0D50
-#define GL_RED_BITS                       0x0D52
-#define GL_GREEN_BITS                     0x0D53
-#define GL_BLUE_BITS                      0x0D54
-#define GL_ALPHA_BITS                     0x0D55
-#define GL_DEPTH_BITS                     0x0D56
-#define GL_STENCIL_BITS                   0x0D57
-#define GL_POLYGON_OFFSET_UNITS           0x2A00
-/*      GL_POLYGON_OFFSET_FILL */
-#define GL_POLYGON_OFFSET_FACTOR          0x8038
-#define GL_TEXTURE_BINDING_2D             0x8069
-#define GL_SAMPLE_BUFFERS                 0x80A8
-#define GL_SAMPLES                        0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE          0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT         0x80AB
-
-/* GetTextureParameter */
-/*      GL_TEXTURE_MAG_FILTER */
-/*      GL_TEXTURE_MIN_FILTER */
-/*      GL_TEXTURE_WRAP_S */
-/*      GL_TEXTURE_WRAP_T */
-
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
-
-/* HintMode */
-#define GL_DONT_CARE                      0x1100
-#define GL_FASTEST                        0x1101
-#define GL_NICEST                         0x1102
-
-/* HintTarget */
-#define GL_GENERATE_MIPMAP_HINT            0x8192
-
-/* DataType */
-#define GL_BYTE                           0x1400
-#define GL_UNSIGNED_BYTE                  0x1401
-#define GL_SHORT                          0x1402
-#define GL_UNSIGNED_SHORT                 0x1403
-#define GL_INT                            0x1404
-#define GL_UNSIGNED_INT                   0x1405
-#define GL_FLOAT                          0x1406
-#define GL_FIXED                          0x140C
-
-/* PixelFormat */
-#define GL_DEPTH_COMPONENT                0x1902
-#define GL_ALPHA                          0x1906
-#define GL_RGB                            0x1907
-#define GL_RGBA                           0x1908
-#define GL_LUMINANCE                      0x1909
-#define GL_LUMINANCE_ALPHA                0x190A
-
-/* PixelType */
-/*      GL_UNSIGNED_BYTE */
-#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
-#define GL_UNSIGNED_SHORT_5_6_5           0x8363
-
-/* Shaders */
-#define GL_FRAGMENT_SHADER                  0x8B30
-#define GL_VERTEX_SHADER                    0x8B31
-#define GL_MAX_VERTEX_ATTRIBS               0x8869
-#define GL_MAX_VERTEX_UNIFORM_VECTORS       0x8DFB
-#define GL_MAX_VARYING_VECTORS              0x8DFC
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS   0x8B4C
-#define GL_MAX_TEXTURE_IMAGE_UNITS          0x8872
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS     0x8DFD
-#define GL_SHADER_TYPE                      0x8B4F
-#define GL_DELETE_STATUS                    0x8B80
-#define GL_LINK_STATUS                      0x8B82
-#define GL_VALIDATE_STATUS                  0x8B83
-#define GL_ATTACHED_SHADERS                 0x8B85
-#define GL_ACTIVE_UNIFORMS                  0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH        0x8B87
-#define GL_ACTIVE_ATTRIBUTES                0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH      0x8B8A
-#define GL_SHADING_LANGUAGE_VERSION         0x8B8C
-#define GL_CURRENT_PROGRAM                  0x8B8D
-
-/* StencilFunction */
-#define GL_NEVER                          0x0200
-#define GL_LESS                           0x0201
-#define GL_EQUAL                          0x0202
-#define GL_LEQUAL                         0x0203
-#define GL_GREATER                        0x0204
-#define GL_NOTEQUAL                       0x0205
-#define GL_GEQUAL                         0x0206
-#define GL_ALWAYS                         0x0207
-
-/* StencilOp */
-/*      GL_ZERO */
-#define GL_KEEP                           0x1E00
-#define GL_REPLACE                        0x1E01
-#define GL_INCR                           0x1E02
-#define GL_DECR                           0x1E03
-#define GL_INVERT                         0x150A
-#define GL_INCR_WRAP                      0x8507
-#define GL_DECR_WRAP                      0x8508
-
-/* StringName */
-#define GL_VENDOR                         0x1F00
-#define GL_RENDERER                       0x1F01
-#define GL_VERSION                        0x1F02
-#define GL_EXTENSIONS                     0x1F03
-
-/* TextureMagFilter */
-#define GL_NEAREST                        0x2600
-#define GL_LINEAR                         0x2601
-
-/* TextureMinFilter */
-/*      GL_NEAREST */
-/*      GL_LINEAR */
-#define GL_NEAREST_MIPMAP_NEAREST         0x2700
-#define GL_LINEAR_MIPMAP_NEAREST          0x2701
-#define GL_NEAREST_MIPMAP_LINEAR          0x2702
-#define GL_LINEAR_MIPMAP_LINEAR           0x2703
-
-/* TextureParameterName */
-#define GL_TEXTURE_MAG_FILTER             0x2800
-#define GL_TEXTURE_MIN_FILTER             0x2801
-#define GL_TEXTURE_WRAP_S                 0x2802
-#define GL_TEXTURE_WRAP_T                 0x2803
-
-/* TextureTarget */
-/*      GL_TEXTURE_2D */
-#define GL_TEXTURE                        0x1702
-
-#define GL_TEXTURE_CUBE_MAP               0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
-
-/* TextureUnit */
-#define GL_TEXTURE0                       0x84C0
-#define GL_TEXTURE1                       0x84C1
-#define GL_TEXTURE2                       0x84C2
-#define GL_TEXTURE3                       0x84C3
-#define GL_TEXTURE4                       0x84C4
-#define GL_TEXTURE5                       0x84C5
-#define GL_TEXTURE6                       0x84C6
-#define GL_TEXTURE7                       0x84C7
-#define GL_TEXTURE8                       0x84C8
-#define GL_TEXTURE9                       0x84C9
-#define GL_TEXTURE10                      0x84CA
-#define GL_TEXTURE11                      0x84CB
-#define GL_TEXTURE12                      0x84CC
-#define GL_TEXTURE13                      0x84CD
-#define GL_TEXTURE14                      0x84CE
-#define GL_TEXTURE15                      0x84CF
-#define GL_TEXTURE16                      0x84D0
-#define GL_TEXTURE17                      0x84D1
-#define GL_TEXTURE18                      0x84D2
-#define GL_TEXTURE19                      0x84D3
-#define GL_TEXTURE20                      0x84D4
-#define GL_TEXTURE21                      0x84D5
-#define GL_TEXTURE22                      0x84D6
-#define GL_TEXTURE23                      0x84D7
-#define GL_TEXTURE24                      0x84D8
-#define GL_TEXTURE25                      0x84D9
-#define GL_TEXTURE26                      0x84DA
-#define GL_TEXTURE27                      0x84DB
-#define GL_TEXTURE28                      0x84DC
-#define GL_TEXTURE29                      0x84DD
-#define GL_TEXTURE30                      0x84DE
-#define GL_TEXTURE31                      0x84DF
-#define GL_ACTIVE_TEXTURE                 0x84E0
-
-/* TextureWrapMode */
-#define GL_REPEAT                         0x2901
-#define GL_CLAMP_TO_EDGE                  0x812F
-#define GL_MIRRORED_REPEAT                0x8370
-
-/* Uniform Types */
-#define GL_FLOAT_VEC2                     0x8B50
-#define GL_FLOAT_VEC3                     0x8B51
-#define GL_FLOAT_VEC4                     0x8B52
-#define GL_INT_VEC2                       0x8B53
-#define GL_INT_VEC3                       0x8B54
-#define GL_INT_VEC4                       0x8B55
-#define GL_BOOL                           0x8B56
-#define GL_BOOL_VEC2                      0x8B57
-#define GL_BOOL_VEC3                      0x8B58
-#define GL_BOOL_VEC4                      0x8B59
-#define GL_FLOAT_MAT2                     0x8B5A
-#define GL_FLOAT_MAT3                     0x8B5B
-#define GL_FLOAT_MAT4                     0x8B5C
-#define GL_SAMPLER_2D                     0x8B5E
-#define GL_SAMPLER_CUBE                   0x8B60
-
-/* Vertex Arrays */
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED        0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE           0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE         0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE           0x8625
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED     0x886A
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER        0x8645
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-
-/* Read Format */
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE   0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-
-/* Shader Source */
-#define GL_COMPILE_STATUS                 0x8B81
-#define GL_INFO_LOG_LENGTH                0x8B84
-#define GL_SHADER_SOURCE_LENGTH           0x8B88
-#define GL_SHADER_COMPILER                0x8DFA
-
-/* Shader Binary */
-#define GL_SHADER_BINARY_FORMATS          0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9
-
-/* Shader Precision-Specified Types */
-#define GL_LOW_FLOAT                      0x8DF0
-#define GL_MEDIUM_FLOAT                   0x8DF1
-#define GL_HIGH_FLOAT                     0x8DF2
-#define GL_LOW_INT                        0x8DF3
-#define GL_MEDIUM_INT                     0x8DF4
-#define GL_HIGH_INT                       0x8DF5
-
-/* Framebuffer Object. */
-#define GL_FRAMEBUFFER                    0x8D40
-#define GL_RENDERBUFFER                   0x8D41
-
-#define GL_RGBA4                          0x8056
-#define GL_RGB5_A1                        0x8057
-#define GL_RGB565                         0x8D62
-#define GL_DEPTH_COMPONENT16              0x81A5
-#define GL_STENCIL_INDEX8                 0x8D48
-
-#define GL_RENDERBUFFER_WIDTH             0x8D42
-#define GL_RENDERBUFFER_HEIGHT            0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
-#define GL_RENDERBUFFER_RED_SIZE          0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
-
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
-
-#define GL_COLOR_ATTACHMENT0              0x8CE0
-#define GL_DEPTH_ATTACHMENT               0x8D00
-#define GL_STENCIL_ATTACHMENT             0x8D20
-
-#define GL_NONE                           0
-
-#define GL_FRAMEBUFFER_COMPLETE                      0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT         0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS         0x8CD9
-#define GL_FRAMEBUFFER_UNSUPPORTED                   0x8CDD
-
-#define GL_FRAMEBUFFER_BINDING            0x8CA6
-#define GL_RENDERBUFFER_BINDING           0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE          0x84E8
-
-#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
-
-/*-------------------------------------------------------------------------
- * GL core functions.
- *-----------------------------------------------------------------------*/
-
-GL_APICALL void         GL_APIENTRY glActiveTexture (GLenum texture);
-GL_APICALL void         GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void         GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
-GL_APICALL void         GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_APICALL void         GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-GL_APICALL void         GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-GL_APICALL void         GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_APICALL void         GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-GL_APICALL void         GL_APIENTRY glBlendEquation ( GLenum mode );
-GL_APICALL void         GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void         GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_APICALL void         GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-GL_APICALL void         GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
-GL_APICALL void         GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
-GL_APICALL GLenum       GL_APIENTRY glCheckFramebufferStatus (GLenum target);
-GL_APICALL void         GL_APIENTRY glClear (GLbitfield mask);
-GL_APICALL void         GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-GL_APICALL void         GL_APIENTRY glClearDepthf (GLclampf depth);
-GL_APICALL void         GL_APIENTRY glClearStencil (GLint s);
-GL_APICALL void         GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_APICALL void         GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void         GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void         GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void         GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_APICALL void         GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL GLuint       GL_APIENTRY glCreateProgram (void);
-GL_APICALL GLuint       GL_APIENTRY glCreateShader (GLenum type);
-GL_APICALL void         GL_APIENTRY glCullFace (GLenum mode);
-GL_APICALL void         GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
-GL_APICALL void         GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
-GL_APICALL void         GL_APIENTRY glDeleteProgram (GLuint program);
-GL_APICALL void         GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
-GL_APICALL void         GL_APIENTRY glDeleteShader (GLuint shader);
-GL_APICALL void         GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
-GL_APICALL void         GL_APIENTRY glDepthFunc (GLenum func);
-GL_APICALL void         GL_APIENTRY glDepthMask (GLboolean flag);
-GL_APICALL void         GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
-GL_APICALL void         GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
-GL_APICALL void         GL_APIENTRY glDisable (GLenum cap);
-GL_APICALL void         GL_APIENTRY glDisableVertexAttribArray (GLuint index);
-GL_APICALL void         GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void         GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
-GL_APICALL void         GL_APIENTRY glEnable (GLenum cap);
-GL_APICALL void         GL_APIENTRY glEnableVertexAttribArray (GLuint index);
-GL_APICALL void         GL_APIENTRY glFinish (void);
-GL_APICALL void         GL_APIENTRY glFlush (void);
-GL_APICALL void         GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_APICALL void         GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_APICALL void         GL_APIENTRY glFrontFace (GLenum mode);
-GL_APICALL void         GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
-GL_APICALL void         GL_APIENTRY glGenerateMipmap (GLenum target);
-GL_APICALL void         GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
-GL_APICALL void         GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
-GL_APICALL void         GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
-GL_APICALL void         GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void         GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void         GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
-GL_APICALL GLint        GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
-GL_APICALL void         GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
-GL_APICALL void         GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL GLenum       GL_APIENTRY glGetError (void);
-GL_APICALL void         GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
-GL_APICALL void         GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void         GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void         GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
-GL_APICALL void         GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
-GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
-GL_APICALL void         GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
-GL_APICALL void         GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
-GL_APICALL void         GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
-GL_APICALL GLint        GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
-GL_APICALL void         GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
-GL_APICALL void         GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
-GL_APICALL void         GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_APICALL GLboolean    GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_APICALL GLboolean    GL_APIENTRY glIsEnabled (GLenum cap);
-GL_APICALL GLboolean    GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
-GL_APICALL GLboolean    GL_APIENTRY glIsProgram (GLuint program);
-GL_APICALL GLboolean    GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-GL_APICALL GLboolean    GL_APIENTRY glIsShader (GLuint shader);
-GL_APICALL GLboolean    GL_APIENTRY glIsTexture (GLuint texture);
-GL_APICALL void         GL_APIENTRY glLineWidth (GLfloat width);
-GL_APICALL void         GL_APIENTRY glLinkProgram (GLuint program);
-GL_APICALL void         GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_APICALL void         GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void         GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
-GL_APICALL void         GL_APIENTRY glReleaseShaderCompiler (void);
-GL_APICALL void         GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void         GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
-GL_APICALL void         GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void         GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
-GL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
-GL_APICALL void         GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_APICALL void         GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-GL_APICALL void         GL_APIENTRY glStencilMask (GLuint mask);
-GL_APICALL void         GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-GL_APICALL void         GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void         GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void         GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void         GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_APICALL void         GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
-GL_APICALL void         GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void         GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
-GL_APICALL void         GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void         GL_APIENTRY glUniform1f (GLint location, GLfloat x);
-GL_APICALL void         GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void         GL_APIENTRY glUniform1i (GLint location, GLint x);
-GL_APICALL void         GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void         GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
-GL_APICALL void         GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void         GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
-GL_APICALL void         GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void         GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void         GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void         GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
-GL_APICALL void         GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void         GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void         GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void         GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void         GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void         GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void         GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void         GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void         GL_APIENTRY glUseProgram (GLuint program);
-GL_APICALL void         GL_APIENTRY glValidateProgram (GLuint program);
-GL_APICALL void         GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
-GL_APICALL void         GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
-GL_APICALL void         GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
-GL_APICALL void         GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
-GL_APICALL void         GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void         GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
-GL_APICALL void         GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void         GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
-GL_APICALL void         GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
-GL_APICALL void         GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gl2_h_ */
-
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_gl2ext.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_gl2ext.h
deleted file mode 100644 (file)
index e8ca8b1..0000000
+++ /dev/null
@@ -1,2050 +0,0 @@
-#ifndef __gl2ext_h_
-#define __gl2ext_h_
-
-/* $Revision: 22801 $ on $Date:: 2013-08-21 03:20:48 -0700 #$ */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-#ifndef GL_APIENTRYP
-#   define GL_APIENTRYP GL_APIENTRY*
-#endif
-
-/* New types shared by several extensions */
-
-#ifndef __gl3_h_
-/* These are defined with respect to <inttypes.h> in the
- * Apple extension spec, but they are also used by non-APPLE
- * extensions, and in the Khronos header we use the Khronos
- * portable types in khrplatform.h, which must be defined.
- */
-typedef khronos_int64_t GLint64;
-typedef khronos_uint64_t GLuint64;
-typedef struct __GLsync *GLsync;
-#endif
-
-
-/*------------------------------------------------------------------------*
- * OES extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_ETC1_RGB8_OES                                        0x8D64
-#endif
-
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_PALETTE4_RGB8_OES                                    0x8B90
-#define GL_PALETTE4_RGBA8_OES                                   0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES                                0x8B92
-#define GL_PALETTE4_RGBA4_OES                                   0x8B93
-#define GL_PALETTE4_RGB5_A1_OES                                 0x8B94
-#define GL_PALETTE8_RGB8_OES                                    0x8B95
-#define GL_PALETTE8_RGBA8_OES                                   0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES                                0x8B97
-#define GL_PALETTE8_RGBA4_OES                                   0x8B98
-#define GL_PALETTE8_RGB5_A1_OES                                 0x8B99
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_DEPTH_COMPONENT24_OES                                0x81A6
-#endif
-
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_DEPTH_COMPONENT32_OES                                0x81A7
-#endif
-
-/* GL_OES_depth_texture */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-typedef void* GLeglImageOES;
-#endif
-
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-/* GLeglImageOES defined in GL_OES_EGL_image already. */
-#define GL_TEXTURE_EXTERNAL_OES                                 0x8D65
-#define GL_SAMPLER_EXTERNAL_OES                                 0x8D66
-#define GL_TEXTURE_BINDING_EXTERNAL_OES                         0x8D67
-#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES                     0x8D68
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_UNSIGNED_INT                                         0x1405
-#endif
-
-/* GL_OES_get_program_binary */
-#ifndef GL_OES_get_program_binary
-#define GL_PROGRAM_BINARY_LENGTH_OES                            0x8741
-#define GL_NUM_PROGRAM_BINARY_FORMATS_OES                       0x87FE
-#define GL_PROGRAM_BINARY_FORMATS_OES                           0x87FF
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_WRITE_ONLY_OES                                       0x88B9
-#define GL_BUFFER_ACCESS_OES                                    0x88BB
-#define GL_BUFFER_MAPPED_OES                                    0x88BC
-#define GL_BUFFER_MAP_POINTER_OES                               0x88BD
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_DEPTH_STENCIL_OES                                    0x84F9
-#define GL_UNSIGNED_INT_24_8_OES                                0x84FA
-#define GL_DEPTH24_STENCIL8_OES                                 0x88F0
-#endif
-
-/* GL_OES_required_internalformat */
-#ifndef GL_OES_required_internalformat
-#define GL_ALPHA8_OES                                           0x803C
-#define GL_DEPTH_COMPONENT16_OES                                0x81A5
-/* reuse GL_DEPTH_COMPONENT24_OES */
-/* reuse GL_DEPTH24_STENCIL8_OES */
-/* reuse GL_DEPTH_COMPONENT32_OES */
-#define GL_LUMINANCE4_ALPHA4_OES                                0x8043
-#define GL_LUMINANCE8_ALPHA8_OES                                0x8045
-#define GL_LUMINANCE8_OES                                       0x8040
-#define GL_RGBA4_OES                                            0x8056
-#define GL_RGB5_A1_OES                                          0x8057
-#define GL_RGB565_OES                                           0x8D62
-/* reuse GL_RGB8_OES */
-/* reuse GL_RGBA8_OES */
-/* reuse GL_RGB10_EXT */
-/* reuse GL_RGB10_A2_EXT */
-#endif
-
-/* GL_OES_rgb8_rgba8 */
-#ifndef GL_OES_rgb8_rgba8
-#define GL_RGB8_OES                                             0x8051
-#define GL_RGBA8_OES                                            0x8058
-#endif
-
-/* GL_OES_standard_derivatives */
-#ifndef GL_OES_standard_derivatives
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES                  0x8B8B
-#endif
-
-/* GL_OES_stencil1 */
-#ifndef GL_OES_stencil1
-#define GL_STENCIL_INDEX1_OES                                   0x8D46
-#endif
-
-/* GL_OES_stencil4 */
-#ifndef GL_OES_stencil4
-#define GL_STENCIL_INDEX4_OES                                   0x8D47
-#endif
-
-#ifndef GL_OES_surfaceless_context
-#define GL_FRAMEBUFFER_UNDEFINED_OES                            0x8219
-#endif
-
-/* GL_OES_texture_3D */
-#ifndef GL_OES_texture_3D
-#define GL_TEXTURE_WRAP_R_OES                                   0x8072
-#define GL_TEXTURE_3D_OES                                       0x806F
-#define GL_TEXTURE_BINDING_3D_OES                               0x806A
-#define GL_MAX_3D_TEXTURE_SIZE_OES                              0x8073
-#define GL_SAMPLER_3D_OES                                       0x8B5F
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES        0x8CD4
-#endif
-
-/* GL_OES_texture_float */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_float_linear */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_half_float */
-#ifndef GL_OES_texture_half_float
-#define GL_HALF_FLOAT_OES                                       0x8D61
-#endif
-
-/* GL_OES_texture_half_float_linear */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_npot */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_vertex_array_object */
-#ifndef GL_OES_vertex_array_object
-#define GL_VERTEX_ARRAY_BINDING_OES                             0x85B5
-#endif
-
-/* GL_OES_vertex_half_float */
-/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
-
-/* GL_OES_vertex_type_10_10_10_2 */
-#ifndef GL_OES_vertex_type_10_10_10_2
-#define GL_UNSIGNED_INT_10_10_10_2_OES                          0x8DF6
-#define GL_INT_10_10_10_2_OES                                   0x8DF7
-#endif
-
-/*------------------------------------------------------------------------*
- * KHR extension tokens
- *------------------------------------------------------------------------*/
-
-#ifndef GL_KHR_debug
-typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR                         0x8242
-#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR                 0x8243
-#define GL_DEBUG_CALLBACK_FUNCTION_KHR                          0x8244
-#define GL_DEBUG_CALLBACK_USER_PARAM_KHR                        0x8245
-#define GL_DEBUG_SOURCE_API_KHR                                 0x8246
-#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR                       0x8247
-#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR                     0x8248
-#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR                         0x8249
-#define GL_DEBUG_SOURCE_APPLICATION_KHR                         0x824A
-#define GL_DEBUG_SOURCE_OTHER_KHR                               0x824B
-#define GL_DEBUG_TYPE_ERROR_KHR                                 0x824C
-#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR                   0x824D
-#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR                    0x824E
-#define GL_DEBUG_TYPE_PORTABILITY_KHR                           0x824F
-#define GL_DEBUG_TYPE_PERFORMANCE_KHR                           0x8250
-#define GL_DEBUG_TYPE_OTHER_KHR                                 0x8251
-#define GL_DEBUG_TYPE_MARKER_KHR                                0x8268
-#define GL_DEBUG_TYPE_PUSH_GROUP_KHR                            0x8269
-#define GL_DEBUG_TYPE_POP_GROUP_KHR                             0x826A
-#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR                      0x826B
-#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR                      0x826C
-#define GL_DEBUG_GROUP_STACK_DEPTH_KHR                          0x826D
-#define GL_BUFFER_KHR                                           0x82E0
-#define GL_SHADER_KHR                                           0x82E1
-#define GL_PROGRAM_KHR                                          0x82E2
-#define GL_QUERY_KHR                                            0x82E3
-/* PROGRAM_PIPELINE only in GL */
-#define GL_SAMPLER_KHR                                          0x82E6
-/* DISPLAY_LIST only in GL */
-#define GL_MAX_LABEL_LENGTH_KHR                                 0x82E8
-#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR                         0x9143
-#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR                        0x9144
-#define GL_DEBUG_LOGGED_MESSAGES_KHR                            0x9145
-#define GL_DEBUG_SEVERITY_HIGH_KHR                              0x9146
-#define GL_DEBUG_SEVERITY_MEDIUM_KHR                            0x9147
-#define GL_DEBUG_SEVERITY_LOW_KHR                               0x9148
-#define GL_DEBUG_OUTPUT_KHR                                     0x92E0
-#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR                           0x00000002
-#define GL_STACK_OVERFLOW_KHR                                   0x0503
-#define GL_STACK_UNDERFLOW_KHR                                  0x0504
-#endif
-
-#ifndef GL_KHR_texture_compression_astc_ldr
-#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR                         0x93B0
-#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR                         0x93B1
-#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR                         0x93B2
-#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR                         0x93B3
-#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR                         0x93B4
-#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR                         0x93B5
-#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR                         0x93B6
-#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR                         0x93B7
-#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR                        0x93B8
-#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR                        0x93B9
-#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR                        0x93BA
-#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR                       0x93BB
-#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR                       0x93BC
-#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR                       0x93BD
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR                 0x93D0
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR                 0x93D1
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR                 0x93D2
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR                 0x93D3
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR                 0x93D4
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR                 0x93D5
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR                 0x93D6
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR                 0x93D7
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR                0x93D8
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR                0x93D9
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR                0x93DA
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR               0x93DB
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR               0x93DC
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR               0x93DD
-#endif
-
-/*------------------------------------------------------------------------*
- * AMD extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_3DC_X_AMD                                            0x87F9
-#define GL_3DC_XY_AMD                                           0x87FA
-#endif
-
-/* GL_AMD_compressed_ATC_texture */
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_ATC_RGB_AMD                                          0x8C92
-#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD                          0x8C93
-#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD                      0x87EE
-#endif
-
-/* GL_AMD_performance_monitor */
-#ifndef GL_AMD_performance_monitor
-#define GL_COUNTER_TYPE_AMD                                     0x8BC0
-#define GL_COUNTER_RANGE_AMD                                    0x8BC1
-#define GL_UNSIGNED_INT64_AMD                                   0x8BC2
-#define GL_PERCENTAGE_AMD                                       0x8BC3
-#define GL_PERFMON_RESULT_AVAILABLE_AMD                         0x8BC4
-#define GL_PERFMON_RESULT_SIZE_AMD                              0x8BC5
-#define GL_PERFMON_RESULT_AMD                                   0x8BC6
-#endif
-
-/* GL_AMD_program_binary_Z400 */
-#ifndef GL_AMD_program_binary_Z400
-#define GL_Z400_BINARY_AMD                                      0x8740
-#endif
-
-/*------------------------------------------------------------------------*
- * ANGLE extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_ANGLE_depth_texture */
-#ifndef GL_ANGLE_depth_texture
-#define GL_DEPTH_COMPONENT                                      0x1902
-#define GL_DEPTH_STENCIL_OES                                    0x84F9
-#define GL_UNSIGNED_SHORT                                       0x1403
-#define GL_UNSIGNED_INT                                         0x1405
-#define GL_UNSIGNED_INT_24_8_OES                                0x84FA
-#define GL_DEPTH_COMPONENT16                                    0x81A5
-#define GL_DEPTH_COMPONENT32_OES                                0x81A7
-#define GL_DEPTH24_STENCIL8_OES                                 0x88F0
-#endif
-
-/* GL_ANGLE_framebuffer_blit */
-#ifndef GL_ANGLE_framebuffer_blit
-#define GL_READ_FRAMEBUFFER_ANGLE                               0x8CA8
-#define GL_DRAW_FRAMEBUFFER_ANGLE                               0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE                       0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_ANGLE                       0x8CAA
-#endif
-
-/* GL_ANGLE_framebuffer_multisample */
-#ifndef GL_ANGLE_framebuffer_multisample
-#define GL_RENDERBUFFER_SAMPLES_ANGLE                           0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE             0x8D56
-#define GL_MAX_SAMPLES_ANGLE                                    0x8D57
-#endif
-
-/* GL_ANGLE_instanced_arrays */
-#ifndef GL_ANGLE_instanced_arrays
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE                    0x88FE
-#endif
-
-/* GL_ANGLE_pack_reverse_row_order */
-#ifndef GL_ANGLE_pack_reverse_row_order
-#define GL_PACK_REVERSE_ROW_ORDER_ANGLE                         0x93A4
-#endif
-
-/* GL_ANGLE_program_binary */
-#ifndef GL_ANGLE_program_binary
-#define GL_PROGRAM_BINARY_ANGLE                                 0x93A6
-#endif
-
-/* GL_ANGLE_texture_compression_dxt3 */
-#ifndef GL_ANGLE_texture_compression_dxt3
-#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE                      0x83F2
-#endif
-
-/* GL_ANGLE_texture_compression_dxt5 */
-#ifndef GL_ANGLE_texture_compression_dxt5
-#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE                      0x83F3
-#endif
-
-/* GL_ANGLE_texture_usage */
-#ifndef GL_ANGLE_texture_usage
-#define GL_TEXTURE_USAGE_ANGLE                                  0x93A2
-#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE                         0x93A3
-#endif
-
-/* GL_ANGLE_translated_shader_source */
-#ifndef GL_ANGLE_translated_shader_source
-#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE                0x93A0
-#endif
-
-/*------------------------------------------------------------------------*
- * APPLE extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_APPLE_copy_texture_levels */
-/* No new tokens introduced by this extension. */
-
-/* GL_APPLE_framebuffer_multisample */
-#ifndef GL_APPLE_framebuffer_multisample
-#define GL_RENDERBUFFER_SAMPLES_APPLE                           0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE             0x8D56
-#define GL_MAX_SAMPLES_APPLE                                    0x8D57
-#define GL_READ_FRAMEBUFFER_APPLE                               0x8CA8
-#define GL_DRAW_FRAMEBUFFER_APPLE                               0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE                       0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_APPLE                       0x8CAA
-#endif
-
-/* GL_APPLE_rgb_422 */
-#ifndef GL_APPLE_rgb_422
-#define GL_RGB_422_APPLE                                        0x8A1F
-#define GL_UNSIGNED_SHORT_8_8_APPLE                             0x85BA
-#define GL_UNSIGNED_SHORT_8_8_REV_APPLE                         0x85BB
-#endif
-
-/* GL_APPLE_sync */
-#ifndef GL_APPLE_sync
-
-#define GL_SYNC_OBJECT_APPLE                                    0x8A53
-#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE                        0x9111
-#define GL_OBJECT_TYPE_APPLE                                    0x9112
-#define GL_SYNC_CONDITION_APPLE                                 0x9113
-#define GL_SYNC_STATUS_APPLE                                    0x9114
-#define GL_SYNC_FLAGS_APPLE                                     0x9115
-#define GL_SYNC_FENCE_APPLE                                     0x9116
-#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE                     0x9117
-#define GL_UNSIGNALED_APPLE                                     0x9118
-#define GL_SIGNALED_APPLE                                       0x9119
-#define GL_ALREADY_SIGNALED_APPLE                               0x911A
-#define GL_TIMEOUT_EXPIRED_APPLE                                0x911B
-#define GL_CONDITION_SATISFIED_APPLE                            0x911C
-#define GL_WAIT_FAILED_APPLE                                    0x911D
-#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE                        0x00000001
-#define GL_TIMEOUT_IGNORED_APPLE                                0xFFFFFFFFFFFFFFFFull
-#endif
-
-/* GL_APPLE_texture_format_BGRA8888 */
-#ifndef GL_APPLE_texture_format_BGRA8888
-#define GL_BGRA_EXT                                             0x80E1
-#endif
-
-/* GL_APPLE_texture_max_level */
-#ifndef GL_APPLE_texture_max_level
-#define GL_TEXTURE_MAX_LEVEL_APPLE                              0x813D
-#endif
-
-/*------------------------------------------------------------------------*
- * ARM extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_ARM_mali_program_binary */
-#ifndef GL_ARM_mali_program_binary
-#define GL_MALI_PROGRAM_BINARY_ARM                              0x8F61
-#endif
-
-/* GL_ARM_mali_shader_binary */
-#ifndef GL_ARM_mali_shader_binary
-#define GL_MALI_SHADER_BINARY_ARM                               0x8F60
-#endif
-
-/* GL_ARM_rgba8 */
-/* No new tokens introduced by this extension. */
-
-/*------------------------------------------------------------------------*
- * EXT extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_EXT_blend_minmax */
-#ifndef GL_EXT_blend_minmax
-#define GL_MIN_EXT                                              0x8007
-#define GL_MAX_EXT                                              0x8008
-#endif
-
-/* GL_EXT_color_buffer_half_float */
-#ifndef GL_EXT_color_buffer_half_float
-#define GL_RGBA16F_EXT                                          0x881A
-#define GL_RGB16F_EXT                                           0x881B
-#define GL_RG16F_EXT                                            0x822F
-#define GL_R16F_EXT                                             0x822D
-#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT            0x8211
-#define GL_UNSIGNED_NORMALIZED_EXT                              0x8C17
-#endif
-
-/* GL_EXT_debug_label */
-#ifndef GL_EXT_debug_label
-#define GL_PROGRAM_PIPELINE_OBJECT_EXT                          0x8A4F
-#define GL_PROGRAM_OBJECT_EXT                                   0x8B40
-#define GL_SHADER_OBJECT_EXT                                    0x8B48
-#define GL_BUFFER_OBJECT_EXT                                    0x9151
-#define GL_QUERY_OBJECT_EXT                                     0x9153
-#define GL_VERTEX_ARRAY_OBJECT_EXT                              0x9154
-#endif
-
-/* GL_EXT_debug_marker */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_discard_framebuffer */
-#ifndef GL_EXT_discard_framebuffer
-#define GL_COLOR_EXT                                            0x1800
-#define GL_DEPTH_EXT                                            0x1801
-#define GL_STENCIL_EXT                                          0x1802
-#endif
-
-#ifndef GL_EXT_disjoint_timer_query
-#define GL_QUERY_COUNTER_BITS_EXT                               0x8864
-#define GL_CURRENT_QUERY_EXT                                    0x8865
-#define GL_QUERY_RESULT_EXT                                     0x8866
-#define GL_QUERY_RESULT_AVAILABLE_EXT                           0x8867
-#define GL_TIME_ELAPSED_EXT                                     0x88BF
-#define GL_TIMESTAMP_EXT                                        0x8E28
-#define GL_GPU_DISJOINT_EXT                                     0x8FBB
-#endif
-
-#ifndef GL_EXT_draw_buffers
-#define GL_EXT_draw_buffers 1
-#define GL_MAX_COLOR_ATTACHMENTS_EXT                            0x8CDF
-#define GL_MAX_DRAW_BUFFERS_EXT                                 0x8824
-#define GL_DRAW_BUFFER0_EXT                                     0x8825
-#define GL_DRAW_BUFFER1_EXT                                     0x8826
-#define GL_DRAW_BUFFER2_EXT                                     0x8827
-#define GL_DRAW_BUFFER3_EXT                                     0x8828
-#define GL_DRAW_BUFFER4_EXT                                     0x8829
-#define GL_DRAW_BUFFER5_EXT                                     0x882A
-#define GL_DRAW_BUFFER6_EXT                                     0x882B
-#define GL_DRAW_BUFFER7_EXT                                     0x882C
-#define GL_DRAW_BUFFER8_EXT                                     0x882D
-#define GL_DRAW_BUFFER9_EXT                                     0x882E
-#define GL_DRAW_BUFFER10_EXT                                    0x882F
-#define GL_DRAW_BUFFER11_EXT                                    0x8830
-#define GL_DRAW_BUFFER12_EXT                                    0x8831
-#define GL_DRAW_BUFFER13_EXT                                    0x8832
-#define GL_DRAW_BUFFER14_EXT                                    0x8833
-#define GL_DRAW_BUFFER15_EXT                                    0x8834
-#define GL_COLOR_ATTACHMENT0_EXT                                0x8CE0
-#define GL_COLOR_ATTACHMENT1_EXT                                0x8CE1
-#define GL_COLOR_ATTACHMENT2_EXT                                0x8CE2
-#define GL_COLOR_ATTACHMENT3_EXT                                0x8CE3
-#define GL_COLOR_ATTACHMENT4_EXT                                0x8CE4
-#define GL_COLOR_ATTACHMENT5_EXT                                0x8CE5
-#define GL_COLOR_ATTACHMENT6_EXT                                0x8CE6
-#define GL_COLOR_ATTACHMENT7_EXT                                0x8CE7
-#define GL_COLOR_ATTACHMENT8_EXT                                0x8CE8
-#define GL_COLOR_ATTACHMENT9_EXT                                0x8CE9
-#define GL_COLOR_ATTACHMENT10_EXT                               0x8CEA
-#define GL_COLOR_ATTACHMENT11_EXT                               0x8CEB
-#define GL_COLOR_ATTACHMENT12_EXT                               0x8CEC
-#define GL_COLOR_ATTACHMENT13_EXT                               0x8CED
-#define GL_COLOR_ATTACHMENT14_EXT                               0x8CEE
-#define GL_COLOR_ATTACHMENT15_EXT                               0x8CEF
-#endif
-
-/* GL_EXT_map_buffer_range */
-#ifndef GL_EXT_map_buffer_range
-#define GL_MAP_READ_BIT_EXT                                     0x0001
-#define GL_MAP_WRITE_BIT_EXT                                    0x0002
-#define GL_MAP_INVALIDATE_RANGE_BIT_EXT                         0x0004
-#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT                        0x0008
-#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT                           0x0010
-#define GL_MAP_UNSYNCHRONIZED_BIT_EXT                           0x0020
-#endif
-
-/* GL_EXT_multisampled_render_to_texture */
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT           0x8D6C
-/* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */
-#define GL_RENDERBUFFER_SAMPLES_EXT                             0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT               0x8D56
-#define GL_MAX_SAMPLES_EXT                                      0x8D57
-#endif
-
-/* GL_EXT_multiview_draw_buffers */
-#ifndef GL_EXT_multiview_draw_buffers
-#define GL_COLOR_ATTACHMENT_EXT                                 0x90F0
-#define GL_MULTIVIEW_EXT                                        0x90F1
-#define GL_DRAW_BUFFER_EXT                                      0x0C01
-#define GL_READ_BUFFER_EXT                                      0x0C02
-#define GL_MAX_MULTIVIEW_BUFFERS_EXT                            0x90F2
-#endif
-
-/* GL_EXT_multi_draw_arrays */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_occlusion_query_boolean */
-#ifndef GL_EXT_occlusion_query_boolean
-#define GL_ANY_SAMPLES_PASSED_EXT                               0x8C2F
-#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT                  0x8D6A
-#define GL_CURRENT_QUERY_EXT                                    0x8865
-#define GL_QUERY_RESULT_EXT                                     0x8866
-#define GL_QUERY_RESULT_AVAILABLE_EXT                           0x8867
-#endif
-
-/* GL_EXT_read_format_bgra */
-#ifndef GL_EXT_read_format_bgra
-#define GL_BGRA_EXT                                             0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT                       0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT                       0x8366
-#endif
-
-/* GL_EXT_robustness */
-#ifndef GL_EXT_robustness
-/* reuse GL_NO_ERROR */
-#define GL_GUILTY_CONTEXT_RESET_EXT                             0x8253
-#define GL_INNOCENT_CONTEXT_RESET_EXT                           0x8254
-#define GL_UNKNOWN_CONTEXT_RESET_EXT                            0x8255
-#define GL_CONTEXT_ROBUST_ACCESS_EXT                            0x90F3
-#define GL_RESET_NOTIFICATION_STRATEGY_EXT                      0x8256
-#define GL_LOSE_CONTEXT_ON_RESET_EXT                            0x8252
-#define GL_NO_RESET_NOTIFICATION_EXT                            0x8261
-#endif
-
-/* GL_EXT_separate_shader_objects */
-#ifndef GL_EXT_separate_shader_objects
-#define GL_VERTEX_SHADER_BIT_EXT                                0x00000001
-#define GL_FRAGMENT_SHADER_BIT_EXT                              0x00000002
-#define GL_ALL_SHADER_BITS_EXT                                  0xFFFFFFFF
-#define GL_PROGRAM_SEPARABLE_EXT                                0x8258
-#define GL_ACTIVE_PROGRAM_EXT                                   0x8259
-#define GL_PROGRAM_PIPELINE_BINDING_EXT                         0x825A
-#endif
-
-/* GL_EXT_shader_framebuffer_fetch */
-#ifndef GL_EXT_shader_framebuffer_fetch
-#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT                 0x8A52
-#endif
-
-/* GL_EXT_shader_texture_lod */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_shadow_samplers */
-#ifndef GL_EXT_shadow_samplers
-#define GL_TEXTURE_COMPARE_MODE_EXT                             0x884C
-#define GL_TEXTURE_COMPARE_FUNC_EXT                             0x884D
-#define GL_COMPARE_REF_TO_TEXTURE_EXT                           0x884E
-#define GL_SAMPLER_2D_SHADOW_EXT                                0x8B62
-#endif
-
-/* GL_EXT_sRGB */
-#ifndef GL_EXT_sRGB
-#define GL_SRGB_EXT                                             0x8C40
-#define GL_SRGB_ALPHA_EXT                                       0x8C42
-#define GL_SRGB8_ALPHA8_EXT                                     0x8C43
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT            0x8210
-#endif
-
-/* GL_EXT_sRGB_write_control */
-#ifndef GL_EXT_sRGB_write_control
-#define GL_EXT_sRGB_write_control 1
-#define GL_FRAMEBUFFER_SRGB_EXT                                 0x8DB9
-#endif
-
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT                         0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT                        0x83F1
-#endif
-
-/* GL_EXT_texture_filter_anisotropic */
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_TEXTURE_MAX_ANISOTROPY_EXT                           0x84FE
-#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT                       0x84FF
-#endif
-
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_BGRA_EXT                                             0x80E1
-#endif
-
-/* GL_EXT_texture_rg */
-#ifndef GL_EXT_texture_rg
-#define GL_RED_EXT                                              0x1903
-#define GL_RG_EXT                                               0x8227
-#define GL_R8_EXT                                               0x8229
-#define GL_RG8_EXT                                              0x822B
-#endif
-
-/* GL_EXT_texture_sRGB_decode */
-#ifndef GL_EXT_texture_sRGB_decode
-#define GL_EXT_texture_sRGB_decode 1
-#define GL_TEXTURE_SRGB_DECODE_EXT                              0x8A48
-#define GL_DECODE_EXT                                           0x8A49
-#define GL_SKIP_DECODE_EXT                                      0x8A4A
-#endif
-
-/* GL_EXT_texture_storage */
-#ifndef GL_EXT_texture_storage
-#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT                         0x912F
-#define GL_ALPHA8_EXT                                           0x803C
-#define GL_LUMINANCE8_EXT                                       0x8040
-#define GL_LUMINANCE8_ALPHA8_EXT                                0x8045
-#define GL_RGBA32F_EXT                                          0x8814
-#define GL_RGB32F_EXT                                           0x8815
-#define GL_ALPHA32F_EXT                                         0x8816
-#define GL_LUMINANCE32F_EXT                                     0x8818
-#define GL_LUMINANCE_ALPHA32F_EXT                               0x8819
-/* reuse GL_RGBA16F_EXT */
-/* reuse GL_RGB16F_EXT */
-#define GL_ALPHA16F_EXT                                         0x881C
-#define GL_LUMINANCE16F_EXT                                     0x881E
-#define GL_LUMINANCE_ALPHA16F_EXT                               0x881F
-#define GL_RGB10_A2_EXT                                         0x8059
-#define GL_RGB10_EXT                                            0x8052
-#define GL_BGRA8_EXT                                            0x93A1
-#define GL_R8_EXT                                               0x8229
-#define GL_RG8_EXT                                              0x822B
-#define GL_R32F_EXT                                             0x822E
-#define GL_RG32F_EXT                                            0x8230
-#define GL_R16F_EXT                                             0x822D
-#define GL_RG16F_EXT                                            0x822F
-#endif
-
-/* GL_EXT_texture_type_2_10_10_10_REV */
-#ifndef GL_EXT_texture_type_2_10_10_10_REV
-#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT                      0x8368
-#endif
-
-/* GL_EXT_unpack_subimage */
-#ifndef GL_EXT_unpack_subimage
-#define GL_UNPACK_ROW_LENGTH_EXT                                0x0CF2
-#define GL_UNPACK_SKIP_ROWS_EXT                                 0x0CF3
-#define GL_UNPACK_SKIP_PIXELS_EXT                               0x0CF4
-#endif
-
-/*------------------------------------------------------------------------*
- * DMP extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_DMP_shader_binary */
-#ifndef GL_DMP_shader_binary
-#define GL_SHADER_BINARY_DMP                                    0x9250
-#endif
-
-/*------------------------------------------------------------------------*
- * FJ extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_FJ_shader_binary_GCCSO */
-#ifndef GL_FJ_shader_binary_GCCSO
-#define GL_GCCSO_SHADER_BINARY_FJ                               0x9260
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_program_binary */
-#ifndef GL_IMG_program_binary
-#define GL_SGX_PROGRAM_BINARY_IMG                               0x9130
-#endif
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_BGRA_IMG                                             0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG                       0x8365
-#endif
-
-/* GL_IMG_shader_binary */
-#ifndef GL_IMG_shader_binary
-#define GL_SGX_BINARY_IMG                                       0x8C0A
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG                      0x8C00
-#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG                      0x8C01
-#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG                     0x8C02
-#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG                     0x8C03
-#endif
-
-/* GL_IMG_texture_compression_pvrtc2 */
-#ifndef GL_IMG_texture_compression_pvrtc2
-#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG                     0x9137
-#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG                     0x9138
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_RENDERBUFFER_SAMPLES_IMG                             0x9133
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG               0x9134
-#define GL_MAX_SAMPLES_IMG                                      0x9135
-#define GL_TEXTURE_SAMPLES_IMG                                  0x9136
-#endif
-
-/*------------------------------------------------------------------------*
- * NV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_NV_coverage_sample */
-#ifndef GL_NV_coverage_sample
-#define GL_COVERAGE_COMPONENT_NV                                0x8ED0
-#define GL_COVERAGE_COMPONENT4_NV                               0x8ED1
-#define GL_COVERAGE_ATTACHMENT_NV                               0x8ED2
-#define GL_COVERAGE_BUFFERS_NV                                  0x8ED3
-#define GL_COVERAGE_SAMPLES_NV                                  0x8ED4
-#define GL_COVERAGE_ALL_FRAGMENTS_NV                            0x8ED5
-#define GL_COVERAGE_EDGE_FRAGMENTS_NV                           0x8ED6
-#define GL_COVERAGE_AUTOMATIC_NV                                0x8ED7
-#define GL_COVERAGE_BUFFER_BIT_NV                               0x00008000
-#endif
-
-/* GL_NV_depth_nonlinear */
-#ifndef GL_NV_depth_nonlinear
-#define GL_DEPTH_COMPONENT16_NONLINEAR_NV                       0x8E2C
-#endif
-
-/* GL_NV_draw_buffers */
-#ifndef GL_NV_draw_buffers
-#define GL_MAX_DRAW_BUFFERS_NV                                  0x8824
-#define GL_DRAW_BUFFER0_NV                                      0x8825
-#define GL_DRAW_BUFFER1_NV                                      0x8826
-#define GL_DRAW_BUFFER2_NV                                      0x8827
-#define GL_DRAW_BUFFER3_NV                                      0x8828
-#define GL_DRAW_BUFFER4_NV                                      0x8829
-#define GL_DRAW_BUFFER5_NV                                      0x882A
-#define GL_DRAW_BUFFER6_NV                                      0x882B
-#define GL_DRAW_BUFFER7_NV                                      0x882C
-#define GL_DRAW_BUFFER8_NV                                      0x882D
-#define GL_DRAW_BUFFER9_NV                                      0x882E
-#define GL_DRAW_BUFFER10_NV                                     0x882F
-#define GL_DRAW_BUFFER11_NV                                     0x8830
-#define GL_DRAW_BUFFER12_NV                                     0x8831
-#define GL_DRAW_BUFFER13_NV                                     0x8832
-#define GL_DRAW_BUFFER14_NV                                     0x8833
-#define GL_DRAW_BUFFER15_NV                                     0x8834
-#define GL_COLOR_ATTACHMENT0_NV                                 0x8CE0
-#define GL_COLOR_ATTACHMENT1_NV                                 0x8CE1
-#define GL_COLOR_ATTACHMENT2_NV                                 0x8CE2
-#define GL_COLOR_ATTACHMENT3_NV                                 0x8CE3
-#define GL_COLOR_ATTACHMENT4_NV                                 0x8CE4
-#define GL_COLOR_ATTACHMENT5_NV                                 0x8CE5
-#define GL_COLOR_ATTACHMENT6_NV                                 0x8CE6
-#define GL_COLOR_ATTACHMENT7_NV                                 0x8CE7
-#define GL_COLOR_ATTACHMENT8_NV                                 0x8CE8
-#define GL_COLOR_ATTACHMENT9_NV                                 0x8CE9
-#define GL_COLOR_ATTACHMENT10_NV                                0x8CEA
-#define GL_COLOR_ATTACHMENT11_NV                                0x8CEB
-#define GL_COLOR_ATTACHMENT12_NV                                0x8CEC
-#define GL_COLOR_ATTACHMENT13_NV                                0x8CED
-#define GL_COLOR_ATTACHMENT14_NV                                0x8CEE
-#define GL_COLOR_ATTACHMENT15_NV                                0x8CEF
-#endif
-
-/* GL_NV_draw_instanced */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_fbo_color_attachments */
-#ifndef GL_NV_fbo_color_attachments
-#define GL_MAX_COLOR_ATTACHMENTS_NV                             0x8CDF
-/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
-#endif
-
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_ALL_COMPLETED_NV                                     0x84F2
-#define GL_FENCE_STATUS_NV                                      0x84F3
-#define GL_FENCE_CONDITION_NV                                   0x84F4
-#endif
-
-/* GL_NV_framebuffer_blit */
-#ifndef GL_NV_framebuffer_blit
-#define GL_READ_FRAMEBUFFER_NV                                  0x8CA8
-#define GL_DRAW_FRAMEBUFFER_NV                                  0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_NV                          0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_NV                          0x8CAA
-#endif
-
-/* GL_NV_framebuffer_multisample */
-#ifndef GL_NV_framebuffer_multisample
-#define GL_RENDERBUFFER_SAMPLES_NV                              0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV                0x8D56
-#define GL_MAX_SAMPLES_NV                                       0x8D57
-#endif
-
-/* GL_NV_generate_mipmap_sRGB */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_instanced_arrays */
-#ifndef GL_NV_instanced_arrays
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV                       0x88FE
-#endif
-
-/* GL_NV_read_buffer */
-#ifndef GL_NV_read_buffer
-#define GL_READ_BUFFER_NV                                       0x0C02
-#endif
-
-/* GL_NV_read_buffer_front */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_read_depth */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_read_depth_stencil */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_read_stencil */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_shadow_samplers_array */
-#ifndef GL_NV_shadow_samplers_array
-#define GL_SAMPLER_2D_ARRAY_SHADOW_NV                           0x8DC4
-#endif
-
-/* GL_NV_shadow_samplers_cube */
-#ifndef GL_NV_shadow_samplers_cube
-#define GL_SAMPLER_CUBE_SHADOW_NV                               0x8DC5
-#endif
-
-/* GL_NV_sRGB_formats */
-#ifndef GL_NV_sRGB_formats
-#define GL_SLUMINANCE_NV                                        0x8C46
-#define GL_SLUMINANCE_ALPHA_NV                                  0x8C44
-#define GL_SRGB8_NV                                             0x8C41
-#define GL_SLUMINANCE8_NV                                       0x8C47
-#define GL_SLUMINANCE8_ALPHA8_NV                                0x8C45
-#define GL_COMPRESSED_SRGB_S3TC_DXT1_NV                         0x8C4C
-#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV                   0x8C4D
-#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV                   0x8C4E
-#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV                   0x8C4F
-#define GL_ETC1_SRGB8_NV                                        0x88EE
-#endif
-
-/* GL_NV_texture_border_clamp */
-#ifndef GL_NV_texture_border_clamp
-#define GL_TEXTURE_BORDER_COLOR_NV                              0x1004
-#define GL_CLAMP_TO_BORDER_NV                                   0x812D
-#endif
-
-/* GL_NV_texture_compression_s3tc_update */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_texture_npot_2D_mipmap */
-/* No new tokens introduced by this extension. */
-
-/*------------------------------------------------------------------------*
- * QCOM extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_alpha_test */
-#ifndef GL_QCOM_alpha_test
-#define GL_ALPHA_TEST_QCOM                                      0x0BC0
-#define GL_ALPHA_TEST_FUNC_QCOM                                 0x0BC1
-#define GL_ALPHA_TEST_REF_QCOM                                  0x0BC2
-#endif
-
-/* GL_QCOM_binning_control */
-#ifndef GL_QCOM_binning_control
-#define GL_BINNING_CONTROL_HINT_QCOM                            0x8FB0
-#define GL_CPU_OPTIMIZED_QCOM                                   0x8FB1
-#define GL_GPU_OPTIMIZED_QCOM                                   0x8FB2
-#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM                    0x8FB3
-#endif
-
-/* GL_QCOM_driver_control */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_extended_get */
-#ifndef GL_QCOM_extended_get
-#define GL_TEXTURE_WIDTH_QCOM                                   0x8BD2
-#define GL_TEXTURE_HEIGHT_QCOM                                  0x8BD3
-#define GL_TEXTURE_DEPTH_QCOM                                   0x8BD4
-#define GL_TEXTURE_INTERNAL_FORMAT_QCOM                         0x8BD5
-#define GL_TEXTURE_FORMAT_QCOM                                  0x8BD6
-#define GL_TEXTURE_TYPE_QCOM                                    0x8BD7
-#define GL_TEXTURE_IMAGE_VALID_QCOM                             0x8BD8
-#define GL_TEXTURE_NUM_LEVELS_QCOM                              0x8BD9
-#define GL_TEXTURE_TARGET_QCOM                                  0x8BDA
-#define GL_TEXTURE_OBJECT_VALID_QCOM                            0x8BDB
-#define GL_STATE_RESTORE                                        0x8BDC
-#endif
-
-/* GL_QCOM_extended_get2 */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_perfmon_global_mode */
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_PERFMON_GLOBAL_MODE_QCOM                             0x8FA0
-#endif
-
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_WRITEONLY_RENDERING_QCOM                             0x8823
-#endif
-
-/* GL_QCOM_tiled_rendering */
-#ifndef GL_QCOM_tiled_rendering
-#define GL_COLOR_BUFFER_BIT0_QCOM                               0x00000001
-#define GL_COLOR_BUFFER_BIT1_QCOM                               0x00000002
-#define GL_COLOR_BUFFER_BIT2_QCOM                               0x00000004
-#define GL_COLOR_BUFFER_BIT3_QCOM                               0x00000008
-#define GL_COLOR_BUFFER_BIT4_QCOM                               0x00000010
-#define GL_COLOR_BUFFER_BIT5_QCOM                               0x00000020
-#define GL_COLOR_BUFFER_BIT6_QCOM                               0x00000040
-#define GL_COLOR_BUFFER_BIT7_QCOM                               0x00000080
-#define GL_DEPTH_BUFFER_BIT0_QCOM                               0x00000100
-#define GL_DEPTH_BUFFER_BIT1_QCOM                               0x00000200
-#define GL_DEPTH_BUFFER_BIT2_QCOM                               0x00000400
-#define GL_DEPTH_BUFFER_BIT3_QCOM                               0x00000800
-#define GL_DEPTH_BUFFER_BIT4_QCOM                               0x00001000
-#define GL_DEPTH_BUFFER_BIT5_QCOM                               0x00002000
-#define GL_DEPTH_BUFFER_BIT6_QCOM                               0x00004000
-#define GL_DEPTH_BUFFER_BIT7_QCOM                               0x00008000
-#define GL_STENCIL_BUFFER_BIT0_QCOM                             0x00010000
-#define GL_STENCIL_BUFFER_BIT1_QCOM                             0x00020000
-#define GL_STENCIL_BUFFER_BIT2_QCOM                             0x00040000
-#define GL_STENCIL_BUFFER_BIT3_QCOM                             0x00080000
-#define GL_STENCIL_BUFFER_BIT4_QCOM                             0x00100000
-#define GL_STENCIL_BUFFER_BIT5_QCOM                             0x00200000
-#define GL_STENCIL_BUFFER_BIT6_QCOM                             0x00400000
-#define GL_STENCIL_BUFFER_BIT7_QCOM                             0x00800000
-#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM                         0x01000000
-#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM                         0x02000000
-#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM                         0x04000000
-#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM                         0x08000000
-#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM                         0x10000000
-#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM                         0x20000000
-#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM                         0x40000000
-#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM                         0x80000000
-#endif
-
-/*------------------------------------------------------------------------*
- * VIV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_VIV_shader_binary */
-#ifndef GL_VIV_shader_binary
-#define GL_SHADER_BINARY_VIV                                    0x8FC4
-#endif
-
-/*------------------------------------------------------------------------*
- * End of extension tokens, start of corresponding extension functions
- *------------------------------------------------------------------------*/
-
-/*------------------------------------------------------------------------*
- * OES extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_OES_compressed_ETC1_RGB8_texture 1
-#endif
-
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_OES_compressed_paletted_texture 1
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_OES_depth24 1
-#endif
-
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_OES_depth32 1
-#endif
-
-/* GL_OES_depth_texture */
-#ifndef GL_OES_depth_texture
-#define GL_OES_depth_texture 1
-#endif
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-#define GL_OES_EGL_image 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
-GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
-#endif
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-#endif
-
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-#define GL_OES_EGL_image_external 1
-/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_OES_element_index_uint 1
-#endif
-
-/* GL_OES_fbo_render_mipmap */
-#ifndef GL_OES_fbo_render_mipmap
-#define GL_OES_fbo_render_mipmap 1
-#endif
-
-/* GL_OES_fragment_precision_high */
-#ifndef GL_OES_fragment_precision_high
-#define GL_OES_fragment_precision_high 1
-#endif
-
-/* GL_OES_get_program_binary */
-#ifndef GL_OES_get_program_binary
-#define GL_OES_get_program_binary 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
-GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
-typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_OES_mapbuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
-GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
-GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid **params);
-#endif
-typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
-typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid **params);
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_OES_packed_depth_stencil 1
-#endif
-
-/* GL_OES_required_internalformat */
-#ifndef GL_OES_required_internalformat
-#define GL_OES_required_internalformat 1
-#endif
-
-/* GL_OES_rgb8_rgba8 */
-#ifndef GL_OES_rgb8_rgba8
-#define GL_OES_rgb8_rgba8 1
-#endif
-
-/* GL_OES_standard_derivatives */
-#ifndef GL_OES_standard_derivatives
-#define GL_OES_standard_derivatives 1
-#endif
-
-/* GL_OES_stencil1 */
-#ifndef GL_OES_stencil1
-#define GL_OES_stencil1 1
-#endif
-
-/* GL_OES_stencil4 */
-#ifndef GL_OES_stencil4
-#define GL_OES_stencil4 1
-#endif
-
-#ifndef GL_OES_surfaceless_context
-#define GL_OES_surfaceless_context 1
-#endif
-
-/* GL_OES_texture_3D */
-#ifndef GL_OES_texture_3D
-#define GL_OES_texture_3D 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_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);
-GL_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);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_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);
-GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-#endif
-typedef 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);
-typedef 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);
-typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-typedef 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);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-#endif
-
-/* GL_OES_texture_float */
-#ifndef GL_OES_texture_float
-#define GL_OES_texture_float 1
-#endif
-
-/* GL_OES_texture_float_linear */
-#ifndef GL_OES_texture_float_linear
-#define GL_OES_texture_float_linear 1
-#endif
-
-/* GL_OES_texture_half_float */
-#ifndef GL_OES_texture_half_float
-#define GL_OES_texture_half_float 1
-#endif
-
-/* GL_OES_texture_half_float_linear */
-#ifndef GL_OES_texture_half_float_linear
-#define GL_OES_texture_half_float_linear 1
-#endif
-
-/* GL_OES_texture_npot */
-#ifndef GL_OES_texture_npot
-#define GL_OES_texture_npot 1
-#endif
-
-/* GL_OES_vertex_array_object */
-#ifndef GL_OES_vertex_array_object
-#define GL_OES_vertex_array_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
-GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
-GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
-GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
-#endif
-typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
-typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
-typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
-typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
-#endif
-
-/* GL_OES_vertex_half_float */
-#ifndef GL_OES_vertex_half_float
-#define GL_OES_vertex_half_float 1
-#endif
-
-/* GL_OES_vertex_type_10_10_10_2 */
-#ifndef GL_OES_vertex_type_10_10_10_2
-#define GL_OES_vertex_type_10_10_10_2 1
-#endif
-
-/*------------------------------------------------------------------------*
- * KHR extension functions
- *------------------------------------------------------------------------*/
-
-#ifndef GL_KHR_debug
-#define GL_KHR_debug 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);
-GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void);
-GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label);
-GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, GLvoid **params);
-#endif
-typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
-typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void);
-typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, GLvoid **params);
-#endif
-
-#ifndef GL_KHR_texture_compression_astc_ldr
-#define GL_KHR_texture_compression_astc_ldr 1
-#endif
-
-
-/*------------------------------------------------------------------------*
- * AMD extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_AMD_compressed_3DC_texture 1
-#endif
-
-/* GL_AMD_compressed_ATC_texture */
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_AMD_compressed_ATC_texture 1
-#endif
-
-/* AMD_performance_monitor */
-#ifndef GL_AMD_performance_monitor
-#define GL_AMD_performance_monitor 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
-GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
-GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
-GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
-typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
-typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#endif
-
-/* GL_AMD_program_binary_Z400 */
-#ifndef GL_AMD_program_binary_Z400
-#define GL_AMD_program_binary_Z400 1
-#endif
-
-/*------------------------------------------------------------------------*
- * ANGLE extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_ANGLE_depth_texture */
-#ifndef GL_ANGLE_depth_texture
-#define GL_ANGLE_depth_texture 1
-#endif
-
-/* GL_ANGLE_framebuffer_blit */
-#ifndef GL_ANGLE_framebuffer_blit
-#define GL_ANGLE_framebuffer_blit 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_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);
-#endif
-typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
-
-/* GL_ANGLE_framebuffer_multisample */
-#ifndef GL_ANGLE_framebuffer_multisample
-#define GL_ANGLE_framebuffer_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-
-#ifndef GL_ANGLE_instanced_arrays
-#define GL_ANGLE_instanced_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);
-#endif
-typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
-#endif
-
-/* GL_ANGLE_pack_reverse_row_order */
-#ifndef GL_ANGLE_pack_reverse_row_order
-#define GL_ANGLE_pack_reverse_row_order 1
-#endif
-
-/* GL_ANGLE_program_binary */
-#ifndef GL_ANGLE_program_binary
-#define GL_ANGLE_program_binary 1
-#endif
-
-/* GL_ANGLE_texture_compression_dxt3 */
-#ifndef GL_ANGLE_texture_compression_dxt3
-#define GL_ANGLE_texture_compression_dxt3 1
-#endif
-
-/* GL_ANGLE_texture_compression_dxt5 */
-#ifndef GL_ANGLE_texture_compression_dxt5
-#define GL_ANGLE_texture_compression_dxt5 1
-#endif
-
-/* GL_ANGLE_texture_usage */
-#ifndef GL_ANGLE_texture_usage
-#define GL_ANGLE_texture_usage 1
-#endif
-
-#ifndef GL_ANGLE_translated_shader_source
-#define GL_ANGLE_translated_shader_source 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
-#endif
-
-/*------------------------------------------------------------------------*
- * APPLE extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_APPLE_copy_texture_levels */
-#ifndef GL_APPLE_copy_texture_levels
-#define GL_APPLE_copy_texture_levels 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
-#endif
-typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
-#endif
-
-/* GL_APPLE_framebuffer_multisample */
-#ifndef GL_APPLE_framebuffer_multisample
-#define GL_APPLE_framebuffer_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
-#endif
-
-/* GL_APPLE_rgb_422 */
-#ifndef GL_APPLE_rgb_422
-#define GL_APPLE_rgb_422 1
-#endif
-
-/* GL_APPLE_sync */
-#ifndef GL_APPLE_sync
-#define GL_APPLE_sync 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
-GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
-GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
-GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
-GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-#endif
-typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
-typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
-typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
-typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
-typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-#endif
-
-/* GL_APPLE_texture_format_BGRA8888 */
-#ifndef GL_APPLE_texture_format_BGRA8888
-#define GL_APPLE_texture_format_BGRA8888 1
-#endif
-
-/* GL_APPLE_texture_max_level */
-#ifndef GL_APPLE_texture_max_level
-#define GL_APPLE_texture_max_level 1
-#endif
-
-/*------------------------------------------------------------------------*
- * ARM extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_ARM_mali_program_binary */
-#ifndef GL_ARM_mali_program_binary
-#define GL_ARM_mali_program_binary 1
-#endif
-
-/* GL_ARM_mali_shader_binary */
-#ifndef GL_ARM_mali_shader_binary
-#define GL_ARM_mali_shader_binary 1
-#endif
-
-/* GL_ARM_rgba8 */
-#ifndef GL_ARM_rgba8
-#define GL_ARM_rgba8 1
-#endif
-
-/*------------------------------------------------------------------------*
- * EXT extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_EXT_blend_minmax */
-#ifndef GL_EXT_blend_minmax
-#define GL_EXT_blend_minmax 1
-#endif
-
-/* GL_EXT_color_buffer_half_float */
-#ifndef GL_EXT_color_buffer_half_float
-#define GL_EXT_color_buffer_half_float 1
-#endif
-
-/* GL_EXT_debug_label */
-#ifndef GL_EXT_debug_label
-#define GL_EXT_debug_label 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-#endif
-typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-#endif
-
-/* GL_EXT_debug_marker */
-#ifndef GL_EXT_debug_marker
-#define GL_EXT_debug_marker 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
-GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
-GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
-#endif
-typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
-#endif
-
-/* GL_EXT_discard_framebuffer */
-#ifndef GL_EXT_discard_framebuffer
-#define GL_EXT_discard_framebuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-
-#ifndef GL_EXT_disjoint_timer_query
-#define GL_EXT_disjoint_timer_query 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
-GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
-GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
-GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
-GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
-GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target);
-GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
-#endif
-typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
-typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
-typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
-typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
-typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
-#endif /* GL_EXT_disjoint_timer_query */
-
-#ifndef GL_EXT_draw_buffers
-#define GL_EXT_draw_buffers 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);
-#endif
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);
-#endif /* GL_EXT_draw_buffers */
-
-/* GL_EXT_map_buffer_range */
-#ifndef GL_EXT_map_buffer_range
-#define GL_EXT_map_buffer_range 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
-#endif
-typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
-#endif
-
-/* GL_EXT_multisampled_render_to_texture */
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_EXT_multisampled_render_to_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);             
-GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-
-/* GL_EXT_multiview_draw_buffers */
-#ifndef GL_EXT_multiview_draw_buffers
-#define GL_EXT_multiview_draw_buffers 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);
-GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);
-GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);
-#endif
-typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
-typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
-#endif
-
-#ifndef GL_EXT_multi_draw_arrays
-#define GL_EXT_multi_draw_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
-#endif
-
-/* GL_EXT_occlusion_query_boolean */
-#ifndef GL_EXT_occlusion_query_boolean
-#define GL_EXT_occlusion_query_boolean 1
-/* All entry points also exist in GL_EXT_disjoint_timer_query */
-#endif
-
-/* GL_EXT_read_format_bgra */
-#ifndef GL_EXT_read_format_bgra
-#define GL_EXT_read_format_bgra 1
-#endif
-
-/* GL_EXT_robustness */
-#ifndef GL_EXT_robustness
-#define GL_EXT_robustness 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
-GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
-GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#endif
-typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
-typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#endif
-
-/* GL_EXT_separate_shader_objects */
-#ifndef GL_EXT_separate_shader_objects
-#define GL_EXT_separate_shader_objects 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
-GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
-GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
-GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
-GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
-GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);
-GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);
-GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);
-GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);
-GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-#endif
-typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
-typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
-typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
-typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
-typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
-typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-#endif
-
-/* GL_EXT_shader_framebuffer_fetch */
-#ifndef GL_EXT_shader_framebuffer_fetch
-#define GL_EXT_shader_framebuffer_fetch 1
-#endif
-
-/* GL_EXT_shader_texture_lod */
-#ifndef GL_EXT_shader_texture_lod
-#define GL_EXT_shader_texture_lod 1
-#endif
-
-/* GL_EXT_shadow_samplers */
-#ifndef GL_EXT_shadow_samplers
-#define GL_EXT_shadow_samplers 1
-#endif
-
-/* GL_EXT_sRGB */
-#ifndef GL_EXT_sRGB
-#define GL_EXT_sRGB 1
-#endif
-
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_EXT_texture_compression_dxt1 1
-#endif
-
-/* GL_EXT_texture_filter_anisotropic */
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_EXT_texture_filter_anisotropic 1
-#endif
-
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_EXT_texture_format_BGRA8888 1
-#endif
-
-/* GL_EXT_texture_rg */
-#ifndef GL_EXT_texture_rg
-#define GL_EXT_texture_rg 1
-#endif
-
-/* GL_EXT_texture_storage */
-#ifndef GL_EXT_texture_storage
-#define GL_EXT_texture_storage 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#endif
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#endif
-
-/* GL_EXT_texture_type_2_10_10_10_REV */
-#ifndef GL_EXT_texture_type_2_10_10_10_REV
-#define GL_EXT_texture_type_2_10_10_10_REV 1
-#endif
-
-/* GL_EXT_unpack_subimage */
-#ifndef GL_EXT_unpack_subimage
-#define GL_EXT_unpack_subimage 1
-#endif
-
-/*------------------------------------------------------------------------*
- * DMP extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_DMP_shader_binary */
-#ifndef GL_DMP_shader_binary
-#define GL_DMP_shader_binary 1
-#endif
-
-/*------------------------------------------------------------------------*
- * FJ extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_FJ_shader_binary_GCCSO */
-#ifndef GL_FJ_shader_binary_GCCSO
-#define GL_FJ_shader_binary_GCCSO 1
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_program_binary */
-#ifndef GL_IMG_program_binary
-#define GL_IMG_program_binary 1
-#endif
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_IMG_read_format 1
-#endif
-
-/* GL_IMG_shader_binary */
-#ifndef GL_IMG_shader_binary
-#define GL_IMG_shader_binary 1
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_IMG_texture_compression_pvrtc 1
-#endif
-
-/* GL_IMG_texture_compression_pvrtc2 */
-#ifndef GL_IMG_texture_compression_pvrtc2
-#define GL_IMG_texture_compression_pvrtc2 1
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_IMG_multisampled_render_to_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-
-/*------------------------------------------------------------------------*
- * NV extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_NV_coverage_sample */
-#ifndef GL_NV_coverage_sample
-#define GL_NV_coverage_sample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
-GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
-#endif
-typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
-typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
-#endif
-
-/* GL_NV_depth_nonlinear */
-#ifndef GL_NV_depth_nonlinear
-#define GL_NV_depth_nonlinear 1
-#endif
-
-/* GL_NV_draw_buffers */
-#ifndef GL_NV_draw_buffers
-#define GL_NV_draw_buffers 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
-#endif
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
-#endif
-
-/* GL_NV_draw_instanced */
-#ifndef GL_NV_draw_instanced
-#define GL_NV_draw_instanced 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
-#endif
-typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
-#endif
-
-/* GL_NV_fbo_color_attachments */
-#ifndef GL_NV_fbo_color_attachments
-#define GL_NV_fbo_color_attachments 1
-#endif
-
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_NV_fence 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
-GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
-GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
-GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
-GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);
-GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
-#endif
-typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
-typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
-typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
-typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
-#endif
-
-/* GL_NV_framebuffer_blit */
-#ifndef GL_NV_framebuffer_blit
-#define GL_NV_framebuffer_blit 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_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);
-#endif
-typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
-
-/* GL_NV_framebuffer_multisample */
-#ifndef GL_NV_framebuffer_multisample
-#define GL_NV_framebuffer_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-
-/* GL_NV_generate_mipmap_sRGB */
-#ifndef GL_NV_generate_mipmap_sRGB
-#define GL_NV_generate_mipmap_sRGB 1
-#endif
-
-/* GL_NV_instanced_arrays */
-#ifndef GL_NV_instanced_arrays
-#define GL_NV_instanced_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor);
-#endif
-typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor);
-#endif
-
-/* GL_NV_read_buffer */
-#ifndef GL_NV_read_buffer
-#define GL_NV_read_buffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
-#endif
-typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
-#endif
-
-/* GL_NV_read_buffer_front */
-#ifndef GL_NV_read_buffer_front
-#define GL_NV_read_buffer_front 1
-#endif
-
-/* GL_NV_read_depth */
-#ifndef GL_NV_read_depth
-#define GL_NV_read_depth 1
-#endif
-
-/* GL_NV_read_depth_stencil */
-#ifndef GL_NV_read_depth_stencil
-#define GL_NV_read_depth_stencil 1
-#endif
-
-/* GL_NV_read_stencil */
-#ifndef GL_NV_read_stencil
-#define GL_NV_read_stencil 1
-#endif
-
-/* GL_NV_shadow_samplers_array */
-#ifndef GL_NV_shadow_samplers_array
-#define GL_NV_shadow_samplers_array 1
-#endif
-
-/* GL_NV_shadow_samplers_cube */
-#ifndef GL_NV_shadow_samplers_cube
-#define GL_NV_shadow_samplers_cube 1
-#endif
-
-/* GL_NV_sRGB_formats */
-#ifndef GL_NV_sRGB_formats
-#define GL_NV_sRGB_formats 1
-#endif
-
-/* GL_NV_texture_border_clamp */
-#ifndef GL_NV_texture_border_clamp
-#define GL_NV_texture_border_clamp 1
-#endif
-
-/* GL_NV_texture_compression_s3tc_update */
-#ifndef GL_NV_texture_compression_s3tc_update
-#define GL_NV_texture_compression_s3tc_update 1
-#endif
-
-/* GL_NV_texture_npot_2D_mipmap */
-#ifndef GL_NV_texture_npot_2D_mipmap
-#define GL_NV_texture_npot_2D_mipmap 1
-#endif
-
-/*------------------------------------------------------------------------*
- * QCOM extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_alpha_test */
-#ifndef GL_QCOM_alpha_test
-#define GL_QCOM_alpha_test 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
-#endif
-typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
-#endif
-
-/* GL_QCOM_binning_control */
-#ifndef GL_QCOM_binning_control
-#define GL_QCOM_binning_control 1
-#endif
-
-/* GL_QCOM_driver_control */
-#ifndef GL_QCOM_driver_control
-#define GL_QCOM_driver_control 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
-GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
-GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-#endif
-
-/* GL_QCOM_extended_get */
-#ifndef GL_QCOM_extended_get
-#define GL_QCOM_extended_get 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
-GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
-GL_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);
-GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
-#endif
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
-typedef 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);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
-#endif
-
-/* GL_QCOM_extended_get2 */
-#ifndef GL_QCOM_extended_get2
-#define GL_QCOM_extended_get2 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
-GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-
-/* GL_QCOM_perfmon_global_mode */
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_QCOM_perfmon_global_mode 1
-#endif
-
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_QCOM_writeonly_rendering 1
-#endif
-
-/* GL_QCOM_tiled_rendering */
-#ifndef GL_QCOM_tiled_rendering
-#define GL_QCOM_tiled_rendering 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
-#endif
-typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
-#endif
-
-/*------------------------------------------------------------------------*
- * VIV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_VIV_shader_binary */
-#ifndef GL_VIV_shader_binary
-#define GL_VIV_shader_binary 1
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gl2ext_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_gl2platform.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_gl2platform.h
deleted file mode 100644 (file)
index c325686..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __gl2platform_h_
-#define __gl2platform_h_
-
-/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/* Platform-specific types and definitions for OpenGL ES 2.X  gl2.h
- *
- * Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file.  Please submit changes
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
- * by filing a bug against product "OpenGL-ES" component "Registry".
- */
-
-/*#include <KHR/khrplatform.h>*/
-
-#ifndef GL_APICALL
-#define GL_APICALL  KHRONOS_APICALL
-#endif
-
-#ifndef GL_APIENTRY
-#define GL_APIENTRY KHRONOS_APIENTRY
-#endif
-
-#endif /* __gl2platform_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_khrplatform.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_khrplatform.h
deleted file mode 100644 (file)
index c9e6f17..0000000
+++ /dev/null
@@ -1,282 +0,0 @@
-#ifndef __khrplatform_h_
-#define __khrplatform_h_
-
-/*
-** Copyright (c) 2008-2009 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-
-/* Khronos platform-specific types and definitions.
- *
- * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
- *
- * Adopters may modify this file to suit their platform. Adopters are
- * encouraged to submit platform specific modifications to the Khronos
- * group so that they can be included in future versions of this file.
- * Please submit changes by sending them to the public Khronos Bugzilla
- * (http://khronos.org/bugzilla) by filing a bug against product
- * "Khronos (general)" component "Registry".
- *
- * A predefined template which fills in some of the bug fields can be
- * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
- * must create a Bugzilla login first.
- *
- *
- * See the Implementer's Guidelines for information about where this file
- * should be located on your system and for more details of its use:
- *    http://www.khronos.org/registry/implementers_guide.pdf
- *
- * This file should be included as
- *        #include <KHR/khrplatform.h>
- * by Khronos client API header files that use its types and defines.
- *
- * The types in khrplatform.h should only be used to define API-specific types.
- *
- * Types defined in khrplatform.h:
- *    khronos_int8_t              signed   8  bit
- *    khronos_uint8_t             unsigned 8  bit
- *    khronos_int16_t             signed   16 bit
- *    khronos_uint16_t            unsigned 16 bit
- *    khronos_int32_t             signed   32 bit
- *    khronos_uint32_t            unsigned 32 bit
- *    khronos_int64_t             signed   64 bit
- *    khronos_uint64_t            unsigned 64 bit
- *    khronos_intptr_t            signed   same number of bits as a pointer
- *    khronos_uintptr_t           unsigned same number of bits as a pointer
- *    khronos_ssize_t             signed   size
- *    khronos_usize_t             unsigned size
- *    khronos_float_t             signed   32 bit floating point
- *    khronos_time_ns_t           unsigned 64 bit time in nanoseconds
- *    khronos_utime_nanoseconds_t unsigned time interval or absolute time in
- *                                         nanoseconds
- *    khronos_stime_nanoseconds_t signed time interval in nanoseconds
- *    khronos_boolean_enum_t      enumerated boolean type. This should
- *      only be used as a base type when a client API's boolean type is
- *      an enum. Client APIs which use an integer or other type for
- *      booleans cannot use this as the base type for their boolean.
- *
- * Tokens defined in khrplatform.h:
- *
- *    KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
- *
- *    KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
- *    KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
- *
- * Calling convention macros defined in this file:
- *    KHRONOS_APICALL
- *    KHRONOS_APIENTRY
- *    KHRONOS_APIATTRIBUTES
- *
- * These may be used in function prototypes as:
- *
- *      KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
- *                                  int arg1,
- *                                  int arg2) KHRONOS_APIATTRIBUTES;
- */
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APICALL
- *-------------------------------------------------------------------------
- * This precedes the return type of the function in the function prototype.
- */
-#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
-#   define KHRONOS_APICALL __declspec(dllimport)
-#elif defined (__SYMBIAN32__)
-#   define KHRONOS_APICALL IMPORT_C
-#else
-#   define KHRONOS_APICALL
-#endif
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APIENTRY
- *-------------------------------------------------------------------------
- * This follows the return type of the function  and precedes the function
- * name in the function prototype.
- */
-#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
-    /* Win32 but not WinCE */
-#   define KHRONOS_APIENTRY __stdcall
-#else
-#   define KHRONOS_APIENTRY
-#endif
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APIATTRIBUTES
- *-------------------------------------------------------------------------
- * This follows the closing parenthesis of the function prototype arguments.
- */
-#if defined (__ARMCC_2__)
-#define KHRONOS_APIATTRIBUTES __softfp
-#else
-#define KHRONOS_APIATTRIBUTES
-#endif
-
-/*-------------------------------------------------------------------------
- * basic type definitions
- *-----------------------------------------------------------------------*/
-#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
-
-
-/*
- * Using <stdint.h>
- */
-#include <stdint.h>
-typedef int32_t                 khronos_int32_t;
-typedef uint32_t                khronos_uint32_t;
-typedef int64_t                 khronos_int64_t;
-typedef uint64_t                khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#elif defined(__VMS ) || defined(__sgi)
-
-/*
- * Using <inttypes.h>
- */
-#include <inttypes.h>
-typedef int32_t                 khronos_int32_t;
-typedef uint32_t                khronos_uint32_t;
-typedef int64_t                 khronos_int64_t;
-typedef uint64_t                khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
-
-/*
- * Win32
- */
-typedef __int32                 khronos_int32_t;
-typedef unsigned __int32        khronos_uint32_t;
-typedef __int64                 khronos_int64_t;
-typedef unsigned __int64        khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#elif defined(__sun__) || defined(__digital__)
-
-/*
- * Sun or Digital
- */
-typedef int                     khronos_int32_t;
-typedef unsigned int            khronos_uint32_t;
-#if defined(__arch64__) || defined(_LP64)
-typedef long int                khronos_int64_t;
-typedef unsigned long int       khronos_uint64_t;
-#else
-typedef long long int           khronos_int64_t;
-typedef unsigned long long int  khronos_uint64_t;
-#endif /* __arch64__ */
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#elif 0
-
-/*
- * Hypothetical platform with no float or int64 support
- */
-typedef int                     khronos_int32_t;
-typedef unsigned int            khronos_uint32_t;
-#define KHRONOS_SUPPORT_INT64   0
-#define KHRONOS_SUPPORT_FLOAT   0
-
-#else
-
-/*
- * Generic fallback
- */
-#include <stdint.h>
-typedef int32_t                 khronos_int32_t;
-typedef uint32_t                khronos_uint32_t;
-typedef int64_t                 khronos_int64_t;
-typedef uint64_t                khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#endif
-
-
-/*
- * Types that are (so far) the same on all platforms
- */
-typedef signed   char          khronos_int8_t;
-typedef unsigned char          khronos_uint8_t;
-typedef signed   short int     khronos_int16_t;
-typedef unsigned short int     khronos_uint16_t;
-
-/*
- * Types that differ between LLP64 and LP64 architectures - in LLP64, 
- * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
- * to be the only LLP64 architecture in current use.
- */
-#ifdef _WIN64
-typedef signed   long long int khronos_intptr_t;
-typedef unsigned long long int khronos_uintptr_t;
-typedef signed   long long int khronos_ssize_t;
-typedef unsigned long long int khronos_usize_t;
-#else
-typedef signed   long  int     khronos_intptr_t;
-typedef unsigned long  int     khronos_uintptr_t;
-typedef signed   long  int     khronos_ssize_t;
-typedef unsigned long  int     khronos_usize_t;
-#endif
-
-#if KHRONOS_SUPPORT_FLOAT
-/*
- * Float type
- */
-typedef          float         khronos_float_t;
-#endif
-
-#if KHRONOS_SUPPORT_INT64
-/* Time types
- *
- * These types can be used to represent a time interval in nanoseconds or
- * an absolute Unadjusted System Time.  Unadjusted System Time is the number
- * of nanoseconds since some arbitrary system event (e.g. since the last
- * time the system booted).  The Unadjusted System Time is an unsigned
- * 64 bit value that wraps back to 0 every 584 years.  Time intervals
- * may be either signed or unsigned.
- */
-typedef khronos_uint64_t       khronos_utime_nanoseconds_t;
-typedef khronos_int64_t        khronos_stime_nanoseconds_t;
-#endif
-
-/*
- * Dummy value used to pad enum types to 32 bits.
- */
-#ifndef KHRONOS_MAX_ENUM
-#define KHRONOS_MAX_ENUM 0x7FFFFFFF
-#endif
-
-/*
- * Enumerated boolean type
- *
- * Values other than zero should be considered to be true.  Therefore
- * comparisons should not be made against KHRONOS_TRUE.
- */
-typedef enum {
-    KHRONOS_FALSE = 0,
-    KHRONOS_TRUE  = 1,
-    KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
-} khronos_boolean_enum_t;
-
-#endif /* __khrplatform_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_pixels.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_pixels.h
deleted file mode 100644 (file)
index 5d2c0c8..0000000
+++ /dev/null
@@ -1,644 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_pixels.h
- *
- *  Header for the enumerated pixel format definitions.
- */
-
-#ifndef SDL_pixels_h_
-#define SDL_pixels_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_endian.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \name Transparency definitions
- *
- *  These define alpha as the opacity of a surface.
- */
-/* @{ */
-#define SDL_ALPHA_OPAQUE 255
-#define SDL_ALPHA_TRANSPARENT 0
-/* @} */
-
-/** Pixel type. */
-typedef enum
-{
-    SDL_PIXELTYPE_UNKNOWN,
-    SDL_PIXELTYPE_INDEX1,
-    SDL_PIXELTYPE_INDEX4,
-    SDL_PIXELTYPE_INDEX8,
-    SDL_PIXELTYPE_PACKED8,
-    SDL_PIXELTYPE_PACKED16,
-    SDL_PIXELTYPE_PACKED32,
-    SDL_PIXELTYPE_ARRAYU8,
-    SDL_PIXELTYPE_ARRAYU16,
-    SDL_PIXELTYPE_ARRAYU32,
-    SDL_PIXELTYPE_ARRAYF16,
-    SDL_PIXELTYPE_ARRAYF32
-} SDL_PixelType;
-
-/** Bitmap pixel order, high bit -> low bit. */
-typedef enum
-{
-    SDL_BITMAPORDER_NONE,
-    SDL_BITMAPORDER_4321,
-    SDL_BITMAPORDER_1234
-} SDL_BitmapOrder;
-
-/** Packed component order, high bit -> low bit. */
-typedef enum
-{
-    SDL_PACKEDORDER_NONE,
-    SDL_PACKEDORDER_XRGB,
-    SDL_PACKEDORDER_RGBX,
-    SDL_PACKEDORDER_ARGB,
-    SDL_PACKEDORDER_RGBA,
-    SDL_PACKEDORDER_XBGR,
-    SDL_PACKEDORDER_BGRX,
-    SDL_PACKEDORDER_ABGR,
-    SDL_PACKEDORDER_BGRA
-} SDL_PackedOrder;
-
-/** Array component order, low byte -> high byte. */
-/* !!! FIXME: in 2.1, make these not overlap differently with
-   !!! FIXME:  SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */
-typedef enum
-{
-    SDL_ARRAYORDER_NONE,
-    SDL_ARRAYORDER_RGB,
-    SDL_ARRAYORDER_RGBA,
-    SDL_ARRAYORDER_ARGB,
-    SDL_ARRAYORDER_BGR,
-    SDL_ARRAYORDER_BGRA,
-    SDL_ARRAYORDER_ABGR
-} SDL_ArrayOrder;
-
-/** Packed component layout. */
-typedef enum
-{
-    SDL_PACKEDLAYOUT_NONE,
-    SDL_PACKEDLAYOUT_332,
-    SDL_PACKEDLAYOUT_4444,
-    SDL_PACKEDLAYOUT_1555,
-    SDL_PACKEDLAYOUT_5551,
-    SDL_PACKEDLAYOUT_565,
-    SDL_PACKEDLAYOUT_8888,
-    SDL_PACKEDLAYOUT_2101010,
-    SDL_PACKEDLAYOUT_1010102
-} SDL_PackedLayout;
-
-#define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)
-
-#define SDL_DEFINE_PIXELFORMAT(type, order, layout, bits, bytes) \
-    ((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \
-     ((bits) << 8) | ((bytes) << 0))
-
-#define SDL_PIXELFLAG(X)    (((X) >> 28) & 0x0F)
-#define SDL_PIXELTYPE(X)    (((X) >> 24) & 0x0F)
-#define SDL_PIXELORDER(X)   (((X) >> 20) & 0x0F)
-#define SDL_PIXELLAYOUT(X)  (((X) >> 16) & 0x0F)
-#define SDL_BITSPERPIXEL(X) (((X) >> 8) & 0xFF)
-#define SDL_BYTESPERPIXEL(X) \
-    (SDL_ISPIXELFORMAT_FOURCC(X) ? \
-        ((((X) == SDL_PIXELFORMAT_YUY2) || \
-          ((X) == SDL_PIXELFORMAT_UYVY) || \
-          ((X) == SDL_PIXELFORMAT_YVYU)) ? 2 : 1) : (((X) >> 0) & 0xFF))
-
-#define SDL_ISPIXELFORMAT_INDEXED(format)   \
-    (!SDL_ISPIXELFORMAT_FOURCC(format) && \
-     ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) || \
-      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \
-      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))
-
-#define SDL_ISPIXELFORMAT_PACKED(format) \
-    (!SDL_ISPIXELFORMAT_FOURCC(format) && \
-     ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED8) || \
-      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED16) || \
-      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32)))
-
-#define SDL_ISPIXELFORMAT_ARRAY(format) \
-    (!SDL_ISPIXELFORMAT_FOURCC(format) && \
-     ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU8) || \
-      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU16) || \
-      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU32) || \
-      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || \
-      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32)))
-
-#define SDL_ISPIXELFORMAT_ALPHA(format)   \
-    ((SDL_ISPIXELFORMAT_PACKED(format) && \
-     ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \
-      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \
-      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \
-      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA))) || \
-    (SDL_ISPIXELFORMAT_ARRAY(format) && \
-     ((SDL_PIXELORDER(format) == SDL_ARRAYORDER_ARGB) || \
-      (SDL_PIXELORDER(format) == SDL_ARRAYORDER_RGBA) || \
-      (SDL_PIXELORDER(format) == SDL_ARRAYORDER_ABGR) || \
-      (SDL_PIXELORDER(format) == SDL_ARRAYORDER_BGRA))))
-
-/* The flag is set to 1 because 0x1? is not in the printable ASCII range */
-#define SDL_ISPIXELFORMAT_FOURCC(format)    \
-    ((format) && (SDL_PIXELFLAG(format) != 1))
-
-/* Note: If you modify this list, update SDL_GetPixelFormatName() */
-typedef enum
-{
-    SDL_PIXELFORMAT_UNKNOWN,
-    SDL_PIXELFORMAT_INDEX1LSB =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_4321, 0,
-                               1, 0),
-    SDL_PIXELFORMAT_INDEX1MSB =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0,
-                               1, 0),
-    SDL_PIXELFORMAT_INDEX4LSB =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0,
-                               4, 0),
-    SDL_PIXELFORMAT_INDEX4MSB =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_1234, 0,
-                               4, 0),
-    SDL_PIXELFORMAT_INDEX8 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0, 8, 1),
-    SDL_PIXELFORMAT_RGB332 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB,
-                               SDL_PACKEDLAYOUT_332, 8, 1),
-    SDL_PIXELFORMAT_XRGB4444 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
-                               SDL_PACKEDLAYOUT_4444, 12, 2),
-    SDL_PIXELFORMAT_RGB444 = SDL_PIXELFORMAT_XRGB4444,
-    SDL_PIXELFORMAT_XBGR4444 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
-                               SDL_PACKEDLAYOUT_4444, 12, 2),
-    SDL_PIXELFORMAT_BGR444 = SDL_PIXELFORMAT_XBGR4444,
-    SDL_PIXELFORMAT_XRGB1555 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
-                               SDL_PACKEDLAYOUT_1555, 15, 2),
-    SDL_PIXELFORMAT_RGB555 = SDL_PIXELFORMAT_XRGB1555,
-    SDL_PIXELFORMAT_XBGR1555 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
-                               SDL_PACKEDLAYOUT_1555, 15, 2),
-    SDL_PIXELFORMAT_BGR555 = SDL_PIXELFORMAT_XBGR1555,
-    SDL_PIXELFORMAT_ARGB4444 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
-                               SDL_PACKEDLAYOUT_4444, 16, 2),
-    SDL_PIXELFORMAT_RGBA4444 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
-                               SDL_PACKEDLAYOUT_4444, 16, 2),
-    SDL_PIXELFORMAT_ABGR4444 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
-                               SDL_PACKEDLAYOUT_4444, 16, 2),
-    SDL_PIXELFORMAT_BGRA4444 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
-                               SDL_PACKEDLAYOUT_4444, 16, 2),
-    SDL_PIXELFORMAT_ARGB1555 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
-                               SDL_PACKEDLAYOUT_1555, 16, 2),
-    SDL_PIXELFORMAT_RGBA5551 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
-                               SDL_PACKEDLAYOUT_5551, 16, 2),
-    SDL_PIXELFORMAT_ABGR1555 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
-                               SDL_PACKEDLAYOUT_1555, 16, 2),
-    SDL_PIXELFORMAT_BGRA5551 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
-                               SDL_PACKEDLAYOUT_5551, 16, 2),
-    SDL_PIXELFORMAT_RGB565 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
-                               SDL_PACKEDLAYOUT_565, 16, 2),
-    SDL_PIXELFORMAT_BGR565 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
-                               SDL_PACKEDLAYOUT_565, 16, 2),
-    SDL_PIXELFORMAT_RGB24 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_RGB, 0,
-                               24, 3),
-    SDL_PIXELFORMAT_BGR24 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0,
-                               24, 3),
-    SDL_PIXELFORMAT_XRGB8888 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB,
-                               SDL_PACKEDLAYOUT_8888, 24, 4),
-    SDL_PIXELFORMAT_RGB888 = SDL_PIXELFORMAT_XRGB8888,
-    SDL_PIXELFORMAT_RGBX8888 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX,
-                               SDL_PACKEDLAYOUT_8888, 24, 4),
-    SDL_PIXELFORMAT_XBGR8888 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,
-                               SDL_PACKEDLAYOUT_8888, 24, 4),
-    SDL_PIXELFORMAT_BGR888 = SDL_PIXELFORMAT_XBGR8888,
-    SDL_PIXELFORMAT_BGRX8888 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX,
-                               SDL_PACKEDLAYOUT_8888, 24, 4),
-    SDL_PIXELFORMAT_ARGB8888 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
-                               SDL_PACKEDLAYOUT_8888, 32, 4),
-    SDL_PIXELFORMAT_RGBA8888 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA,
-                               SDL_PACKEDLAYOUT_8888, 32, 4),
-    SDL_PIXELFORMAT_ABGR8888 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR,
-                               SDL_PACKEDLAYOUT_8888, 32, 4),
-    SDL_PIXELFORMAT_BGRA8888 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRA,
-                               SDL_PACKEDLAYOUT_8888, 32, 4),
-    SDL_PIXELFORMAT_ARGB2101010 =
-        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
-                               SDL_PACKEDLAYOUT_2101010, 32, 4),
-
-    /* Aliases for RGBA byte arrays of color data, for the current platform */
-#if SDL_BYTEORDER == SDL_BIG_ENDIAN
-    SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
-    SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
-    SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
-    SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
-#else
-    SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
-    SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
-    SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
-    SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
-#endif
-
-    SDL_PIXELFORMAT_YV12 =      /**< Planar mode: Y + V + U  (3 planes) */
-        SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
-    SDL_PIXELFORMAT_IYUV =      /**< Planar mode: Y + U + V  (3 planes) */
-        SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),
-    SDL_PIXELFORMAT_YUY2 =      /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
-        SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),
-    SDL_PIXELFORMAT_UYVY =      /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
-        SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
-    SDL_PIXELFORMAT_YVYU =      /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
-        SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'),
-    SDL_PIXELFORMAT_NV12 =      /**< Planar mode: Y + U/V interleaved  (2 planes) */
-        SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),
-    SDL_PIXELFORMAT_NV21 =      /**< Planar mode: Y + V/U interleaved  (2 planes) */
-        SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
-    SDL_PIXELFORMAT_EXTERNAL_OES =      /**< Android video texture format */
-        SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
-} SDL_PixelFormatEnum;
-
-/**
- * The bits of this structure can be directly reinterpreted as an integer-packed
- * color which uses the SDL_PIXELFORMAT_RGBA32 format (SDL_PIXELFORMAT_ABGR8888
- * on little-endian systems and SDL_PIXELFORMAT_RGBA8888 on big-endian systems).
- */
-typedef struct SDL_Color
-{
-    Uint8 r;
-    Uint8 g;
-    Uint8 b;
-    Uint8 a;
-} SDL_Color;
-#define SDL_Colour SDL_Color
-
-typedef struct SDL_Palette
-{
-    int ncolors;
-    SDL_Color *colors;
-    Uint32 version;
-    int refcount;
-} SDL_Palette;
-
-/**
- *  \note Everything in the pixel format structure is read-only.
- */
-typedef struct SDL_PixelFormat
-{
-    Uint32 format;
-    SDL_Palette *palette;
-    Uint8 BitsPerPixel;
-    Uint8 BytesPerPixel;
-    Uint8 padding[2];
-    Uint32 Rmask;
-    Uint32 Gmask;
-    Uint32 Bmask;
-    Uint32 Amask;
-    Uint8 Rloss;
-    Uint8 Gloss;
-    Uint8 Bloss;
-    Uint8 Aloss;
-    Uint8 Rshift;
-    Uint8 Gshift;
-    Uint8 Bshift;
-    Uint8 Ashift;
-    int refcount;
-    struct SDL_PixelFormat *next;
-} SDL_PixelFormat;
-
-/**
- * Get the human readable name of a pixel format.
- *
- * \param format the pixel format to query
- * \returns the human readable name of the specified pixel format or
- *          `SDL_PIXELFORMAT_UNKNOWN` if the format isn't recognized.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format);
-
-/**
- * Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
- *
- * \param format one of the SDL_PixelFormatEnum values
- * \param bpp a bits per pixel value; usually 15, 16, or 32
- * \param Rmask a pointer filled in with the red mask for the format
- * \param Gmask a pointer filled in with the green mask for the format
- * \param Bmask a pointer filled in with the blue mask for the format
- * \param Amask a pointer filled in with the alpha mask for the format
- * \returns SDL_TRUE on success or SDL_FALSE if the conversion wasn't
- *          possible; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_MasksToPixelFormatEnum
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format,
-                                                            int *bpp,
-                                                            Uint32 * Rmask,
-                                                            Uint32 * Gmask,
-                                                            Uint32 * Bmask,
-                                                            Uint32 * Amask);
-
-/**
- * Convert a bpp value and RGBA masks to an enumerated pixel format.
- *
- * This will return `SDL_PIXELFORMAT_UNKNOWN` if the conversion wasn't
- * possible.
- *
- * \param bpp a bits per pixel value; usually 15, 16, or 32
- * \param Rmask the red mask for the format
- * \param Gmask the green mask for the format
- * \param Bmask the blue mask for the format
- * \param Amask the alpha mask for the format
- * \returns one of the SDL_PixelFormatEnum values
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_PixelFormatEnumToMasks
- */
-extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,
-                                                          Uint32 Rmask,
-                                                          Uint32 Gmask,
-                                                          Uint32 Bmask,
-                                                          Uint32 Amask);
-
-/**
- * Create an SDL_PixelFormat structure corresponding to a pixel format.
- *
- * Returned structure may come from a shared global cache (i.e. not newly
- * allocated), and hence should not be modified, especially the palette. Weird
- * errors such as `Blit combination not supported` may occur.
- *
- * \param pixel_format one of the SDL_PixelFormatEnum values
- * \returns the new SDL_PixelFormat structure or NULL on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_FreeFormat
- */
-extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(Uint32 pixel_format);
-
-/**
- * Free an SDL_PixelFormat structure allocated by SDL_AllocFormat().
- *
- * \param format the SDL_PixelFormat structure to free
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AllocFormat
- */
-extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format);
-
-/**
- * Create a palette structure with the specified number of color entries.
- *
- * The palette entries are initialized to white.
- *
- * \param ncolors represents the number of color entries in the color palette
- * \returns a new SDL_Palette structure on success or NULL on failure (e.g. if
- *          there wasn't enough memory); call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_FreePalette
- */
-extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
-
-/**
- * Set the palette for a pixel format structure.
- *
- * \param format the SDL_PixelFormat structure that will use the palette
- * \param palette the SDL_Palette structure that will be used
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AllocPalette
- * \sa SDL_FreePalette
- */
-extern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format,
-                                                      SDL_Palette *palette);
-
-/**
- * Set a range of colors in a palette.
- *
- * \param palette the SDL_Palette structure to modify
- * \param colors an array of SDL_Color structures to copy into the palette
- * \param firstcolor the index of the first palette entry to modify
- * \param ncolors the number of entries to modify
- * \returns 0 on success or a negative error code if not all of the colors
- *          could be set; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AllocPalette
- * \sa SDL_CreateRGBSurface
- */
-extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,
-                                                 const SDL_Color * colors,
-                                                 int firstcolor, int ncolors);
-
-/**
- * Free a palette created with SDL_AllocPalette().
- *
- * \param palette the SDL_Palette structure to be freed
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AllocPalette
- */
-extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);
-
-/**
- * Map an RGB triple to an opaque pixel value for a given pixel format.
- *
- * This function maps the RGB color value to the specified pixel format and
- * returns the pixel value best approximating the given RGB color value for
- * the given pixel format.
- *
- * If the format has a palette (8-bit) the index of the closest matching color
- * in the palette will be returned.
- *
- * If the specified pixel format has an alpha component it will be returned as
- * all 1 bits (fully opaque).
- *
- * If the pixel format bpp (color depth) is less than 32-bpp then the unused
- * upper bits of the return value can safely be ignored (e.g., with a 16-bpp
- * format the return value can be assigned to a Uint16, and similarly a Uint8
- * for an 8-bpp format).
- *
- * \param format an SDL_PixelFormat structure describing the pixel format
- * \param r the red component of the pixel in the range 0-255
- * \param g the green component of the pixel in the range 0-255
- * \param b the blue component of the pixel in the range 0-255
- * \returns a pixel value
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetRGB
- * \sa SDL_GetRGBA
- * \sa SDL_MapRGBA
- */
-extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format,
-                                          Uint8 r, Uint8 g, Uint8 b);
-
-/**
- * Map an RGBA quadruple to a pixel value for a given pixel format.
- *
- * This function maps the RGBA color value to the specified pixel format and
- * returns the pixel value best approximating the given RGBA color value for
- * the given pixel format.
- *
- * If the specified pixel format has no alpha component the alpha value will
- * be ignored (as it will be in formats with a palette).
- *
- * If the format has a palette (8-bit) the index of the closest matching color
- * in the palette will be returned.
- *
- * If the pixel format bpp (color depth) is less than 32-bpp then the unused
- * upper bits of the return value can safely be ignored (e.g., with a 16-bpp
- * format the return value can be assigned to a Uint16, and similarly a Uint8
- * for an 8-bpp format).
- *
- * \param format an SDL_PixelFormat structure describing the format of the
- *               pixel
- * \param r the red component of the pixel in the range 0-255
- * \param g the green component of the pixel in the range 0-255
- * \param b the blue component of the pixel in the range 0-255
- * \param a the alpha component of the pixel in the range 0-255
- * \returns a pixel value
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetRGB
- * \sa SDL_GetRGBA
- * \sa SDL_MapRGB
- */
-extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format,
-                                           Uint8 r, Uint8 g, Uint8 b,
-                                           Uint8 a);
-
-/**
- * Get RGB values from a pixel in the specified format.
- *
- * This function uses the entire 8-bit [0..255] range when converting color
- * components from pixel formats with less than 8-bits per RGB component
- * (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff,
- * 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
- *
- * \param pixel a pixel value
- * \param format an SDL_PixelFormat structure describing the format of the
- *               pixel
- * \param r a pointer filled in with the red component
- * \param g a pointer filled in with the green component
- * \param b a pointer filled in with the blue component
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetRGBA
- * \sa SDL_MapRGB
- * \sa SDL_MapRGBA
- */
-extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel,
-                                        const SDL_PixelFormat * format,
-                                        Uint8 * r, Uint8 * g, Uint8 * b);
-
-/**
- * Get RGBA values from a pixel in the specified format.
- *
- * This function uses the entire 8-bit [0..255] range when converting color
- * components from pixel formats with less than 8-bits per RGB component
- * (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff,
- * 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
- *
- * If the surface has no alpha component, the alpha will be returned as 0xff
- * (100% opaque).
- *
- * \param pixel a pixel value
- * \param format an SDL_PixelFormat structure describing the format of the
- *               pixel
- * \param r a pointer filled in with the red component
- * \param g a pointer filled in with the green component
- * \param b a pointer filled in with the blue component
- * \param a a pointer filled in with the alpha component
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetRGB
- * \sa SDL_MapRGB
- * \sa SDL_MapRGBA
- */
-extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel,
-                                         const SDL_PixelFormat * format,
-                                         Uint8 * r, Uint8 * g, Uint8 * b,
-                                         Uint8 * a);
-
-/**
- * Calculate a 256 entry gamma ramp for a gamma value.
- *
- * \param gamma a gamma value where 0.0 is black and 1.0 is identity
- * \param ramp an array of 256 values filled in with the gamma ramp
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetWindowGammaRamp
- */
-extern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, Uint16 * ramp);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_pixels_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_platform.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_platform.h
deleted file mode 100644 (file)
index 79b8b6f..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_platform.h
- *
- *  Try to get a standard set of platform defines.
- */
-
-#ifndef SDL_platform_h_
-#define SDL_platform_h_
-
-#if defined(_AIX)
-#undef __AIX__
-#define __AIX__     1
-#endif
-#if defined(__HAIKU__)
-#undef __HAIKU__
-#define __HAIKU__   1
-#endif
-#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
-#undef __BSDI__
-#define __BSDI__    1
-#endif
-#if defined(_arch_dreamcast)
-#undef __DREAMCAST__
-#define __DREAMCAST__   1
-#endif
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
-#undef __FREEBSD__
-#define __FREEBSD__ 1
-#endif
-#if defined(hpux) || defined(__hpux) || defined(__hpux__)
-#undef __HPUX__
-#define __HPUX__    1
-#endif
-#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
-#undef __IRIX__
-#define __IRIX__    1
-#endif
-#if (defined(linux) || defined(__linux) || defined(__linux__))
-#undef __LINUX__
-#define __LINUX__   1
-#endif
-#if defined(ANDROID) || defined(__ANDROID__)
-#undef __ANDROID__
-#undef __LINUX__ /* do we need to do this? */
-#define __ANDROID__ 1
-#endif
-
-#if defined(__APPLE__)
-/* lets us know what version of Mac OS X we're compiling on */
-#include "AvailabilityMacros.h"
-#include "TargetConditionals.h"
-
-/* Fix building with older SDKs that don't define these
-   See this for more information:
-   https://stackoverflow.com/questions/12132933/preprocessor-macro-for-os-x-targets
-*/
-#ifndef TARGET_OS_MACCATALYST
-#define TARGET_OS_MACCATALYST 0
-#endif
-#ifndef TARGET_OS_IOS
-#define TARGET_OS_IOS 0
-#endif
-#ifndef TARGET_OS_IPHONE
-#define TARGET_OS_IPHONE 0
-#endif
-#ifndef TARGET_OS_TV
-#define TARGET_OS_TV 0
-#endif
-#ifndef TARGET_OS_SIMULATOR
-#define TARGET_OS_SIMULATOR 0
-#endif
-
-#if TARGET_OS_TV
-#undef __TVOS__
-#define __TVOS__ 1
-#endif
-#if TARGET_OS_IPHONE
-/* if compiling for iOS */
-#undef __IPHONEOS__
-#define __IPHONEOS__ 1
-#undef __MACOSX__
-#else
-/* if not compiling for iOS */
-#undef __MACOSX__
-#define __MACOSX__  1
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
-# error SDL for Mac OS X only supports deploying on 10.6 and above.
-#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
-#endif /* TARGET_OS_IPHONE */
-#endif /* defined(__APPLE__) */
-
-#if defined(__NetBSD__)
-#undef __NETBSD__
-#define __NETBSD__  1
-#endif
-#if defined(__OpenBSD__)
-#undef __OPENBSD__
-#define __OPENBSD__ 1
-#endif
-#if defined(__OS2__) || defined(__EMX__)
-#undef __OS2__
-#define __OS2__     1
-#endif
-#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
-#undef __OSF__
-#define __OSF__     1
-#endif
-#if defined(__QNXNTO__)
-#undef __QNXNTO__
-#define __QNXNTO__  1
-#endif
-#if defined(riscos) || defined(__riscos) || defined(__riscos__)
-#undef __RISCOS__
-#define __RISCOS__  1
-#endif
-#if defined(__sun) && defined(__SVR4)
-#undef __SOLARIS__
-#define __SOLARIS__ 1
-#endif
-
-#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
-/* Try to find out if we're compiling for WinRT or non-WinRT */
-#if defined(_MSC_VER) && defined(__has_include)
-#if __has_include(<winapifamily.h>)
-#define HAVE_WINAPIFAMILY_H 1
-#else
-#define HAVE_WINAPIFAMILY_H 0
-#endif
-
-/* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
-#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_)    /* _MSC_VER == 1700 for Visual Studio 2012 */
-#define HAVE_WINAPIFAMILY_H 1
-#else
-#define HAVE_WINAPIFAMILY_H 0
-#endif
-
-#if HAVE_WINAPIFAMILY_H
-#include <winapifamily.h>
-#define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP))
-#else
-#define WINAPI_FAMILY_WINRT 0
-#endif /* HAVE_WINAPIFAMILY_H */
-
-#if WINAPI_FAMILY_WINRT
-#undef __WINRT__
-#define __WINRT__ 1
-#else
-#undef __WINDOWS__
-#define __WINDOWS__ 1
-#endif
-#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
-
-#if defined(__WINDOWS__)
-#undef __WIN32__
-#define __WIN32__ 1
-#endif
-#if defined(__PSP__)
-#undef __PSP__
-#define __PSP__ 1
-#endif
-
-/* The NACL compiler defines __native_client__ and __pnacl__
- * Ref: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi
- */
-#if defined(__native_client__)
-#undef __LINUX__
-#undef __NACL__
-#define __NACL__ 1
-#endif
-#if defined(__pnacl__)
-#undef __LINUX__
-#undef __PNACL__
-#define __PNACL__ 1
-/* PNACL with newlib supports static linking only */
-#define __SDL_NOGETPROCADDR__
-#endif
-
-#if defined(__vita__)
-#define __VITA__ 1
-#endif
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Get the name of the platform.
- *
- * Here are the names returned for some (but not all) supported platforms:
- *
- * - "Windows"
- * - "Mac OS X"
- * - "Linux"
- * - "iOS"
- * - "Android"
- *
- * \returns the name of the platform. If the correct platform name is not
- *          available, returns a string beginning with the text "Unknown".
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_platform_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_power.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_power.h
deleted file mode 100644 (file)
index ecb3f4b..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_power_h_
-#define SDL_power_h_
-
-/**
- *  \file SDL_power.h
- *
- *  Header for the SDL power management routines.
- */
-
-#include "SDL_stdinc.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  The basic state for the system's power supply.
- */
-typedef enum
-{
-    SDL_POWERSTATE_UNKNOWN,      /**< cannot determine power status */
-    SDL_POWERSTATE_ON_BATTERY,   /**< Not plugged in, running on the battery */
-    SDL_POWERSTATE_NO_BATTERY,   /**< Plugged in, no battery available */
-    SDL_POWERSTATE_CHARGING,     /**< Plugged in, charging battery */
-    SDL_POWERSTATE_CHARGED       /**< Plugged in, battery charged */
-} SDL_PowerState;
-
-
-/**
- * Get the current power supply details.
- *
- * You should never take a battery status as absolute truth. Batteries
- * (especially failing batteries) are delicate hardware, and the values
- * reported here are best estimates based on what that hardware reports. It's
- * not uncommon for older batteries to lose stored power much faster than it
- * reports, or completely drain when reporting it has 20 percent left, etc.
- *
- * Battery status can change at any time; if you are concerned with power
- * state, you should call this function frequently, and perhaps ignore changes
- * until they seem to be stable for a few seconds.
- *
- * It's possible a platform can only report battery percentage or time left
- * but not both.
- *
- * \param secs seconds of battery life left, you can pass a NULL here if you
- *             don't care, will return -1 if we can't determine a value, or
- *             we're not running on a battery
- * \param pct percentage of battery life left, between 0 and 100, you can pass
- *            a NULL here if you don't care, will return -1 if we can't
- *            determine a value, or we're not running on a battery
- * \returns an SDL_PowerState enum representing the current battery state.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_power_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_quit.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_quit.h
deleted file mode 100644 (file)
index 4090f7f..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_quit.h
- *
- *  Include file for SDL quit event handling.
- */
-
-#ifndef SDL_quit_h_
-#define SDL_quit_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-
-/**
- *  \file SDL_quit.h
- *
- *  An ::SDL_QUIT event is generated when the user tries to close the application
- *  window.  If it is ignored or filtered out, the window will remain open.
- *  If it is not ignored or filtered, it is queued normally and the window
- *  is allowed to close.  When the window is closed, screen updates will
- *  complete, but have no effect.
- *
- *  SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
- *  and SIGTERM (system termination request), if handlers do not already
- *  exist, that generate ::SDL_QUIT events as well.  There is no way
- *  to determine the cause of an ::SDL_QUIT event, but setting a signal
- *  handler in your application will override the default generation of
- *  quit events for that signal.
- *
- *  \sa SDL_Quit()
- */
-
-/* There are no functions directly affecting the quit event */
-
-#define SDL_QuitRequested() \
-        (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0))
-
-#endif /* SDL_quit_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_rect.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_rect.h
deleted file mode 100644 (file)
index b678c7a..0000000
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_rect.h
- *
- *  Header file for SDL_rect definition and management functions.
- */
-
-#ifndef SDL_rect_h_
-#define SDL_rect_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-#include "SDL_pixels.h"
-#include "SDL_rwops.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * The structure that defines a point (integer)
- *
- * \sa SDL_EnclosePoints
- * \sa SDL_PointInRect
- */
-typedef struct SDL_Point
-{
-    int x;
-    int y;
-} SDL_Point;
-
-/**
- * The structure that defines a point (floating point)
- *
- * \sa SDL_EncloseFPoints
- * \sa SDL_PointInFRect
- */
-typedef struct SDL_FPoint
-{
-    float x;
-    float y;
-} SDL_FPoint;
-
-
-/**
- * A rectangle, with the origin at the upper left (integer).
- *
- * \sa SDL_RectEmpty
- * \sa SDL_RectEquals
- * \sa SDL_HasIntersection
- * \sa SDL_IntersectRect
- * \sa SDL_IntersectRectAndLine
- * \sa SDL_UnionRect
- * \sa SDL_EnclosePoints
- */
-typedef struct SDL_Rect
-{
-    int x, y;
-    int w, h;
-} SDL_Rect;
-
-
-/**
- * A rectangle, with the origin at the upper left (floating point).
- *
- * \sa SDL_FRectEmpty
- * \sa SDL_FRectEquals
- * \sa SDL_FRectEqualsEpsilon
- * \sa SDL_HasIntersectionF
- * \sa SDL_IntersectFRect
- * \sa SDL_IntersectFRectAndLine
- * \sa SDL_UnionFRect
- * \sa SDL_EncloseFPoints
- * \sa SDL_PointInFRect
- */
-typedef struct SDL_FRect
-{
-    float x;
-    float y;
-    float w;
-    float h;
-} SDL_FRect;
-
-
-/**
- * Returns true if point resides inside a rectangle.
- */
-SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)
-{
-    return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
-             (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
-}
-
-/**
- * Returns true if the rectangle has no area.
- */
-SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
-{
-    return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE;
-}
-
-/**
- * Returns true if the two rectangles are equal.
- */
-SDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b)
-{
-    return (a && b && (a->x == b->x) && (a->y == b->y) &&
-            (a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE;
-}
-
-/**
- * Determine whether two rectangles intersect.
- *
- * If either pointer is NULL the function will return SDL_FALSE.
- *
- * \param A an SDL_Rect structure representing the first rectangle
- * \param B an SDL_Rect structure representing the second rectangle
- * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_IntersectRect
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,
-                                                     const SDL_Rect * B);
-
-/**
- * Calculate the intersection of two rectangles.
- *
- * If `result` is NULL then this function will return SDL_FALSE.
- *
- * \param A an SDL_Rect structure representing the first rectangle
- * \param B an SDL_Rect structure representing the second rectangle
- * \param result an SDL_Rect structure filled in with the intersection of
- *               rectangles `A` and `B`
- * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HasIntersection
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,
-                                                   const SDL_Rect * B,
-                                                   SDL_Rect * result);
-
-/**
- * Calculate the union of two rectangles.
- *
- * \param A an SDL_Rect structure representing the first rectangle
- * \param B an SDL_Rect structure representing the second rectangle
- * \param result an SDL_Rect structure filled in with the union of rectangles
- *               `A` and `B`
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,
-                                           const SDL_Rect * B,
-                                           SDL_Rect * result);
-
-/**
- * Calculate a minimal rectangle enclosing a set of points.
- *
- * If `clip` is not NULL then only points inside of the clipping rectangle are
- * considered.
- *
- * \param points an array of SDL_Point structures representing points to be
- *               enclosed
- * \param count the number of structures in the `points` array
- * \param clip an SDL_Rect used for clipping or NULL to enclose all points
- * \param result an SDL_Rect structure filled in with the minimal enclosing
- *               rectangle
- * \returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the
- *          points were outside of the clipping rectangle.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points,
-                                                   int count,
-                                                   const SDL_Rect * clip,
-                                                   SDL_Rect * result);
-
-/**
- * Calculate the intersection of a rectangle and line segment.
- *
- * This function is used to clip a line segment to a rectangle. A line segment
- * contained entirely within the rectangle or that does not intersect will
- * remain unchanged. A line segment that crosses the rectangle at either or
- * both ends will be clipped to the boundary of the rectangle and the new
- * coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.
- *
- * \param rect an SDL_Rect structure representing the rectangle to intersect
- * \param X1 a pointer to the starting X-coordinate of the line
- * \param Y1 a pointer to the starting Y-coordinate of the line
- * \param X2 a pointer to the ending X-coordinate of the line
- * \param Y2 a pointer to the ending Y-coordinate of the line
- * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
-                                                          rect, int *X1,
-                                                          int *Y1, int *X2,
-                                                          int *Y2);
-
-
-/* SDL_FRect versions... */
-
-/**
- * Returns true if point resides inside a rectangle.
- */
-SDL_FORCE_INLINE SDL_bool SDL_PointInFRect(const SDL_FPoint *p, const SDL_FRect *r)
-{
-    return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
-             (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
-}
-
-/**
- * Returns true if the rectangle has no area.
- */
-SDL_FORCE_INLINE SDL_bool SDL_FRectEmpty(const SDL_FRect *r)
-{
-    return ((!r) || (r->w <= 0.0f) || (r->h <= 0.0f)) ? SDL_TRUE : SDL_FALSE;
-}
-
-/**
- * Returns true if the two rectangles are equal, within some given epsilon.
- *
- * \since This function is available since SDL 2.0.22.
- */
-SDL_FORCE_INLINE SDL_bool SDL_FRectEqualsEpsilon(const SDL_FRect *a, const SDL_FRect *b, const float epsilon)
-{
-    return (a && b && ((a == b) ||
-            ((SDL_fabs(a->x - b->x) <= epsilon) &&
-            (SDL_fabs(a->y - b->y) <= epsilon) &&
-            (SDL_fabs(a->w - b->w) <= epsilon) &&
-            (SDL_fabs(a->h - b->h) <= epsilon))))
-            ? SDL_TRUE : SDL_FALSE;
-}
-
-/**
- * Returns true if the two rectangles are equal, using a default epsilon.
- *
- * \since This function is available since SDL 2.0.22.
- */
-SDL_FORCE_INLINE SDL_bool SDL_FRectEquals(const SDL_FRect *a, const SDL_FRect *b)
-{
-    return SDL_FRectEqualsEpsilon(a, b, SDL_FLT_EPSILON);
-}
-
-/**
- * Determine whether two rectangles intersect with float precision.
- *
- * If either pointer is NULL the function will return SDL_FALSE.
- *
- * \param A an SDL_FRect structure representing the first rectangle
- * \param B an SDL_FRect structure representing the second rectangle
- * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.22.
- *
- * \sa SDL_IntersectRect
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersectionF(const SDL_FRect * A,
-                                                      const SDL_FRect * B);
-
-/**
- * Calculate the intersection of two rectangles with float precision.
- *
- * If `result` is NULL then this function will return SDL_FALSE.
- *
- * \param A an SDL_FRect structure representing the first rectangle
- * \param B an SDL_FRect structure representing the second rectangle
- * \param result an SDL_FRect structure filled in with the intersection of
- *               rectangles `A` and `B`
- * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.22.
- *
- * \sa SDL_HasIntersectionF
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRect(const SDL_FRect * A,
-                                                    const SDL_FRect * B,
-                                                    SDL_FRect * result);
-
-/**
- * Calculate the union of two rectangles with float precision.
- *
- * \param A an SDL_FRect structure representing the first rectangle
- * \param B an SDL_FRect structure representing the second rectangle
- * \param result an SDL_FRect structure filled in with the union of rectangles
- *               `A` and `B`
- *
- * \since This function is available since SDL 2.0.22.
- */
-extern DECLSPEC void SDLCALL SDL_UnionFRect(const SDL_FRect * A,
-                                            const SDL_FRect * B,
-                                            SDL_FRect * result);
-
-/**
- * Calculate a minimal rectangle enclosing a set of points with float
- * precision.
- *
- * If `clip` is not NULL then only points inside of the clipping rectangle are
- * considered.
- *
- * \param points an array of SDL_FPoint structures representing points to be
- *               enclosed
- * \param count the number of structures in the `points` array
- * \param clip an SDL_FRect used for clipping or NULL to enclose all points
- * \param result an SDL_FRect structure filled in with the minimal enclosing
- *               rectangle
- * \returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the
- *          points were outside of the clipping rectangle.
- *
- * \since This function is available since SDL 2.0.22.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_EncloseFPoints(const SDL_FPoint * points,
-                                                    int count,
-                                                    const SDL_FRect * clip,
-                                                    SDL_FRect * result);
-
-/**
- * Calculate the intersection of a rectangle and line segment with float
- * precision.
- *
- * This function is used to clip a line segment to a rectangle. A line segment
- * contained entirely within the rectangle or that does not intersect will
- * remain unchanged. A line segment that crosses the rectangle at either or
- * both ends will be clipped to the boundary of the rectangle and the new
- * coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.
- *
- * \param rect an SDL_FRect structure representing the rectangle to intersect
- * \param X1 a pointer to the starting X-coordinate of the line
- * \param Y1 a pointer to the starting Y-coordinate of the line
- * \param X2 a pointer to the ending X-coordinate of the line
- * \param Y2 a pointer to the ending Y-coordinate of the line
- * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.22.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRectAndLine(const SDL_FRect *
-                                                           rect, float *X1,
-                                                           float *Y1, float *X2,
-                                                           float *Y2);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_rect_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_render.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_render.h
deleted file mode 100644 (file)
index d859e3f..0000000
+++ /dev/null
@@ -1,1908 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_render.h
- *
- *  Header file for SDL 2D rendering functions.
- *
- *  This API supports the following features:
- *      * single pixel points
- *      * single pixel lines
- *      * filled rectangles
- *      * texture images
- *
- *  The primitives may be drawn in opaque, blended, or additive modes.
- *
- *  The texture images may be drawn in opaque, blended, or additive modes.
- *  They can have an additional color tint or alpha modulation applied to
- *  them, and may also be stretched with linear interpolation.
- *
- *  This API is designed to accelerate simple 2D operations. You may
- *  want more functionality such as polygons and particle effects and
- *  in that case you should use SDL's OpenGL/Direct3D support or one
- *  of the many good 3D engines.
- *
- *  These functions must be called from the main thread.
- *  See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995
- */
-
-#ifndef SDL_render_h_
-#define SDL_render_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_rect.h"
-#include "SDL_video.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Flags used when creating a rendering context
- */
-typedef enum
-{
-    SDL_RENDERER_SOFTWARE = 0x00000001,         /**< The renderer is a software fallback */
-    SDL_RENDERER_ACCELERATED = 0x00000002,      /**< The renderer uses hardware
-                                                     acceleration */
-    SDL_RENDERER_PRESENTVSYNC = 0x00000004,     /**< Present is synchronized
-                                                     with the refresh rate */
-    SDL_RENDERER_TARGETTEXTURE = 0x00000008     /**< The renderer supports
-                                                     rendering to texture */
-} SDL_RendererFlags;
-
-/**
- * Information on the capabilities of a render driver or context.
- */
-typedef struct SDL_RendererInfo
-{
-    const char *name;           /**< The name of the renderer */
-    Uint32 flags;               /**< Supported ::SDL_RendererFlags */
-    Uint32 num_texture_formats; /**< The number of available texture formats */
-    Uint32 texture_formats[16]; /**< The available texture formats */
-    int max_texture_width;      /**< The maximum texture width */
-    int max_texture_height;     /**< The maximum texture height */
-} SDL_RendererInfo;
-
-/**
- *  Vertex structure
- */
-typedef struct SDL_Vertex
-{
-    SDL_FPoint position;        /**< Vertex position, in SDL_Renderer coordinates  */
-    SDL_Color  color;           /**< Vertex color */
-    SDL_FPoint tex_coord;       /**< Normalized texture coordinates, if needed */
-} SDL_Vertex;
-
-/**
- * The scaling mode for a texture.
- */
-typedef enum
-{
-    SDL_ScaleModeNearest, /**< nearest pixel sampling */
-    SDL_ScaleModeLinear,  /**< linear filtering */
-    SDL_ScaleModeBest     /**< anisotropic filtering */
-} SDL_ScaleMode;
-
-/**
- * The access pattern allowed for a texture.
- */
-typedef enum
-{
-    SDL_TEXTUREACCESS_STATIC,    /**< Changes rarely, not lockable */
-    SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */
-    SDL_TEXTUREACCESS_TARGET     /**< Texture can be used as a render target */
-} SDL_TextureAccess;
-
-/**
- * The texture channel modulation used in SDL_RenderCopy().
- */
-typedef enum
-{
-    SDL_TEXTUREMODULATE_NONE = 0x00000000,     /**< No modulation */
-    SDL_TEXTUREMODULATE_COLOR = 0x00000001,    /**< srcC = srcC * color */
-    SDL_TEXTUREMODULATE_ALPHA = 0x00000002     /**< srcA = srcA * alpha */
-} SDL_TextureModulate;
-
-/**
- * Flip constants for SDL_RenderCopyEx
- */
-typedef enum
-{
-    SDL_FLIP_NONE = 0x00000000,     /**< Do not flip */
-    SDL_FLIP_HORIZONTAL = 0x00000001,    /**< flip horizontally */
-    SDL_FLIP_VERTICAL = 0x00000002     /**< flip vertically */
-} SDL_RendererFlip;
-
-/**
- * A structure representing rendering state
- */
-struct SDL_Renderer;
-typedef struct SDL_Renderer SDL_Renderer;
-
-/**
- * An efficient driver-specific representation of pixel data
- */
-struct SDL_Texture;
-typedef struct SDL_Texture SDL_Texture;
-
-/* Function prototypes */
-
-/**
- * Get the number of 2D rendering drivers available for the current display.
- *
- * A render driver is a set of code that handles rendering and texture
- * management on a particular display. Normally there is only one, but some
- * drivers may have several available with different capabilities.
- *
- * There may be none if SDL was compiled without render support.
- *
- * \returns a number >= 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateRenderer
- * \sa SDL_GetRenderDriverInfo
- */
-extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);
-
-/**
- * Get info about a specific 2D rendering driver for the current display.
- *
- * \param index the index of the driver to query information about
- * \param info an SDL_RendererInfo structure to be filled with information on
- *             the rendering driver
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateRenderer
- * \sa SDL_GetNumRenderDrivers
- */
-extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,
-                                                    SDL_RendererInfo * info);
-
-/**
- * Create a window and default renderer.
- *
- * \param width the width of the window
- * \param height the height of the window
- * \param window_flags the flags used to create the window (see
- *                     SDL_CreateWindow())
- * \param window a pointer filled with the window, or NULL on error
- * \param renderer a pointer filled with the renderer, or NULL on error
- * \returns 0 on success, or -1 on error; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateRenderer
- * \sa SDL_CreateWindow
- */
-extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer(
-                                int width, int height, Uint32 window_flags,
-                                SDL_Window **window, SDL_Renderer **renderer);
-
-
-/**
- * Create a 2D rendering context for a window.
- *
- * \param window the window where rendering is displayed
- * \param index the index of the rendering driver to initialize, or -1 to
- *              initialize the first one supporting the requested flags
- * \param flags 0, or one or more SDL_RendererFlags OR'd together
- * \returns a valid rendering context or NULL if there was an error; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateSoftwareRenderer
- * \sa SDL_DestroyRenderer
- * \sa SDL_GetNumRenderDrivers
- * \sa SDL_GetRendererInfo
- */
-extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window,
-                                               int index, Uint32 flags);
-
-/**
- * Create a 2D software rendering context for a surface.
- *
- * Two other API which can be used to create SDL_Renderer:
- * SDL_CreateRenderer() and SDL_CreateWindowAndRenderer(). These can _also_
- * create a software renderer, but they are intended to be used with an
- * SDL_Window as the final destination and not an SDL_Surface.
- *
- * \param surface the SDL_Surface structure representing the surface where
- *                rendering is done
- * \returns a valid rendering context or NULL if there was an error; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateRenderer
- * \sa SDL_CreateWindowRenderer
- * \sa SDL_DestroyRenderer
- */
-extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface);
-
-/**
- * Get the renderer associated with a window.
- *
- * \param window the window to query
- * \returns the rendering context on success or NULL on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateRenderer
- */
-extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);
-
-/**
- * Get the window associated with a renderer.
- *
- * \param renderer the renderer to query
- * \returns the window on success or NULL on failure; call SDL_GetError() for
- *          more information.
- *
- * \since This function is available since SDL 2.0.22.
- */
-extern DECLSPEC SDL_Window * SDLCALL SDL_RenderGetWindow(SDL_Renderer *renderer);
-
-/**
- * Get information about a rendering context.
- *
- * \param renderer the rendering context
- * \param info an SDL_RendererInfo structure filled with information about the
- *             current renderer
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateRenderer
- */
-extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,
-                                                SDL_RendererInfo * info);
-
-/**
- * Get the output size in pixels of a rendering context.
- *
- * Due to high-dpi displays, you might end up with a rendering context that
- * has more pixels than the window that contains it, so use this instead of
- * SDL_GetWindowSize() to decide how much drawing area you have.
- *
- * \param renderer the rendering context
- * \param w an int filled with the width
- * \param h an int filled with the height
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetRenderer
- */
-extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
-                                                      int *w, int *h);
-
-/**
- * Create a texture for a rendering context.
- *
- * You can set the texture scaling method by setting
- * `SDL_HINT_RENDER_SCALE_QUALITY` before creating the texture.
- *
- * \param renderer the rendering context
- * \param format one of the enumerated values in SDL_PixelFormatEnum
- * \param access one of the enumerated values in SDL_TextureAccess
- * \param w the width of the texture in pixels
- * \param h the height of the texture in pixels
- * \returns a pointer to the created texture or NULL if no rendering context
- *          was active, the format was unsupported, or the width or height
- *          were out of range; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateTextureFromSurface
- * \sa SDL_DestroyTexture
- * \sa SDL_QueryTexture
- * \sa SDL_UpdateTexture
- */
-extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer,
-                                                        Uint32 format,
-                                                        int access, int w,
-                                                        int h);
-
-/**
- * Create a texture from an existing surface.
- *
- * The surface is not modified or freed by this function.
- *
- * The SDL_TextureAccess hint for the created texture is
- * `SDL_TEXTUREACCESS_STATIC`.
- *
- * The pixel format of the created texture may be different from the pixel
- * format of the surface. Use SDL_QueryTexture() to query the pixel format of
- * the texture.
- *
- * \param renderer the rendering context
- * \param surface the SDL_Surface structure containing pixel data used to fill
- *                the texture
- * \returns the created texture or NULL on failure; call SDL_GetError() for
- *          more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateTexture
- * \sa SDL_DestroyTexture
- * \sa SDL_QueryTexture
- */
-extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface);
-
-/**
- * Query the attributes of a texture.
- *
- * \param texture the texture to query
- * \param format a pointer filled in with the raw format of the texture; the
- *               actual format may differ, but pixel transfers will use this
- *               format (one of the SDL_PixelFormatEnum values). This argument
- *               can be NULL if you don't need this information.
- * \param access a pointer filled in with the actual access to the texture
- *               (one of the SDL_TextureAccess values). This argument can be
- *               NULL if you don't need this information.
- * \param w a pointer filled in with the width of the texture in pixels. This
- *          argument can be NULL if you don't need this information.
- * \param h a pointer filled in with the height of the texture in pixels. This
- *          argument can be NULL if you don't need this information.
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateTexture
- */
-extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture,
-                                             Uint32 * format, int *access,
-                                             int *w, int *h);
-
-/**
- * Set an additional color value multiplied into render copy operations.
- *
- * When this texture is rendered, during the copy operation each source color
- * channel is modulated by the appropriate color value according to the
- * following formula:
- *
- * `srcC = srcC * (color / 255)`
- *
- * Color modulation is not always supported by the renderer; it will return -1
- * if color modulation is not supported.
- *
- * \param texture the texture to update
- * \param r the red color value multiplied into copy operations
- * \param g the green color value multiplied into copy operations
- * \param b the blue color value multiplied into copy operations
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetTextureColorMod
- * \sa SDL_SetTextureAlphaMod
- */
-extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture,
-                                                   Uint8 r, Uint8 g, Uint8 b);
-
-
-/**
- * Get the additional color value multiplied into render copy operations.
- *
- * \param texture the texture to query
- * \param r a pointer filled in with the current red color value
- * \param g a pointer filled in with the current green color value
- * \param b a pointer filled in with the current blue color value
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetTextureAlphaMod
- * \sa SDL_SetTextureColorMod
- */
-extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture,
-                                                   Uint8 * r, Uint8 * g,
-                                                   Uint8 * b);
-
-/**
- * Set an additional alpha value multiplied into render copy operations.
- *
- * When this texture is rendered, during the copy operation the source alpha
- * value is modulated by this alpha value according to the following formula:
- *
- * `srcA = srcA * (alpha / 255)`
- *
- * Alpha modulation is not always supported by the renderer; it will return -1
- * if alpha modulation is not supported.
- *
- * \param texture the texture to update
- * \param alpha the source alpha value multiplied into copy operations
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetTextureAlphaMod
- * \sa SDL_SetTextureColorMod
- */
-extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture,
-                                                   Uint8 alpha);
-
-/**
- * Get the additional alpha value multiplied into render copy operations.
- *
- * \param texture the texture to query
- * \param alpha a pointer filled in with the current alpha value
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetTextureColorMod
- * \sa SDL_SetTextureAlphaMod
- */
-extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,
-                                                   Uint8 * alpha);
-
-/**
- * Set the blend mode for a texture, used by SDL_RenderCopy().
- *
- * If the blend mode is not supported, the closest supported mode is chosen
- * and this function returns -1.
- *
- * \param texture the texture to update
- * \param blendMode the SDL_BlendMode to use for texture blending
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetTextureBlendMode
- * \sa SDL_RenderCopy
- */
-extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
-                                                    SDL_BlendMode blendMode);
-
-/**
- * Get the blend mode used for texture copy operations.
- *
- * \param texture the texture to query
- * \param blendMode a pointer filled in with the current SDL_BlendMode
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetTextureBlendMode
- */
-extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
-                                                    SDL_BlendMode *blendMode);
-
-/**
- * Set the scale mode used for texture scale operations.
- *
- * If the scale mode is not supported, the closest supported mode is chosen.
- *
- * \param texture The texture to update.
- * \param scaleMode the SDL_ScaleMode to use for texture scaling.
- * \returns 0 on success, or -1 if the texture is not valid.
- *
- * \since This function is available since SDL 2.0.12.
- *
- * \sa SDL_GetTextureScaleMode
- */
-extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture,
-                                                    SDL_ScaleMode scaleMode);
-
-/**
- * Get the scale mode used for texture scale operations.
- *
- * \param texture the texture to query.
- * \param scaleMode a pointer filled in with the current scale mode.
- * \return 0 on success, or -1 if the texture is not valid.
- *
- * \since This function is available since SDL 2.0.12.
- *
- * \sa SDL_SetTextureScaleMode
- */
-extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture,
-                                                    SDL_ScaleMode *scaleMode);
-
-/**
- * Associate a user-specified pointer with a texture.
- *
- * \param texture the texture to update.
- * \param userdata the pointer to associate with the texture.
- * \returns 0 on success, or -1 if the texture is not valid.
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_GetTextureUserData
- */
-extern DECLSPEC int SDLCALL SDL_SetTextureUserData(SDL_Texture * texture,
-                                                   void *userdata);
-
-/**
- * Get the user-specified pointer associated with a texture
- *
- * \param texture the texture to query.
- * \return the pointer associated with the texture, or NULL if the texture is
- *         not valid.
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_SetTextureUserData
- */
-extern DECLSPEC void * SDLCALL SDL_GetTextureUserData(SDL_Texture * texture);
-
-/**
- * Update the given texture rectangle with new pixel data.
- *
- * The pixel data must be in the pixel format of the texture. Use
- * SDL_QueryTexture() to query the pixel format of the texture.
- *
- * This is a fairly slow function, intended for use with static textures that
- * do not change often.
- *
- * If the texture is intended to be updated often, it is preferred to create
- * the texture as streaming and use the locking functions referenced below.
- * While this function will work with streaming textures, for optimization
- * reasons you may not get the pixels back if you lock the texture afterward.
- *
- * \param texture the texture to update
- * \param rect an SDL_Rect structure representing the area to update, or NULL
- *             to update the entire texture
- * \param pixels the raw pixel data in the format of the texture
- * \param pitch the number of bytes in a row of pixel data, including padding
- *              between lines
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateTexture
- * \sa SDL_LockTexture
- * \sa SDL_UnlockTexture
- */
-extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture,
-                                              const SDL_Rect * rect,
-                                              const void *pixels, int pitch);
-
-/**
- * Update a rectangle within a planar YV12 or IYUV texture with new pixel
- * data.
- *
- * You can use SDL_UpdateTexture() as long as your pixel data is a contiguous
- * block of Y and U/V planes in the proper order, but this function is
- * available if your pixel data is not contiguous.
- *
- * \param texture the texture to update
- * \param rect a pointer to the rectangle of pixels to update, or NULL to
- *             update the entire texture
- * \param Yplane the raw pixel data for the Y plane
- * \param Ypitch the number of bytes between rows of pixel data for the Y
- *               plane
- * \param Uplane the raw pixel data for the U plane
- * \param Upitch the number of bytes between rows of pixel data for the U
- *               plane
- * \param Vplane the raw pixel data for the V plane
- * \param Vpitch the number of bytes between rows of pixel data for the V
- *               plane
- * \returns 0 on success or -1 if the texture is not valid; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.1.
- *
- * \sa SDL_UpdateTexture
- */
-extern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture,
-                                                 const SDL_Rect * rect,
-                                                 const Uint8 *Yplane, int Ypitch,
-                                                 const Uint8 *Uplane, int Upitch,
-                                                 const Uint8 *Vplane, int Vpitch);
-
-/**
- * Update a rectangle within a planar NV12 or NV21 texture with new pixels.
- *
- * You can use SDL_UpdateTexture() as long as your pixel data is a contiguous
- * block of NV12/21 planes in the proper order, but this function is available
- * if your pixel data is not contiguous.
- *
- * \param texture the texture to update
- * \param rect a pointer to the rectangle of pixels to update, or NULL to
- *             update the entire texture.
- * \param Yplane the raw pixel data for the Y plane.
- * \param Ypitch the number of bytes between rows of pixel data for the Y
- *               plane.
- * \param UVplane the raw pixel data for the UV plane.
- * \param UVpitch the number of bytes between rows of pixel data for the UV
- *                plane.
- * \return 0 on success, or -1 if the texture is not valid.
- *
- * \since This function is available since SDL 2.0.16.
- */
-extern DECLSPEC int SDLCALL SDL_UpdateNVTexture(SDL_Texture * texture,
-                                                 const SDL_Rect * rect,
-                                                 const Uint8 *Yplane, int Ypitch,
-                                                 const Uint8 *UVplane, int UVpitch);
-
-/**
- * Lock a portion of the texture for **write-only** pixel access.
- *
- * As an optimization, the pixels made available for editing don't necessarily
- * contain the old texture data. This is a write-only operation, and if you
- * need to keep a copy of the texture data you should do that at the
- * application level.
- *
- * You must use SDL_UnlockTexture() to unlock the pixels and apply any
- * changes.
- *
- * \param texture the texture to lock for access, which was created with
- *                `SDL_TEXTUREACCESS_STREAMING`
- * \param rect an SDL_Rect structure representing the area to lock for access;
- *             NULL to lock the entire texture
- * \param pixels this is filled in with a pointer to the locked pixels,
- *               appropriately offset by the locked area
- * \param pitch this is filled in with the pitch of the locked pixels; the
- *              pitch is the length of one row in bytes
- * \returns 0 on success or a negative error code if the texture is not valid
- *          or was not created with `SDL_TEXTUREACCESS_STREAMING`; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_UnlockTexture
- */
-extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,
-                                            const SDL_Rect * rect,
-                                            void **pixels, int *pitch);
-
-/**
- * Lock a portion of the texture for **write-only** pixel access, and expose
- * it as a SDL surface.
- *
- * Besides providing an SDL_Surface instead of raw pixel data, this function
- * operates like SDL_LockTexture.
- *
- * As an optimization, the pixels made available for editing don't necessarily
- * contain the old texture data. This is a write-only operation, and if you
- * need to keep a copy of the texture data you should do that at the
- * application level.
- *
- * You must use SDL_UnlockTexture() to unlock the pixels and apply any
- * changes.
- *
- * The returned surface is freed internally after calling SDL_UnlockTexture()
- * or SDL_DestroyTexture(). The caller should not free it.
- *
- * \param texture the texture to lock for access, which was created with
- *                `SDL_TEXTUREACCESS_STREAMING`
- * \param rect a pointer to the rectangle to lock for access. If the rect is
- *             NULL, the entire texture will be locked
- * \param surface this is filled in with an SDL surface representing the
- *                locked area
- * \returns 0 on success, or -1 if the texture is not valid or was not created
- *          with `SDL_TEXTUREACCESS_STREAMING`
- *
- * \since This function is available since SDL 2.0.12.
- *
- * \sa SDL_LockTexture
- * \sa SDL_UnlockTexture
- */
-extern DECLSPEC int SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture,
-                                            const SDL_Rect *rect,
-                                            SDL_Surface **surface);
-
-/**
- * Unlock a texture, uploading the changes to video memory, if needed.
- *
- * **Warning**: Please note that SDL_LockTexture() is intended to be
- * write-only; it will not guarantee the previous contents of the texture will
- * be provided. You must fully initialize any area of a texture that you lock
- * before unlocking it, as the pixels might otherwise be uninitialized memory.
- *
- * Which is to say: locking and immediately unlocking a texture can result in
- * corrupted textures, depending on the renderer in use.
- *
- * \param texture a texture locked by SDL_LockTexture()
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LockTexture
- */
-extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
-
-/**
- * Determine whether a renderer supports the use of render targets.
- *
- * \param renderer the renderer that will be checked
- * \returns SDL_TRUE if supported or SDL_FALSE if not.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetRenderTarget
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);
-
-/**
- * Set a texture as the current rendering target.
- *
- * Before using this function, you should check the
- * `SDL_RENDERER_TARGETTEXTURE` bit in the flags of SDL_RendererInfo to see if
- * render targets are supported.
- *
- * The default render target is the window for which the renderer was created.
- * To stop rendering to a texture and render to the window again, call this
- * function with a NULL `texture`.
- *
- * \param renderer the rendering context
- * \param texture the targeted texture, which must be created with the
- *                `SDL_TEXTUREACCESS_TARGET` flag, or NULL to render to the
- *                window instead of a texture.
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetRenderTarget
- */
-extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer,
-                                                SDL_Texture *texture);
-
-/**
- * Get the current render target.
- *
- * The default render target is the window for which the renderer was created,
- * and is reported a NULL here.
- *
- * \param renderer the rendering context
- * \returns the current render target or NULL for the default render target.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetRenderTarget
- */
-extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer);
-
-/**
- * Set a device independent resolution for rendering.
- *
- * This function uses the viewport and scaling functionality to allow a fixed
- * logical resolution for rendering, regardless of the actual output
- * resolution. If the actual output resolution doesn't have the same aspect
- * ratio the output rendering will be centered within the output display.
- *
- * If the output display is a window, mouse and touch events in the window
- * will be filtered and scaled so they seem to arrive within the logical
- * resolution. The SDL_HINT_MOUSE_RELATIVE_SCALING hint controls whether
- * relative motion events are also scaled.
- *
- * If this function results in scaling or subpixel drawing by the rendering
- * backend, it will be handled using the appropriate quality hints.
- *
- * \param renderer the renderer for which resolution should be set
- * \param w the width of the logical resolution
- * \param h the height of the logical resolution
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderGetLogicalSize
- */
-extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h);
-
-/**
- * Get device independent resolution for rendering.
- *
- * This may return 0 for `w` and `h` if the SDL_Renderer has never had its
- * logical size set by SDL_RenderSetLogicalSize() and never had a render
- * target set.
- *
- * \param renderer a rendering context
- * \param w an int to be filled with the width
- * \param h an int to be filled with the height
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderSetLogicalSize
- */
-extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
-
-/**
- * Set whether to force integer scales for resolution-independent rendering.
- *
- * This function restricts the logical viewport to integer values - that is,
- * when a resolution is between two multiples of a logical size, the viewport
- * size is rounded down to the lower multiple.
- *
- * \param renderer the renderer for which integer scaling should be set
- * \param enable enable or disable the integer scaling for rendering
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.5.
- *
- * \sa SDL_RenderGetIntegerScale
- * \sa SDL_RenderSetLogicalSize
- */
-extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
-                                                      SDL_bool enable);
-
-/**
- * Get whether integer scales are forced for resolution-independent rendering.
- *
- * \param renderer the renderer from which integer scaling should be queried
- * \returns SDL_TRUE if integer scales are forced or SDL_FALSE if not and on
- *          failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.5.
- *
- * \sa SDL_RenderSetIntegerScale
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);
-
-/**
- * Set the drawing area for rendering on the current target.
- *
- * When the window is resized, the viewport is reset to fill the entire new
- * window size.
- *
- * \param renderer the rendering context
- * \param rect the SDL_Rect structure representing the drawing area, or NULL
- *             to set the viewport to the entire target
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderGetViewport
- */
-extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer,
-                                                  const SDL_Rect * rect);
-
-/**
- * Get the drawing area for the current target.
- *
- * \param renderer the rendering context
- * \param rect an SDL_Rect structure filled in with the current drawing area
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderSetViewport
- */
-extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
-                                                   SDL_Rect * rect);
-
-/**
- * Set the clip rectangle for rendering on the specified target.
- *
- * \param renderer the rendering context for which clip rectangle should be
- *                 set
- * \param rect an SDL_Rect structure representing the clip area, relative to
- *             the viewport, or NULL to disable clipping
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderGetClipRect
- * \sa SDL_RenderIsClipEnabled
- */
-extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,
-                                                  const SDL_Rect * rect);
-
-/**
- * Get the clip rectangle for the current target.
- *
- * \param renderer the rendering context from which clip rectangle should be
- *                 queried
- * \param rect an SDL_Rect structure filled in with the current clipping area
- *             or an empty rectangle if clipping is disabled
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderIsClipEnabled
- * \sa SDL_RenderSetClipRect
- */
-extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,
-                                                   SDL_Rect * rect);
-
-/**
- * Get whether clipping is enabled on the given renderer.
- *
- * \param renderer the renderer from which clip state should be queried
- * \returns SDL_TRUE if clipping is enabled or SDL_FALSE if not; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.4.
- *
- * \sa SDL_RenderGetClipRect
- * \sa SDL_RenderSetClipRect
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_RenderIsClipEnabled(SDL_Renderer * renderer);
-
-
-/**
- * Set the drawing scale for rendering on the current target.
- *
- * The drawing coordinates are scaled by the x/y scaling factors before they
- * are used by the renderer. This allows resolution independent drawing with a
- * single coordinate system.
- *
- * If this results in scaling or subpixel drawing by the rendering backend, it
- * will be handled using the appropriate quality hints. For best results use
- * integer scaling factors.
- *
- * \param renderer a rendering context
- * \param scaleX the horizontal scaling factor
- * \param scaleY the vertical scaling factor
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderGetScale
- * \sa SDL_RenderSetLogicalSize
- */
-extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer,
-                                               float scaleX, float scaleY);
-
-/**
- * Get the drawing scale for the current target.
- *
- * \param renderer the renderer from which drawing scale should be queried
- * \param scaleX a pointer filled in with the horizontal scaling factor
- * \param scaleY a pointer filled in with the vertical scaling factor
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderSetScale
- */
-extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,
-                                               float *scaleX, float *scaleY);
-
-/**
- * Get logical coordinates of point in renderer when given real coordinates of
- * point in window.
- *
- * Logical coordinates will differ from real coordinates when render is scaled
- * and logical renderer size set
- *
- * \param renderer the renderer from which the logical coordinates should be
- *                 calcualted
- * \param windowX the real X coordinate in the window
- * \param windowY the real Y coordinate in the window
- * \param logicalX the pointer filled with the logical x coordinate
- * \param logicalY the pointer filled with the logical y coordinate
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_RenderGetScale
- * \sa SDL_RenderSetScale
- * \sa SDL_RenderGetLogicalSize
- * \sa SDL_RenderSetLogicalSize
- */
-extern DECLSPEC void SDLCALL SDL_RenderWindowToLogical(SDL_Renderer * renderer, 
-                                                            int windowX, int windowY, 
-                                                            float *logicalX, float *logicalY);
-                                                  
-                                                  /**
- * Get real coordinates of point in window when given logical coordinates of point in renderer.
- * Logical coordinates will differ from real coordinates when render is scaled and logical renderer size set
- * 
- * \param renderer the renderer from which the window coordinates should be calculated
- * \param logicalX the logical x coordinate
- * \param logicalY the logical y coordinate
- * \param windowX the pointer filled with the real X coordinate in the window
- * \param windowY the pointer filled with the real Y coordinate in the window
- *  
- * \since This function is available since SDL 2.0.18.
- * 
- * \sa SDL_RenderGetScale
- * \sa SDL_RenderSetScale
- * \sa SDL_RenderGetLogicalSize
- * \sa SDL_RenderSetLogicalSize
- */
-extern DECLSPEC void SDLCALL SDL_RenderLogicalToWindow(SDL_Renderer * renderer, 
-                                                            float logicalX, float logicalY,
-                                                            int *windowX, int *windowY);
-
-/**
- * Set the color used for drawing operations (Rect, Line and Clear).
- *
- * Set the color for drawing or filling rectangles, lines, and points, and for
- * SDL_RenderClear().
- *
- * \param renderer the rendering context
- * \param r the red value used to draw on the rendering target
- * \param g the green value used to draw on the rendering target
- * \param b the blue value used to draw on the rendering target
- * \param a the alpha value used to draw on the rendering target; usually
- *          `SDL_ALPHA_OPAQUE` (255). Use SDL_SetRenderDrawBlendMode to
- *          specify how the alpha channel is used
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetRenderDrawColor
- * \sa SDL_RenderClear
- * \sa SDL_RenderDrawLine
- * \sa SDL_RenderDrawLines
- * \sa SDL_RenderDrawPoint
- * \sa SDL_RenderDrawPoints
- * \sa SDL_RenderDrawRect
- * \sa SDL_RenderDrawRects
- * \sa SDL_RenderFillRect
- * \sa SDL_RenderFillRects
- */
-extern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer,
-                                           Uint8 r, Uint8 g, Uint8 b,
-                                           Uint8 a);
-
-/**
- * Get the color used for drawing operations (Rect, Line and Clear).
- *
- * \param renderer the rendering context
- * \param r a pointer filled in with the red value used to draw on the
- *          rendering target
- * \param g a pointer filled in with the green value used to draw on the
- *          rendering target
- * \param b a pointer filled in with the blue value used to draw on the
- *          rendering target
- * \param a a pointer filled in with the alpha value used to draw on the
- *          rendering target; usually `SDL_ALPHA_OPAQUE` (255)
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetRenderDrawColor
- */
-extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer,
-                                           Uint8 * r, Uint8 * g, Uint8 * b,
-                                           Uint8 * a);
-
-/**
- * Set the blend mode used for drawing operations (Fill and Line).
- *
- * If the blend mode is not supported, the closest supported mode is chosen.
- *
- * \param renderer the rendering context
- * \param blendMode the SDL_BlendMode to use for blending
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetRenderDrawBlendMode
- * \sa SDL_RenderDrawLine
- * \sa SDL_RenderDrawLines
- * \sa SDL_RenderDrawPoint
- * \sa SDL_RenderDrawPoints
- * \sa SDL_RenderDrawRect
- * \sa SDL_RenderDrawRects
- * \sa SDL_RenderFillRect
- * \sa SDL_RenderFillRects
- */
-extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer,
-                                                       SDL_BlendMode blendMode);
-
-/**
- * Get the blend mode used for drawing operations.
- *
- * \param renderer the rendering context
- * \param blendMode a pointer filled in with the current SDL_BlendMode
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetRenderDrawBlendMode
- */
-extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
-                                                       SDL_BlendMode *blendMode);
-
-/**
- * Clear the current rendering target with the drawing color.
- *
- * This function clears the entire rendering target, ignoring the viewport and
- * the clip rectangle.
- *
- * \param renderer the rendering context
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetRenderDrawColor
- */
-extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);
-
-/**
- * Draw a point on the current rendering target.
- *
- * SDL_RenderDrawPoint() draws a single point. If you want to draw multiple,
- * use SDL_RenderDrawPoints() instead.
- *
- * \param renderer the rendering context
- * \param x the x coordinate of the point
- * \param y the y coordinate of the point
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderDrawLine
- * \sa SDL_RenderDrawLines
- * \sa SDL_RenderDrawPoints
- * \sa SDL_RenderDrawRect
- * \sa SDL_RenderDrawRects
- * \sa SDL_RenderFillRect
- * \sa SDL_RenderFillRects
- * \sa SDL_RenderPresent
- * \sa SDL_SetRenderDrawBlendMode
- * \sa SDL_SetRenderDrawColor
- */
-extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer,
-                                                int x, int y);
-
-/**
- * Draw multiple points on the current rendering target.
- *
- * \param renderer the rendering context
- * \param points an array of SDL_Point structures that represent the points to
- *               draw
- * \param count the number of points to draw
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderDrawLine
- * \sa SDL_RenderDrawLines
- * \sa SDL_RenderDrawPoint
- * \sa SDL_RenderDrawRect
- * \sa SDL_RenderDrawRects
- * \sa SDL_RenderFillRect
- * \sa SDL_RenderFillRects
- * \sa SDL_RenderPresent
- * \sa SDL_SetRenderDrawBlendMode
- * \sa SDL_SetRenderDrawColor
- */
-extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer,
-                                                 const SDL_Point * points,
-                                                 int count);
-
-/**
- * Draw a line on the current rendering target.
- *
- * SDL_RenderDrawLine() draws the line to include both end points. If you want
- * to draw multiple, connecting lines use SDL_RenderDrawLines() instead.
- *
- * \param renderer the rendering context
- * \param x1 the x coordinate of the start point
- * \param y1 the y coordinate of the start point
- * \param x2 the x coordinate of the end point
- * \param y2 the y coordinate of the end point
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderDrawLines
- * \sa SDL_RenderDrawPoint
- * \sa SDL_RenderDrawPoints
- * \sa SDL_RenderDrawRect
- * \sa SDL_RenderDrawRects
- * \sa SDL_RenderFillRect
- * \sa SDL_RenderFillRects
- * \sa SDL_RenderPresent
- * \sa SDL_SetRenderDrawBlendMode
- * \sa SDL_SetRenderDrawColor
- */
-extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer,
-                                               int x1, int y1, int x2, int y2);
-
-/**
- * Draw a series of connected lines on the current rendering target.
- *
- * \param renderer the rendering context
- * \param points an array of SDL_Point structures representing points along
- *               the lines
- * \param count the number of points, drawing count-1 lines
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderDrawLine
- * \sa SDL_RenderDrawPoint
- * \sa SDL_RenderDrawPoints
- * \sa SDL_RenderDrawRect
- * \sa SDL_RenderDrawRects
- * \sa SDL_RenderFillRect
- * \sa SDL_RenderFillRects
- * \sa SDL_RenderPresent
- * \sa SDL_SetRenderDrawBlendMode
- * \sa SDL_SetRenderDrawColor
- */
-extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer,
-                                                const SDL_Point * points,
-                                                int count);
-
-/**
- * Draw a rectangle on the current rendering target.
- *
- * \param renderer the rendering context
- * \param rect an SDL_Rect structure representing the rectangle to draw, or
- *             NULL to outline the entire rendering target
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderDrawLine
- * \sa SDL_RenderDrawLines
- * \sa SDL_RenderDrawPoint
- * \sa SDL_RenderDrawPoints
- * \sa SDL_RenderDrawRects
- * \sa SDL_RenderFillRect
- * \sa SDL_RenderFillRects
- * \sa SDL_RenderPresent
- * \sa SDL_SetRenderDrawBlendMode
- * \sa SDL_SetRenderDrawColor
- */
-extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer,
-                                               const SDL_Rect * rect);
-
-/**
- * Draw some number of rectangles on the current rendering target.
- *
- * \param renderer the rendering context
- * \param rects an array of SDL_Rect structures representing the rectangles to
- *              be drawn
- * \param count the number of rectangles
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderDrawLine
- * \sa SDL_RenderDrawLines
- * \sa SDL_RenderDrawPoint
- * \sa SDL_RenderDrawPoints
- * \sa SDL_RenderDrawRect
- * \sa SDL_RenderFillRect
- * \sa SDL_RenderFillRects
- * \sa SDL_RenderPresent
- * \sa SDL_SetRenderDrawBlendMode
- * \sa SDL_SetRenderDrawColor
- */
-extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer,
-                                                const SDL_Rect * rects,
-                                                int count);
-
-/**
- * Fill a rectangle on the current rendering target with the drawing color.
- *
- * The current drawing color is set by SDL_SetRenderDrawColor(), and the
- * color's alpha value is ignored unless blending is enabled with the
- * appropriate call to SDL_SetRenderDrawBlendMode().
- *
- * \param renderer the rendering context
- * \param rect the SDL_Rect structure representing the rectangle to fill, or
- *             NULL for the entire rendering target
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderDrawLine
- * \sa SDL_RenderDrawLines
- * \sa SDL_RenderDrawPoint
- * \sa SDL_RenderDrawPoints
- * \sa SDL_RenderDrawRect
- * \sa SDL_RenderDrawRects
- * \sa SDL_RenderFillRects
- * \sa SDL_RenderPresent
- * \sa SDL_SetRenderDrawBlendMode
- * \sa SDL_SetRenderDrawColor
- */
-extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer,
-                                               const SDL_Rect * rect);
-
-/**
- * Fill some number of rectangles on the current rendering target with the
- * drawing color.
- *
- * \param renderer the rendering context
- * \param rects an array of SDL_Rect structures representing the rectangles to
- *              be filled
- * \param count the number of rectangles
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderDrawLine
- * \sa SDL_RenderDrawLines
- * \sa SDL_RenderDrawPoint
- * \sa SDL_RenderDrawPoints
- * \sa SDL_RenderDrawRect
- * \sa SDL_RenderDrawRects
- * \sa SDL_RenderFillRect
- * \sa SDL_RenderPresent
- */
-extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer,
-                                                const SDL_Rect * rects,
-                                                int count);
-
-/**
- * Copy a portion of the texture to the current rendering target.
- *
- * The texture is blended with the destination based on its blend mode set
- * with SDL_SetTextureBlendMode().
- *
- * The texture color is affected based on its color modulation set by
- * SDL_SetTextureColorMod().
- *
- * The texture alpha is affected based on its alpha modulation set by
- * SDL_SetTextureAlphaMod().
- *
- * \param renderer the rendering context
- * \param texture the source texture
- * \param srcrect the source SDL_Rect structure or NULL for the entire texture
- * \param dstrect the destination SDL_Rect structure or NULL for the entire
- *                rendering target; the texture will be stretched to fill the
- *                given rectangle
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderCopyEx
- * \sa SDL_SetTextureAlphaMod
- * \sa SDL_SetTextureBlendMode
- * \sa SDL_SetTextureColorMod
- */
-extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
-                                           SDL_Texture * texture,
-                                           const SDL_Rect * srcrect,
-                                           const SDL_Rect * dstrect);
-
-/**
- * Copy a portion of the texture to the current rendering, with optional
- * rotation and flipping.
- *
- * Copy a portion of the texture to the current rendering target, optionally
- * rotating it by angle around the given center and also flipping it
- * top-bottom and/or left-right.
- *
- * The texture is blended with the destination based on its blend mode set
- * with SDL_SetTextureBlendMode().
- *
- * The texture color is affected based on its color modulation set by
- * SDL_SetTextureColorMod().
- *
- * The texture alpha is affected based on its alpha modulation set by
- * SDL_SetTextureAlphaMod().
- *
- * \param renderer the rendering context
- * \param texture the source texture
- * \param srcrect the source SDL_Rect structure or NULL for the entire texture
- * \param dstrect the destination SDL_Rect structure or NULL for the entire
- *                rendering target
- * \param angle an angle in degrees that indicates the rotation that will be
- *              applied to dstrect, rotating it in a clockwise direction
- * \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`)
- * \param flip a SDL_RendererFlip value stating which flipping actions should
- *             be performed on the texture
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderCopy
- * \sa SDL_SetTextureAlphaMod
- * \sa SDL_SetTextureBlendMode
- * \sa SDL_SetTextureColorMod
- */
-extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
-                                           SDL_Texture * texture,
-                                           const SDL_Rect * srcrect,
-                                           const SDL_Rect * dstrect,
-                                           const double angle,
-                                           const SDL_Point *center,
-                                           const SDL_RendererFlip flip);
-
-
-/**
- * Draw a point on the current rendering target at subpixel precision.
- *
- * \param renderer The renderer which should draw a point.
- * \param x The x coordinate of the point.
- * \param y The y coordinate of the point.
- * \return 0 on success, or -1 on error
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer,
-                                                 float x, float y);
-
-/**
- * Draw multiple points on the current rendering target at subpixel precision.
- *
- * \param renderer The renderer which should draw multiple points.
- * \param points The points to draw
- * \param count The number of points to draw
- * \return 0 on success, or -1 on error
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer,
-                                                  const SDL_FPoint * points,
-                                                  int count);
-
-/**
- * Draw a line on the current rendering target at subpixel precision.
- *
- * \param renderer The renderer which should draw a line.
- * \param x1 The x coordinate of the start point.
- * \param y1 The y coordinate of the start point.
- * \param x2 The x coordinate of the end point.
- * \param y2 The y coordinate of the end point.
- * \return 0 on success, or -1 on error
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer,
-                                                float x1, float y1, float x2, float y2);
-
-/**
- * Draw a series of connected lines on the current rendering target at
- * subpixel precision.
- *
- * \param renderer The renderer which should draw multiple lines.
- * \param points The points along the lines
- * \param count The number of points, drawing count-1 lines
- * \return 0 on success, or -1 on error
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer,
-                                                 const SDL_FPoint * points,
-                                                 int count);
-
-/**
- * Draw a rectangle on the current rendering target at subpixel precision.
- *
- * \param renderer The renderer which should draw a rectangle.
- * \param rect A pointer to the destination rectangle, or NULL to outline the
- *             entire rendering target.
- * \return 0 on success, or -1 on error
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer,
-                                                const SDL_FRect * rect);
-
-/**
- * Draw some number of rectangles on the current rendering target at subpixel
- * precision.
- *
- * \param renderer The renderer which should draw multiple rectangles.
- * \param rects A pointer to an array of destination rectangles.
- * \param count The number of rectangles.
- * \return 0 on success, or -1 on error
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer,
-                                                 const SDL_FRect * rects,
-                                                 int count);
-
-/**
- * Fill a rectangle on the current rendering target with the drawing color at
- * subpixel precision.
- *
- * \param renderer The renderer which should fill a rectangle.
- * \param rect A pointer to the destination rectangle, or NULL for the entire
- *             rendering target.
- * \return 0 on success, or -1 on error
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer,
-                                                const SDL_FRect * rect);
-
-/**
- * Fill some number of rectangles on the current rendering target with the
- * drawing color at subpixel precision.
- *
- * \param renderer The renderer which should fill multiple rectangles.
- * \param rects A pointer to an array of destination rectangles.
- * \param count The number of rectangles.
- * \return 0 on success, or -1 on error
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer,
-                                                 const SDL_FRect * rects,
-                                                 int count);
-
-/**
- * Copy a portion of the texture to the current rendering target at subpixel
- * precision.
- *
- * \param renderer The renderer which should copy parts of a texture.
- * \param texture The source texture.
- * \param srcrect A pointer to the source rectangle, or NULL for the entire
- *                texture.
- * \param dstrect A pointer to the destination rectangle, or NULL for the
- *                entire rendering target.
- * \return 0 on success, or -1 on error
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer,
-                                            SDL_Texture * texture,
-                                            const SDL_Rect * srcrect,
-                                            const SDL_FRect * dstrect);
-
-/**
- * Copy a portion of the source texture to the current rendering target, with
- * rotation and flipping, at subpixel precision.
- *
- * \param renderer The renderer which should copy parts of a texture.
- * \param texture The source texture.
- * \param srcrect A pointer to the source rectangle, or NULL for the entire
- *                texture.
- * \param dstrect A pointer to the destination rectangle, or NULL for the
- *                entire rendering target.
- * \param angle An angle in degrees that indicates the rotation that will be
- *              applied to dstrect, rotating it in a clockwise direction
- * \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).
- * \param flip An SDL_RendererFlip value stating which flipping actions should
- *             be performed on the texture
- * \return 0 on success, or -1 on error
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer,
-                                            SDL_Texture * texture,
-                                            const SDL_Rect * srcrect,
-                                            const SDL_FRect * dstrect,
-                                            const double angle,
-                                            const SDL_FPoint *center,
-                                            const SDL_RendererFlip flip);
-
-/**
- * Render a list of triangles, optionally using a texture and indices into the
- * vertex array Color and alpha modulation is done per vertex
- * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
- *
- * \param renderer The rendering context.
- * \param texture (optional) The SDL texture to use.
- * \param vertices Vertices.
- * \param num_vertices Number of vertices.
- * \param indices (optional) An array of integer indices into the 'vertices'
- *                array, if NULL all vertices will be rendered in sequential
- *                order.
- * \param num_indices Number of indices.
- * \return 0 on success, or -1 if the operation is not supported
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_RenderGeometryRaw
- * \sa SDL_Vertex
- */
-extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer,
-                                               SDL_Texture *texture,
-                                               const SDL_Vertex *vertices, int num_vertices,
-                                               const int *indices, int num_indices);
-
-/**
- * Render a list of triangles, optionally using a texture and indices into the
- * vertex arrays Color and alpha modulation is done per vertex
- * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
- *
- * \param renderer The rendering context.
- * \param texture (optional) The SDL texture to use.
- * \param xy Vertex positions
- * \param xy_stride Byte size to move from one element to the next element
- * \param color Vertex colors (as SDL_Color)
- * \param color_stride Byte size to move from one element to the next element
- * \param uv Vertex normalized texture coordinates
- * \param uv_stride Byte size to move from one element to the next element
- * \param num_vertices Number of vertices.
- * \param indices (optional) An array of indices into the 'vertices' arrays,
- *                if NULL all vertices will be rendered in sequential order.
- * \param num_indices Number of indices.
- * \param size_indices Index size: 1 (byte), 2 (short), 4 (int)
- * \return 0 on success, or -1 if the operation is not supported
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_RenderGeometry
- * \sa SDL_Vertex
- */
-extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer,
-                                               SDL_Texture *texture,
-                                               const float *xy, int xy_stride,
-                                               const SDL_Color *color, int color_stride,
-                                               const float *uv, int uv_stride,
-                                               int num_vertices,
-                                               const void *indices, int num_indices, int size_indices);
-
-/**
- * Read pixels from the current rendering target to an array of pixels.
- *
- * **WARNING**: This is a very slow operation, and should not be used
- * frequently. If you're using this on the main rendering target, it should be
- * called after rendering and before SDL_RenderPresent().
- *
- * `pitch` specifies the number of bytes between rows in the destination
- * `pixels` data. This allows you to write to a subrectangle or have padded
- * rows in the destination. Generally, `pitch` should equal the number of
- * pixels per row in the `pixels` data times the number of bytes per pixel,
- * but it might contain additional padding (for example, 24bit RGB Windows
- * Bitmap data pads all rows to multiples of 4 bytes).
- *
- * \param renderer the rendering context
- * \param rect an SDL_Rect structure representing the area to read, or NULL
- *             for the entire render target
- * \param format an SDL_PixelFormatEnum value of the desired format of the
- *               pixel data, or 0 to use the format of the rendering target
- * \param pixels a pointer to the pixel data to copy into
- * \param pitch the pitch of the `pixels` parameter
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer,
-                                                 const SDL_Rect * rect,
-                                                 Uint32 format,
-                                                 void *pixels, int pitch);
-
-/**
- * Update the screen with any rendering performed since the previous call.
- *
- * SDL's rendering functions operate on a backbuffer; that is, calling a
- * rendering function such as SDL_RenderDrawLine() does not directly put a
- * line on the screen, but rather updates the backbuffer. As such, you compose
- * your entire scene and *present* the composed backbuffer to the screen as a
- * complete picture.
- *
- * Therefore, when using SDL's rendering API, one does all drawing intended
- * for the frame, and then calls this function once per frame to present the
- * final drawing to the user.
- *
- * The backbuffer should be considered invalidated after each present; do not
- * assume that previous contents will exist between frames. You are strongly
- * encouraged to call SDL_RenderClear() to initialize the backbuffer before
- * starting each new frame's drawing, even if you plan to overwrite every
- * pixel.
- *
- * \param renderer the rendering context
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RenderClear
- * \sa SDL_RenderDrawLine
- * \sa SDL_RenderDrawLines
- * \sa SDL_RenderDrawPoint
- * \sa SDL_RenderDrawPoints
- * \sa SDL_RenderDrawRect
- * \sa SDL_RenderDrawRects
- * \sa SDL_RenderFillRect
- * \sa SDL_RenderFillRects
- * \sa SDL_SetRenderDrawBlendMode
- * \sa SDL_SetRenderDrawColor
- */
-extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer);
-
-/**
- * Destroy the specified texture.
- *
- * Passing NULL or an otherwise invalid texture will set the SDL error message
- * to "Invalid texture".
- *
- * \param texture the texture to destroy
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateTexture
- * \sa SDL_CreateTextureFromSurface
- */
-extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
-
-/**
- * Destroy the rendering context for a window and free associated textures.
- *
- * \param renderer the rendering context
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateRenderer
- */
-extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
-
-/**
- * Force the rendering context to flush any pending commands to the underlying
- * rendering API.
- *
- * You do not need to (and in fact, shouldn't) call this function unless you
- * are planning to call into OpenGL/Direct3D/Metal/whatever directly in
- * addition to using an SDL_Renderer.
- *
- * This is for a very-specific case: if you are using SDL's render API, you
- * asked for a specific renderer backend (OpenGL, Direct3D, etc), you set
- * SDL_HINT_RENDER_BATCHING to "1", and you plan to make OpenGL/D3D/whatever
- * calls in addition to SDL render API calls. If all of this applies, you
- * should call SDL_RenderFlush() between calls to SDL's render API and the
- * low-level API you're using in cooperation.
- *
- * In all other cases, you can ignore this function. This is only here to get
- * maximum performance out of a specific situation. In all other cases, SDL
- * will do the right thing, perhaps at a performance loss.
- *
- * This function is first available in SDL 2.0.10, and is not needed in 2.0.9
- * and earlier, as earlier versions did not queue rendering commands at all,
- * instead flushing them to the OS immediately.
- *
- * \param renderer the rendering context
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC int SDLCALL SDL_RenderFlush(SDL_Renderer * renderer);
-
-
-/**
- * Bind an OpenGL/ES/ES2 texture to the current context.
- *
- * This is for use with OpenGL instructions when rendering OpenGL primitives
- * directly.
- *
- * If not NULL, `texw` and `texh` will be filled with the width and height
- * values suitable for the provided texture. In most cases, both will be 1.0,
- * however, on systems that support the GL_ARB_texture_rectangle extension,
- * these values will actually be the pixel width and height used to create the
- * texture, so this factor needs to be taken into account when providing
- * texture coordinates to OpenGL.
- *
- * You need a renderer to create an SDL_Texture, therefore you can only use
- * this function with an implicit OpenGL context from SDL_CreateRenderer(),
- * not with your own OpenGL context. If you need control over your OpenGL
- * context, you need to write your own texture-loading methods.
- *
- * Also note that SDL may upload RGB textures as BGR (or vice-versa), and
- * re-order the color channels in the shaders phase, so the uploaded texture
- * may have swapped color channels.
- *
- * \param texture the texture to bind to the current OpenGL/ES/ES2 context
- * \param texw a pointer to a float value which will be filled with the
- *             texture width or NULL if you don't need that value
- * \param texh a pointer to a float value which will be filled with the
- *             texture height or NULL if you don't need that value
- * \returns 0 on success, or -1 if the operation is not supported; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_MakeCurrent
- * \sa SDL_GL_UnbindTexture
- */
-extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh);
-
-/**
- * Unbind an OpenGL/ES/ES2 texture from the current context.
- *
- * See SDL_GL_BindTexture() for examples on how to use these functions
- *
- * \param texture the texture to unbind from the current OpenGL/ES/ES2 context
- * \returns 0 on success, or -1 if the operation is not supported
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_BindTexture
- * \sa SDL_GL_MakeCurrent
- */
-extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
-
-/**
- * Get the CAMetalLayer associated with the given Metal renderer.
- *
- * This function returns `void *`, so SDL doesn't have to include Metal's
- * headers, but it can be safely cast to a `CAMetalLayer *`.
- *
- * \param renderer The renderer to query
- * \returns a `CAMetalLayer *` on success, or NULL if the renderer isn't a
- *          Metal renderer
- *
- * \since This function is available since SDL 2.0.8.
- *
- * \sa SDL_RenderGetMetalCommandEncoder
- */
-extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer);
-
-/**
- * Get the Metal command encoder for the current frame
- *
- * This function returns `void *`, so SDL doesn't have to include Metal's
- * headers, but it can be safely cast to an `id<MTLRenderCommandEncoder>`.
- *
- * Note that as of SDL 2.0.18, this will return NULL if Metal refuses to give
- * SDL a drawable to render to, which might happen if the window is
- * hidden/minimized/offscreen. This doesn't apply to command encoders for
- * render targets, just the window's backbacker. Check your return values!
- *
- * \param renderer The renderer to query
- * \returns an `id<MTLRenderCommandEncoder>` on success, or NULL if the
- *          renderer isn't a Metal renderer or there was an error.
- *
- * \since This function is available since SDL 2.0.8.
- *
- * \sa SDL_RenderGetMetalLayer
- */
-extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer);
-
-/**
- * Toggle VSync of the given renderer.
- *
- * \param renderer The renderer to toggle
- * \param vsync 1 for on, 0 for off. All other values are reserved
- * \returns a 0 int on success, or non-zero on failure
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC int SDLCALL SDL_RenderSetVSync(SDL_Renderer* renderer, int vsync);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_render_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_revision.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_revision.h
deleted file mode 100644 (file)
index 9910dff..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#define SDL_REVISION "https://github.com/libsdl-org/SDL.git@53dea9830964eee8b5c2a7ee0a65d6e268dc78a1"
-#define SDL_REVISION_NUMBER 0
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_rwops.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_rwops.h
deleted file mode 100644 (file)
index 71e5c8d..0000000
+++ /dev/null
@@ -1,855 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_rwops.h
- *
- *  This file provides a general interface for SDL to read and write
- *  data streams.  It can easily be extended to files, memory, etc.
- */
-
-#ifndef SDL_rwops_h_
-#define SDL_rwops_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* RWops Types */
-#define SDL_RWOPS_UNKNOWN   0U  /**< Unknown stream type */
-#define SDL_RWOPS_WINFILE   1U  /**< Win32 file */
-#define SDL_RWOPS_STDFILE   2U  /**< Stdio file */
-#define SDL_RWOPS_JNIFILE   3U  /**< Android asset */
-#define SDL_RWOPS_MEMORY    4U  /**< Memory stream */
-#define SDL_RWOPS_MEMORY_RO 5U  /**< Read-Only memory stream */
-#if defined(__VITA__)
-#define SDL_RWOPS_VITAFILE  6U  /**< Vita file */
-#endif
-
-/**
- * This is the read/write operation structure -- very basic.
- */
-typedef struct SDL_RWops
-{
-    /**
-     *  Return the size of the file in this rwops, or -1 if unknown
-     */
-    Sint64 (SDLCALL * size) (struct SDL_RWops * context);
-
-    /**
-     *  Seek to \c offset relative to \c whence, one of stdio's whence values:
-     *  RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
-     *
-     *  \return the final offset in the data stream, or -1 on error.
-     */
-    Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,
-                             int whence);
-
-    /**
-     *  Read up to \c maxnum objects each of size \c size from the data
-     *  stream to the area pointed at by \c ptr.
-     *
-     *  \return the number of objects read, or 0 at error or end of file.
-     */
-    size_t (SDLCALL * read) (struct SDL_RWops * context, void *ptr,
-                             size_t size, size_t maxnum);
-
-    /**
-     *  Write exactly \c num objects each of size \c size from the area
-     *  pointed at by \c ptr to data stream.
-     *
-     *  \return the number of objects written, or 0 at error or end of file.
-     */
-    size_t (SDLCALL * write) (struct SDL_RWops * context, const void *ptr,
-                              size_t size, size_t num);
-
-    /**
-     *  Close and free an allocated SDL_RWops structure.
-     *
-     *  \return 0 if successful or -1 on write error when flushing data.
-     */
-    int (SDLCALL * close) (struct SDL_RWops * context);
-
-    Uint32 type;
-    union
-    {
-#if defined(__ANDROID__)
-        struct
-        {
-            void *asset;
-        } androidio;
-#elif defined(__WIN32__)
-        struct
-        {
-            SDL_bool append;
-            void *h;
-            struct
-            {
-                void *data;
-                size_t size;
-                size_t left;
-            } buffer;
-        } windowsio;
-#elif defined(__VITA__)
-        struct
-        {
-            int h;
-            struct
-            {
-                void *data;
-                size_t size;
-                size_t left;
-            } buffer;
-        } vitaio;
-#endif
-
-#ifdef HAVE_STDIO_H
-        struct
-        {
-            SDL_bool autoclose;
-            FILE *fp;
-        } stdio;
-#endif
-        struct
-        {
-            Uint8 *base;
-            Uint8 *here;
-            Uint8 *stop;
-        } mem;
-        struct
-        {
-            void *data1;
-            void *data2;
-        } unknown;
-    } hidden;
-
-} SDL_RWops;
-
-
-/**
- *  \name RWFrom functions
- *
- *  Functions to create SDL_RWops structures from various data streams.
- */
-/* @{ */
-
-/**
- * Use this function to create a new SDL_RWops structure for reading from
- * and/or writing to a named file.
- *
- * The `mode` string is treated roughly the same as in a call to the C
- * library's fopen(), even if SDL doesn't happen to use fopen() behind the
- * scenes.
- *
- * Available `mode` strings:
- *
- * - "r": Open a file for reading. The file must exist.
- * - "w": Create an empty file for writing. If a file with the same name
- *   already exists its content is erased and the file is treated as a new
- *   empty file.
- * - "a": Append to a file. Writing operations append data at the end of the
- *   file. The file is created if it does not exist.
- * - "r+": Open a file for update both reading and writing. The file must
- *   exist.
- * - "w+": Create an empty file for both reading and writing. If a file with
- *   the same name already exists its content is erased and the file is
- *   treated as a new empty file.
- * - "a+": Open a file for reading and appending. All writing operations are
- *   performed at the end of the file, protecting the previous content to be
- *   overwritten. You can reposition (fseek, rewind) the internal pointer to
- *   anywhere in the file for reading, but writing operations will move it
- *   back to the end of file. The file is created if it does not exist.
- *
- * **NOTE**: In order to open a file as a binary file, a "b" character has to
- * be included in the `mode` string. This additional "b" character can either
- * be appended at the end of the string (thus making the following compound
- * modes: "rb", "wb", "ab", "r+b", "w+b", "a+b") or be inserted between the
- * letter and the "+" sign for the mixed modes ("rb+", "wb+", "ab+").
- * Additional characters may follow the sequence, although they should have no
- * effect. For example, "t" is sometimes appended to make explicit the file is
- * a text file.
- *
- * This function supports Unicode filenames, but they must be encoded in UTF-8
- * format, regardless of the underlying operating system.
- *
- * As a fallback, SDL_RWFromFile() will transparently open a matching filename
- * in an Android app's `assets`.
- *
- * Closing the SDL_RWops will close the file handle SDL is holding internally.
- *
- * \param file a UTF-8 string representing the filename to open
- * \param mode an ASCII string representing the mode to be used for opening
- *             the file.
- * \returns a pointer to the SDL_RWops structure that is created, or NULL on
- *          failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RWclose
- * \sa SDL_RWFromConstMem
- * \sa SDL_RWFromFP
- * \sa SDL_RWFromMem
- * \sa SDL_RWread
- * \sa SDL_RWseek
- * \sa SDL_RWtell
- * \sa SDL_RWwrite
- */
-extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
-                                                  const char *mode);
-
-#ifdef HAVE_STDIO_H
-
-extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, SDL_bool autoclose);
-
-#else
-
-/**
- * Use this function to create an SDL_RWops structure from a standard I/O file
- * pointer (stdio.h's `FILE*`).
- *
- * This function is not available on Windows, since files opened in an
- * application on that platform cannot be used by a dynamically linked
- * library.
- *
- * On some platforms, the first parameter is a `void*`, on others, it's a
- * `FILE*`, depending on what system headers are available to SDL. It is
- * always intended to be the `FILE*` type from the C runtime's stdio.h.
- *
- * \param fp the `FILE*` that feeds the SDL_RWops stream
- * \param autoclose SDL_TRUE to close the `FILE*` when closing the SDL_RWops,
- *                  SDL_FALSE to leave the `FILE*` open when the RWops is
- *                  closed
- * \returns a pointer to the SDL_RWops structure that is created, or NULL on
- *          failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RWclose
- * \sa SDL_RWFromConstMem
- * \sa SDL_RWFromFile
- * \sa SDL_RWFromMem
- * \sa SDL_RWread
- * \sa SDL_RWseek
- * \sa SDL_RWtell
- * \sa SDL_RWwrite
- */
-extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp,
-                                                SDL_bool autoclose);
-#endif
-
-/**
- * Use this function to prepare a read-write memory buffer for use with
- * SDL_RWops.
- *
- * This function sets up an SDL_RWops struct based on a memory area of a
- * certain size, for both read and write access.
- *
- * This memory buffer is not copied by the RWops; the pointer you provide must
- * remain valid until you close the stream. Closing the stream will not free
- * the original buffer.
- *
- * If you need to make sure the RWops never writes to the memory buffer, you
- * should use SDL_RWFromConstMem() with a read-only buffer of memory instead.
- *
- * \param mem a pointer to a buffer to feed an SDL_RWops stream
- * \param size the buffer size, in bytes
- * \returns a pointer to a new SDL_RWops structure, or NULL if it fails; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RWclose
- * \sa SDL_RWFromConstMem
- * \sa SDL_RWFromFile
- * \sa SDL_RWFromFP
- * \sa SDL_RWFromMem
- * \sa SDL_RWread
- * \sa SDL_RWseek
- * \sa SDL_RWtell
- * \sa SDL_RWwrite
- */
-extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
-
-/**
- * Use this function to prepare a read-only memory buffer for use with RWops.
- *
- * This function sets up an SDL_RWops struct based on a memory area of a
- * certain size. It assumes the memory area is not writable.
- *
- * Attempting to write to this RWops stream will report an error without
- * writing to the memory buffer.
- *
- * This memory buffer is not copied by the RWops; the pointer you provide must
- * remain valid until you close the stream. Closing the stream will not free
- * the original buffer.
- *
- * If you need to write to a memory buffer, you should use SDL_RWFromMem()
- * with a writable buffer of memory instead.
- *
- * \param mem a pointer to a read-only buffer to feed an SDL_RWops stream
- * \param size the buffer size, in bytes
- * \returns a pointer to a new SDL_RWops structure, or NULL if it fails; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RWclose
- * \sa SDL_RWFromConstMem
- * \sa SDL_RWFromFile
- * \sa SDL_RWFromFP
- * \sa SDL_RWFromMem
- * \sa SDL_RWread
- * \sa SDL_RWseek
- * \sa SDL_RWtell
- */
-extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
-                                                      int size);
-
-/* @} *//* RWFrom functions */
-
-
-/**
- * Use this function to allocate an empty, unpopulated SDL_RWops structure.
- *
- * Applications do not need to use this function unless they are providing
- * their own SDL_RWops implementation. If you just need a SDL_RWops to
- * read/write a common data source, you should use the built-in
- * implementations in SDL, like SDL_RWFromFile() or SDL_RWFromMem(), etc.
- *
- * You must free the returned pointer with SDL_FreeRW(). Depending on your
- * operating system and compiler, there may be a difference between the
- * malloc() and free() your program uses and the versions SDL calls
- * internally. Trying to mix the two can cause crashing such as segmentation
- * faults. Since all SDL_RWops must free themselves when their **close**
- * method is called, all SDL_RWops must be allocated through this function, so
- * they can all be freed correctly with SDL_FreeRW().
- *
- * \returns a pointer to the allocated memory on success, or NULL on failure;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_FreeRW
- */
-extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);
-
-/**
- * Use this function to free an SDL_RWops structure allocated by
- * SDL_AllocRW().
- *
- * Applications do not need to use this function unless they are providing
- * their own SDL_RWops implementation. If you just need a SDL_RWops to
- * read/write a common data source, you should use the built-in
- * implementations in SDL, like SDL_RWFromFile() or SDL_RWFromMem(), etc, and
- * call the **close** method on those SDL_RWops pointers when you are done
- * with them.
- *
- * Only use SDL_FreeRW() on pointers returned by SDL_AllocRW(). The pointer is
- * invalid as soon as this function returns. Any extra memory allocated during
- * creation of the SDL_RWops is not freed by SDL_FreeRW(); the programmer must
- * be responsible for managing that memory in their **close** method.
- *
- * \param area the SDL_RWops structure to be freed
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AllocRW
- */
-extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
-
-#define RW_SEEK_SET 0       /**< Seek from the beginning of data */
-#define RW_SEEK_CUR 1       /**< Seek relative to current read point */
-#define RW_SEEK_END 2       /**< Seek relative to the end of data */
-
-/**
- * Use this function to get the size of the data stream in an SDL_RWops.
- *
- * Prior to SDL 2.0.10, this function was a macro.
- *
- * \param context the SDL_RWops to get the size of the data stream from
- * \returns the size of the data stream in the SDL_RWops on success, -1 if
- *          unknown or a negative error code on failure; call SDL_GetError()
- *          for more information.
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);
-
-/**
- * Seek within an SDL_RWops data stream.
- *
- * This function seeks to byte `offset`, relative to `whence`.
- *
- * `whence` may be any of the following values:
- *
- * - `RW_SEEK_SET`: seek from the beginning of data
- * - `RW_SEEK_CUR`: seek relative to current read point
- * - `RW_SEEK_END`: seek relative to the end of data
- *
- * If this stream can not seek, it will return -1.
- *
- * SDL_RWseek() is actually a wrapper function that calls the SDL_RWops's
- * `seek` method appropriately, to simplify application development.
- *
- * Prior to SDL 2.0.10, this function was a macro.
- *
- * \param context a pointer to an SDL_RWops structure
- * \param offset an offset in bytes, relative to **whence** location; can be
- *               negative
- * \param whence any of `RW_SEEK_SET`, `RW_SEEK_CUR`, `RW_SEEK_END`
- * \returns the final offset in the data stream after the seek or -1 on error.
- *
- * \since This function is available since SDL 2.0.10.
- *
- * \sa SDL_RWclose
- * \sa SDL_RWFromConstMem
- * \sa SDL_RWFromFile
- * \sa SDL_RWFromFP
- * \sa SDL_RWFromMem
- * \sa SDL_RWread
- * \sa SDL_RWtell
- * \sa SDL_RWwrite
- */
-extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,
-                                          Sint64 offset, int whence);
-
-/**
- * Determine the current read/write offset in an SDL_RWops data stream.
- *
- * SDL_RWtell is actually a wrapper function that calls the SDL_RWops's `seek`
- * method, with an offset of 0 bytes from `RW_SEEK_CUR`, to simplify
- * application development.
- *
- * Prior to SDL 2.0.10, this function was a macro.
- *
- * \param context a SDL_RWops data stream object from which to get the current
- *                offset
- * \returns the current offset in the stream, or -1 if the information can not
- *          be determined.
- *
- * \since This function is available since SDL 2.0.10.
- *
- * \sa SDL_RWclose
- * \sa SDL_RWFromConstMem
- * \sa SDL_RWFromFile
- * \sa SDL_RWFromFP
- * \sa SDL_RWFromMem
- * \sa SDL_RWread
- * \sa SDL_RWseek
- * \sa SDL_RWwrite
- */
-extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);
-
-/**
- * Read from a data source.
- *
- * This function reads up to `maxnum` objects each of size `size` from the
- * data source to the area pointed at by `ptr`. This function may read less
- * objects than requested. It will return zero when there has been an error or
- * the data stream is completely read.
- *
- * SDL_RWread() is actually a function wrapper that calls the SDL_RWops's
- * `read` method appropriately, to simplify application development.
- *
- * Prior to SDL 2.0.10, this function was a macro.
- *
- * \param context a pointer to an SDL_RWops structure
- * \param ptr a pointer to a buffer to read data into
- * \param size the size of each object to read, in bytes
- * \param maxnum the maximum number of objects to be read
- * \returns the number of objects read, or 0 at error or end of file; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.10.
- *
- * \sa SDL_RWclose
- * \sa SDL_RWFromConstMem
- * \sa SDL_RWFromFile
- * \sa SDL_RWFromFP
- * \sa SDL_RWFromMem
- * \sa SDL_RWseek
- * \sa SDL_RWwrite
- */
-extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,
-                                          void *ptr, size_t size,
-                                          size_t maxnum);
-
-/**
- * Write to an SDL_RWops data stream.
- *
- * This function writes exactly `num` objects each of size `size` from the
- * area pointed at by `ptr` to the stream. If this fails for any reason, it'll
- * return less than `num` to demonstrate how far the write progressed. On
- * success, it returns `num`.
- *
- * SDL_RWwrite is actually a function wrapper that calls the SDL_RWops's
- * `write` method appropriately, to simplify application development.
- *
- * Prior to SDL 2.0.10, this function was a macro.
- *
- * \param context a pointer to an SDL_RWops structure
- * \param ptr a pointer to a buffer containing data to write
- * \param size the size of an object to write, in bytes
- * \param num the number of objects to write
- * \returns the number of objects written, which will be less than **num** on
- *          error; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.10.
- *
- * \sa SDL_RWclose
- * \sa SDL_RWFromConstMem
- * \sa SDL_RWFromFile
- * \sa SDL_RWFromFP
- * \sa SDL_RWFromMem
- * \sa SDL_RWread
- * \sa SDL_RWseek
- */
-extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,
-                                           const void *ptr, size_t size,
-                                           size_t num);
-
-/**
- * Close and free an allocated SDL_RWops structure.
- *
- * SDL_RWclose() closes and cleans up the SDL_RWops stream. It releases any
- * resources used by the stream and frees the SDL_RWops itself with
- * SDL_FreeRW(). This returns 0 on success, or -1 if the stream failed to
- * flush to its output (e.g. to disk).
- *
- * Note that if this fails to flush the stream to disk, this function reports
- * an error, but the SDL_RWops is still invalid once this function returns.
- *
- * Prior to SDL 2.0.10, this function was a macro.
- *
- * \param context SDL_RWops structure to close
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.10.
- *
- * \sa SDL_RWFromConstMem
- * \sa SDL_RWFromFile
- * \sa SDL_RWFromFP
- * \sa SDL_RWFromMem
- * \sa SDL_RWread
- * \sa SDL_RWseek
- * \sa SDL_RWwrite
- */
-extern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context);
-
-/**
- * Load all the data from an SDL data stream.
- *
- * The data is allocated with a zero byte at the end (null terminated) for
- * convenience. This extra byte is not included in the value reported via
- * `datasize`.
- *
- * The data should be freed with SDL_free().
- *
- * \param src the SDL_RWops to read all available data from
- * \param datasize if not NULL, will store the number of bytes read
- * \param freesrc if non-zero, calls SDL_RWclose() on `src` before returning
- * \returns the data, or NULL if there was an error.
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops *src,
-                                              size_t *datasize,
-                                              int freesrc);
-
-/**
- * Load all the data from a file path.
- *
- * The data is allocated with a zero byte at the end (null terminated) for
- * convenience. This extra byte is not included in the value reported via
- * `datasize`.
- *
- * The data should be freed with SDL_free().
- *
- * Prior to SDL 2.0.10, this function was a macro wrapping around
- * SDL_LoadFile_RW.
- *
- * \param file the path to read all available data from
- * \param datasize if not NULL, will store the number of bytes read
- * \returns the data, or NULL if there was an error.
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize);
-
-/**
- *  \name Read endian functions
- *
- *  Read an item of the specified endianness and return in native format.
- */
-/* @{ */
-
-/**
- * Use this function to read a byte from an SDL_RWops.
- *
- * \param src the SDL_RWops to read from
- * \returns the read byte on success or 0 on failure; call SDL_GetError() for
- *          more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_WriteU8
- */
-extern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src);
-
-/**
- * Use this function to read 16 bits of little-endian data from an SDL_RWops
- * and return in native format.
- *
- * SDL byteswaps the data only if necessary, so the data returned will be in
- * the native byte order.
- *
- * \param src the stream from which to read data
- * \returns 16 bits of data in the native byte order of the platform.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ReadBE16
- */
-extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
-
-/**
- * Use this function to read 16 bits of big-endian data from an SDL_RWops and
- * return in native format.
- *
- * SDL byteswaps the data only if necessary, so the data returned will be in
- * the native byte order.
- *
- * \param src the stream from which to read data
- * \returns 16 bits of data in the native byte order of the platform.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ReadLE16
- */
-extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
-
-/**
- * Use this function to read 32 bits of little-endian data from an SDL_RWops
- * and return in native format.
- *
- * SDL byteswaps the data only if necessary, so the data returned will be in
- * the native byte order.
- *
- * \param src the stream from which to read data
- * \returns 32 bits of data in the native byte order of the platform.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ReadBE32
- */
-extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
-
-/**
- * Use this function to read 32 bits of big-endian data from an SDL_RWops and
- * return in native format.
- *
- * SDL byteswaps the data only if necessary, so the data returned will be in
- * the native byte order.
- *
- * \param src the stream from which to read data
- * \returns 32 bits of data in the native byte order of the platform.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ReadLE32
- */
-extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);
-
-/**
- * Use this function to read 64 bits of little-endian data from an SDL_RWops
- * and return in native format.
- *
- * SDL byteswaps the data only if necessary, so the data returned will be in
- * the native byte order.
- *
- * \param src the stream from which to read data
- * \returns 64 bits of data in the native byte order of the platform.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ReadBE64
- */
-extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);
-
-/**
- * Use this function to read 64 bits of big-endian data from an SDL_RWops and
- * return in native format.
- *
- * SDL byteswaps the data only if necessary, so the data returned will be in
- * the native byte order.
- *
- * \param src the stream from which to read data
- * \returns 64 bits of data in the native byte order of the platform.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ReadLE64
- */
-extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
-/* @} *//* Read endian functions */
-
-/**
- *  \name Write endian functions
- *
- *  Write an item of native format to the specified endianness.
- */
-/* @{ */
-
-/**
- * Use this function to write a byte to an SDL_RWops.
- *
- * \param dst the SDL_RWops to write to
- * \param value the byte value to write
- * \returns 1 on success or 0 on failure; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ReadU8
- */
-extern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value);
-
-/**
- * Use this function to write 16 bits in native format to a SDL_RWops as
- * little-endian data.
- *
- * SDL byteswaps the data only if necessary, so the application always
- * specifies native format, and the data written will be in little-endian
- * format.
- *
- * \param dst the stream to which data will be written
- * \param value the data to be written, in native format
- * \returns 1 on successful write, 0 on error.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_WriteBE16
- */
-extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
-
-/**
- * Use this function to write 16 bits in native format to a SDL_RWops as
- * big-endian data.
- *
- * SDL byteswaps the data only if necessary, so the application always
- * specifies native format, and the data written will be in big-endian format.
- *
- * \param dst the stream to which data will be written
- * \param value the data to be written, in native format
- * \returns 1 on successful write, 0 on error.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_WriteLE16
- */
-extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
-
-/**
- * Use this function to write 32 bits in native format to a SDL_RWops as
- * little-endian data.
- *
- * SDL byteswaps the data only if necessary, so the application always
- * specifies native format, and the data written will be in little-endian
- * format.
- *
- * \param dst the stream to which data will be written
- * \param value the data to be written, in native format
- * \returns 1 on successful write, 0 on error.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_WriteBE32
- */
-extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
-
-/**
- * Use this function to write 32 bits in native format to a SDL_RWops as
- * big-endian data.
- *
- * SDL byteswaps the data only if necessary, so the application always
- * specifies native format, and the data written will be in big-endian format.
- *
- * \param dst the stream to which data will be written
- * \param value the data to be written, in native format
- * \returns 1 on successful write, 0 on error.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_WriteLE32
- */
-extern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
-
-/**
- * Use this function to write 64 bits in native format to a SDL_RWops as
- * little-endian data.
- *
- * SDL byteswaps the data only if necessary, so the application always
- * specifies native format, and the data written will be in little-endian
- * format.
- *
- * \param dst the stream to which data will be written
- * \param value the data to be written, in native format
- * \returns 1 on successful write, 0 on error.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_WriteBE64
- */
-extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
-
-/**
- * Use this function to write 64 bits in native format to a SDL_RWops as
- * big-endian data.
- *
- * SDL byteswaps the data only if necessary, so the application always
- * specifies native format, and the data written will be in big-endian format.
- *
- * \param dst the stream to which data will be written
- * \param value the data to be written, in native format
- * \returns 1 on successful write, 0 on error.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_WriteLE64
- */
-extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
-/* @} *//* Write endian functions */
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_rwops_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_scancode.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_scancode.h
deleted file mode 100644 (file)
index 5b2c67c..0000000
+++ /dev/null
@@ -1,413 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_scancode.h
- *
- *  Defines keyboard scancodes.
- */
-
-#ifndef SDL_scancode_h_
-#define SDL_scancode_h_
-
-#include "SDL_stdinc.h"
-
-/**
- *  \brief The SDL keyboard scancode representation.
- *
- *  Values of this type are used to represent keyboard keys, among other places
- *  in the \link SDL_Keysym::scancode key.keysym.scancode \endlink field of the
- *  SDL_Event structure.
- *
- *  The values in this enumeration are based on the USB usage page standard:
- *  https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
- */
-typedef enum
-{
-    SDL_SCANCODE_UNKNOWN = 0,
-
-    /**
-     *  \name Usage page 0x07
-     *
-     *  These values are from usage page 0x07 (USB keyboard page).
-     */
-    /* @{ */
-
-    SDL_SCANCODE_A = 4,
-    SDL_SCANCODE_B = 5,
-    SDL_SCANCODE_C = 6,
-    SDL_SCANCODE_D = 7,
-    SDL_SCANCODE_E = 8,
-    SDL_SCANCODE_F = 9,
-    SDL_SCANCODE_G = 10,
-    SDL_SCANCODE_H = 11,
-    SDL_SCANCODE_I = 12,
-    SDL_SCANCODE_J = 13,
-    SDL_SCANCODE_K = 14,
-    SDL_SCANCODE_L = 15,
-    SDL_SCANCODE_M = 16,
-    SDL_SCANCODE_N = 17,
-    SDL_SCANCODE_O = 18,
-    SDL_SCANCODE_P = 19,
-    SDL_SCANCODE_Q = 20,
-    SDL_SCANCODE_R = 21,
-    SDL_SCANCODE_S = 22,
-    SDL_SCANCODE_T = 23,
-    SDL_SCANCODE_U = 24,
-    SDL_SCANCODE_V = 25,
-    SDL_SCANCODE_W = 26,
-    SDL_SCANCODE_X = 27,
-    SDL_SCANCODE_Y = 28,
-    SDL_SCANCODE_Z = 29,
-
-    SDL_SCANCODE_1 = 30,
-    SDL_SCANCODE_2 = 31,
-    SDL_SCANCODE_3 = 32,
-    SDL_SCANCODE_4 = 33,
-    SDL_SCANCODE_5 = 34,
-    SDL_SCANCODE_6 = 35,
-    SDL_SCANCODE_7 = 36,
-    SDL_SCANCODE_8 = 37,
-    SDL_SCANCODE_9 = 38,
-    SDL_SCANCODE_0 = 39,
-
-    SDL_SCANCODE_RETURN = 40,
-    SDL_SCANCODE_ESCAPE = 41,
-    SDL_SCANCODE_BACKSPACE = 42,
-    SDL_SCANCODE_TAB = 43,
-    SDL_SCANCODE_SPACE = 44,
-
-    SDL_SCANCODE_MINUS = 45,
-    SDL_SCANCODE_EQUALS = 46,
-    SDL_SCANCODE_LEFTBRACKET = 47,
-    SDL_SCANCODE_RIGHTBRACKET = 48,
-    SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return
-                                  *   key on ISO keyboards and at the right end
-                                  *   of the QWERTY row on ANSI keyboards.
-                                  *   Produces REVERSE SOLIDUS (backslash) and
-                                  *   VERTICAL LINE in a US layout, REVERSE
-                                  *   SOLIDUS and VERTICAL LINE in a UK Mac
-                                  *   layout, NUMBER SIGN and TILDE in a UK
-                                  *   Windows layout, DOLLAR SIGN and POUND SIGN
-                                  *   in a Swiss German layout, NUMBER SIGN and
-                                  *   APOSTROPHE in a German layout, GRAVE
-                                  *   ACCENT and POUND SIGN in a French Mac
-                                  *   layout, and ASTERISK and MICRO SIGN in a
-                                  *   French Windows layout.
-                                  */
-    SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code
-                                  *   instead of 49 for the same key, but all
-                                  *   OSes I've seen treat the two codes
-                                  *   identically. So, as an implementor, unless
-                                  *   your keyboard generates both of those
-                                  *   codes and your OS treats them differently,
-                                  *   you should generate SDL_SCANCODE_BACKSLASH
-                                  *   instead of this code. As a user, you
-                                  *   should not rely on this code because SDL
-                                  *   will never generate it with most (all?)
-                                  *   keyboards.
-                                  */
-    SDL_SCANCODE_SEMICOLON = 51,
-    SDL_SCANCODE_APOSTROPHE = 52,
-    SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI
-                              *   and ISO keyboards). Produces GRAVE ACCENT and
-                              *   TILDE in a US Windows layout and in US and UK
-                              *   Mac layouts on ANSI keyboards, GRAVE ACCENT
-                              *   and NOT SIGN in a UK Windows layout, SECTION
-                              *   SIGN and PLUS-MINUS SIGN in US and UK Mac
-                              *   layouts on ISO keyboards, SECTION SIGN and
-                              *   DEGREE SIGN in a Swiss German layout (Mac:
-                              *   only on ISO keyboards), CIRCUMFLEX ACCENT and
-                              *   DEGREE SIGN in a German layout (Mac: only on
-                              *   ISO keyboards), SUPERSCRIPT TWO and TILDE in a
-                              *   French Windows layout, COMMERCIAL AT and
-                              *   NUMBER SIGN in a French Mac layout on ISO
-                              *   keyboards, and LESS-THAN SIGN and GREATER-THAN
-                              *   SIGN in a Swiss German, German, or French Mac
-                              *   layout on ANSI keyboards.
-                              */
-    SDL_SCANCODE_COMMA = 54,
-    SDL_SCANCODE_PERIOD = 55,
-    SDL_SCANCODE_SLASH = 56,
-
-    SDL_SCANCODE_CAPSLOCK = 57,
-
-    SDL_SCANCODE_F1 = 58,
-    SDL_SCANCODE_F2 = 59,
-    SDL_SCANCODE_F3 = 60,
-    SDL_SCANCODE_F4 = 61,
-    SDL_SCANCODE_F5 = 62,
-    SDL_SCANCODE_F6 = 63,
-    SDL_SCANCODE_F7 = 64,
-    SDL_SCANCODE_F8 = 65,
-    SDL_SCANCODE_F9 = 66,
-    SDL_SCANCODE_F10 = 67,
-    SDL_SCANCODE_F11 = 68,
-    SDL_SCANCODE_F12 = 69,
-
-    SDL_SCANCODE_PRINTSCREEN = 70,
-    SDL_SCANCODE_SCROLLLOCK = 71,
-    SDL_SCANCODE_PAUSE = 72,
-    SDL_SCANCODE_INSERT = 73, /**< insert on PC, help on some Mac keyboards (but
-                                   does send code 73, not 117) */
-    SDL_SCANCODE_HOME = 74,
-    SDL_SCANCODE_PAGEUP = 75,
-    SDL_SCANCODE_DELETE = 76,
-    SDL_SCANCODE_END = 77,
-    SDL_SCANCODE_PAGEDOWN = 78,
-    SDL_SCANCODE_RIGHT = 79,
-    SDL_SCANCODE_LEFT = 80,
-    SDL_SCANCODE_DOWN = 81,
-    SDL_SCANCODE_UP = 82,
-
-    SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards
-                                     */
-    SDL_SCANCODE_KP_DIVIDE = 84,
-    SDL_SCANCODE_KP_MULTIPLY = 85,
-    SDL_SCANCODE_KP_MINUS = 86,
-    SDL_SCANCODE_KP_PLUS = 87,
-    SDL_SCANCODE_KP_ENTER = 88,
-    SDL_SCANCODE_KP_1 = 89,
-    SDL_SCANCODE_KP_2 = 90,
-    SDL_SCANCODE_KP_3 = 91,
-    SDL_SCANCODE_KP_4 = 92,
-    SDL_SCANCODE_KP_5 = 93,
-    SDL_SCANCODE_KP_6 = 94,
-    SDL_SCANCODE_KP_7 = 95,
-    SDL_SCANCODE_KP_8 = 96,
-    SDL_SCANCODE_KP_9 = 97,
-    SDL_SCANCODE_KP_0 = 98,
-    SDL_SCANCODE_KP_PERIOD = 99,
-
-    SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO
-                                        *   keyboards have over ANSI ones,
-                                        *   located between left shift and Y.
-                                        *   Produces GRAVE ACCENT and TILDE in a
-                                        *   US or UK Mac layout, REVERSE SOLIDUS
-                                        *   (backslash) and VERTICAL LINE in a
-                                        *   US or UK Windows layout, and
-                                        *   LESS-THAN SIGN and GREATER-THAN SIGN
-                                        *   in a Swiss German, German, or French
-                                        *   layout. */
-    SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */
-    SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag,
-                               *   not a physical key - but some Mac keyboards
-                               *   do have a power key. */
-    SDL_SCANCODE_KP_EQUALS = 103,
-    SDL_SCANCODE_F13 = 104,
-    SDL_SCANCODE_F14 = 105,
-    SDL_SCANCODE_F15 = 106,
-    SDL_SCANCODE_F16 = 107,
-    SDL_SCANCODE_F17 = 108,
-    SDL_SCANCODE_F18 = 109,
-    SDL_SCANCODE_F19 = 110,
-    SDL_SCANCODE_F20 = 111,
-    SDL_SCANCODE_F21 = 112,
-    SDL_SCANCODE_F22 = 113,
-    SDL_SCANCODE_F23 = 114,
-    SDL_SCANCODE_F24 = 115,
-    SDL_SCANCODE_EXECUTE = 116,
-    SDL_SCANCODE_HELP = 117,
-    SDL_SCANCODE_MENU = 118,
-    SDL_SCANCODE_SELECT = 119,
-    SDL_SCANCODE_STOP = 120,
-    SDL_SCANCODE_AGAIN = 121,   /**< redo */
-    SDL_SCANCODE_UNDO = 122,
-    SDL_SCANCODE_CUT = 123,
-    SDL_SCANCODE_COPY = 124,
-    SDL_SCANCODE_PASTE = 125,
-    SDL_SCANCODE_FIND = 126,
-    SDL_SCANCODE_MUTE = 127,
-    SDL_SCANCODE_VOLUMEUP = 128,
-    SDL_SCANCODE_VOLUMEDOWN = 129,
-/* not sure whether there's a reason to enable these */
-/*     SDL_SCANCODE_LOCKINGCAPSLOCK = 130,  */
-/*     SDL_SCANCODE_LOCKINGNUMLOCK = 131, */
-/*     SDL_SCANCODE_LOCKINGSCROLLLOCK = 132, */
-    SDL_SCANCODE_KP_COMMA = 133,
-    SDL_SCANCODE_KP_EQUALSAS400 = 134,
-
-    SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see
-                                            footnotes in USB doc */
-    SDL_SCANCODE_INTERNATIONAL2 = 136,
-    SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */
-    SDL_SCANCODE_INTERNATIONAL4 = 138,
-    SDL_SCANCODE_INTERNATIONAL5 = 139,
-    SDL_SCANCODE_INTERNATIONAL6 = 140,
-    SDL_SCANCODE_INTERNATIONAL7 = 141,
-    SDL_SCANCODE_INTERNATIONAL8 = 142,
-    SDL_SCANCODE_INTERNATIONAL9 = 143,
-    SDL_SCANCODE_LANG1 = 144, /**< Hangul/English toggle */
-    SDL_SCANCODE_LANG2 = 145, /**< Hanja conversion */
-    SDL_SCANCODE_LANG3 = 146, /**< Katakana */
-    SDL_SCANCODE_LANG4 = 147, /**< Hiragana */
-    SDL_SCANCODE_LANG5 = 148, /**< Zenkaku/Hankaku */
-    SDL_SCANCODE_LANG6 = 149, /**< reserved */
-    SDL_SCANCODE_LANG7 = 150, /**< reserved */
-    SDL_SCANCODE_LANG8 = 151, /**< reserved */
-    SDL_SCANCODE_LANG9 = 152, /**< reserved */
-
-    SDL_SCANCODE_ALTERASE = 153, /**< Erase-Eaze */
-    SDL_SCANCODE_SYSREQ = 154,
-    SDL_SCANCODE_CANCEL = 155,
-    SDL_SCANCODE_CLEAR = 156,
-    SDL_SCANCODE_PRIOR = 157,
-    SDL_SCANCODE_RETURN2 = 158,
-    SDL_SCANCODE_SEPARATOR = 159,
-    SDL_SCANCODE_OUT = 160,
-    SDL_SCANCODE_OPER = 161,
-    SDL_SCANCODE_CLEARAGAIN = 162,
-    SDL_SCANCODE_CRSEL = 163,
-    SDL_SCANCODE_EXSEL = 164,
-
-    SDL_SCANCODE_KP_00 = 176,
-    SDL_SCANCODE_KP_000 = 177,
-    SDL_SCANCODE_THOUSANDSSEPARATOR = 178,
-    SDL_SCANCODE_DECIMALSEPARATOR = 179,
-    SDL_SCANCODE_CURRENCYUNIT = 180,
-    SDL_SCANCODE_CURRENCYSUBUNIT = 181,
-    SDL_SCANCODE_KP_LEFTPAREN = 182,
-    SDL_SCANCODE_KP_RIGHTPAREN = 183,
-    SDL_SCANCODE_KP_LEFTBRACE = 184,
-    SDL_SCANCODE_KP_RIGHTBRACE = 185,
-    SDL_SCANCODE_KP_TAB = 186,
-    SDL_SCANCODE_KP_BACKSPACE = 187,
-    SDL_SCANCODE_KP_A = 188,
-    SDL_SCANCODE_KP_B = 189,
-    SDL_SCANCODE_KP_C = 190,
-    SDL_SCANCODE_KP_D = 191,
-    SDL_SCANCODE_KP_E = 192,
-    SDL_SCANCODE_KP_F = 193,
-    SDL_SCANCODE_KP_XOR = 194,
-    SDL_SCANCODE_KP_POWER = 195,
-    SDL_SCANCODE_KP_PERCENT = 196,
-    SDL_SCANCODE_KP_LESS = 197,
-    SDL_SCANCODE_KP_GREATER = 198,
-    SDL_SCANCODE_KP_AMPERSAND = 199,
-    SDL_SCANCODE_KP_DBLAMPERSAND = 200,
-    SDL_SCANCODE_KP_VERTICALBAR = 201,
-    SDL_SCANCODE_KP_DBLVERTICALBAR = 202,
-    SDL_SCANCODE_KP_COLON = 203,
-    SDL_SCANCODE_KP_HASH = 204,
-    SDL_SCANCODE_KP_SPACE = 205,
-    SDL_SCANCODE_KP_AT = 206,
-    SDL_SCANCODE_KP_EXCLAM = 207,
-    SDL_SCANCODE_KP_MEMSTORE = 208,
-    SDL_SCANCODE_KP_MEMRECALL = 209,
-    SDL_SCANCODE_KP_MEMCLEAR = 210,
-    SDL_SCANCODE_KP_MEMADD = 211,
-    SDL_SCANCODE_KP_MEMSUBTRACT = 212,
-    SDL_SCANCODE_KP_MEMMULTIPLY = 213,
-    SDL_SCANCODE_KP_MEMDIVIDE = 214,
-    SDL_SCANCODE_KP_PLUSMINUS = 215,
-    SDL_SCANCODE_KP_CLEAR = 216,
-    SDL_SCANCODE_KP_CLEARENTRY = 217,
-    SDL_SCANCODE_KP_BINARY = 218,
-    SDL_SCANCODE_KP_OCTAL = 219,
-    SDL_SCANCODE_KP_DECIMAL = 220,
-    SDL_SCANCODE_KP_HEXADECIMAL = 221,
-
-    SDL_SCANCODE_LCTRL = 224,
-    SDL_SCANCODE_LSHIFT = 225,
-    SDL_SCANCODE_LALT = 226, /**< alt, option */
-    SDL_SCANCODE_LGUI = 227, /**< windows, command (apple), meta */
-    SDL_SCANCODE_RCTRL = 228,
-    SDL_SCANCODE_RSHIFT = 229,
-    SDL_SCANCODE_RALT = 230, /**< alt gr, option */
-    SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */
-
-    SDL_SCANCODE_MODE = 257,    /**< I'm not sure if this is really not covered
-                                 *   by any of the above, but since there's a
-                                 *   special KMOD_MODE for it I'm adding it here
-                                 */
-
-    /* @} *//* Usage page 0x07 */
-
-    /**
-     *  \name Usage page 0x0C
-     *
-     *  These values are mapped from usage page 0x0C (USB consumer page).
-     */
-    /* @{ */
-
-    SDL_SCANCODE_AUDIONEXT = 258,
-    SDL_SCANCODE_AUDIOPREV = 259,
-    SDL_SCANCODE_AUDIOSTOP = 260,
-    SDL_SCANCODE_AUDIOPLAY = 261,
-    SDL_SCANCODE_AUDIOMUTE = 262,
-    SDL_SCANCODE_MEDIASELECT = 263,
-    SDL_SCANCODE_WWW = 264,
-    SDL_SCANCODE_MAIL = 265,
-    SDL_SCANCODE_CALCULATOR = 266,
-    SDL_SCANCODE_COMPUTER = 267,
-    SDL_SCANCODE_AC_SEARCH = 268,
-    SDL_SCANCODE_AC_HOME = 269,
-    SDL_SCANCODE_AC_BACK = 270,
-    SDL_SCANCODE_AC_FORWARD = 271,
-    SDL_SCANCODE_AC_STOP = 272,
-    SDL_SCANCODE_AC_REFRESH = 273,
-    SDL_SCANCODE_AC_BOOKMARKS = 274,
-
-    /* @} *//* Usage page 0x0C */
-
-    /**
-     *  \name Walther keys
-     *
-     *  These are values that Christian Walther added (for mac keyboard?).
-     */
-    /* @{ */
-
-    SDL_SCANCODE_BRIGHTNESSDOWN = 275,
-    SDL_SCANCODE_BRIGHTNESSUP = 276,
-    SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display
-                                           switch, video mode switch */
-    SDL_SCANCODE_KBDILLUMTOGGLE = 278,
-    SDL_SCANCODE_KBDILLUMDOWN = 279,
-    SDL_SCANCODE_KBDILLUMUP = 280,
-    SDL_SCANCODE_EJECT = 281,
-    SDL_SCANCODE_SLEEP = 282,
-
-    SDL_SCANCODE_APP1 = 283,
-    SDL_SCANCODE_APP2 = 284,
-
-    /* @} *//* Walther keys */
-
-    /**
-     *  \name Usage page 0x0C (additional media keys)
-     *
-     *  These values are mapped from usage page 0x0C (USB consumer page).
-     */
-    /* @{ */
-
-    SDL_SCANCODE_AUDIOREWIND = 285,
-    SDL_SCANCODE_AUDIOFASTFORWARD = 286,
-
-    /* @} *//* Usage page 0x0C (additional media keys) */
-
-    /* Add any other keys here. */
-
-    SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes
-                                 for array bounds */
-} SDL_Scancode;
-
-#endif /* SDL_scancode_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_sensor.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_sensor.h
deleted file mode 100644 (file)
index a2f30e0..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_sensor.h
- *
- *  Include file for SDL sensor event handling
- *
- */
-
-#ifndef SDL_sensor_h_
-#define SDL_sensor_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-/* *INDENT-OFF* */
-extern "C" {
-/* *INDENT-ON* */
-#endif
-
-/**
- *  \brief SDL_sensor.h
- *
- *  In order to use these functions, SDL_Init() must have been called
- *  with the ::SDL_INIT_SENSOR flag.  This causes SDL to scan the system
- *  for sensors, and load appropriate drivers.
- */
-
-struct _SDL_Sensor;
-typedef struct _SDL_Sensor SDL_Sensor;
-
-/**
- * This is a unique ID for a sensor for the time it is connected to the system,
- * and is never reused for the lifetime of the application.
- *
- * The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
- */
-typedef Sint32 SDL_SensorID;
-
-/* The different sensors defined by SDL
- *
- * Additional sensors may be available, using platform dependent semantics.
- *
- * Hare are the additional Android sensors:
- * https://developer.android.com/reference/android/hardware/SensorEvent.html#values
- */
-typedef enum
-{
-    SDL_SENSOR_INVALID = -1,    /**< Returned for an invalid sensor */
-    SDL_SENSOR_UNKNOWN,         /**< Unknown sensor type */
-    SDL_SENSOR_ACCEL,           /**< Accelerometer */
-    SDL_SENSOR_GYRO             /**< Gyroscope */
-} SDL_SensorType;
-
-/**
- * Accelerometer sensor
- *
- * The accelerometer returns the current acceleration in SI meters per
- * second squared. This measurement includes the force of gravity, so
- * a device at rest will have an value of SDL_STANDARD_GRAVITY away
- * from the center of the earth.
- *
- * values[0]: Acceleration on the x axis
- * values[1]: Acceleration on the y axis
- * values[2]: Acceleration on the z axis
- *
- * For phones held in portrait mode and game controllers held in front of you,
- * the axes are defined as follows:
- * -X ... +X : left ... right
- * -Y ... +Y : bottom ... top
- * -Z ... +Z : farther ... closer
- * 
- * The axis data is not changed when the phone is rotated.
- *
- * \sa SDL_GetDisplayOrientation()
- */
-#define SDL_STANDARD_GRAVITY    9.80665f
-
-/**
- * Gyroscope sensor
- *
- * The gyroscope returns the current rate of rotation in radians per second.
- * The rotation is positive in the counter-clockwise direction. That is,
- * an observer looking from a positive location on one of the axes would
- * see positive rotation on that axis when it appeared to be rotating
- * counter-clockwise.
- *
- * values[0]: Angular speed around the x axis (pitch)
- * values[1]: Angular speed around the y axis (yaw)
- * values[2]: Angular speed around the z axis (roll)
- *
- * For phones held in portrait mode and game controllers held in front of you,
- * the axes are defined as follows:
- * -X ... +X : left ... right
- * -Y ... +Y : bottom ... top
- * -Z ... +Z : farther ... closer
- * 
- * The axis data is not changed when the phone or controller is rotated.
- *
- * \sa SDL_GetDisplayOrientation()
- */
-
-/* Function prototypes */
-
-/**
- * Locking for multi-threaded access to the sensor API
- *
- * If you are using the sensor API or handling events from multiple threads
- * you should use these locking functions to protect access to the sensors.
- *
- * In particular, you are guaranteed that the sensor list won't change, so the
- * API functions that take a sensor index will be valid, and sensor events
- * will not be delivered.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC void SDLCALL SDL_LockSensors(void);
-extern DECLSPEC void SDLCALL SDL_UnlockSensors(void);
-
-/**
- * Count the number of sensors attached to the system right now.
- *
- * \returns the number of sensors detected.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC int SDLCALL SDL_NumSensors(void);
-
-/**
- * Get the implementation dependent name of a sensor.
- *
- * \param device_index The sensor to obtain name from
- * \returns the sensor name, or NULL if `device_index` is out of range.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index);
-
-/**
- * Get the type of a sensor.
- *
- * \param device_index The sensor to get the type from
- * \returns the SDL_SensorType, or `SDL_SENSOR_INVALID` if `device_index` is
- *          out of range.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index);
-
-/**
- * Get the platform dependent type of a sensor.
- *
- * \param device_index The sensor to check
- * \returns the sensor platform dependent type, or -1 if `device_index` is out
- *          of range.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index);
-
-/**
- * Get the instance ID of a sensor.
- *
- * \param device_index The sensor to get instance id from
- * \returns the sensor instance ID, or -1 if `device_index` is out of range.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index);
-
-/**
- * Open a sensor for use.
- *
- * \param device_index The sensor to open
- * \returns an SDL_Sensor sensor object, or NULL if an error occurred.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index);
-
-/**
- * Return the SDL_Sensor associated with an instance id.
- *
- * \param instance_id The sensor from instance id
- * \returns an SDL_Sensor object.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id);
-
-/**
- * Get the implementation dependent name of a sensor
- *
- * \param sensor The SDL_Sensor object
- * \returns the sensor name, or NULL if `sensor` is NULL.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor);
-
-/**
- * Get the type of a sensor.
- *
- * \param sensor The SDL_Sensor object to inspect
- * \returns the SDL_SensorType type, or `SDL_SENSOR_INVALID` if `sensor` is
- *          NULL.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor);
-
-/**
- * Get the platform dependent type of a sensor.
- *
- * \param sensor The SDL_Sensor object to inspect
- * \returns the sensor platform dependent type, or -1 if `sensor` is NULL.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor);
-
-/**
- * Get the instance ID of a sensor.
- *
- * \param sensor The SDL_Sensor object to inspect
- * \returns the sensor instance ID, or -1 if `sensor` is NULL.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor);
-
-/**
- * Get the current state of an opened sensor.
- *
- * The number of values and interpretation of the data is sensor dependent.
- *
- * \param sensor The SDL_Sensor object to query
- * \param data A pointer filled with the current sensor state
- * \param num_values The number of values to write to data
- * \returns 0 or -1 if an error occurred.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values);
-
-/**
- * Close a sensor previously opened with SDL_SensorOpen().
- *
- * \param sensor The SDL_Sensor object to close
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor);
-
-/**
- * Update the current state of the open sensors.
- *
- * This is called automatically by the event loop if sensor events are
- * enabled.
- *
- * This needs to be called from the thread that initialized the sensor
- * subsystem.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC void SDLCALL SDL_SensorUpdate(void);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-/* *INDENT-OFF* */
-}
-/* *INDENT-ON* */
-#endif
-#include "close_code.h"
-
-#endif /* SDL_sensor_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_shape.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_shape.h
deleted file mode 100644 (file)
index 1bca927..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_shape_h_
-#define SDL_shape_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_pixels.h"
-#include "SDL_rect.h"
-#include "SDL_surface.h"
-#include "SDL_video.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** \file SDL_shape.h
- *
- * Header file for the shaped window API.
- */
-
-#define SDL_NONSHAPEABLE_WINDOW -1
-#define SDL_INVALID_SHAPE_ARGUMENT -2
-#define SDL_WINDOW_LACKS_SHAPE -3
-
-/**
- * Create a window that can be shaped with the specified position, dimensions,
- * and flags.
- *
- * \param title The title of the window, in UTF-8 encoding.
- * \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or
- *          ::SDL_WINDOWPOS_UNDEFINED.
- * \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
- *          ::SDL_WINDOWPOS_UNDEFINED.
- * \param w The width of the window.
- * \param h The height of the window.
- * \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with
- *              any of the following: ::SDL_WINDOW_OPENGL,
- *              ::SDL_WINDOW_INPUT_GRABBED, ::SDL_WINDOW_HIDDEN,
- *              ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED,
- *              ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_BORDERLESS is always set,
- *              and ::SDL_WINDOW_FULLSCREEN is always unset.
- * \return the window created, or NULL if window creation failed.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_DestroyWindow
- */
-extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);
-
-/**
- * Return whether the given window is a shaped window.
- *
- * \param window The window to query for being shaped.
- * \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if
- *         the window is unshaped or NULL.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateShapedWindow
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window);
-
-/** \brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */
-typedef enum {
-    /** \brief The default mode, a binarized alpha cutoff of 1. */
-    ShapeModeDefault,
-    /** \brief A binarized alpha cutoff with a given integer value. */
-    ShapeModeBinarizeAlpha,
-    /** \brief A binarized alpha cutoff with a given integer value, but with the opposite comparison. */
-    ShapeModeReverseBinarizeAlpha,
-    /** \brief A color key is applied. */
-    ShapeModeColorKey
-} WindowShapeMode;
-
-#define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha)
-
-/** \brief A union containing parameters for shaped windows. */
-typedef union {
-    /** \brief A cutoff alpha value for binarization of the window shape's alpha channel. */
-    Uint8 binarizationCutoff;
-    SDL_Color colorKey;
-} SDL_WindowShapeParams;
-
-/** \brief A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. */
-typedef struct SDL_WindowShapeMode {
-    /** \brief The mode of these window-shape parameters. */
-    WindowShapeMode mode;
-    /** \brief Window-shape parameters. */
-    SDL_WindowShapeParams parameters;
-} SDL_WindowShapeMode;
-
-/**
- * Set the shape and parameters of a shaped window.
- *
- * \param window The shaped window whose parameters should be set.
- * \param shape A surface encoding the desired shape for the window.
- * \param shape_mode The parameters to set for the shaped window.
- * \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on an invalid shape
- *         argument, or SDL_NONSHAPEABLE_WINDOW if the SDL_Window given does
- *         not reference a valid shaped window.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_WindowShapeMode
- * \sa SDL_GetShapedWindowMode
- */
-extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode);
-
-/**
- * Get the shape parameters of a shaped window.
- *
- * \param window The shaped window whose parameters should be retrieved.
- * \param shape_mode An empty shape-mode structure to fill, or NULL to check
- *                   whether the window has a shape.
- * \return 0 if the window has a shape and, provided shape_mode was not NULL,
- *         shape_mode has been filled with the mode data,
- *         SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped
- *         window, or SDL_WINDOW_LACKS_SHAPE if the SDL_Window given is a
- *         shapeable window currently lacking a shape.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_WindowShapeMode
- * \sa SDL_SetWindowShape
- */
-extern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_shape_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_stdinc.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_stdinc.h
deleted file mode 100644 (file)
index 449e644..0000000
+++ /dev/null
@@ -1,738 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_stdinc.h
- *
- *  This is a general header that includes C language support.
- */
-
-#ifndef SDL_stdinc_h_
-#define SDL_stdinc_h_
-
-#include "SDL_config.h"
-
-#ifdef __APPLE__
-#ifndef _DARWIN_C_SOURCE
-#define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */
-#endif
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if defined(STDC_HEADERS)
-# include <stdlib.h>
-# include <stddef.h>
-# include <stdarg.h>
-#else
-# if defined(HAVE_STDLIB_H)
-#  include <stdlib.h>
-# elif defined(HAVE_MALLOC_H)
-#  include <malloc.h>
-# endif
-# if defined(HAVE_STDDEF_H)
-#  include <stddef.h>
-# endif
-# if defined(HAVE_STDARG_H)
-#  include <stdarg.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_WCHAR_H
-# include <wchar.h>
-#endif
-#if defined(HAVE_INTTYPES_H)
-# include <inttypes.h>
-#elif defined(HAVE_STDINT_H)
-# include <stdint.h>
-#endif
-#ifdef HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-#ifdef HAVE_MATH_H
-# if defined(__WINRT__)
-/* Defining _USE_MATH_DEFINES is required to get M_PI to be defined on
-   WinRT.  See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
-   for more information.
-*/
-#  define _USE_MATH_DEFINES
-# endif
-# include <math.h>
-#endif
-#ifdef HAVE_FLOAT_H
-# include <float.h>
-#endif
-#if defined(HAVE_ALLOCA) && !defined(alloca)
-# if defined(HAVE_ALLOCA_H)
-#  include <alloca.h>
-# elif defined(__GNUC__)
-#  define alloca __builtin_alloca
-# elif defined(_MSC_VER)
-#  include <malloc.h>
-#  define alloca _alloca
-# elif defined(__WATCOMC__)
-#  include <malloc.h>
-# elif defined(__BORLANDC__)
-#  include <malloc.h>
-# elif defined(__DMC__)
-#  include <stdlib.h>
-# elif defined(__AIX__)
-#pragma alloca
-# elif defined(__MRC__)
-void *alloca(unsigned);
-# else
-char *alloca();
-# endif
-#endif
-
-/**
- * Check if the compiler supports a given builtin.
- * Supported by virtually all clang versions and recent gcc. Use this
- * instead of checking the clang version if possible.
- */
-#ifdef __has_builtin
-#define _SDL_HAS_BUILTIN(x) __has_builtin(x)
-#else
-#define _SDL_HAS_BUILTIN(x) 0
-#endif
-
-/**
- *  The number of elements in an array.
- */
-#define SDL_arraysize(array)    (sizeof(array)/sizeof(array[0]))
-#define SDL_TABLESIZE(table)    SDL_arraysize(table)
-
-/**
- *  Macro useful for building other macros with strings in them
- *
- *  e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
- */
-#define SDL_STRINGIFY_ARG(arg)  #arg
-
-/**
- *  \name Cast operators
- *
- *  Use proper C++ casts when compiled as C++ to be compatible with the option
- *  -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above).
- */
-/* @{ */
-#ifdef __cplusplus
-#define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)
-#define SDL_static_cast(type, expression) static_cast<type>(expression)
-#define SDL_const_cast(type, expression) const_cast<type>(expression)
-#else
-#define SDL_reinterpret_cast(type, expression) ((type)(expression))
-#define SDL_static_cast(type, expression) ((type)(expression))
-#define SDL_const_cast(type, expression) ((type)(expression))
-#endif
-/* @} *//* Cast operators */
-
-/* Define a four character code as a Uint32 */
-#define SDL_FOURCC(A, B, C, D) \
-    ((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \
-     (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (B))) << 8) | \
-     (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (C))) << 16) | \
-     (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (D))) << 24))
-
-/**
- *  \name Basic data types
- */
-/* @{ */
-
-#ifdef __CC_ARM
-/* ARM's compiler throws warnings if we use an enum: like "SDL_bool x = a < b;" */
-#define SDL_FALSE 0
-#define SDL_TRUE 1
-typedef int SDL_bool;
-#else
-typedef enum
-{
-    SDL_FALSE = 0,
-    SDL_TRUE = 1
-} SDL_bool;
-#endif
-
-/**
- * \brief A signed 8-bit integer type.
- */
-#define SDL_MAX_SINT8   ((Sint8)0x7F)           /* 127 */
-#define SDL_MIN_SINT8   ((Sint8)(~0x7F))        /* -128 */
-typedef int8_t Sint8;
-/**
- * \brief An unsigned 8-bit integer type.
- */
-#define SDL_MAX_UINT8   ((Uint8)0xFF)           /* 255 */
-#define SDL_MIN_UINT8   ((Uint8)0x00)           /* 0 */
-typedef uint8_t Uint8;
-/**
- * \brief A signed 16-bit integer type.
- */
-#define SDL_MAX_SINT16  ((Sint16)0x7FFF)        /* 32767 */
-#define SDL_MIN_SINT16  ((Sint16)(~0x7FFF))     /* -32768 */
-typedef int16_t Sint16;
-/**
- * \brief An unsigned 16-bit integer type.
- */
-#define SDL_MAX_UINT16  ((Uint16)0xFFFF)        /* 65535 */
-#define SDL_MIN_UINT16  ((Uint16)0x0000)        /* 0 */
-typedef uint16_t Uint16;
-/**
- * \brief A signed 32-bit integer type.
- */
-#define SDL_MAX_SINT32  ((Sint32)0x7FFFFFFF)    /* 2147483647 */
-#define SDL_MIN_SINT32  ((Sint32)(~0x7FFFFFFF)) /* -2147483648 */
-typedef int32_t Sint32;
-/**
- * \brief An unsigned 32-bit integer type.
- */
-#define SDL_MAX_UINT32  ((Uint32)0xFFFFFFFFu)   /* 4294967295 */
-#define SDL_MIN_UINT32  ((Uint32)0x00000000)    /* 0 */
-typedef uint32_t Uint32;
-
-/**
- * \brief A signed 64-bit integer type.
- */
-#define SDL_MAX_SINT64  ((Sint64)0x7FFFFFFFFFFFFFFFll)      /* 9223372036854775807 */
-#define SDL_MIN_SINT64  ((Sint64)(~0x7FFFFFFFFFFFFFFFll))   /* -9223372036854775808 */
-typedef int64_t Sint64;
-/**
- * \brief An unsigned 64-bit integer type.
- */
-#define SDL_MAX_UINT64  ((Uint64)0xFFFFFFFFFFFFFFFFull)     /* 18446744073709551615 */
-#define SDL_MIN_UINT64  ((Uint64)(0x0000000000000000ull))   /* 0 */
-typedef uint64_t Uint64;
-
-/* @} *//* Basic data types */
-
-/**
- *  \name Floating-point constants
- */
-/* @{ */
-
-#ifdef FLT_EPSILON
-#define SDL_FLT_EPSILON FLT_EPSILON
-#else
-#define SDL_FLT_EPSILON 1.1920928955078125e-07F /* 0x0.000002p0 */
-#endif
-
-/* @} *//* Floating-point constants */
-
-/* Make sure we have macros for printing width-based integers.
- * <stdint.h> should define these but this is not true all platforms.
- * (for example win32) */
-#ifndef SDL_PRIs64
-#ifdef PRIs64
-#define SDL_PRIs64 PRIs64
-#elif defined(__WIN32__)
-#define SDL_PRIs64 "I64d"
-#elif defined(__LINUX__) && defined(__LP64__)
-#define SDL_PRIs64 "ld"
-#else
-#define SDL_PRIs64 "lld"
-#endif
-#endif
-#ifndef SDL_PRIu64
-#ifdef PRIu64
-#define SDL_PRIu64 PRIu64
-#elif defined(__WIN32__)
-#define SDL_PRIu64 "I64u"
-#elif defined(__LINUX__) && defined(__LP64__)
-#define SDL_PRIu64 "lu"
-#else
-#define SDL_PRIu64 "llu"
-#endif
-#endif
-#ifndef SDL_PRIx64
-#ifdef PRIx64
-#define SDL_PRIx64 PRIx64
-#elif defined(__WIN32__)
-#define SDL_PRIx64 "I64x"
-#elif defined(__LINUX__) && defined(__LP64__)
-#define SDL_PRIx64 "lx"
-#else
-#define SDL_PRIx64 "llx"
-#endif
-#endif
-#ifndef SDL_PRIX64
-#ifdef PRIX64
-#define SDL_PRIX64 PRIX64
-#elif defined(__WIN32__)
-#define SDL_PRIX64 "I64X"
-#elif defined(__LINUX__) && defined(__LP64__)
-#define SDL_PRIX64 "lX"
-#else
-#define SDL_PRIX64 "llX"
-#endif
-#endif
-#ifndef SDL_PRIs32
-#ifdef PRId32
-#define SDL_PRIs32 PRId32
-#else
-#define SDL_PRIs32 "d"
-#endif
-#endif
-#ifndef SDL_PRIu32
-#ifdef PRIu32
-#define SDL_PRIu32 PRIu32
-#else
-#define SDL_PRIu32 "u"
-#endif
-#endif
-#ifndef SDL_PRIx32
-#ifdef PRIx32
-#define SDL_PRIx32 PRIx32
-#else
-#define SDL_PRIx32 "x"
-#endif
-#endif
-#ifndef SDL_PRIX32
-#ifdef PRIX32
-#define SDL_PRIX32 PRIX32
-#else
-#define SDL_PRIX32 "X"
-#endif
-#endif
-
-/* Annotations to help code analysis tools */
-#ifdef SDL_DISABLE_ANALYZE_MACROS
-#define SDL_IN_BYTECAP(x)
-#define SDL_INOUT_Z_CAP(x)
-#define SDL_OUT_Z_CAP(x)
-#define SDL_OUT_CAP(x)
-#define SDL_OUT_BYTECAP(x)
-#define SDL_OUT_Z_BYTECAP(x)
-#define SDL_PRINTF_FORMAT_STRING
-#define SDL_SCANF_FORMAT_STRING
-#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
-#define SDL_SCANF_VARARG_FUNC( fmtargnumber )
-#else
-#if defined(_MSC_VER) && (_MSC_VER >= 1600) /* VS 2010 and above */
-#include <sal.h>
-
-#define SDL_IN_BYTECAP(x) _In_bytecount_(x)
-#define SDL_INOUT_Z_CAP(x) _Inout_z_cap_(x)
-#define SDL_OUT_Z_CAP(x) _Out_z_cap_(x)
-#define SDL_OUT_CAP(x) _Out_cap_(x)
-#define SDL_OUT_BYTECAP(x) _Out_bytecap_(x)
-#define SDL_OUT_Z_BYTECAP(x) _Out_z_bytecap_(x)
-
-#define SDL_PRINTF_FORMAT_STRING _Printf_format_string_
-#define SDL_SCANF_FORMAT_STRING _Scanf_format_string_impl_
-#else
-#define SDL_IN_BYTECAP(x)
-#define SDL_INOUT_Z_CAP(x)
-#define SDL_OUT_Z_CAP(x)
-#define SDL_OUT_CAP(x)
-#define SDL_OUT_BYTECAP(x)
-#define SDL_OUT_Z_BYTECAP(x)
-#define SDL_PRINTF_FORMAT_STRING
-#define SDL_SCANF_FORMAT_STRING
-#endif
-#if defined(__GNUC__)
-#define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 )))
-#define SDL_SCANF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __scanf__, fmtargnumber, fmtargnumber+1 )))
-#else
-#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
-#define SDL_SCANF_VARARG_FUNC( fmtargnumber )
-#endif
-#endif /* SDL_DISABLE_ANALYZE_MACROS */
-
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
-#define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x)
-#elif defined(__cplusplus) && (__cplusplus >= 201103L)
-#define SDL_COMPILE_TIME_ASSERT(name, x)  static_assert(x, #x)
-#else /* universal, but may trigger -Wunused-local-typedefs */
-#define SDL_COMPILE_TIME_ASSERT(name, x)               \
-       typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
-#endif
-/** \cond */
-#ifndef DOXYGEN_SHOULD_IGNORE_THIS
-SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
-SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
-SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
-SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
-SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
-SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
-SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
-SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
-#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
-/** \endcond */
-
-/* Check to make sure enums are the size of ints, for structure packing.
-   For both Watcom C/C++ and Borland C/C++ the compiler option that makes
-   enums having the size of an int must be enabled.
-   This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
-*/
-
-/** \cond */
-#ifndef DOXYGEN_SHOULD_IGNORE_THIS
-#if !defined(__ANDROID__) && !defined(__VITA__)
-   /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
-typedef enum
-{
-    DUMMY_ENUM_VALUE
-} SDL_DUMMY_ENUM;
-
-SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
-#endif
-#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
-/** \endcond */
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef HAVE_ALLOCA
-#define SDL_stack_alloc(type, count)    (type*)alloca(sizeof(type)*(count))
-#define SDL_stack_free(data)
-#else
-#define SDL_stack_alloc(type, count)    (type*)SDL_malloc(sizeof(type)*(count))
-#define SDL_stack_free(data)            SDL_free(data)
-#endif
-
-extern DECLSPEC void *SDLCALL SDL_malloc(size_t size);
-extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
-extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
-extern DECLSPEC void SDLCALL SDL_free(void *mem);
-
-typedef void *(SDLCALL *SDL_malloc_func)(size_t size);
-typedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size);
-typedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size);
-typedef void (SDLCALL *SDL_free_func)(void *mem);
-
-/**
- * Get the current set of SDL memory functions
- *
- * \since This function is available since SDL 2.0.7.
- */
-extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
-                                                    SDL_calloc_func *calloc_func,
-                                                    SDL_realloc_func *realloc_func,
-                                                    SDL_free_func *free_func);
-
-/**
- * Replace SDL's memory allocation functions with a custom set
- *
- * \since This function is available since SDL 2.0.7.
- */
-extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
-                                                   SDL_calloc_func calloc_func,
-                                                   SDL_realloc_func realloc_func,
-                                                   SDL_free_func free_func);
-
-/**
- * Get the number of outstanding (unfreed) allocations
- *
- * \since This function is available since SDL 2.0.7.
- */
-extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
-
-extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
-extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
-
-extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *));
-
-extern DECLSPEC int SDLCALL SDL_abs(int x);
-
-/* NOTE: these double-evaluate their arguments, so you should never have side effects in the parameters */
-#define SDL_min(x, y) (((x) < (y)) ? (x) : (y))
-#define SDL_max(x, y) (((x) > (y)) ? (x) : (y))
-#define SDL_clamp(x, a, b) (((x) < (a)) ? (a) : (((x) > (b)) ? (b) : (x)))
-
-extern DECLSPEC int SDLCALL SDL_isalpha(int x);
-extern DECLSPEC int SDLCALL SDL_isalnum(int x);
-extern DECLSPEC int SDLCALL SDL_isblank(int x);
-extern DECLSPEC int SDLCALL SDL_iscntrl(int x);
-extern DECLSPEC int SDLCALL SDL_isdigit(int x);
-extern DECLSPEC int SDLCALL SDL_isxdigit(int x);
-extern DECLSPEC int SDLCALL SDL_ispunct(int x);
-extern DECLSPEC int SDLCALL SDL_isspace(int x);
-extern DECLSPEC int SDLCALL SDL_isupper(int x);
-extern DECLSPEC int SDLCALL SDL_islower(int x);
-extern DECLSPEC int SDLCALL SDL_isprint(int x);
-extern DECLSPEC int SDLCALL SDL_isgraph(int x);
-extern DECLSPEC int SDLCALL SDL_toupper(int x);
-extern DECLSPEC int SDLCALL SDL_tolower(int x);
-
-extern DECLSPEC Uint32 SDLCALL SDL_crc32(Uint32 crc, const void *data, size_t len);
-
-extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len);
-
-#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
-#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
-#define SDL_zeroa(x) SDL_memset((x), 0, sizeof((x)))
-
-/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
-SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
-{
-#ifdef __APPLE__
-    memset_pattern4(dst, &val, dwords * 4);
-#elif defined(__GNUC__) && defined(__i386__)
-    int u0, u1, u2;
-    __asm__ __volatile__ (
-        "cld \n\t"
-        "rep ; stosl \n\t"
-        : "=&D" (u0), "=&a" (u1), "=&c" (u2)
-        : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, dwords))
-        : "memory"
-    );
-#else
-    size_t _n = (dwords + 3) / 4;
-    Uint32 *_p = SDL_static_cast(Uint32 *, dst);
-    Uint32 _val = (val);
-    if (dwords == 0) {
-        return;
-    }
-    switch (dwords % 4) {
-        case 0: do {    *_p++ = _val;   SDL_FALLTHROUGH;
-        case 3:         *_p++ = _val;   SDL_FALLTHROUGH;
-        case 2:         *_p++ = _val;   SDL_FALLTHROUGH;
-        case 1:         *_p++ = _val;
-        } while ( --_n );
-    }
-#endif
-}
-
-extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
-
-extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
-extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
-
-extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
-extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
-extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
-extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
-extern DECLSPEC wchar_t *SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle);
-
-extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);
-extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);
-extern DECLSPEC int SDLCALL SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2);
-extern DECLSPEC int SDLCALL SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t len);
-
-extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
-extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
-extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(SDL_OUT_Z_CAP(dst_bytes) char *dst, const char *src, size_t dst_bytes);
-extern DECLSPEC size_t SDLCALL SDL_strlcat(SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
-extern DECLSPEC char *SDLCALL SDL_strdup(const char *str);
-extern DECLSPEC char *SDLCALL SDL_strrev(char *str);
-extern DECLSPEC char *SDLCALL SDL_strupr(char *str);
-extern DECLSPEC char *SDLCALL SDL_strlwr(char *str);
-extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
-extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
-extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
-extern DECLSPEC char *SDLCALL SDL_strtokr(char *s1, const char *s2, char **saveptr);
-extern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);
-
-extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
-extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
-extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix);
-extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix);
-extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *str, int radix);
-extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *str, int radix);
-
-extern DECLSPEC int SDLCALL SDL_atoi(const char *str);
-extern DECLSPEC double SDLCALL SDL_atof(const char *str);
-extern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base);
-extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base);
-extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base);
-extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base);
-extern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp);
-
-extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
-extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);
-extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
-extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
-
-extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) SDL_SCANF_VARARG_FUNC(2);
-extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);
-extern 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);
-extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap);
-extern DECLSPEC int SDLCALL SDL_asprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
-extern DECLSPEC int SDLCALL SDL_vasprintf(char **strp, const char *fmt, va_list ap);
-
-#ifndef HAVE_M_PI
-#ifndef M_PI
-#define M_PI    3.14159265358979323846264338327950288   /**< pi */
-#endif
-#endif
-
-/**
- * Use this function to compute arc cosine of `x`.
- *
- * The definition of `y = acos(x)` is `x = cos(y)`.
- *
- * Domain: `-1 <= x <= 1`
- *
- * Range: `0 <= y <= Pi`
- *
- * \param x floating point value, in radians.
- * \returns arc cosine of `x`.
- *
- * \since This function is available since SDL 2.0.2.
- */
-extern DECLSPEC double SDLCALL SDL_acos(double x);
-extern DECLSPEC float SDLCALL SDL_acosf(float x);
-extern DECLSPEC double SDLCALL SDL_asin(double x);
-extern DECLSPEC float SDLCALL SDL_asinf(float x);
-extern DECLSPEC double SDLCALL SDL_atan(double x);
-extern DECLSPEC float SDLCALL SDL_atanf(float x);
-extern DECLSPEC double SDLCALL SDL_atan2(double y, double x);
-extern DECLSPEC float SDLCALL SDL_atan2f(float y, float x);
-extern DECLSPEC double SDLCALL SDL_ceil(double x);
-extern DECLSPEC float SDLCALL SDL_ceilf(float x);
-extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
-extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y);
-extern DECLSPEC double SDLCALL SDL_cos(double x);
-extern DECLSPEC float SDLCALL SDL_cosf(float x);
-extern DECLSPEC double SDLCALL SDL_exp(double x);
-extern DECLSPEC float SDLCALL SDL_expf(float x);
-extern DECLSPEC double SDLCALL SDL_fabs(double x);
-extern DECLSPEC float SDLCALL SDL_fabsf(float x);
-extern DECLSPEC double SDLCALL SDL_floor(double x);
-extern DECLSPEC float SDLCALL SDL_floorf(float x);
-extern DECLSPEC double SDLCALL SDL_trunc(double x);
-extern DECLSPEC float SDLCALL SDL_truncf(float x);
-extern DECLSPEC double SDLCALL SDL_fmod(double x, double y);
-extern DECLSPEC float SDLCALL SDL_fmodf(float x, float y);
-extern DECLSPEC double SDLCALL SDL_log(double x);
-extern DECLSPEC float SDLCALL SDL_logf(float x);
-extern DECLSPEC double SDLCALL SDL_log10(double x);
-extern DECLSPEC float SDLCALL SDL_log10f(float x);
-extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
-extern DECLSPEC float SDLCALL SDL_powf(float x, float y);
-extern DECLSPEC double SDLCALL SDL_round(double x);
-extern DECLSPEC float SDLCALL SDL_roundf(float x);
-extern DECLSPEC long SDLCALL SDL_lround(double x);
-extern DECLSPEC long SDLCALL SDL_lroundf(float x);
-extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
-extern DECLSPEC float SDLCALL SDL_scalbnf(float x, int n);
-extern DECLSPEC double SDLCALL SDL_sin(double x);
-extern DECLSPEC float SDLCALL SDL_sinf(float x);
-extern DECLSPEC double SDLCALL SDL_sqrt(double x);
-extern DECLSPEC float SDLCALL SDL_sqrtf(float x);
-extern DECLSPEC double SDLCALL SDL_tan(double x);
-extern DECLSPEC float SDLCALL SDL_tanf(float x);
-
-/* The SDL implementation of iconv() returns these error codes */
-#define SDL_ICONV_ERROR     (size_t)-1
-#define SDL_ICONV_E2BIG     (size_t)-2
-#define SDL_ICONV_EILSEQ    (size_t)-3
-#define SDL_ICONV_EINVAL    (size_t)-4
-
-/* SDL_iconv_* are now always real symbols/types, not macros or inlined. */
-typedef struct _SDL_iconv_t *SDL_iconv_t;
-extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,
-                                                   const char *fromcode);
-extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
-extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
-                                         size_t * inbytesleft, char **outbuf,
-                                         size_t * outbytesleft);
-
-/**
- * This function converts a string between encodings in one pass, returning a
- * string that must be freed with SDL_free() or NULL on error.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
-                                               const char *fromcode,
-                                               const char *inbuf,
-                                               size_t inbytesleft);
-#define SDL_iconv_utf8_locale(S)    SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
-#define SDL_iconv_utf8_ucs2(S)      (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
-#define SDL_iconv_utf8_ucs4(S)      (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
-#define SDL_iconv_wchar_utf8(S)     SDL_iconv_string("UTF-8", "WCHAR_T", (char *)S, (SDL_wcslen(S)+1)*sizeof(wchar_t))
-
-/* force builds using Clang's static analysis tools to use literal C runtime
-   here, since there are possibly tests that are ineffective otherwise. */
-#if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
-
-/* The analyzer knows about strlcpy even when the system doesn't provide it */
-#ifndef HAVE_STRLCPY
-size_t strlcpy(char* dst, const char* src, size_t size);
-#endif
-
-/* The analyzer knows about strlcat even when the system doesn't provide it */
-#ifndef HAVE_STRLCAT
-size_t strlcat(char* dst, const char* src, size_t size);
-#endif
-
-#define SDL_malloc malloc
-#define SDL_calloc calloc
-#define SDL_realloc realloc
-#define SDL_free free
-#define SDL_memset memset
-#define SDL_memcpy memcpy
-#define SDL_memmove memmove
-#define SDL_memcmp memcmp
-#define SDL_strlcpy strlcpy
-#define SDL_strlcat strlcat
-#define SDL_strlen strlen
-#define SDL_wcslen wcslen
-#define SDL_wcslcpy wcslcpy
-#define SDL_wcslcat wcslcat
-#define SDL_strdup strdup
-#define SDL_wcsdup wcsdup
-#define SDL_strchr strchr
-#define SDL_strrchr strrchr
-#define SDL_strstr strstr
-#define SDL_wcsstr wcsstr
-#define SDL_strtokr strtok_r
-#define SDL_strcmp strcmp
-#define SDL_wcscmp wcscmp
-#define SDL_strncmp strncmp
-#define SDL_wcsncmp wcsncmp
-#define SDL_strcasecmp strcasecmp
-#define SDL_strncasecmp strncasecmp
-#define SDL_sscanf sscanf
-#define SDL_vsscanf vsscanf
-#define SDL_snprintf snprintf
-#define SDL_vsnprintf vsnprintf
-#endif
-
-SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_BYTECAP(dwords*4) const void *src, size_t dwords)
-{
-    return SDL_memcpy(dst, src, dwords * 4);
-}
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_stdinc_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_surface.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_surface.h
deleted file mode 100644 (file)
index 4412376..0000000
+++ /dev/null
@@ -1,995 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_surface.h
- *
- *  Header file for ::SDL_Surface definition and management functions.
- */
-
-#ifndef SDL_surface_h_
-#define SDL_surface_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_pixels.h"
-#include "SDL_rect.h"
-#include "SDL_blendmode.h"
-#include "SDL_rwops.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \name Surface flags
- *
- *  These are the currently supported flags for the ::SDL_Surface.
- *
- *  \internal
- *  Used internally (read-only).
- */
-/* @{ */
-#define SDL_SWSURFACE       0           /**< Just here for compatibility */
-#define SDL_PREALLOC        0x00000001  /**< Surface uses preallocated memory */
-#define SDL_RLEACCEL        0x00000002  /**< Surface is RLE encoded */
-#define SDL_DONTFREE        0x00000004  /**< Surface is referenced internally */
-#define SDL_SIMD_ALIGNED    0x00000008  /**< Surface uses aligned memory */
-/* @} *//* Surface flags */
-
-/**
- *  Evaluates to true if the surface needs to be locked before access.
- */
-#define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0)
-
-/**
- * \brief A collection of pixels used in software blitting.
- *
- * \note  This structure should be treated as read-only, except for \c pixels,
- *        which, if not NULL, contains the raw pixel data for the surface.
- */
-typedef struct SDL_Surface
-{
-    Uint32 flags;               /**< Read-only */
-    SDL_PixelFormat *format;    /**< Read-only */
-    int w, h;                   /**< Read-only */
-    int pitch;                  /**< Read-only */
-    void *pixels;               /**< Read-write */
-
-    /** Application data associated with the surface */
-    void *userdata;             /**< Read-write */
-
-    /** information needed for surfaces requiring locks */
-    int locked;                 /**< Read-only */
-
-    /** list of BlitMap that hold a reference to this surface */
-    void *list_blitmap;         /**< Private */
-
-    /** clipping information */
-    SDL_Rect clip_rect;         /**< Read-only */
-
-    /** info for fast blit mapping to other surfaces */
-    struct SDL_BlitMap *map;    /**< Private */
-
-    /** Reference count -- used when freeing surface */
-    int refcount;               /**< Read-mostly */
-} SDL_Surface;
-
-/**
- * \brief The type of function used for surface blitting functions.
- */
-typedef int (SDLCALL *SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
-                                 struct SDL_Surface * dst, SDL_Rect * dstrect);
-
-/**
- * \brief The formula used for converting between YUV and RGB
- */
-typedef enum
-{
-    SDL_YUV_CONVERSION_JPEG,        /**< Full range JPEG */
-    SDL_YUV_CONVERSION_BT601,       /**< BT.601 (the default) */
-    SDL_YUV_CONVERSION_BT709,       /**< BT.709 */
-    SDL_YUV_CONVERSION_AUTOMATIC    /**< BT.601 for SD content, BT.709 for HD content */
-} SDL_YUV_CONVERSION_MODE;
-
-/**
- * Allocate a new RGB surface.
- *
- * If `depth` is 4 or 8 bits, an empty palette is allocated for the surface.
- * If `depth` is greater than 8 bits, the pixel format is set using the
- * [RGBA]mask parameters.
- *
- * The [RGBA]mask parameters are the bitmasks used to extract that color from
- * a pixel. For instance, `Rmask` being 0xFF000000 means the red data is
- * stored in the most significant byte. Using zeros for the RGB masks sets a
- * default value, based on the depth. For example:
- *
- * ```c++
- * SDL_CreateRGBSurface(0,w,h,32,0,0,0,0);
- * ```
- *
- * However, using zero for the Amask results in an Amask of 0.
- *
- * By default surfaces with an alpha mask are set up for blending as with:
- *
- * ```c++
- * SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_BLEND)
- * ```
- *
- * You can change this by calling SDL_SetSurfaceBlendMode() and selecting a
- * different `blendMode`.
- *
- * \param flags the flags are unused and should be set to 0
- * \param width the width of the surface
- * \param height the height of the surface
- * \param depth the depth of the surface in bits
- * \param Rmask the red mask for the pixels
- * \param Gmask the green mask for the pixels
- * \param Bmask the blue mask for the pixels
- * \param Amask the alpha mask for the pixels
- * \returns the new SDL_Surface structure that is created or NULL if it fails;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateRGBSurfaceFrom
- * \sa SDL_CreateRGBSurfaceWithFormat
- * \sa SDL_FreeSurface
- */
-extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
-    (Uint32 flags, int width, int height, int depth,
-     Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
-
-
-/* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */
-
-/**
- * Allocate a new RGB surface with a specific pixel format.
- *
- * This function operates mostly like SDL_CreateRGBSurface(), except instead
- * of providing pixel color masks, you provide it with a predefined format
- * from SDL_PixelFormatEnum.
- *
- * \param flags the flags are unused and should be set to 0
- * \param width the width of the surface
- * \param height the height of the surface
- * \param depth the depth of the surface in bits
- * \param format the SDL_PixelFormatEnum for the new surface's pixel format.
- * \returns the new SDL_Surface structure that is created or NULL if it fails;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.5.
- *
- * \sa SDL_CreateRGBSurface
- * \sa SDL_CreateRGBSurfaceFrom
- * \sa SDL_FreeSurface
- */
-extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
-    (Uint32 flags, int width, int height, int depth, Uint32 format);
-
-/**
- * Allocate a new RGB surface with existing pixel data.
- *
- * This function operates mostly like SDL_CreateRGBSurface(), except it does
- * not allocate memory for the pixel data, instead the caller provides an
- * existing buffer of data for the surface to use.
- *
- * No copy is made of the pixel data. Pixel data is not managed automatically;
- * you must free the surface before you free the pixel data.
- *
- * \param pixels a pointer to existing pixel data
- * \param width the width of the surface
- * \param height the height of the surface
- * \param depth the depth of the surface in bits
- * \param pitch the pitch of the surface in bytes
- * \param Rmask the red mask for the pixels
- * \param Gmask the green mask for the pixels
- * \param Bmask the blue mask for the pixels
- * \param Amask the alpha mask for the pixels
- * \returns the new SDL_Surface structure that is created or NULL if it fails;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateRGBSurface
- * \sa SDL_CreateRGBSurfaceWithFormat
- * \sa SDL_FreeSurface
- */
-extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
-                                                              int width,
-                                                              int height,
-                                                              int depth,
-                                                              int pitch,
-                                                              Uint32 Rmask,
-                                                              Uint32 Gmask,
-                                                              Uint32 Bmask,
-                                                              Uint32 Amask);
-
-/* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */
-
-/**
- * Allocate a new RGB surface with with a specific pixel format and existing
- * pixel data.
- *
- * This function operates mostly like SDL_CreateRGBSurfaceFrom(), except
- * instead of providing pixel color masks, you provide it with a predefined
- * format from SDL_PixelFormatEnum.
- *
- * No copy is made of the pixel data. Pixel data is not managed automatically;
- * you must free the surface before you free the pixel data.
- *
- * \param pixels a pointer to existing pixel data
- * \param width the width of the surface
- * \param height the height of the surface
- * \param depth the depth of the surface in bits
- * \param pitch the pitch of the surface in bytes
- * \param format the SDL_PixelFormatEnum for the new surface's pixel format.
- * \returns the new SDL_Surface structure that is created or NULL if it fails;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.5.
- *
- * \sa SDL_CreateRGBSurfaceFrom
- * \sa SDL_CreateRGBSurfaceWithFormat
- * \sa SDL_FreeSurface
- */
-extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
-    (void *pixels, int width, int height, int depth, int pitch, Uint32 format);
-
-/**
- * Free an RGB surface.
- *
- * It is safe to pass NULL to this function.
- *
- * \param surface the SDL_Surface to free.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateRGBSurface
- * \sa SDL_CreateRGBSurfaceFrom
- * \sa SDL_LoadBMP
- * \sa SDL_LoadBMP_RW
- */
-extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
-
-/**
- * Set the palette used by a surface.
- *
- * A single palette can be shared with many surfaces.
- *
- * \param surface the SDL_Surface structure to update
- * \param palette the SDL_Palette structure to use
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,
-                                                  SDL_Palette * palette);
-
-/**
- * Set up a surface for directly accessing the pixels.
- *
- * Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write to
- * and read from `surface->pixels`, using the pixel format stored in
- * `surface->format`. Once you are done accessing the surface, you should use
- * SDL_UnlockSurface() to release it.
- *
- * Not all surfaces require locking. If `SDL_MUSTLOCK(surface)` evaluates to
- * 0, then you can read and write to the surface at any time, and the pixel
- * format of the surface will not change.
- *
- * \param surface the SDL_Surface structure to be locked
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_MUSTLOCK
- * \sa SDL_UnlockSurface
- */
-extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
-
-/**
- * Release a surface after directly accessing the pixels.
- *
- * \param surface the SDL_Surface structure to be unlocked
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LockSurface
- */
-extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
-
-/**
- * Load a BMP image from a seekable SDL data stream.
- *
- * The new surface should be freed with SDL_FreeSurface(). Not doing so will
- * result in a memory leak.
- *
- * src is an open SDL_RWops buffer, typically loaded with SDL_RWFromFile.
- * Alternitavely, you might also use the macro SDL_LoadBMP to load a bitmap
- * from a file, convert it to an SDL_Surface and then close the file.
- *
- * \param src the data stream for the surface
- * \param freesrc non-zero to close the stream after being read
- * \returns a pointer to a new SDL_Surface structure or NULL if there was an
- *          error; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_FreeSurface
- * \sa SDL_RWFromFile
- * \sa SDL_LoadBMP
- * \sa SDL_SaveBMP_RW
- */
-extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
-                                                    int freesrc);
-
-/**
- * Load a surface from a file.
- *
- * Convenience macro.
- */
-#define SDL_LoadBMP(file)   SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
-
-/**
- * Save a surface to a seekable SDL data stream in BMP format.
- *
- * Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
- * BMP directly. Other RGB formats with 8-bit or higher get converted to a
- * 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
- * surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
- * not supported.
- *
- * \param surface the SDL_Surface structure containing the image to be saved
- * \param dst a data stream to save to
- * \param freedst non-zero to close the stream after being written
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_LoadBMP_RW
- * \sa SDL_SaveBMP
- */
-extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
-    (SDL_Surface * surface, SDL_RWops * dst, int freedst);
-
-/**
- *  Save a surface to a file.
- *
- *  Convenience macro.
- */
-#define SDL_SaveBMP(surface, file) \
-        SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
-
-/**
- * Set the RLE acceleration hint for a surface.
- *
- * If RLE is enabled, color key and alpha blending blits are much faster, but
- * the surface must be locked before directly accessing the pixels.
- *
- * \param surface the SDL_Surface structure to optimize
- * \param flag 0 to disable, non-zero to enable RLE acceleration
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_BlitSurface
- * \sa SDL_LockSurface
- * \sa SDL_UnlockSurface
- */
-extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
-                                              int flag);
-
-/**
- * Returns whether the surface is RLE enabled
- *
- * It is safe to pass a NULL `surface` here; it will return SDL_FALSE.
- *
- * \param surface the SDL_Surface structure to query
- * \returns SDL_TRUE if the surface is RLE enabled, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.14.
- *
- * \sa SDL_SetSurfaceRLE
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasSurfaceRLE(SDL_Surface * surface);
-
-/**
- * Set the color key (transparent pixel) in a surface.
- *
- * The color key defines a pixel value that will be treated as transparent in
- * a blit. For example, one can use this to specify that cyan pixels should be
- * considered transparent, and therefore not rendered.
- *
- * It is a pixel of the format used by the surface, as generated by
- * SDL_MapRGB().
- *
- * RLE acceleration can substantially speed up blitting of images with large
- * horizontal runs of transparent pixels. See SDL_SetSurfaceRLE() for details.
- *
- * \param surface the SDL_Surface structure to update
- * \param flag SDL_TRUE to enable color key, SDL_FALSE to disable color key
- * \param key the transparent pixel
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_BlitSurface
- * \sa SDL_GetColorKey
- */
-extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
-                                            int flag, Uint32 key);
-
-/**
- * Returns whether the surface has a color key
- *
- * It is safe to pass a NULL `surface` here; it will return SDL_FALSE.
- *
- * \param surface the SDL_Surface structure to query
- * \return SDL_TRUE if the surface has a color key, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.9.
- *
- * \sa SDL_SetColorKey
- * \sa SDL_GetColorKey
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface);
-
-/**
- * Get the color key (transparent pixel) for a surface.
- *
- * The color key is a pixel of the format used by the surface, as generated by
- * SDL_MapRGB().
- *
- * If the surface doesn't have color key enabled this function returns -1.
- *
- * \param surface the SDL_Surface structure to query
- * \param key a pointer filled in with the transparent pixel
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_BlitSurface
- * \sa SDL_SetColorKey
- */
-extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface,
-                                            Uint32 * key);
-
-/**
- * Set an additional color value multiplied into blit operations.
- *
- * When this surface is blitted, during the blit operation each source color
- * channel is modulated by the appropriate color value according to the
- * following formula:
- *
- * `srcC = srcC * (color / 255)`
- *
- * \param surface the SDL_Surface structure to update
- * \param r the red color value multiplied into blit operations
- * \param g the green color value multiplied into blit operations
- * \param b the blue color value multiplied into blit operations
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetSurfaceColorMod
- * \sa SDL_SetSurfaceAlphaMod
- */
-extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface,
-                                                   Uint8 r, Uint8 g, Uint8 b);
-
-
-/**
- * Get the additional color value multiplied into blit operations.
- *
- * \param surface the SDL_Surface structure to query
- * \param r a pointer filled in with the current red color value
- * \param g a pointer filled in with the current green color value
- * \param b a pointer filled in with the current blue color value
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetSurfaceAlphaMod
- * \sa SDL_SetSurfaceColorMod
- */
-extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface,
-                                                   Uint8 * r, Uint8 * g,
-                                                   Uint8 * b);
-
-/**
- * Set an additional alpha value used in blit operations.
- *
- * When this surface is blitted, during the blit operation the source alpha
- * value is modulated by this alpha value according to the following formula:
- *
- * `srcA = srcA * (alpha / 255)`
- *
- * \param surface the SDL_Surface structure to update
- * \param alpha the alpha value multiplied into blit operations
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetSurfaceAlphaMod
- * \sa SDL_SetSurfaceColorMod
- */
-extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface,
-                                                   Uint8 alpha);
-
-/**
- * Get the additional alpha value used in blit operations.
- *
- * \param surface the SDL_Surface structure to query
- * \param alpha a pointer filled in with the current alpha value
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetSurfaceColorMod
- * \sa SDL_SetSurfaceAlphaMod
- */
-extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface,
-                                                   Uint8 * alpha);
-
-/**
- * Set the blend mode used for blit operations.
- *
- * To copy a surface to another surface (or texture) without blending with the
- * existing data, the blendmode of the SOURCE surface should be set to
- * `SDL_BLENDMODE_NONE`.
- *
- * \param surface the SDL_Surface structure to update
- * \param blendMode the SDL_BlendMode to use for blit blending
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetSurfaceBlendMode
- */
-extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,
-                                                    SDL_BlendMode blendMode);
-
-/**
- * Get the blend mode used for blit operations.
- *
- * \param surface the SDL_Surface structure to query
- * \param blendMode a pointer filled in with the current SDL_BlendMode
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetSurfaceBlendMode
- */
-extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,
-                                                    SDL_BlendMode *blendMode);
-
-/**
- * Set the clipping rectangle for a surface.
- *
- * When `surface` is the destination of a blit, only the area within the clip
- * rectangle is drawn into.
- *
- * Note that blits are automatically clipped to the edges of the source and
- * destination surfaces.
- *
- * \param surface the SDL_Surface structure to be clipped
- * \param rect the SDL_Rect structure representing the clipping rectangle, or
- *             NULL to disable clipping
- * \returns SDL_TRUE if the rectangle intersects the surface, otherwise
- *          SDL_FALSE and blits will be completely clipped.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_BlitSurface
- * \sa SDL_GetClipRect
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
-                                                 const SDL_Rect * rect);
-
-/**
- * Get the clipping rectangle for a surface.
- *
- * When `surface` is the destination of a blit, only the area within the clip
- * rectangle is drawn into.
- *
- * \param surface the SDL_Surface structure representing the surface to be
- *                clipped
- * \param rect an SDL_Rect structure filled in with the clipping rectangle for
- *             the surface
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_BlitSurface
- * \sa SDL_SetClipRect
- */
-extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
-                                             SDL_Rect * rect);
-
-/*
- * Creates a new surface identical to the existing surface.
- *
- * The returned surface should be freed with SDL_FreeSurface().
- *
- * \param surface the surface to duplicate.
- * \returns a copy of the surface, or NULL on failure; call SDL_GetError() for
- *          more information.
- */
-extern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface);
-
-/**
- * Copy an existing surface to a new surface of the specified format.
- *
- * This function is used to optimize images for faster *repeat* blitting. This
- * is accomplished by converting the original and storing the result as a new
- * surface. The new, optimized surface can then be used as the source for
- * future blits, making them faster.
- *
- * \param src the existing SDL_Surface structure to convert
- * \param fmt the SDL_PixelFormat structure that the new surface is optimized
- *            for
- * \param flags the flags are unused and should be set to 0; this is a
- *              leftover from SDL 1.2's API
- * \returns the new SDL_Surface structure that is created or NULL if it fails;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AllocFormat
- * \sa SDL_ConvertSurfaceFormat
- * \sa SDL_CreateRGBSurface
- */
-extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
-    (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags);
-
-/**
- * Copy an existing surface to a new surface of the specified format enum.
- *
- * This function operates just like SDL_ConvertSurface(), but accepts an
- * SDL_PixelFormatEnum value instead of an SDL_PixelFormat structure. As such,
- * it might be easier to call but it doesn't have access to palette
- * information for the destination surface, in case that would be important.
- *
- * \param src the existing SDL_Surface structure to convert
- * \param pixel_format the SDL_PixelFormatEnum that the new surface is
- *                     optimized for
- * \param flags the flags are unused and should be set to 0; this is a
- *              leftover from SDL 1.2's API
- * \returns the new SDL_Surface structure that is created or NULL if it fails;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AllocFormat
- * \sa SDL_ConvertSurface
- * \sa SDL_CreateRGBSurface
- */
-extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat
-    (SDL_Surface * src, Uint32 pixel_format, Uint32 flags);
-
-/**
- * Copy a block of pixels of one format to another format.
- *
- * \param width the width of the block to copy, in pixels
- * \param height the height of the block to copy, in pixels
- * \param src_format an SDL_PixelFormatEnum value of the `src` pixels format
- * \param src a pointer to the source pixels
- * \param src_pitch the pitch of the source pixels, in bytes
- * \param dst_format an SDL_PixelFormatEnum value of the `dst` pixels format
- * \param dst a pointer to be filled in with new pixel data
- * \param dst_pitch the pitch of the destination pixels, in bytes
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height,
-                                              Uint32 src_format,
-                                              const void * src, int src_pitch,
-                                              Uint32 dst_format,
-                                              void * dst, int dst_pitch);
-
-/**
- * Premultiply the alpha on a block of pixels.
- *
- * This is safe to use with src == dst, but not for other overlapping areas.
- *
- * This function is currently only implemented for SDL_PIXELFORMAT_ARGB8888.
- *
- * \param width the width of the block to convert, in pixels
- * \param height the height of the block to convert, in pixels
- * \param src_format an SDL_PixelFormatEnum value of the `src` pixels format
- * \param src a pointer to the source pixels
- * \param src_pitch the pitch of the source pixels, in bytes
- * \param dst_format an SDL_PixelFormatEnum value of the `dst` pixels format
- * \param dst a pointer to be filled in with premultiplied pixel data
- * \param dst_pitch the pitch of the destination pixels, in bytes
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC int SDLCALL SDL_PremultiplyAlpha(int width, int height,
-                                                 Uint32 src_format,
-                                                 const void * src, int src_pitch,
-                                                 Uint32 dst_format,
-                                                 void * dst, int dst_pitch);
-
-/**
- * Perform a fast fill of a rectangle with a specific color.
- *
- * `color` should be a pixel of the format used by the surface, and can be
- * generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an
- * alpha component then the destination is simply filled with that alpha
- * information, no blending takes place.
- *
- * If there is a clip rectangle set on the destination (set via
- * SDL_SetClipRect()), then this function will fill based on the intersection
- * of the clip rectangle and `rect`.
- *
- * \param dst the SDL_Surface structure that is the drawing target
- * \param rect the SDL_Rect structure representing the rectangle to fill, or
- *             NULL to fill the entire surface
- * \param color the color to fill with
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_FillRects
- */
-extern DECLSPEC int SDLCALL SDL_FillRect
-    (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color);
-
-/**
- * Perform a fast fill of a set of rectangles with a specific color.
- *
- * `color` should be a pixel of the format used by the surface, and can be
- * generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an
- * alpha component then the destination is simply filled with that alpha
- * information, no blending takes place.
- *
- * If there is a clip rectangle set on the destination (set via
- * SDL_SetClipRect()), then this function will fill based on the intersection
- * of the clip rectangle and `rect`.
- *
- * \param dst the SDL_Surface structure that is the drawing target
- * \param rects an array of SDL_Rects representing the rectangles to fill.
- * \param count the number of rectangles in the array
- * \param color the color to fill with
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_FillRect
- */
-extern DECLSPEC int SDLCALL SDL_FillRects
-    (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color);
-
-/* !!! FIXME: merge this documentation with the wiki */
-/**
- *  Performs a fast blit from the source surface to the destination surface.
- *
- *  This assumes that the source and destination rectangles are
- *  the same size.  If either \c srcrect or \c dstrect are NULL, the entire
- *  surface (\c src or \c dst) is copied.  The final blit rectangles are saved
- *  in \c srcrect and \c dstrect after all clipping is performed.
- *
- *  \returns 0 if the blit is successful, otherwise it returns -1.
- *
- *  The blit function should not be called on a locked surface.
- *
- *  The blit semantics for surfaces with and without blending and colorkey
- *  are defined as follows:
- *  \verbatim
-    RGBA->RGB:
-      Source surface blend mode set to SDL_BLENDMODE_BLEND:
-        alpha-blend (using the source alpha-channel and per-surface alpha)
-        SDL_SRCCOLORKEY ignored.
-      Source surface blend mode set to SDL_BLENDMODE_NONE:
-        copy RGB.
-        if SDL_SRCCOLORKEY set, only copy the pixels matching the
-        RGB values of the source color key, ignoring alpha in the
-        comparison.
-
-    RGB->RGBA:
-      Source surface blend mode set to SDL_BLENDMODE_BLEND:
-        alpha-blend (using the source per-surface alpha)
-      Source surface blend mode set to SDL_BLENDMODE_NONE:
-        copy RGB, set destination alpha to source per-surface alpha value.
-      both:
-        if SDL_SRCCOLORKEY set, only copy the pixels matching the
-        source color key.
-
-    RGBA->RGBA:
-      Source surface blend mode set to SDL_BLENDMODE_BLEND:
-        alpha-blend (using the source alpha-channel and per-surface alpha)
-        SDL_SRCCOLORKEY ignored.
-      Source surface blend mode set to SDL_BLENDMODE_NONE:
-        copy all of RGBA to the destination.
-        if SDL_SRCCOLORKEY set, only copy the pixels matching the
-        RGB values of the source color key, ignoring alpha in the
-        comparison.
-
-    RGB->RGB:
-      Source surface blend mode set to SDL_BLENDMODE_BLEND:
-        alpha-blend (using the source per-surface alpha)
-      Source surface blend mode set to SDL_BLENDMODE_NONE:
-        copy RGB.
-      both:
-        if SDL_SRCCOLORKEY set, only copy the pixels matching the
-        source color key.
-    \endverbatim
- *
- *  You should call SDL_BlitSurface() unless you know exactly how SDL
- *  blitting works internally and how to use the other blit functions.
- */
-#define SDL_BlitSurface SDL_UpperBlit
-
-/**
- * Perform a fast blit from the source surface to the destination surface.
- *
- * SDL_UpperBlit() has been replaced by SDL_BlitSurface(), which is merely a
- * macro for this function with a less confusing name.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_BlitSurface
- */
-extern DECLSPEC int SDLCALL SDL_UpperBlit
-    (SDL_Surface * src, const SDL_Rect * srcrect,
-     SDL_Surface * dst, SDL_Rect * dstrect);
-
-/**
- * Perform low-level surface blitting only.
- *
- * This is a semi-private blit function and it performs low-level surface
- * blitting, assuming the input rectangles have already been clipped.
- *
- * Unless you know what you're doing, you should be using SDL_BlitSurface()
- * instead.
- *
- * \param src the SDL_Surface structure to be copied from
- * \param srcrect the SDL_Rect structure representing the rectangle to be
- *                copied, or NULL to copy the entire surface
- * \param dst the SDL_Surface structure that is the blit target
- * \param dstrect the SDL_Rect structure representing the rectangle that is
- *                copied into
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_BlitSurface
- */
-extern DECLSPEC int SDLCALL SDL_LowerBlit
-    (SDL_Surface * src, SDL_Rect * srcrect,
-     SDL_Surface * dst, SDL_Rect * dstrect);
-
-
-/**
- * Perform a fast, low quality, stretch blit between two surfaces of the same
- * format.
- *
- * Please use SDL_BlitScaled() instead.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
-                                            const SDL_Rect * srcrect,
-                                            SDL_Surface * dst,
-                                            const SDL_Rect * dstrect);
-
-/**
- * Perform bilinear scaling between two surfaces of the same format, 32BPP.
- *
- * \since This function is available since SDL 2.0.16.
- */
-extern DECLSPEC int SDLCALL SDL_SoftStretchLinear(SDL_Surface * src,
-                                            const SDL_Rect * srcrect,
-                                            SDL_Surface * dst,
-                                            const SDL_Rect * dstrect);
-
-
-#define SDL_BlitScaled SDL_UpperBlitScaled
-
-/**
- * Perform a scaled surface copy to a destination surface.
- *
- * SDL_UpperBlitScaled() has been replaced by SDL_BlitScaled(), which is
- * merely a macro for this function with a less confusing name.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_BlitScaled
- */
-extern DECLSPEC int SDLCALL SDL_UpperBlitScaled
-    (SDL_Surface * src, const SDL_Rect * srcrect,
-    SDL_Surface * dst, SDL_Rect * dstrect);
-
-/**
- * Perform low-level surface scaled blitting only.
- *
- * This is a semi-private function and it performs low-level surface blitting,
- * assuming the input rectangles have already been clipped.
- *
- * \param src the SDL_Surface structure to be copied from
- * \param srcrect the SDL_Rect structure representing the rectangle to be
- *                copied
- * \param dst the SDL_Surface structure that is the blit target
- * \param dstrect the SDL_Rect structure representing the rectangle that is
- *                copied into
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_BlitScaled
- */
-extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
-    (SDL_Surface * src, SDL_Rect * srcrect,
-    SDL_Surface * dst, SDL_Rect * dstrect);
-
-/**
- * Set the YUV conversion mode
- *
- * \since This function is available since SDL 2.0.8.
- */
-extern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode);
-
-/**
- * Get the YUV conversion mode
- *
- * \since This function is available since SDL 2.0.8.
- */
-extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void);
-
-/**
- * Get the YUV conversion mode, returning the correct mode for the resolution
- * when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC
- *
- * \since This function is available since SDL 2.0.8.
- */
-extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_surface_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_system.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_system.h
deleted file mode 100644 (file)
index 41563ad..0000000
+++ /dev/null
@@ -1,575 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_system.h
- *
- *  Include file for platform specific SDL API functions
- */
-
-#ifndef SDL_system_h_
-#define SDL_system_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_keyboard.h"
-#include "SDL_render.h"
-#include "SDL_video.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Platform specific functions for Windows */
-#ifdef __WIN32__
-       
-typedef void (SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam);
-
-/**
- * Set a callback for every Windows message, run before TranslateMessage().
- *
- * \param callback The SDL_WindowsMessageHook function to call.
- * \param userdata a pointer to pass to every iteration of `callback`
- *
- * \since This function is available since SDL 2.0.4.
- */
-extern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);
-
-/**
- * Get the D3D9 adapter index that matches the specified display index.
- *
- * The returned adapter index can be passed to `IDirect3D9::CreateDevice` and
- * controls on which monitor a full screen application will appear.
- *
- * \param displayIndex the display index for which to get the D3D9 adapter
- *                     index
- * \returns the D3D9 adapter index on success or a negative error code on
- *          failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.1.
- */
-extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex );
-
-typedef struct IDirect3DDevice9 IDirect3DDevice9;
-
-/**
- * Get the D3D9 device associated with a renderer.
- *
- * Once you are done using the device, you should release it to avoid a
- * resource leak.
- *
- * \param renderer the renderer from which to get the associated D3D device
- * \returns the D3D9 device associated with given renderer or NULL if it is
- *          not a D3D9 renderer; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.1.
- */
-extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
-
-typedef struct ID3D11Device ID3D11Device;
-
-/**
- * Get the D3D11 device associated with a renderer.
- *
- * Once you are done using the device, you should release it to avoid a
- * resource leak.
- *
- * \param renderer the renderer from which to get the associated D3D11 device
- * \returns the D3D11 device associated with given renderer or NULL if it is
- *          not a D3D11 renderer; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.16.
- */
-extern DECLSPEC ID3D11Device* SDLCALL SDL_RenderGetD3D11Device(SDL_Renderer * renderer);
-
-/**
- * Get the DXGI Adapter and Output indices for the specified display index.
- *
- * The DXGI Adapter and Output indices can be passed to `EnumAdapters` and
- * `EnumOutputs` respectively to get the objects required to create a DX10 or
- * DX11 device and swap chain.
- *
- * Before SDL 2.0.4 this function did not return a value. Since SDL 2.0.4 it
- * returns an SDL_bool.
- *
- * \param displayIndex the display index for which to get both indices
- * \param adapterIndex a pointer to be filled in with the adapter index
- * \param outputIndex a pointer to be filled in with the output index
- * \returns SDL_TRUE on success or SDL_FALSE on failure; call SDL_GetError()
- *          for more information.
- *
- * \since This function is available since SDL 2.0.2.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
-
-#endif /* __WIN32__ */
-
-
-/* Platform specific functions for Linux */
-#ifdef __LINUX__
-
-/**
- * Sets the UNIX nice value for a thread.
- *
- * This uses setpriority() if possible, and RealtimeKit if available.
- *
- * \param threadID the Unix thread ID to change priority of.
- * \param priority The new, Unix-specific, priority value.
- * \returns 0 on success, or -1 on error.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);
-
-/**
- * Sets the priority (not nice level) and scheduling policy for a thread.
- *
- * This uses setpriority() if possible, and RealtimeKit if available.
- *
- * \param threadID The Unix thread ID to change priority of.
- * \param sdlPriority The new SDL_ThreadPriority value.
- * \param schedPolicy The new scheduling policy (SCHED_FIFO, SCHED_RR,
- *                    SCHED_OTHER, etc...)
- * \returns 0 on success, or -1 on error.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy);
-#endif /* __LINUX__ */
-       
-/* Platform specific functions for iOS */
-#ifdef __IPHONEOS__
-
-#define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam)
-
-/**
- * Use this function to set the animation callback on Apple iOS.
- *
- * The function prototype for `callback` is:
- *
- * ```c
- * void callback(void* callbackParam);
- * ```
- *
- * Where its parameter, `callbackParam`, is what was passed as `callbackParam`
- * to SDL_iPhoneSetAnimationCallback().
- *
- * This function is only available on Apple iOS.
- *
- * For more information see:
- * [README-ios.md](https://hg.libsdl.org/SDL/file/default/docs/README-ios.md)
- *
- * This functions is also accessible using the macro
- * SDL_iOSSetAnimationCallback() since SDL 2.0.4.
- *
- * \param window the window for which the animation callback should be set
- * \param interval the number of frames after which **callback** will be
- *                 called
- * \param callback the function to call for every frame.
- * \param callbackParam a pointer that is passed to `callback`.
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_iPhoneSetEventPump
- */
-extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
-
-#define SDL_iOSSetEventPump(enabled) SDL_iPhoneSetEventPump(enabled)
-
-/**
- * Use this function to enable or disable the SDL event pump on Apple iOS.
- *
- * This function is only available on Apple iOS.
- *
- * This functions is also accessible using the macro SDL_iOSSetEventPump()
- * since SDL 2.0.4.
- *
- * \param enabled SDL_TRUE to enable the event pump, SDL_FALSE to disable it
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_iPhoneSetAnimationCallback
- */
-extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
-
-#endif /* __IPHONEOS__ */
-
-
-/* Platform specific functions for Android */
-#ifdef __ANDROID__
-
-/**
- * Get the Android Java Native Interface Environment of the current thread.
- *
- * This is the JNIEnv one needs to access the Java virtual machine from native
- * code, and is needed for many Android APIs to be usable from C.
- *
- * The prototype of the function in SDL's code actually declare a void* return
- * type, even if the implementation returns a pointer to a JNIEnv. The
- * rationale being that the SDL headers can avoid including jni.h.
- *
- * \returns a pointer to Java native interface object (JNIEnv) to which the
- *          current thread is attached, or 0 on error.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AndroidGetActivity
- */
-extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);
-
-/**
- * Retrieve the Java instance of the Android activity class.
- *
- * The prototype of the function in SDL's code actually declares a void*
- * return type, even if the implementation returns a jobject. The rationale
- * being that the SDL headers can avoid including jni.h.
- *
- * The jobject returned by the function is a local reference and must be
- * released by the caller. See the PushLocalFrame() and PopLocalFrame() or
- * DeleteLocalRef() functions of the Java native interface:
- *
- * https://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/functions.html
- *
- * \returns the jobject representing the instance of the Activity class of the
- *          Android application, or NULL on error.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AndroidGetJNIEnv
- */
-extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
-
-/**
- * Query Android API level of the current device.
- *
- * - API level 31: Android 12
- * - API level 30: Android 11
- * - API level 29: Android 10
- * - API level 28: Android 9
- * - API level 27: Android 8.1
- * - API level 26: Android 8.0
- * - API level 25: Android 7.1
- * - API level 24: Android 7.0
- * - API level 23: Android 6.0
- * - API level 22: Android 5.1
- * - API level 21: Android 5.0
- * - API level 20: Android 4.4W
- * - API level 19: Android 4.4
- * - API level 18: Android 4.3
- * - API level 17: Android 4.2
- * - API level 16: Android 4.1
- * - API level 15: Android 4.0.3
- * - API level 14: Android 4.0
- * - API level 13: Android 3.2
- * - API level 12: Android 3.1
- * - API level 11: Android 3.0
- * - API level 10: Android 2.3.3
- *
- * \returns the Android API level.
- *
- * \since This function is available since SDL 2.0.12.
- */
-extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
-
-/**
- * Query if the application is running on Android TV.
- *
- * \returns SDL_TRUE if this is Android TV, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.8.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
-
-/**
- * Query if the application is running on a Chromebook.
- *
- * \returns SDL_TRUE if this is a Chromebook, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);
-
-/**
- * Query if the application is running on a Samsung DeX docking station.
- *
- * \returns SDL_TRUE if this is a DeX docking station, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);
-
-/**
- * Trigger the Android system back button behavior.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);
-
-/**
-   See the official Android developer guide for more information:
-   http://developer.android.com/guide/topics/data/data-storage.html
-*/
-#define SDL_ANDROID_EXTERNAL_STORAGE_READ   0x01
-#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE  0x02
-
-/**
- * Get the path used for internal storage for this application.
- *
- * This path is unique to your application and cannot be written to by other
- * applications.
- *
- * Your internal storage path is typically:
- * `/data/data/your.app.package/files`.
- *
- * \returns the path used for internal storage or NULL on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AndroidGetExternalStorageState
- */
-extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(void);
-
-/**
- * Get the current state of external storage.
- *
- * The current state of external storage, a bitmask of these values:
- * `SDL_ANDROID_EXTERNAL_STORAGE_READ`, `SDL_ANDROID_EXTERNAL_STORAGE_WRITE`.
- *
- * If external storage is currently unavailable, this will return 0.
- *
- * \returns the current state of external storage on success or 0 on failure;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AndroidGetExternalStoragePath
- */
-extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void);
-
-/**
- * Get the path used for external storage for this application.
- *
- * This path is unique to your application, but is public and can be written
- * to by other applications.
- *
- * Your external storage path is typically:
- * `/storage/sdcard0/Android/data/your.app.package/files`.
- *
- * \returns the path used for external storage for this application on success
- *          or NULL on failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AndroidGetExternalStorageState
- */
-extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void);
-
-/**
- * Request permissions at runtime.
- *
- * This blocks the calling thread until the permission is granted or denied.
- *
- * \param permission The permission to request.
- * \returns SDL_TRUE if the permission was granted, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.14.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_AndroidRequestPermission(const char *permission);
-
-/**
- * Shows an Android toast notification.
- *
- * Toasts are a sort of lightweight notification that are unique to Android.
- *
- * https://developer.android.com/guide/topics/ui/notifiers/toasts
- *
- * Shows toast in UI thread.
- *
- * For the `gravity` parameter, choose a value from here, or -1 if you don't
- * have a preference:
- *
- * https://developer.android.com/reference/android/view/Gravity
- *
- * \param message text message to be shown
- * \param duration 0=short, 1=long
- * \param gravity where the notification should appear on the screen.
- * \param xoffset set this parameter only when gravity >=0
- * \param yoffset set this parameter only when gravity >=0
- * \returns 0 if success, -1 if any error occurs.
- *
- * \since This function is available since SDL 2.0.16.
- */
-extern DECLSPEC int SDLCALL SDL_AndroidShowToast(const char* message, int duration, int gravity, int xoffset, int yoffset);
-
-/**
- * Send a user command to SDLActivity.
- *
- * Override "boolean onUnhandledMessage(Message msg)" to handle the message.
- *
- * \param command user command that must be greater or equal to 0x8000
- * \param param user parameter
- *
- * \since This function is available since SDL 2.0.22.
- */
-extern DECLSPEC int SDLCALL SDL_AndroidSendMessage(Uint32 command, int param);
-
-#endif /* __ANDROID__ */
-
-/* Platform specific functions for WinRT */
-#ifdef __WINRT__
-
-/**
- *  \brief WinRT / Windows Phone path types
- */
-typedef enum
-{
-    /** \brief The installed app's root directory.
-        Files here are likely to be read-only. */
-    SDL_WINRT_PATH_INSTALLED_LOCATION,
-
-    /** \brief The app's local data store.  Files may be written here */
-    SDL_WINRT_PATH_LOCAL_FOLDER,
-
-    /** \brief The app's roaming data store.  Unsupported on Windows Phone.
-        Files written here may be copied to other machines via a network
-        connection.
-    */
-    SDL_WINRT_PATH_ROAMING_FOLDER,
-
-    /** \brief The app's temporary data store.  Unsupported on Windows Phone.
-        Files written here may be deleted at any time. */
-    SDL_WINRT_PATH_TEMP_FOLDER
-} SDL_WinRT_Path;
-
-
-/**
- *  \brief WinRT Device Family
- */
-typedef enum
-{
-    /** \brief Unknown family  */
-    SDL_WINRT_DEVICEFAMILY_UNKNOWN,
-
-    /** \brief Desktop family*/
-    SDL_WINRT_DEVICEFAMILY_DESKTOP,
-
-    /** \brief Mobile family (for example smartphone) */
-    SDL_WINRT_DEVICEFAMILY_MOBILE,
-
-    /** \brief XBox family */
-    SDL_WINRT_DEVICEFAMILY_XBOX,
-} SDL_WinRT_DeviceFamily;
-
-
-/**
- * Retrieve a WinRT defined path on the local file system.
- *
- * Not all paths are available on all versions of Windows. This is especially
- * true on Windows Phone. Check the documentation for the given SDL_WinRT_Path
- * for more information on which path types are supported where.
- *
- * Documentation on most app-specific path types on WinRT can be found on
- * MSDN, at the URL:
- *
- * https://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
- *
- * \param pathType the type of path to retrieve, one of SDL_WinRT_Path
- * \returns a UCS-2 string (16-bit, wide-char) containing the path, or NULL if
- *          the path is not available for any reason; call SDL_GetError() for
- *          more information.
- *
- * \since This function is available since SDL 2.0.3.
- *
- * \sa SDL_WinRTGetFSPathUTF8
- */
-extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);
-
-/**
- * Retrieve a WinRT defined path on the local file system.
- *
- * Not all paths are available on all versions of Windows. This is especially
- * true on Windows Phone. Check the documentation for the given SDL_WinRT_Path
- * for more information on which path types are supported where.
- *
- * Documentation on most app-specific path types on WinRT can be found on
- * MSDN, at the URL:
- *
- * https://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
- *
- * \param pathType the type of path to retrieve, one of SDL_WinRT_Path
- * \returns a UTF-8 string (8-bit, multi-byte) containing the path, or NULL if
- *          the path is not available for any reason; call SDL_GetError() for
- *          more information.
- *
- * \since This function is available since SDL 2.0.3.
- *
- * \sa SDL_WinRTGetFSPathUNICODE
- */
-extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
-
-/**
- * Detects the device family of WinRT plattform at runtime.
- *
- * \returns a value from the SDL_WinRT_DeviceFamily enum.
- *
- * \since This function is available since SDL 2.0.8.
- */
-extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
-
-#endif /* __WINRT__ */
-
-/**
- * Query if the current device is a tablet.
- *
- * If SDL can't determine this, it will return SDL_FALSE.
- *
- * \returns SDL_TRUE if the device is a tablet, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.9.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);
-
-/* Functions used by iOS application delegates to notify SDL about state changes */
-extern DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void);
-extern DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void);
-extern DECLSPEC void SDLCALL SDL_OnApplicationWillResignActive(void);
-extern DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void);
-extern DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void);
-extern DECLSPEC void SDLCALL SDL_OnApplicationDidBecomeActive(void);
-#ifdef __IPHONEOS__
-extern DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void);
-#endif
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_system_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_syswm.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_syswm.h
deleted file mode 100644 (file)
index 45f8e75..0000000
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_syswm.h
- *
- *  Include file for SDL custom system window manager hooks.
- */
-
-#ifndef SDL_syswm_h_
-#define SDL_syswm_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-#include "SDL_video.h"
-#include "SDL_version.h"
-
-/**
- *  \brief SDL_syswm.h
- *
- *  Your application has access to a special type of event ::SDL_SYSWMEVENT,
- *  which contains window-manager specific information and arrives whenever
- *  an unhandled window event occurs.  This event is ignored by default, but
- *  you can enable it with SDL_EventState().
- */
-struct SDL_SysWMinfo;
-
-#if !defined(SDL_PROTOTYPES_ONLY)
-
-#if defined(SDL_VIDEO_DRIVER_WINDOWS)
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#ifndef NOMINMAX   /* don't define min() and max(). */
-#define NOMINMAX
-#endif
-#include <windows.h>
-#endif
-
-#if defined(SDL_VIDEO_DRIVER_WINRT)
-#include <Inspectable.h>
-#endif
-
-/* This is the structure for custom window manager events */
-#if defined(SDL_VIDEO_DRIVER_X11)
-#if defined(__APPLE__) && defined(__MACH__)
-/* conflicts with Quickdraw.h */
-#define Cursor X11Cursor
-#endif
-
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-
-#if defined(__APPLE__) && defined(__MACH__)
-/* matches the re-define above */
-#undef Cursor
-#endif
-
-#endif /* defined(SDL_VIDEO_DRIVER_X11) */
-
-#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
-#include <directfb.h>
-#endif
-
-#if defined(SDL_VIDEO_DRIVER_COCOA)
-#ifdef __OBJC__
-@class NSWindow;
-#else
-typedef struct _NSWindow NSWindow;
-#endif
-#endif
-
-#if defined(SDL_VIDEO_DRIVER_UIKIT)
-#ifdef __OBJC__
-#include <UIKit/UIKit.h>
-#else
-typedef struct _UIWindow UIWindow;
-typedef struct _UIViewController UIViewController;
-#endif
-typedef Uint32 GLuint;
-#endif
-
-#if defined(SDL_VIDEO_VULKAN) || defined(SDL_VIDEO_METAL)
-#define SDL_METALVIEW_TAG 255
-#endif
-
-#if defined(SDL_VIDEO_DRIVER_ANDROID)
-typedef struct ANativeWindow ANativeWindow;
-typedef void *EGLSurface;
-#endif
-
-#if defined(SDL_VIDEO_DRIVER_VIVANTE)
-#include "SDL_egl.h"
-#endif
-
-#if defined(SDL_VIDEO_DRIVER_OS2)
-#define INCL_WIN
-#include <os2.h>
-#endif
-#endif /* SDL_PROTOTYPES_ONLY */
-
-#if defined(SDL_VIDEO_DRIVER_KMSDRM)
-struct gbm_device;
-#endif
-
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(SDL_PROTOTYPES_ONLY)
-/**
- *  These are the various supported windowing subsystems
- */
-typedef enum
-{
-    SDL_SYSWM_UNKNOWN,
-    SDL_SYSWM_WINDOWS,
-    SDL_SYSWM_X11,
-    SDL_SYSWM_DIRECTFB,
-    SDL_SYSWM_COCOA,
-    SDL_SYSWM_UIKIT,
-    SDL_SYSWM_WAYLAND,
-    SDL_SYSWM_MIR,  /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
-    SDL_SYSWM_WINRT,
-    SDL_SYSWM_ANDROID,
-    SDL_SYSWM_VIVANTE,
-    SDL_SYSWM_OS2,
-    SDL_SYSWM_HAIKU,
-    SDL_SYSWM_KMSDRM,
-    SDL_SYSWM_RISCOS
-} SDL_SYSWM_TYPE;
-
-/**
- *  The custom event structure.
- */
-struct SDL_SysWMmsg
-{
-    SDL_version version;
-    SDL_SYSWM_TYPE subsystem;
-    union
-    {
-#if defined(SDL_VIDEO_DRIVER_WINDOWS)
-        struct {
-            HWND hwnd;                  /**< The window for the message */
-            UINT msg;                   /**< The type of message */
-            WPARAM wParam;              /**< WORD message parameter */
-            LPARAM lParam;              /**< LONG message parameter */
-        } win;
-#endif
-#if defined(SDL_VIDEO_DRIVER_X11)
-        struct {
-            XEvent event;
-        } x11;
-#endif
-#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
-        struct {
-            DFBEvent event;
-        } dfb;
-#endif
-#if defined(SDL_VIDEO_DRIVER_COCOA)
-        struct
-        {
-            /* Latest version of Xcode clang complains about empty structs in C v. C++:
-                 error: empty struct has size 0 in C, size 1 in C++
-             */
-            int dummy;
-            /* No Cocoa window events yet */
-        } cocoa;
-#endif
-#if defined(SDL_VIDEO_DRIVER_UIKIT)
-        struct
-        {
-            int dummy;
-            /* No UIKit window events yet */
-        } uikit;
-#endif
-#if defined(SDL_VIDEO_DRIVER_VIVANTE)
-        struct
-        {
-            int dummy;
-            /* No Vivante window events yet */
-        } vivante;
-#endif
-#if defined(SDL_VIDEO_DRIVER_OS2)
-        struct
-        {
-            BOOL fFrame;                /**< TRUE if hwnd is a frame window */
-            HWND hwnd;                  /**< The window receiving the message */
-            ULONG msg;                  /**< The message identifier */
-            MPARAM mp1;                 /**< The first first message parameter */
-            MPARAM mp2;                 /**< The second first message parameter */
-        } os2;
-#endif
-        /* Can't have an empty union */
-        int dummy;
-    } msg;
-};
-
-/**
- *  The custom window manager information structure.
- *
- *  When this structure is returned, it holds information about which
- *  low level system it is using, and will be one of SDL_SYSWM_TYPE.
- */
-struct SDL_SysWMinfo
-{
-    SDL_version version;
-    SDL_SYSWM_TYPE subsystem;
-    union
-    {
-#if defined(SDL_VIDEO_DRIVER_WINDOWS)
-        struct
-        {
-            HWND window;                /**< The window handle */
-            HDC hdc;                    /**< The window device context */
-            HINSTANCE hinstance;        /**< The instance handle */
-        } win;
-#endif
-#if defined(SDL_VIDEO_DRIVER_WINRT)
-        struct
-        {
-            IInspectable * window;      /**< The WinRT CoreWindow */
-        } winrt;
-#endif
-#if defined(SDL_VIDEO_DRIVER_X11)
-        struct
-        {
-            Display *display;           /**< The X11 display */
-            Window window;              /**< The X11 window */
-        } x11;
-#endif
-#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
-        struct
-        {
-            IDirectFB *dfb;             /**< The directfb main interface */
-            IDirectFBWindow *window;    /**< The directfb window handle */
-            IDirectFBSurface *surface;  /**< The directfb client surface */
-        } dfb;
-#endif
-#if defined(SDL_VIDEO_DRIVER_COCOA)
-        struct
-        {
-#if defined(__OBJC__) && defined(__has_feature)
-        #if __has_feature(objc_arc)
-            NSWindow __unsafe_unretained *window; /**< The Cocoa window */
-        #else
-            NSWindow *window;                     /**< The Cocoa window */
-        #endif
-#else
-            NSWindow *window;                     /**< The Cocoa window */
-#endif
-        } cocoa;
-#endif
-#if defined(SDL_VIDEO_DRIVER_UIKIT)
-        struct
-        {
-#if defined(__OBJC__) && defined(__has_feature)
-        #if __has_feature(objc_arc)
-            UIWindow __unsafe_unretained *window; /**< The UIKit window */
-        #else
-            UIWindow *window;                     /**< The UIKit window */
-        #endif
-#else
-            UIWindow *window;                     /**< The UIKit window */
-#endif
-            GLuint framebuffer; /**< The GL view's Framebuffer Object. It must be bound when rendering to the screen using GL. */
-            GLuint colorbuffer; /**< The GL view's color Renderbuffer Object. It must be bound when SDL_GL_SwapWindow is called. */
-            GLuint resolveFramebuffer; /**< The Framebuffer Object which holds the resolve color Renderbuffer, when MSAA is used. */
-        } uikit;
-#endif
-#if defined(SDL_VIDEO_DRIVER_WAYLAND)
-        struct
-        {
-            struct wl_display *display;             /**< Wayland display */
-            struct wl_surface *surface;             /**< Wayland surface */
-            void *shell_surface;                    /**< DEPRECATED Wayland shell_surface (window manager handle) */
-            struct wl_egl_window *egl_window;       /**< Wayland EGL window (native window) */
-            struct xdg_surface *xdg_surface;        /**< Wayland xdg surface (window manager handle) */
-            struct xdg_toplevel *xdg_toplevel;      /**< Wayland xdg toplevel role */
-            struct xdg_popup *xdg_popup;            /**< Wayland xdg popup role */
-            struct xdg_positioner *xdg_positioner;  /**< Wayland xdg positioner, for popup */
-        } wl;
-#endif
-#if defined(SDL_VIDEO_DRIVER_MIR)  /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
-        struct
-        {
-            void *connection;  /**< Mir display server connection */
-            void *surface;  /**< Mir surface */
-        } mir;
-#endif
-
-#if defined(SDL_VIDEO_DRIVER_ANDROID)
-        struct
-        {
-            ANativeWindow *window;
-            EGLSurface surface;
-        } android;
-#endif
-
-#if defined(SDL_VIDEO_DRIVER_OS2)
-        struct
-        {
-            HWND hwnd;                  /**< The window handle */
-            HWND hwndFrame;             /**< The frame window handle */
-        } os2;
-#endif
-
-#if defined(SDL_VIDEO_DRIVER_VIVANTE)
-        struct
-        {
-            EGLNativeDisplayType display;
-            EGLNativeWindowType window;
-        } vivante;
-#endif
-
-#if defined(SDL_VIDEO_DRIVER_KMSDRM)
-        struct
-        {
-            int dev_index;               /**< Device index (ex: the X in /dev/dri/cardX) */
-            int drm_fd;                  /**< DRM FD (unavailable on Vulkan windows) */
-            struct gbm_device *gbm_dev;  /**< GBM device (unavailable on Vulkan windows) */
-        } kmsdrm;
-#endif
-
-        /* Make sure this union is always 64 bytes (8 64-bit pointers). */
-        /* Be careful not to overflow this if you add a new target! */
-        Uint8 dummy[64];
-    } info;
-};
-
-#endif /* SDL_PROTOTYPES_ONLY */
-
-typedef struct SDL_SysWMinfo SDL_SysWMinfo;
-
-
-/**
- * Get driver-specific information about a window.
- *
- * You must include SDL_syswm.h for the declaration of SDL_SysWMinfo.
- *
- * The caller must initialize the `info` structure's version by using
- * `SDL_VERSION(&info.version)`, and then this function will fill in the rest
- * of the structure with information about the given window.
- *
- * \param window the window about which information is being requested
- * \param info an SDL_SysWMinfo structure filled in with window information
- * \returns SDL_TRUE if the function is implemented and the `version` member
- *          of the `info` struct is valid, or SDL_FALSE if the information
- *          could not be retrieved; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,
-                                                     SDL_SysWMinfo * info);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_syswm_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test.h
deleted file mode 100644 (file)
index 8cc9d61..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_test.h
- *
- *  Include file for SDL test framework.
- *
- *  This code is a part of the SDL2_test library, not the main SDL library.
- */
-
-#ifndef SDL_test_h_
-#define SDL_test_h_
-
-#include "SDL.h"
-#include "SDL_test_assert.h"
-#include "SDL_test_common.h"
-#include "SDL_test_compare.h"
-#include "SDL_test_crc32.h"
-#include "SDL_test_font.h"
-#include "SDL_test_fuzzer.h"
-#include "SDL_test_harness.h"
-#include "SDL_test_images.h"
-#include "SDL_test_log.h"
-#include "SDL_test_md5.h"
-#include "SDL_test_memory.h"
-#include "SDL_test_random.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Global definitions */
-
-/*
- * Note: Maximum size of SDLTest log message is less than SDL's limit
- * to ensure we can fit additional information such as the timestamp.
- */
-#define SDLTEST_MAX_LOGMESSAGE_LENGTH   3584
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_test_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_assert.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_assert.h
deleted file mode 100644 (file)
index 7342305..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_test_assert.h
- *
- *  Include file for SDL test framework.
- *
- *  This code is a part of the SDL2_test library, not the main SDL library.
- */
-
-/*
- *
- * Assert API for test code and test cases
- *
- */
-
-#ifndef SDL_test_assert_h_
-#define SDL_test_assert_h_
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \brief Fails the assert.
- */
-#define ASSERT_FAIL     0
-
-/**
- * \brief Passes the assert.
- */
-#define ASSERT_PASS     1
-
-/**
- * \brief Assert that logs and break execution flow on failures.
- *
- * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
- * \param assertDescription Message to log with the assert describing it.
- */
-void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);
-
-/**
- * \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters.
- *
- * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
- * \param assertDescription Message to log with the assert describing it.
- *
- * \returns the assertCondition so it can be used to externally to break execution flow if desired.
- */
-int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);
-
-/**
- * \brief Explicitly pass without checking an assertion condition. Updates assertion counter.
- *
- * \param assertDescription Message to log with the assert describing it.
- */
-void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(1);
-
-/**
- * \brief Resets the assert summary counters to zero.
- */
-void SDLTest_ResetAssertSummary(void);
-
-/**
- * \brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.
- */
-void SDLTest_LogAssertSummary(void);
-
-
-/**
- * \brief Converts the current assert summary state to a test result.
- *
- * \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT
- */
-int SDLTest_AssertSummaryToTestResult(void);
-
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_test_assert_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_common.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_common.h
deleted file mode 100644 (file)
index 0f50967..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_test_common.h
- *
- *  Include file for SDL test framework.
- *
- *  This code is a part of the SDL2_test library, not the main SDL library.
- */
-
-/* Ported from original test\common.h file. */
-
-#ifndef SDL_test_common_h_
-#define SDL_test_common_h_
-
-#include "SDL.h"
-
-#if defined(__PSP__)
-#define DEFAULT_WINDOW_WIDTH  480
-#define DEFAULT_WINDOW_HEIGHT 272
-#elif defined(__VITA__)
-#define DEFAULT_WINDOW_WIDTH  960
-#define DEFAULT_WINDOW_HEIGHT 544
-#else
-#define DEFAULT_WINDOW_WIDTH  640
-#define DEFAULT_WINDOW_HEIGHT 480
-#endif
-
-#define VERBOSE_VIDEO   0x00000001
-#define VERBOSE_MODES   0x00000002
-#define VERBOSE_RENDER  0x00000004
-#define VERBOSE_EVENT   0x00000008
-#define VERBOSE_AUDIO   0x00000010
-
-typedef struct
-{
-    /* SDL init flags */
-    char **argv;
-    Uint32 flags;
-    Uint32 verbose;
-
-    /* Video info */
-    const char *videodriver;
-    int display;
-    const char *window_title;
-    const char *window_icon;
-    Uint32 window_flags;
-    SDL_bool flash_on_focus_loss;
-    int window_x;
-    int window_y;
-    int window_w;
-    int window_h;
-    int window_minW;
-    int window_minH;
-    int window_maxW;
-    int window_maxH;
-    int logical_w;
-    int logical_h;
-    float scale;
-    int depth;
-    int refresh_rate;
-    int num_windows;
-    SDL_Window **windows;
-
-    /* Renderer info */
-    const char *renderdriver;
-    Uint32 render_flags;
-    SDL_bool skip_renderer;
-    SDL_Renderer **renderers;
-    SDL_Texture **targets;
-
-    /* Audio info */
-    const char *audiodriver;
-    SDL_AudioSpec audiospec;
-
-    /* GL settings */
-    int gl_red_size;
-    int gl_green_size;
-    int gl_blue_size;
-    int gl_alpha_size;
-    int gl_buffer_size;
-    int gl_depth_size;
-    int gl_stencil_size;
-    int gl_double_buffer;
-    int gl_accum_red_size;
-    int gl_accum_green_size;
-    int gl_accum_blue_size;
-    int gl_accum_alpha_size;
-    int gl_stereo;
-    int gl_multisamplebuffers;
-    int gl_multisamplesamples;
-    int gl_retained_backing;
-    int gl_accelerated;
-    int gl_major_version;
-    int gl_minor_version;
-    int gl_debug;
-    int gl_profile_mask;
-
-    /* Additional fields added in 2.0.18 */
-    SDL_Rect confine;
-
-} SDLTest_CommonState;
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Function prototypes */
-
-/**
- * \brief Parse command line parameters and create common state.
- *
- * \param argv Array of command line parameters
- * \param flags Flags indicating which subsystem to initialize (i.e. SDL_INIT_VIDEO | SDL_INIT_AUDIO)
- *
- * \returns a newly allocated common state object.
- */
-SDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags);
-
-/**
- * \brief Process one common argument.
- *
- * \param state The common state describing the test window to create.
- * \param index The index of the argument to process in argv[].
- *
- * \returns the number of arguments processed (i.e. 1 for --fullscreen, 2 for --video [videodriver], or -1 on error.
- */
-int SDLTest_CommonArg(SDLTest_CommonState * state, int index);
-
-
-/**
- * \brief Logs command line usage info.
- *
- * This logs the appropriate command line options for the subsystems in use
- *  plus other common options, and then any application-specific options.
- *  This uses the SDL_Log() function and splits up output to be friendly to
- *  80-character-wide terminals.
- *
- * \param state The common state describing the test window for the app.
- * \param argv0 argv[0], as passed to main/SDL_main.
- * \param options an array of strings for application specific options. The last element of the array should be NULL.
- */
-void SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const char **options);
-
-/**
- * \brief Returns common usage information
- *
- * You should (probably) be using SDLTest_CommonLogUsage() instead, but this
- *  function remains for binary compatibility. Strings returned from this
- *  function are valid until SDLTest_CommonQuit() is called, in which case
- *  those strings' memory is freed and can no longer be used.
- *
- * \param state The common state describing the test window to create.
- * \returns a string with usage information
- */
-const char *SDLTest_CommonUsage(SDLTest_CommonState * state);
-
-/**
- * \brief Open test window.
- *
- * \param state The common state describing the test window to create.
- *
- * \returns SDL_TRUE if initialization succeeded, false otherwise
- */
-SDL_bool SDLTest_CommonInit(SDLTest_CommonState * state);
-
-/**
- * \brief Easy argument handling when test app doesn't need any custom args.
- *
- * \param state The common state describing the test window to create.
- * \param argc argc, as supplied to SDL_main
- * \param argv argv, as supplied to SDL_main
- *
- * \returns SDL_FALSE if app should quit, true otherwise.
- */
-SDL_bool SDLTest_CommonDefaultArgs(SDLTest_CommonState * state, const int argc, char **argv);
-
-/**
- * \brief Common event handler for test windows.
- *
- * \param state The common state used to create test window.
- * \param event The event to handle.
- * \param done Flag indicating we are done.
- *
- */
-void SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done);
-
-/**
- * \brief Close test window.
- *
- * \param state The common state used to create test window.
- *
- */
-void SDLTest_CommonQuit(SDLTest_CommonState * state);
-
-/**
- * \brief Draws various window information (position, size, etc.) to the renderer.
- *
- * \param renderer The renderer to draw to.
- * \param window The window whose information should be displayed.
- * \param usedHeight Returns the height used, so the caller can draw more below.
- *
- */
-void SDLTest_CommonDrawWindowInfo(SDL_Renderer * renderer, SDL_Window * window, int * usedHeight);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_test_common_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_compare.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_compare.h
deleted file mode 100644 (file)
index 8a7a070..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_test_compare.h
- *
- *  Include file for SDL test framework.
- *
- *  This code is a part of the SDL2_test library, not the main SDL library.
- */
-
-/*
-
- Defines comparison functions (i.e. for surfaces).
-
-*/
-
-#ifndef SDL_test_compare_h_
-#define SDL_test_compare_h_
-
-#include "SDL.h"
-
-#include "SDL_test_images.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \brief Compares a surface and with reference image data for equality
- *
- * \param surface Surface used in comparison
- * \param referenceSurface Test Surface used in comparison
- * \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy.
- *
- * \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.
- */
-int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_test_compare_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_crc32.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_crc32.h
deleted file mode 100644 (file)
index 049da74..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_test_crc32.h
- *
- *  Include file for SDL test framework.
- *
- *  This code is a part of the SDL2_test library, not the main SDL library.
- */
-
-/*
-
- Implements CRC32 calculations (default output is Perl String::CRC32 compatible).
-
-*/
-
-#ifndef SDL_test_crc32_h_
-#define SDL_test_crc32_h_
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* ------------ Definitions --------- */
-
-/* Definition shared by all CRC routines */
-
-#ifndef CrcUint32
- #define CrcUint32  unsigned int
-#endif
-#ifndef CrcUint8
- #define CrcUint8   unsigned char
-#endif
-
-#ifdef ORIGINAL_METHOD
- #define CRC32_POLY 0x04c11db7   /* AUTODIN II, Ethernet, & FDDI */
-#else
- #define CRC32_POLY 0xEDB88320   /* Perl String::CRC32 compatible */
-#endif
-
-/**
- * Data structure for CRC32 (checksum) computation
- */
-  typedef struct {
-    CrcUint32    crc32_table[256]; /* CRC table */
-  } SDLTest_Crc32Context;
-
-/* ---------- Function Prototypes ------------- */
-
-/**
- * \brief Initialize the CRC context
- *
- * Note: The function initializes the crc table required for all crc calculations.
- *
- * \param crcContext        pointer to context variable
- *
- * \returns 0 for OK, -1 on error
- *
- */
- int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext);
-
-
-/**
- * \brief calculate a crc32 from a data block
- *
- * \param crcContext         pointer to context variable
- * \param inBuf              input buffer to checksum
- * \param inLen              length of input buffer
- * \param crc32              pointer to Uint32 to store the final CRC into
- *
- * \returns 0 for OK, -1 on error
- *
- */
-int SDLTest_Crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
-
-/* Same routine broken down into three steps */
-int SDLTest_Crc32CalcStart(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32);
-int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32);
-int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
-
-
-/**
- * \brief clean up CRC context
- *
- * \param crcContext        pointer to context variable
- *
- * \returns 0 for OK, -1 on error
- *
-*/
-
-int SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_test_crc32_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_font.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_font.h
deleted file mode 100644 (file)
index c5cbbbb..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_test_font.h
- *
- *  Include file for SDL test framework.
- *
- *  This code is a part of the SDL2_test library, not the main SDL library.
- */
-
-#ifndef SDL_test_font_h_
-#define SDL_test_font_h_
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Function prototypes */
-
-#define FONT_CHARACTER_SIZE  8
-
-/**
- *  \brief Draw a string in the currently set font.
- *
- *  \param renderer The renderer to draw on.
- *  \param x The X coordinate of the upper left corner of the character.
- *  \param y The Y coordinate of the upper left corner of the character.
- *  \param c The character to draw.
- *
- *  \returns 0 on success, -1 on failure.
- */
-int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, char c);
-
-/**
- *  \brief Draw a string in the currently set font.
- *
- *  \param renderer The renderer to draw on.
- *  \param x The X coordinate of the upper left corner of the string.
- *  \param y The Y coordinate of the upper left corner of the string.
- *  \param s The string to draw.
- *
- *  \returns 0 on success, -1 on failure.
- */
-int SDLTest_DrawString(SDL_Renderer *renderer, int x, int y, const char *s);
-
-
-/**
- *  \brief Cleanup textures used by font drawing functions.
- */
-void SDLTest_CleanupTextDrawing(void);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_test_font_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_fuzzer.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_fuzzer.h
deleted file mode 100644 (file)
index bbe8eb8..0000000
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_test_fuzzer.h
- *
- *  Include file for SDL test framework.
- *
- *  This code is a part of the SDL2_test library, not the main SDL library.
- */
-
-/*
-
-  Data generators for fuzzing test data in a reproducible way.
-
-*/
-
-#ifndef SDL_test_fuzzer_h_
-#define SDL_test_fuzzer_h_
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*
-  Based on GSOC code by Markus Kauppila <markus.kauppila@gmail.com>
-*/
-
-
-/**
- * \file
- * Note: The fuzzer implementation uses a static instance of random context
- * internally which makes it thread-UNsafe.
- */
-
-/**
- * Initializes the fuzzer for a test
- *
- * \param execKey Execution "Key" that initializes the random number generator uniquely for the test.
- *
- */
-void SDLTest_FuzzerInit(Uint64 execKey);
-
-
-/**
- * Returns a random Uint8
- *
- * \returns a generated integer
- */
-Uint8 SDLTest_RandomUint8(void);
-
-/**
- * Returns a random Sint8
- *
- * \returns a generated signed integer
- */
-Sint8 SDLTest_RandomSint8(void);
-
-
-/**
- * Returns a random Uint16
- *
- * \returns a generated integer
- */
-Uint16 SDLTest_RandomUint16(void);
-
-/**
- * Returns a random Sint16
- *
- * \returns a generated signed integer
- */
-Sint16 SDLTest_RandomSint16(void);
-
-
-/**
- * Returns a random integer
- *
- * \returns a generated integer
- */
-Sint32 SDLTest_RandomSint32(void);
-
-
-/**
- * Returns a random positive integer
- *
- * \returns a generated integer
- */
-Uint32 SDLTest_RandomUint32(void);
-
-/**
- * Returns random Uint64.
- *
- * \returns a generated integer
- */
-Uint64 SDLTest_RandomUint64(void);
-
-
-/**
- * Returns random Sint64.
- *
- * \returns a generated signed integer
- */
-Sint64 SDLTest_RandomSint64(void);
-
-/**
- * \returns a random float in range [0.0 - 1.0]
- */
-float SDLTest_RandomUnitFloat(void);
-
-/**
- * \returns a random double in range [0.0 - 1.0]
- */
-double SDLTest_RandomUnitDouble(void);
-
-/**
- * \returns a random float.
- *
- */
-float SDLTest_RandomFloat(void);
-
-/**
- * \returns a random double.
- *
- */
-double SDLTest_RandomDouble(void);
-
-/**
- * Returns a random boundary value for Uint8 within the given boundaries.
- * Boundaries are inclusive, see the usage examples below. If validDomain
- * is true, the function will only return valid boundaries, otherwise non-valid
- * boundaries are also possible.
- * If boundary1 > boundary2, the values are swapped
- *
- * Usage examples:
- * RandomUint8BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20
- * RandomUint8BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21
- * RandomUint8BoundaryValue(0, 99, SDL_FALSE) returns 100
- * RandomUint8BoundaryValue(0, 255, SDL_FALSE) returns 0 (error set)
- *
- * \param boundary1 Lower boundary limit
- * \param boundary2 Upper boundary limit
- * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
- *
- * \returns a random boundary value for the given range and domain or 0 with error set
- */
-Uint8 SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_bool validDomain);
-
-/**
- * Returns a random boundary value for Uint16 within the given boundaries.
- * Boundaries are inclusive, see the usage examples below. If validDomain
- * is true, the function will only return valid boundaries, otherwise non-valid
- * boundaries are also possible.
- * If boundary1 > boundary2, the values are swapped
- *
- * Usage examples:
- * RandomUint16BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20
- * RandomUint16BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21
- * RandomUint16BoundaryValue(0, 99, SDL_FALSE) returns 100
- * RandomUint16BoundaryValue(0, 0xFFFF, SDL_FALSE) returns 0 (error set)
- *
- * \param boundary1 Lower boundary limit
- * \param boundary2 Upper boundary limit
- * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
- *
- * \returns a random boundary value for the given range and domain or 0 with error set
- */
-Uint16 SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain);
-
-/**
- * Returns a random boundary value for Uint32 within the given boundaries.
- * Boundaries are inclusive, see the usage examples below. If validDomain
- * is true, the function will only return valid boundaries, otherwise non-valid
- * boundaries are also possible.
- * If boundary1 > boundary2, the values are swapped
- *
- * Usage examples:
- * RandomUint32BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20
- * RandomUint32BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21
- * RandomUint32BoundaryValue(0, 99, SDL_FALSE) returns 100
- * RandomUint32BoundaryValue(0, 0xFFFFFFFF, SDL_FALSE) returns 0 (with error set)
- *
- * \param boundary1 Lower boundary limit
- * \param boundary2 Upper boundary limit
- * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
- *
- * \returns a random boundary value for the given range and domain or 0 with error set
- */
-Uint32 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain);
-
-/**
- * Returns a random boundary value for Uint64 within the given boundaries.
- * Boundaries are inclusive, see the usage examples below. If validDomain
- * is true, the function will only return valid boundaries, otherwise non-valid
- * boundaries are also possible.
- * If boundary1 > boundary2, the values are swapped
- *
- * Usage examples:
- * RandomUint64BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20
- * RandomUint64BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21
- * RandomUint64BoundaryValue(0, 99, SDL_FALSE) returns 100
- * RandomUint64BoundaryValue(0, 0xFFFFFFFFFFFFFFFF, SDL_FALSE) returns 0 (with error set)
- *
- * \param boundary1 Lower boundary limit
- * \param boundary2 Upper boundary limit
- * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
- *
- * \returns a random boundary value for the given range and domain or 0 with error set
- */
-Uint64 SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain);
-
-/**
- * Returns a random boundary value for Sint8 within the given boundaries.
- * Boundaries are inclusive, see the usage examples below. If validDomain
- * is true, the function will only return valid boundaries, otherwise non-valid
- * boundaries are also possible.
- * If boundary1 > boundary2, the values are swapped
- *
- * Usage examples:
- * RandomSint8BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20
- * RandomSint8BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9
- * RandomSint8BoundaryValue(SINT8_MIN, 99, SDL_FALSE) returns 100
- * RandomSint8BoundaryValue(SINT8_MIN, SINT8_MAX, SDL_FALSE) returns SINT8_MIN (== error value) with error set
- *
- * \param boundary1 Lower boundary limit
- * \param boundary2 Upper boundary limit
- * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
- *
- * \returns a random boundary value for the given range and domain or SINT8_MIN with error set
- */
-Sint8 SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_bool validDomain);
-
-
-/**
- * Returns a random boundary value for Sint16 within the given boundaries.
- * Boundaries are inclusive, see the usage examples below. If validDomain
- * is true, the function will only return valid boundaries, otherwise non-valid
- * boundaries are also possible.
- * If boundary1 > boundary2, the values are swapped
- *
- * Usage examples:
- * RandomSint16BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20
- * RandomSint16BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9
- * RandomSint16BoundaryValue(SINT16_MIN, 99, SDL_FALSE) returns 100
- * RandomSint16BoundaryValue(SINT16_MIN, SINT16_MAX, SDL_FALSE) returns SINT16_MIN (== error value) with error set
- *
- * \param boundary1 Lower boundary limit
- * \param boundary2 Upper boundary limit
- * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
- *
- * \returns a random boundary value for the given range and domain or SINT16_MIN with error set
- */
-Sint16 SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain);
-
-/**
- * Returns a random boundary value for Sint32 within the given boundaries.
- * Boundaries are inclusive, see the usage examples below. If validDomain
- * is true, the function will only return valid boundaries, otherwise non-valid
- * boundaries are also possible.
- * If boundary1 > boundary2, the values are swapped
- *
- * Usage examples:
- * RandomSint32BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20
- * RandomSint32BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9
- * RandomSint32BoundaryValue(SINT32_MIN, 99, SDL_FALSE) returns 100
- * RandomSint32BoundaryValue(SINT32_MIN, SINT32_MAX, SDL_FALSE) returns SINT32_MIN (== error value)
- *
- * \param boundary1 Lower boundary limit
- * \param boundary2 Upper boundary limit
- * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
- *
- * \returns a random boundary value for the given range and domain or SINT32_MIN with error set
- */
-Sint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain);
-
-/**
- * Returns a random boundary value for Sint64 within the given boundaries.
- * Boundaries are inclusive, see the usage examples below. If validDomain
- * is true, the function will only return valid boundaries, otherwise non-valid
- * boundaries are also possible.
- * If boundary1 > boundary2, the values are swapped
- *
- * Usage examples:
- * RandomSint64BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20
- * RandomSint64BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9
- * RandomSint64BoundaryValue(SINT64_MIN, 99, SDL_FALSE) returns 100
- * RandomSint64BoundaryValue(SINT64_MIN, SINT64_MAX, SDL_FALSE) returns SINT64_MIN (== error value) and error set
- *
- * \param boundary1 Lower boundary limit
- * \param boundary2 Upper boundary limit
- * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
- *
- * \returns a random boundary value for the given range and domain or SINT64_MIN with error set
- */
-Sint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain);
-
-
-/**
- * Returns integer in range [min, max] (inclusive).
- * Min and max values can be negative values.
- * If Max in smaller than min, then the values are swapped.
- * Min and max are the same value, that value will be returned.
- *
- * \param min Minimum inclusive value of returned random number
- * \param max Maximum inclusive value of returned random number
- *
- * \returns a generated random integer in range
- */
-Sint32 SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max);
-
-
-/**
- * Generates random null-terminated string. The minimum length for
- * the string is 1 character, maximum length for the string is 255
- * characters and it can contain ASCII characters from 32 to 126.
- *
- * Note: Returned string needs to be deallocated.
- *
- * \returns a newly allocated random string; or NULL if length was invalid or string could not be allocated.
- */
-char * SDLTest_RandomAsciiString(void);
-
-
-/**
- * Generates random null-terminated string. The maximum length for
- * the string is defined by the maxLength parameter.
- * String can contain ASCII characters from 32 to 126.
- *
- * Note: Returned string needs to be deallocated.
- *
- * \param maxLength The maximum length of the generated string.
- *
- * \returns a newly allocated random string; or NULL if maxLength was invalid or string could not be allocated.
- */
-char * SDLTest_RandomAsciiStringWithMaximumLength(int maxLength);
-
-
-/**
- * Generates random null-terminated string. The length for
- * the string is defined by the size parameter.
- * String can contain ASCII characters from 32 to 126.
- *
- * Note: Returned string needs to be deallocated.
- *
- * \param size The length of the generated string
- *
- * \returns a newly allocated random string; or NULL if size was invalid or string could not be allocated.
- */
-char * SDLTest_RandomAsciiStringOfSize(int size);
-
-/**
- * Get the invocation count for the fuzzer since last ...FuzzerInit.
- *
- * \returns the invocation count.
- */
-int SDLTest_GetFuzzerInvocationCount(void);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_test_fuzzer_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_harness.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_harness.h
deleted file mode 100644 (file)
index 1fd4236..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_test_harness.h
- *
- *  Include file for SDL test framework.
- *
- *  This code is a part of the SDL2_test library, not the main SDL library.
- */
-
-/*
-  Defines types for test case definitions and the test execution harness API.
-
-  Based on original GSOC code by Markus Kauppila <markus.kauppila@gmail.com>
-*/
-
-#ifndef SDL_test_h_arness_h
-#define SDL_test_h_arness_h
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* ! Definitions for test case structures */
-#define TEST_ENABLED  1
-#define TEST_DISABLED 0
-
-/* ! Definition of all the possible test return values of the test case method */
-#define TEST_ABORTED        -1
-#define TEST_STARTED         0
-#define TEST_COMPLETED       1
-#define TEST_SKIPPED         2
-
-/* ! Definition of all the possible test results for the harness */
-#define TEST_RESULT_PASSED              0
-#define TEST_RESULT_FAILED              1
-#define TEST_RESULT_NO_ASSERT           2
-#define TEST_RESULT_SKIPPED             3
-#define TEST_RESULT_SETUP_FAILURE       4
-
-/* !< Function pointer to a test case setup function (run before every test) */
-typedef void (*SDLTest_TestCaseSetUpFp)(void *arg);
-
-/* !< Function pointer to a test case function */
-typedef int (*SDLTest_TestCaseFp)(void *arg);
-
-/* !< Function pointer to a test case teardown function (run after every test) */
-typedef void  (*SDLTest_TestCaseTearDownFp)(void *arg);
-
-/**
- * Holds information about a single test case.
- */
-typedef struct SDLTest_TestCaseReference {
-    /* !< Func2Stress */
-    SDLTest_TestCaseFp testCase;
-    /* !< Short name (or function name) "Func2Stress" */
-    const char *name;
-    /* !< Long name or full description "This test pushes func2() to the limit." */
-    const char *description;
-    /* !< Set to TEST_ENABLED or TEST_DISABLED (test won't be run) */
-    int enabled;
-} SDLTest_TestCaseReference;
-
-/**
- * Holds information about a test suite (multiple test cases).
- */
-typedef struct SDLTest_TestSuiteReference {
-    /* !< "PlatformSuite" */
-    const char *name;
-    /* !< The function that is run before each test. NULL skips. */
-    SDLTest_TestCaseSetUpFp testSetUp;
-    /* !< The test cases that are run as part of the suite. Last item should be NULL. */
-    const SDLTest_TestCaseReference **testCases;
-    /* !< The function that is run after each test. NULL skips. */
-    SDLTest_TestCaseTearDownFp testTearDown;
-} SDLTest_TestSuiteReference;
-
-
-/**
- * \brief Generates a random run seed string for the harness. The generated seed will contain alphanumeric characters (0-9A-Z).
- *
- * Note: The returned string needs to be deallocated by the caller.
- *
- * \param length The length of the seed string to generate
- *
- * \returns the generated seed string
- */
-char *SDLTest_GenerateRunSeed(const int length);
-
-/**
- * \brief Execute a test suite using the given run seed and execution key.
- *
- * \param testSuites Suites containing the test case.
- * \param userRunSeed Custom run seed provided by user, or NULL to autogenerate one.
- * \param userExecKey Custom execution key provided by user, or 0 to autogenerate one.
- * \param filter Filter specification. NULL disables. Case sensitive.
- * \param testIterations Number of iterations to run each test case.
- *
- * \returns the test run result: 0 when all tests passed, 1 if any tests failed.
- */
-int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *userRunSeed, Uint64 userExecKey, const char *filter, int testIterations);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_test_h_arness_h */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_images.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_images.h
deleted file mode 100644 (file)
index e2bfc36..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_test_images.h
- *
- *  Include file for SDL test framework.
- *
- *  This code is a part of the SDL2_test library, not the main SDL library.
- */
-
-/*
-
- Defines some images for tests.
-
-*/
-
-#ifndef SDL_test_images_h_
-#define SDL_test_images_h_
-
-#include "SDL.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *Type for test images.
- */
-typedef struct SDLTest_SurfaceImage_s {
-  int width;
-  int height;
-  unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */
-  const char *pixel_data;
-} SDLTest_SurfaceImage_t;
-
-/* Test images */
-SDL_Surface *SDLTest_ImageBlit(void);
-SDL_Surface *SDLTest_ImageBlitColor(void);
-SDL_Surface *SDLTest_ImageBlitAlpha(void);
-SDL_Surface *SDLTest_ImageBlitBlendAdd(void);
-SDL_Surface *SDLTest_ImageBlitBlend(void);
-SDL_Surface *SDLTest_ImageBlitBlendMod(void);
-SDL_Surface *SDLTest_ImageBlitBlendNone(void);
-SDL_Surface *SDLTest_ImageBlitBlendAll(void);
-SDL_Surface *SDLTest_ImageFace(void);
-SDL_Surface *SDLTest_ImagePrimitives(void);
-SDL_Surface *SDLTest_ImagePrimitivesBlend(void);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_test_images_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_log.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_log.h
deleted file mode 100644 (file)
index e3d39ad..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_test_log.h
- *
- *  Include file for SDL test framework.
- *
- *  This code is a part of the SDL2_test library, not the main SDL library.
- */
-
-/*
- *
- *  Wrapper to log in the TEST category
- *
- */
-
-#ifndef SDL_test_log_h_
-#define SDL_test_log_h_
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \brief Prints given message with a timestamp in the TEST category and INFO priority.
- *
- * \param fmt Message to be logged
- */
-void SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
-
-/**
- * \brief Prints given message with a timestamp in the TEST category and the ERROR priority.
- *
- * \param fmt Message to be logged
- */
-void SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_test_log_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_md5.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_md5.h
deleted file mode 100644 (file)
index 17b1d2b..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_test_md5.h
- *
- *  Include file for SDL test framework.
- *
- *  This code is a part of the SDL2_test library, not the main SDL library.
- */
-
-/*
- ***********************************************************************
- ** Header file for implementation of MD5                             **
- ** RSA Data Security, Inc. MD5 Message-Digest Algorithm              **
- ** Created: 2/17/90 RLR                                              **
- ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version               **
- ** Revised (for MD5): RLR 4/27/91                                    **
- **   -- G modified to have y&~z instead of y&z                       **
- **   -- FF, GG, HH modified to add in last register done             **
- **   -- Access pattern: round 2 works mod 5, round 3 works mod 3     **
- **   -- distinct additive constant for each step                     **
- **   -- round 4 added, working mod 7                                 **
- ***********************************************************************
-*/
-
-/*
- ***********************************************************************
- **  Message-digest routines:                                         **
- **  To form the message digest for a message M                       **
- **    (1) Initialize a context buffer mdContext using MD5Init        **
- **    (2) Call MD5Update on mdContext and M                          **
- **    (3) Call MD5Final on mdContext                                 **
- **  The message digest is now in mdContext->digest[0...15]           **
- ***********************************************************************
-*/
-
-#ifndef SDL_test_md5_h_
-#define SDL_test_md5_h_
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* ------------ Definitions --------- */
-
-/* typedef a 32-bit type */
-  typedef unsigned long int MD5UINT4;
-
-/* Data structure for MD5 (Message-Digest) computation */
-  typedef struct {
-    MD5UINT4  i[2];     /* number of _bits_ handled mod 2^64 */
-    MD5UINT4  buf[4];       /* scratch buffer */
-    unsigned char in[64];   /* input buffer */
-    unsigned char digest[16];   /* actual digest after Md5Final call */
-  } SDLTest_Md5Context;
-
-/* ---------- Function Prototypes ------------- */
-
-/**
- * \brief initialize the context
- *
- * \param  mdContext        pointer to context variable
- *
- * Note: The function initializes the message-digest context
- *       mdContext. Call before each new use of the context -
- *       all fields are set to zero.
- */
- void SDLTest_Md5Init(SDLTest_Md5Context * mdContext);
-
-
-/**
- * \brief update digest from variable length data
- *
- * \param  mdContext       pointer to context variable
- * \param  inBuf           pointer to data array/string
- * \param  inLen           length of data array/string
- *
- * Note: The function updates the message-digest context to account
- *       for the presence of each of the characters inBuf[0..inLen-1]
- *       in the message whose digest is being computed.
-*/
-
- void SDLTest_Md5Update(SDLTest_Md5Context * mdContext, unsigned char *inBuf,
-                 unsigned int inLen);
-
-
-/**
- * \brief complete digest computation
- *
- * \param mdContext     pointer to context variable
- *
- * Note: The function terminates the message-digest computation and
- *       ends with the desired message digest in mdContext.digest[0..15].
- *       Always call before using the digest[] variable.
-*/
-
- void SDLTest_Md5Final(SDLTest_Md5Context * mdContext);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_test_md5_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_memory.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_memory.h
deleted file mode 100644 (file)
index cc2edc1..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_test_memory.h
- *
- *  Include file for SDL test framework.
- *
- *  This code is a part of the SDL2_test library, not the main SDL library.
- */
-
-#ifndef SDL_test_memory_h_
-#define SDL_test_memory_h_
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/**
- * \brief Start tracking SDL memory allocations
- * 
- * \note This should be called before any other SDL functions for complete tracking coverage
- */
-int SDLTest_TrackAllocations(void);
-
-/**
- * \brief Print a log of any outstanding allocations
- *
- * \note This can be called after SDL_Quit()
- */
-void SDLTest_LogAllocations(void);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_test_memory_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_random.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_random.h
deleted file mode 100644 (file)
index b1d6060..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_test_random.h
- *
- *  Include file for SDL test framework.
- *
- *  This code is a part of the SDL2_test library, not the main SDL library.
- */
-
-/*
-
- A "32-bit Multiply with carry random number generator. Very fast.
- Includes a list of recommended multipliers.
-
- multiply-with-carry generator: x(n) = a*x(n-1) + carry mod 2^32.
- period: (a*2^31)-1
-
-*/
-
-#ifndef SDL_test_random_h_
-#define SDL_test_random_h_
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* --- Definitions */
-
-/*
- * Macros that return a random number in a specific format.
- */
-#define SDLTest_RandomInt(c)        ((int)SDLTest_Random(c))
-
-/*
- * Context structure for the random number generator state.
- */
-  typedef struct {
-    unsigned int a;
-    unsigned int x;
-    unsigned int c;
-    unsigned int ah;
-    unsigned int al;
-  } SDLTest_RandomContext;
-
-
-/* --- Function prototypes */
-
-/**
- *  \brief Initialize random number generator with two integers.
- *
- *  Note: The random sequence of numbers returned by ...Random() is the
- *  same for the same two integers and has a period of 2^31.
- *
- *  \param rndContext     pointer to context structure
- *  \param xi         integer that defines the random sequence
- *  \param ci         integer that defines the random sequence
- *
- */
- void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi,
-                  unsigned int ci);
-
-/**
- *  \brief Initialize random number generator based on current system time.
- *
- *  \param rndContext     pointer to context structure
- *
- */
- void SDLTest_RandomInitTime(SDLTest_RandomContext *rndContext);
-
-
-/**
- *  \brief Initialize random number generator based on current system time.
- *
- *  Note: ...RandomInit() or ...RandomInitTime() must have been called
- *  before using this function.
- *
- *  \param rndContext     pointer to context structure
- *
- *  \returns a random number (32bit unsigned integer)
- *
- */
- unsigned int SDLTest_Random(SDLTest_RandomContext *rndContext);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_test_random_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_thread.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_thread.h
deleted file mode 100644 (file)
index 35e680d..0000000
+++ /dev/null
@@ -1,464 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_thread_h_
-#define SDL_thread_h_
-
-/**
- *  \file SDL_thread.h
- *
- *  Header for the SDL thread management routines.
- */
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-
-/* Thread synchronization primitives */
-#include "SDL_atomic.h"
-#include "SDL_mutex.h"
-
-#if defined(__WIN32__)
-#include <process.h> /* _beginthreadex() and _endthreadex() */
-#endif
-#if defined(__OS2__) /* for _beginthread() and _endthread() */
-#ifndef __EMX__
-#include <process.h>
-#else
-#include <stdlib.h>
-#endif
-#endif
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* The SDL thread structure, defined in SDL_thread.c */
-struct SDL_Thread;
-typedef struct SDL_Thread SDL_Thread;
-
-/* The SDL thread ID */
-typedef unsigned long SDL_threadID;
-
-/* Thread local storage ID, 0 is the invalid ID */
-typedef unsigned int SDL_TLSID;
-
-/**
- *  The SDL thread priority.
- *
- *  SDL will make system changes as necessary in order to apply the thread priority.
- *  Code which attempts to control thread state related to priority should be aware
- *  that calling SDL_SetThreadPriority may alter such state.
- *  SDL_HINT_THREAD_PRIORITY_POLICY can be used to control aspects of this behavior.
- *
- *  \note On many systems you require special privileges to set high or time critical priority.
- */
-typedef enum {
-    SDL_THREAD_PRIORITY_LOW,
-    SDL_THREAD_PRIORITY_NORMAL,
-    SDL_THREAD_PRIORITY_HIGH,
-    SDL_THREAD_PRIORITY_TIME_CRITICAL
-} SDL_ThreadPriority;
-
-/**
- * The function passed to SDL_CreateThread().
- *
- * \param data what was passed as `data` to SDL_CreateThread()
- * \returns a value that can be reported through SDL_WaitThread().
- */
-typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
-
-
-#if defined(__WIN32__)
-/**
- *  \file SDL_thread.h
- *
- *  We compile SDL into a DLL. This means, that it's the DLL which
- *  creates a new thread for the calling process with the SDL_CreateThread()
- *  API. There is a problem with this, that only the RTL of the SDL2.DLL will
- *  be initialized for those threads, and not the RTL of the calling
- *  application!
- *
- *  To solve this, we make a little hack here.
- *
- *  We'll always use the caller's _beginthread() and _endthread() APIs to
- *  start a new thread. This way, if it's the SDL2.DLL which uses this API,
- *  then the RTL of SDL2.DLL will be used to create the new thread, and if it's
- *  the application, then the RTL of the application will be used.
- *
- *  So, in short:
- *  Always use the _beginthread() and _endthread() of the calling runtime
- *  library!
- */
-#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
-
-typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread)
-                   (void *, unsigned, unsigned (__stdcall *func)(void *),
-                    void * /*arg*/, unsigned, unsigned * /* threadID */);
-typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
-
-#ifndef SDL_beginthread
-#define SDL_beginthread _beginthreadex
-#endif
-#ifndef SDL_endthread
-#define SDL_endthread _endthreadex
-#endif
-
-extern DECLSPEC SDL_Thread *SDLCALL
-SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
-                 pfnSDL_CurrentBeginThread pfnBeginThread,
-                 pfnSDL_CurrentEndThread pfnEndThread);
-
-extern DECLSPEC SDL_Thread *SDLCALL
-SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *),
-                 const char *name, const size_t stacksize, void *data,
-                 pfnSDL_CurrentBeginThread pfnBeginThread,
-                 pfnSDL_CurrentEndThread pfnEndThread);
-
-
-#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
-#undef SDL_CreateThread
-#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
-#undef SDL_CreateThreadWithStackSize
-#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
-#else
-#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
-#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)SDL_endthread)
-#endif
-
-#elif defined(__OS2__)
-/*
- * just like the windows case above:  We compile SDL2
- * into a dll with Watcom's runtime statically linked.
- */
-#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
-
-typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/);
-typedef void (*pfnSDL_CurrentEndThread)(void);
-
-#ifndef SDL_beginthread
-#define SDL_beginthread _beginthread
-#endif
-#ifndef SDL_endthread
-#define SDL_endthread _endthread
-#endif
-
-extern DECLSPEC SDL_Thread *SDLCALL
-SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
-                 pfnSDL_CurrentBeginThread pfnBeginThread,
-                 pfnSDL_CurrentEndThread pfnEndThread);
-extern DECLSPEC SDL_Thread *SDLCALL
-SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data,
-                 pfnSDL_CurrentBeginThread pfnBeginThread,
-                 pfnSDL_CurrentEndThread pfnEndThread);
-
-#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
-#undef SDL_CreateThread
-#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
-#undef SDL_CreateThreadWithStackSize
-#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
-#else
-#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
-#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
-#endif
-
-#else
-
-/**
- * Create a new thread with a default stack size.
- *
- * This is equivalent to calling:
- *
- * ```c
- * SDL_CreateThreadWithStackSize(fn, name, 0, data);
- * ```
- *
- * \param fn the SDL_ThreadFunction function to call in the new thread
- * \param name the name of the thread
- * \param data a pointer that is passed to `fn`
- * \returns an opaque pointer to the new thread object on success, NULL if the
- *          new thread could not be created; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateThreadWithStackSize
- * \sa SDL_WaitThread
- */
-extern DECLSPEC SDL_Thread *SDLCALL
-SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);
-
-/**
- * Create a new thread with a specific stack size.
- *
- * SDL makes an attempt to report `name` to the system, so that debuggers can
- * display it. Not all platforms support this.
- *
- * Thread naming is a little complicated: Most systems have very small limits
- * for the string length (Haiku has 32 bytes, Linux currently has 16, Visual
- * C++ 6.0 has _nine_!), and possibly other arbitrary rules. You'll have to
- * see what happens with your system's debugger. The name should be UTF-8 (but
- * using the naming limits of C identifiers is a better bet). There are no
- * requirements for thread naming conventions, so long as the string is
- * null-terminated UTF-8, but these guidelines are helpful in choosing a name:
- *
- * https://stackoverflow.com/questions/149932/naming-conventions-for-threads
- *
- * If a system imposes requirements, SDL will try to munge the string for it
- * (truncate, etc), but the original string contents will be available from
- * SDL_GetThreadName().
- *
- * The size (in bytes) of the new stack can be specified. Zero means "use the
- * system default" which might be wildly different between platforms. x86
- * Linux generally defaults to eight megabytes, an embedded device might be a
- * few kilobytes instead. You generally need to specify a stack that is a
- * multiple of the system's page size (in many cases, this is 4 kilobytes, but
- * check your system documentation).
- *
- * In SDL 2.1, stack size will be folded into the original SDL_CreateThread
- * function, but for backwards compatibility, this is currently a separate
- * function.
- *
- * \param fn the SDL_ThreadFunction function to call in the new thread
- * \param name the name of the thread
- * \param stacksize the size, in bytes, to allocate for the new thread stack.
- * \param data a pointer that is passed to `fn`
- * \returns an opaque pointer to the new thread object on success, NULL if the
- *          new thread could not be created; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.9.
- *
- * \sa SDL_WaitThread
- */
-extern DECLSPEC SDL_Thread *SDLCALL
-SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data);
-
-#endif
-
-/**
- * Get the thread name as it was specified in SDL_CreateThread().
- *
- * This is internal memory, not to be freed by the caller, and remains valid
- * until the specified thread is cleaned up by SDL_WaitThread().
- *
- * \param thread the thread to query
- * \returns a pointer to a UTF-8 string that names the specified thread, or
- *          NULL if it doesn't have a name.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateThread
- */
-extern DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread);
-
-/**
- * Get the thread identifier for the current thread.
- *
- * This thread identifier is as reported by the underlying operating system.
- * If SDL is running on a platform that does not support threads the return
- * value will always be zero.
- *
- * This function also returns a valid thread ID when called from the main
- * thread.
- *
- * \returns the ID of the current thread.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetThreadID
- */
-extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void);
-
-/**
- * Get the thread identifier for the specified thread.
- *
- * This thread identifier is as reported by the underlying operating system.
- * If SDL is running on a platform that does not support threads the return
- * value will always be zero.
- *
- * \param thread the thread to query
- * \returns the ID of the specified thread, or the ID of the current thread if
- *          `thread` is NULL.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ThreadID
- */
-extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread);
-
-/**
- * Set the priority for the current thread.
- *
- * Note that some platforms will not let you alter the priority (or at least,
- * promote the thread to a higher priority) at all, and some require you to be
- * an administrator account. Be prepared for this to fail.
- *
- * \param priority the SDL_ThreadPriority to set
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);
-
-/**
- * Wait for a thread to finish.
- *
- * Threads that haven't been detached will remain (as a "zombie") until this
- * function cleans them up. Not doing so is a resource leak.
- *
- * Once a thread has been cleaned up through this function, the SDL_Thread
- * that references it becomes invalid and should not be referenced again. As
- * such, only one thread may call SDL_WaitThread() on another.
- *
- * The return code for the thread function is placed in the area pointed to by
- * `status`, if `status` is not NULL.
- *
- * You may not wait on a thread that has been used in a call to
- * SDL_DetachThread(). Use either that function or this one, but not both, or
- * behavior is undefined.
- *
- * It is safe to pass a NULL thread to this function; it is a no-op.
- *
- * Note that the thread pointer is freed by this function and is not valid
- * afterward.
- *
- * \param thread the SDL_Thread pointer that was returned from the
- *               SDL_CreateThread() call that started this thread
- * \param status pointer to an integer that will receive the value returned
- *               from the thread function by its 'return', or NULL to not
- *               receive such value back.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateThread
- * \sa SDL_DetachThread
- */
-extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);
-
-/**
- * Let a thread clean up on exit without intervention.
- *
- * A thread may be "detached" to signify that it should not remain until
- * another thread has called SDL_WaitThread() on it. Detaching a thread is
- * useful for long-running threads that nothing needs to synchronize with or
- * further manage. When a detached thread is done, it simply goes away.
- *
- * There is no way to recover the return code of a detached thread. If you
- * need this, don't detach the thread and instead use SDL_WaitThread().
- *
- * Once a thread is detached, you should usually assume the SDL_Thread isn't
- * safe to reference again, as it will become invalid immediately upon the
- * detached thread's exit, instead of remaining until someone has called
- * SDL_WaitThread() to finally clean it up. As such, don't detach the same
- * thread more than once.
- *
- * If a thread has already exited when passed to SDL_DetachThread(), it will
- * stop waiting for a call to SDL_WaitThread() and clean up immediately. It is
- * not safe to detach a thread that might be used with SDL_WaitThread().
- *
- * You may not call SDL_WaitThread() on a thread that has been detached. Use
- * either that function or this one, but not both, or behavior is undefined.
- *
- * It is safe to pass NULL to this function; it is a no-op.
- *
- * \param thread the SDL_Thread pointer that was returned from the
- *               SDL_CreateThread() call that started this thread
- *
- * \since This function is available since SDL 2.0.2.
- *
- * \sa SDL_CreateThread
- * \sa SDL_WaitThread
- */
-extern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread);
-
-/**
- * Create a piece of thread-local storage.
- *
- * This creates an identifier that is globally visible to all threads but
- * refers to data that is thread-specific.
- *
- * \returns the newly created thread local storage identifier or 0 on error.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_TLSGet
- * \sa SDL_TLSSet
- */
-extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void);
-
-/**
- * Get the current thread's value associated with a thread local storage ID.
- *
- * \param id the thread local storage ID
- * \returns the value associated with the ID for the current thread or NULL if
- *          no value has been set; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_TLSCreate
- * \sa SDL_TLSSet
- */
-extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id);
-
-/**
- * Set the current thread's value associated with a thread local storage ID.
- *
- * The function prototype for `destructor` is:
- *
- * ```c
- * void destructor(void *value)
- * ```
- *
- * where its parameter `value` is what was passed as `value` to SDL_TLSSet().
- *
- * \param id the thread local storage ID
- * \param value the value to associate with the ID for the current thread
- * \param destructor a function called when the thread exits, to free the
- *                   value
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_TLSCreate
- * \sa SDL_TLSGet
- */
-extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (SDLCALL *destructor)(void*));
-
-/**
- * Cleanup all TLS data for this thread.
- *
- * \since This function is available since SDL 2.0.16.
- */
-extern DECLSPEC void SDLCALL SDL_TLSCleanup(void);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_thread_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_timer.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_timer.h
deleted file mode 100644 (file)
index 62f81d4..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef SDL_timer_h_
-#define SDL_timer_h_
-
-/**
- *  \file SDL_timer.h
- *
- *  Header for the SDL time management routines.
- */
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Get the number of milliseconds since SDL library initialization.
- *
- * This value wraps if the program runs for more than ~49 days.
- *
- * This function is not recommended as of SDL 2.0.18; use SDL_GetTicks64()
- * instead, where the value doesn't wrap every ~49 days. There are places in
- * SDL where we provide a 32-bit timestamp that can not change without
- * breaking binary compatibility, though, so this function isn't officially
- * deprecated.
- *
- * \returns an unsigned 32-bit value representing the number of milliseconds
- *          since the SDL library initialized.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_TICKS_PASSED
- */
-extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
-
-/**
- * Get the number of milliseconds since SDL library initialization.
- *
- * Note that you should not use the SDL_TICKS_PASSED macro with values
- * returned by this function, as that macro does clever math to compensate for
- * the 32-bit overflow every ~49 days that SDL_GetTicks() suffers from. 64-bit
- * values from this function can be safely compared directly.
- *
- * For example, if you want to wait 100 ms, you could do this:
- *
- * ```c
- * const Uint64 timeout = SDL_GetTicks64() + 100;
- * while (SDL_GetTicks64() < timeout) {
- *     // ... do work until timeout has elapsed
- * }
- * ```
- *
- * \returns an unsigned 64-bit value representing the number of milliseconds
- *          since the SDL library initialized.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC Uint64 SDLCALL SDL_GetTicks64(void);
-
-/**
- * Compare 32-bit SDL ticks values, and return true if `A` has passed `B`.
- *
- * This should be used with results from SDL_GetTicks(), as this macro
- * attempts to deal with the 32-bit counter wrapping back to zero every ~49
- * days, but should _not_ be used with SDL_GetTicks64(), which does not have
- * that problem.
- *
- * For example, with SDL_GetTicks(), if you want to wait 100 ms, you could
- * do this:
- *
- * ```c
- * const Uint32 timeout = SDL_GetTicks() + 100;
- * while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {
- *     // ... do work until timeout has elapsed
- * }
- * ```
- *
- * Note that this does not handle tick differences greater
- * than 2^31 so take care when using the above kind of code
- * with large timeout delays (tens of days).
- */
-#define SDL_TICKS_PASSED(A, B)  ((Sint32)((B) - (A)) <= 0)
-
-/**
- * Get the current value of the high resolution counter.
- *
- * This function is typically used for profiling.
- *
- * The counter values are only meaningful relative to each other. Differences
- * between values can be converted to times by using
- * SDL_GetPerformanceFrequency().
- *
- * \returns the current counter value.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetPerformanceFrequency
- */
-extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void);
-
-/**
- * Get the count per second of the high resolution counter.
- *
- * \returns a platform-specific count per second.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetPerformanceCounter
- */
-extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void);
-
-/**
- * Wait a specified number of milliseconds before returning.
- *
- * This function waits a specified number of milliseconds before returning. It
- * waits at least the specified time, but possibly longer due to OS
- * scheduling.
- *
- * \param ms the number of milliseconds to delay
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
-
-/**
- * Function prototype for the timer callback function.
- *
- * The callback function is passed the current timer interval and returns
- * the next timer interval. If the returned value is the same as the one
- * passed in, the periodic alarm continues, otherwise a new alarm is
- * scheduled. If the callback returns 0, the periodic alarm is cancelled.
- */
-typedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval, void *param);
-
-/**
- * Definition of the timer ID type.
- */
-typedef int SDL_TimerID;
-
-/**
- * Call a callback function at a future time.
- *
- * If you use this function, you must pass `SDL_INIT_TIMER` to SDL_Init().
- *
- * The callback function is passed the current timer interval and the user
- * supplied parameter from the SDL_AddTimer() call and should return the next
- * timer interval. If the value returned from the callback is 0, the timer is
- * canceled.
- *
- * The callback is run on a separate thread.
- *
- * Timers take into account the amount of time it took to execute the
- * callback. For example, if the callback took 250 ms to execute and returned
- * 1000 (ms), the timer would only wait another 750 ms before its next
- * iteration.
- *
- * Timing may be inexact due to OS scheduling. Be sure to note the current
- * time with SDL_GetTicks() or SDL_GetPerformanceCounter() in case your
- * callback needs to adjust for variances.
- *
- * \param interval the timer delay, in milliseconds, passed to `callback`
- * \param callback the SDL_TimerCallback function to call when the specified
- *                 `interval` elapses
- * \param param a pointer that is passed to `callback`
- * \returns a timer ID or 0 if an error occurs; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RemoveTimer
- */
-extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,
-                                                 SDL_TimerCallback callback,
-                                                 void *param);
-
-/**
- * Remove a timer created with SDL_AddTimer().
- *
- * \param id the ID of the timer to remove
- * \returns SDL_TRUE if the timer is removed or SDL_FALSE if the timer wasn't
- *          found.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_AddTimer
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_timer_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_touch.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_touch.h
deleted file mode 100644 (file)
index 9592413..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_touch.h
- *
- *  Include file for SDL touch event handling.
- */
-
-#ifndef SDL_touch_h_
-#define SDL_touch_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_error.h"
-#include "SDL_video.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef Sint64 SDL_TouchID;
-typedef Sint64 SDL_FingerID;
-
-typedef enum
-{
-    SDL_TOUCH_DEVICE_INVALID = -1,
-    SDL_TOUCH_DEVICE_DIRECT,            /* touch screen with window-relative coordinates */
-    SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */
-    SDL_TOUCH_DEVICE_INDIRECT_RELATIVE  /* trackpad with screen cursor-relative coordinates */
-} SDL_TouchDeviceType;
-
-typedef struct SDL_Finger
-{
-    SDL_FingerID id;
-    float x;
-    float y;
-    float pressure;
-} SDL_Finger;
-
-/* Used as the device ID for mouse events simulated with touch input */
-#define SDL_TOUCH_MOUSEID ((Uint32)-1)
-
-/* Used as the SDL_TouchID for touch events simulated with mouse input */
-#define SDL_MOUSE_TOUCHID ((Sint64)-1)
-
-
-/**
- * Get the number of registered touch devices.
- *
- * On some platforms SDL first sees the touch device if it was actually used.
- * Therefore SDL_GetNumTouchDevices() may return 0 although devices are
- * available. After using all devices at least once the number will be
- * correct.
- *
- * This was fixed for Android in SDL 2.0.1.
- *
- * \returns the number of registered touch devices.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetTouchDevice
- */
-extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
-
-/**
- * Get the touch ID with the given index.
- *
- * \param index the touch device index
- * \returns the touch ID with the given index on success or 0 if the index is
- *          invalid; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetNumTouchDevices
- */
-extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
-
-/**
- * Get the touch device name as reported from the driver or NULL if the index
- * is invalid.
- *
- * \since This function is available since SDL 2.0.22.
- */
-extern DECLSPEC const char* SDLCALL SDL_GetTouchName(int index);
-
-/**
- * Get the type of the given touch device.
- *
- * \since This function is available since SDL 2.0.10.
- */
-extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);
-
-/**
- * Get the number of active fingers for a given touch device.
- *
- * \param touchID the ID of a touch device
- * \returns the number of active fingers for a given touch device on success
- *          or 0 on failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetTouchFinger
- */
-extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID);
-
-/**
- * Get the finger object for specified touch device ID and finger index.
- *
- * The returned resource is owned by SDL and should not be deallocated.
- *
- * \param touchID the ID of the requested touch device
- * \param index the index of the requested finger
- * \returns a pointer to the SDL_Finger object or NULL if no object at the
- *          given ID and index could be found.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_RecordGesture
- */
-extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index);
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_touch_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_types.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_types.h
deleted file mode 100644 (file)
index 355fb50..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_types.h
- *
- *  \deprecated
- */
-
-/* DEPRECATED */
-#include "SDL_stdinc.h"
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_version.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_version.h
deleted file mode 100644 (file)
index 3df4e04..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_version.h
- *
- *  This header defines the current SDL version.
- */
-
-#ifndef SDL_version_h_
-#define SDL_version_h_
-
-#include "SDL_stdinc.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Information about the version of SDL in use.
- *
- * Represents the library's version as three levels: major revision
- * (increments with massive changes, additions, and enhancements),
- * minor revision (increments with backwards-compatible changes to the
- * major revision), and patchlevel (increments with fixes to the minor
- * revision).
- *
- * \sa SDL_VERSION
- * \sa SDL_GetVersion
- */
-typedef struct SDL_version
-{
-    Uint8 major;        /**< major version */
-    Uint8 minor;        /**< minor version */
-    Uint8 patch;        /**< update version */
-} SDL_version;
-
-/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
-*/
-#define SDL_MAJOR_VERSION   2
-#define SDL_MINOR_VERSION   0
-#define SDL_PATCHLEVEL      22
-
-/**
- * Macro to determine SDL version program was compiled against.
- *
- * This macro fills in a SDL_version structure with the version of the
- * library you compiled against. This is determined by what header the
- * compiler uses. Note that if you dynamically linked the library, you might
- * have a slightly newer or older version at runtime. That version can be
- * determined with SDL_GetVersion(), which, unlike SDL_VERSION(),
- * is not a macro.
- *
- * \param x A pointer to a SDL_version struct to initialize.
- *
- * \sa SDL_version
- * \sa SDL_GetVersion
- */
-#define SDL_VERSION(x)                          \
-{                                   \
-    (x)->major = SDL_MAJOR_VERSION;                 \
-    (x)->minor = SDL_MINOR_VERSION;                 \
-    (x)->patch = SDL_PATCHLEVEL;                    \
-}
-
-/**
- *  This macro turns the version numbers into a numeric value:
- *  \verbatim
-    (1,2,3) -> (1203)
-    \endverbatim
- *
- *  This assumes that there will never be more than 100 patchlevels.
- */
-#define SDL_VERSIONNUM(X, Y, Z)                     \
-    ((X)*1000 + (Y)*100 + (Z))
-
-/**
- *  This is the version number macro for the current SDL version.
- */
-#define SDL_COMPILEDVERSION \
-    SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
-
-/**
- *  This macro will evaluate to true if compiled with SDL at least X.Y.Z.
- */
-#define SDL_VERSION_ATLEAST(X, Y, Z) \
-    (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
-
-/**
- * Get the version of SDL that is linked against your program.
- *
- * If you are linking to SDL dynamically, then it is possible that the current
- * version will be different than the version you compiled against. This
- * function returns the current version, while SDL_VERSION() is a macro that
- * tells you what version you compiled with.
- *
- * This function may be called safely at any time, even before SDL_Init().
- *
- * \param ver the SDL_version structure that contains the version information
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetRevision
- */
-extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
-
-/**
- * Get the code revision of SDL that is linked against your program.
- *
- * This value is the revision of the code you are linked with and may be
- * different from the code you are compiling with, which is found in the
- * constant SDL_REVISION.
- *
- * The revision is arbitrary string (a hash value) uniquely identifying the
- * exact revision of the SDL library in use, and is only useful in comparing
- * against other revisions. It is NOT an incrementing number.
- *
- * If SDL wasn't built from a git repository with the appropriate tools, this
- * will return an empty string.
- *
- * Prior to SDL 2.0.16, before development moved to GitHub, this returned a
- * hash for a Mercurial repository.
- *
- * You shouldn't use this function for anything but logging it for debugging
- * purposes. The string is not intended to be reliable in any way.
- *
- * \returns an arbitrary string, uniquely identifying the exact revision of
- *          the SDL library in use.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetVersion
- */
-extern DECLSPEC const char *SDLCALL SDL_GetRevision(void);
-
-/**
- * Obsolete function, do not use.
- *
- * When SDL was hosted in a Mercurial repository, and was built carefully,
- * this would return the revision number that the build was created from. This
- * number was not reliable for several reasons, but more importantly, SDL is
- * now hosted in a git repository, which does not offer numbers at all, only
- * hashes. This function only ever returns zero now. Don't use it.
- *
- * Before SDL 2.0.16, this might have returned an unreliable, but non-zero
- * number.
- *
- * \deprecated Use SDL_GetRevision() instead; if SDL was carefully built, it
- *             will return a git hash.
- *
- * \returns zero, always, in modern SDL releases.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetRevision
- */
-extern SDL_DEPRECATED DECLSPEC int SDLCALL SDL_GetRevisionNumber(void);
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_version_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_video.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_video.h
deleted file mode 100644 (file)
index c62e089..0000000
+++ /dev/null
@@ -1,2089 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_video.h
- *
- *  Header file for SDL video functions.
- */
-
-#ifndef SDL_video_h_
-#define SDL_video_h_
-
-#include "SDL_stdinc.h"
-#include "SDL_pixels.h"
-#include "SDL_rect.h"
-#include "SDL_surface.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \brief  The structure that defines a display mode
- *
- *  \sa SDL_GetNumDisplayModes()
- *  \sa SDL_GetDisplayMode()
- *  \sa SDL_GetDesktopDisplayMode()
- *  \sa SDL_GetCurrentDisplayMode()
- *  \sa SDL_GetClosestDisplayMode()
- *  \sa SDL_SetWindowDisplayMode()
- *  \sa SDL_GetWindowDisplayMode()
- */
-typedef struct
-{
-    Uint32 format;              /**< pixel format */
-    int w;                      /**< width, in screen coordinates */
-    int h;                      /**< height, in screen coordinates */
-    int refresh_rate;           /**< refresh rate (or zero for unspecified) */
-    void *driverdata;           /**< driver-specific data, initialize to 0 */
-} SDL_DisplayMode;
-
-/**
- *  \brief The type used to identify a window
- *
- *  \sa SDL_CreateWindow()
- *  \sa SDL_CreateWindowFrom()
- *  \sa SDL_DestroyWindow()
- *  \sa SDL_FlashWindow()
- *  \sa SDL_GetWindowData()
- *  \sa SDL_GetWindowFlags()
- *  \sa SDL_GetWindowGrab()
- *  \sa SDL_GetWindowKeyboardGrab()
- *  \sa SDL_GetWindowMouseGrab()
- *  \sa SDL_GetWindowPosition()
- *  \sa SDL_GetWindowSize()
- *  \sa SDL_GetWindowTitle()
- *  \sa SDL_HideWindow()
- *  \sa SDL_MaximizeWindow()
- *  \sa SDL_MinimizeWindow()
- *  \sa SDL_RaiseWindow()
- *  \sa SDL_RestoreWindow()
- *  \sa SDL_SetWindowData()
- *  \sa SDL_SetWindowFullscreen()
- *  \sa SDL_SetWindowGrab()
- *  \sa SDL_SetWindowKeyboardGrab()
- *  \sa SDL_SetWindowMouseGrab()
- *  \sa SDL_SetWindowIcon()
- *  \sa SDL_SetWindowPosition()
- *  \sa SDL_SetWindowSize()
- *  \sa SDL_SetWindowBordered()
- *  \sa SDL_SetWindowResizable()
- *  \sa SDL_SetWindowTitle()
- *  \sa SDL_ShowWindow()
- */
-typedef struct SDL_Window SDL_Window;
-
-/**
- *  \brief The flags on a window
- *
- *  \sa SDL_GetWindowFlags()
- */
-typedef enum
-{
-    SDL_WINDOW_FULLSCREEN = 0x00000001,         /**< fullscreen window */
-    SDL_WINDOW_OPENGL = 0x00000002,             /**< window usable with OpenGL context */
-    SDL_WINDOW_SHOWN = 0x00000004,              /**< window is visible */
-    SDL_WINDOW_HIDDEN = 0x00000008,             /**< window is not visible */
-    SDL_WINDOW_BORDERLESS = 0x00000010,         /**< no window decoration */
-    SDL_WINDOW_RESIZABLE = 0x00000020,          /**< window can be resized */
-    SDL_WINDOW_MINIMIZED = 0x00000040,          /**< window is minimized */
-    SDL_WINDOW_MAXIMIZED = 0x00000080,          /**< window is maximized */
-    SDL_WINDOW_MOUSE_GRABBED = 0x00000100,      /**< window has grabbed mouse input */
-    SDL_WINDOW_INPUT_FOCUS = 0x00000200,        /**< window has input focus */
-    SDL_WINDOW_MOUSE_FOCUS = 0x00000400,        /**< window has mouse focus */
-    SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
-    SDL_WINDOW_FOREIGN = 0x00000800,            /**< window not created by SDL */
-    SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000,      /**< window should be created in high-DPI mode if supported.
-                                                     On macOS NSHighResolutionCapable must be set true in the
-                                                     application's Info.plist for this to have any effect. */
-    SDL_WINDOW_MOUSE_CAPTURE    = 0x00004000,   /**< window has mouse captured (unrelated to MOUSE_GRABBED) */
-    SDL_WINDOW_ALWAYS_ON_TOP    = 0x00008000,   /**< window should always be above others */
-    SDL_WINDOW_SKIP_TASKBAR     = 0x00010000,   /**< window should not be added to the taskbar */
-    SDL_WINDOW_UTILITY          = 0x00020000,   /**< window should be treated as a utility window */
-    SDL_WINDOW_TOOLTIP          = 0x00040000,   /**< window should be treated as a tooltip */
-    SDL_WINDOW_POPUP_MENU       = 0x00080000,   /**< window should be treated as a popup menu */
-    SDL_WINDOW_KEYBOARD_GRABBED = 0x00100000,   /**< window has grabbed keyboard input */
-    SDL_WINDOW_VULKAN           = 0x10000000,   /**< window usable for Vulkan surface */
-    SDL_WINDOW_METAL            = 0x20000000,   /**< window usable for Metal view */
-
-    SDL_WINDOW_INPUT_GRABBED = SDL_WINDOW_MOUSE_GRABBED /**< equivalent to SDL_WINDOW_MOUSE_GRABBED for compatibility */
-} SDL_WindowFlags;
-
-/**
- *  \brief Used to indicate that you don't care what the window position is.
- */
-#define SDL_WINDOWPOS_UNDEFINED_MASK    0x1FFF0000u
-#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X)  (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
-#define SDL_WINDOWPOS_UNDEFINED         SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
-#define SDL_WINDOWPOS_ISUNDEFINED(X)    \
-            (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
-
-/**
- *  \brief Used to indicate that the window position should be centered.
- */
-#define SDL_WINDOWPOS_CENTERED_MASK    0x2FFF0000u
-#define SDL_WINDOWPOS_CENTERED_DISPLAY(X)  (SDL_WINDOWPOS_CENTERED_MASK|(X))
-#define SDL_WINDOWPOS_CENTERED         SDL_WINDOWPOS_CENTERED_DISPLAY(0)
-#define SDL_WINDOWPOS_ISCENTERED(X)    \
-            (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
-
-/**
- *  \brief Event subtype for window events
- */
-typedef enum
-{
-    SDL_WINDOWEVENT_NONE,           /**< Never used */
-    SDL_WINDOWEVENT_SHOWN,          /**< Window has been shown */
-    SDL_WINDOWEVENT_HIDDEN,         /**< Window has been hidden */
-    SDL_WINDOWEVENT_EXPOSED,        /**< Window has been exposed and should be
-                                         redrawn */
-    SDL_WINDOWEVENT_MOVED,          /**< Window has been moved to data1, data2
-                                     */
-    SDL_WINDOWEVENT_RESIZED,        /**< Window has been resized to data1xdata2 */
-    SDL_WINDOWEVENT_SIZE_CHANGED,   /**< The window size has changed, either as
-                                         a result of an API call or through the
-                                         system or user changing the window size. */
-    SDL_WINDOWEVENT_MINIMIZED,      /**< Window has been minimized */
-    SDL_WINDOWEVENT_MAXIMIZED,      /**< Window has been maximized */
-    SDL_WINDOWEVENT_RESTORED,       /**< Window has been restored to normal size
-                                         and position */
-    SDL_WINDOWEVENT_ENTER,          /**< Window has gained mouse focus */
-    SDL_WINDOWEVENT_LEAVE,          /**< Window has lost mouse focus */
-    SDL_WINDOWEVENT_FOCUS_GAINED,   /**< Window has gained keyboard focus */
-    SDL_WINDOWEVENT_FOCUS_LOST,     /**< Window has lost keyboard focus */
-    SDL_WINDOWEVENT_CLOSE,          /**< The window manager requests that the window be closed */
-    SDL_WINDOWEVENT_TAKE_FOCUS,     /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
-    SDL_WINDOWEVENT_HIT_TEST,       /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
-    SDL_WINDOWEVENT_ICCPROF_CHANGED,/**< The ICC profile of the window's display has changed. */
-    SDL_WINDOWEVENT_DISPLAY_CHANGED /**< Window has been moved to display data1. */
-} SDL_WindowEventID;
-
-/**
- *  \brief Event subtype for display events
- */
-typedef enum
-{
-    SDL_DISPLAYEVENT_NONE,          /**< Never used */
-    SDL_DISPLAYEVENT_ORIENTATION,   /**< Display orientation has changed to data1 */
-    SDL_DISPLAYEVENT_CONNECTED,     /**< Display has been added to the system */
-    SDL_DISPLAYEVENT_DISCONNECTED   /**< Display has been removed from the system */
-} SDL_DisplayEventID;
-
-/**
- *  \brief Display orientation
- */
-typedef enum
-{
-    SDL_ORIENTATION_UNKNOWN,            /**< The display orientation can't be determined */
-    SDL_ORIENTATION_LANDSCAPE,          /**< The display is in landscape mode, with the right side up, relative to portrait mode */
-    SDL_ORIENTATION_LANDSCAPE_FLIPPED,  /**< The display is in landscape mode, with the left side up, relative to portrait mode */
-    SDL_ORIENTATION_PORTRAIT,           /**< The display is in portrait mode */
-    SDL_ORIENTATION_PORTRAIT_FLIPPED    /**< The display is in portrait mode, upside down */
-} SDL_DisplayOrientation;
-
-/**
- *  \brief Window flash operation
- */
-typedef enum
-{
-    SDL_FLASH_CANCEL,                   /**< Cancel any window flash state */
-    SDL_FLASH_BRIEFLY,                  /**< Flash the window briefly to get attention */
-    SDL_FLASH_UNTIL_FOCUSED             /**< Flash the window until it gets focus */
-} SDL_FlashOperation;
-
-/**
- *  \brief An opaque handle to an OpenGL context.
- */
-typedef void *SDL_GLContext;
-
-/**
- *  \brief OpenGL configuration attributes
- */
-typedef enum
-{
-    SDL_GL_RED_SIZE,
-    SDL_GL_GREEN_SIZE,
-    SDL_GL_BLUE_SIZE,
-    SDL_GL_ALPHA_SIZE,
-    SDL_GL_BUFFER_SIZE,
-    SDL_GL_DOUBLEBUFFER,
-    SDL_GL_DEPTH_SIZE,
-    SDL_GL_STENCIL_SIZE,
-    SDL_GL_ACCUM_RED_SIZE,
-    SDL_GL_ACCUM_GREEN_SIZE,
-    SDL_GL_ACCUM_BLUE_SIZE,
-    SDL_GL_ACCUM_ALPHA_SIZE,
-    SDL_GL_STEREO,
-    SDL_GL_MULTISAMPLEBUFFERS,
-    SDL_GL_MULTISAMPLESAMPLES,
-    SDL_GL_ACCELERATED_VISUAL,
-    SDL_GL_RETAINED_BACKING,
-    SDL_GL_CONTEXT_MAJOR_VERSION,
-    SDL_GL_CONTEXT_MINOR_VERSION,
-    SDL_GL_CONTEXT_EGL,
-    SDL_GL_CONTEXT_FLAGS,
-    SDL_GL_CONTEXT_PROFILE_MASK,
-    SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
-    SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
-    SDL_GL_CONTEXT_RELEASE_BEHAVIOR,
-    SDL_GL_CONTEXT_RESET_NOTIFICATION,
-    SDL_GL_CONTEXT_NO_ERROR
-} SDL_GLattr;
-
-typedef enum
-{
-    SDL_GL_CONTEXT_PROFILE_CORE           = 0x0001,
-    SDL_GL_CONTEXT_PROFILE_COMPATIBILITY  = 0x0002,
-    SDL_GL_CONTEXT_PROFILE_ES             = 0x0004 /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */
-} SDL_GLprofile;
-
-typedef enum
-{
-    SDL_GL_CONTEXT_DEBUG_FLAG              = 0x0001,
-    SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002,
-    SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG      = 0x0004,
-    SDL_GL_CONTEXT_RESET_ISOLATION_FLAG    = 0x0008
-} SDL_GLcontextFlag;
-
-typedef enum
-{
-    SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE   = 0x0000,
-    SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH  = 0x0001
-} SDL_GLcontextReleaseFlag;
-
-typedef enum
-{
-    SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000,
-    SDL_GL_CONTEXT_RESET_LOSE_CONTEXT    = 0x0001
-} SDL_GLContextResetNotification;
-
-/* Function prototypes */
-
-/**
- * Get the number of video drivers compiled into SDL.
- *
- * \returns a number >= 1 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetVideoDriver
- */
-extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
-
-/**
- * Get the name of a built in video driver.
- *
- * The video drivers are presented in the order in which they are normally
- * checked during initialization.
- *
- * \param index the index of a video driver
- * \returns the name of the video driver with the given **index**.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetNumVideoDrivers
- */
-extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
-
-/**
- * Initialize the video subsystem, optionally specifying a video driver.
- *
- * This function initializes the video subsystem, setting up a connection to
- * the window manager, etc, and determines the available display modes and
- * pixel formats, but does not initialize a window or graphics mode.
- *
- * If you use this function and you haven't used the SDL_INIT_VIDEO flag with
- * either SDL_Init() or SDL_InitSubSystem(), you should call SDL_VideoQuit()
- * before calling SDL_Quit().
- *
- * It is safe to call this function multiple times. SDL_VideoInit() will call
- * SDL_VideoQuit() itself if the video subsystem has already been initialized.
- *
- * You can use SDL_GetNumVideoDrivers() and SDL_GetVideoDriver() to find a
- * specific `driver_name`.
- *
- * \param driver_name the name of a video driver to initialize, or NULL for
- *                    the default driver
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetNumVideoDrivers
- * \sa SDL_GetVideoDriver
- * \sa SDL_InitSubSystem
- * \sa SDL_VideoQuit
- */
-extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name);
-
-/**
- * Shut down the video subsystem, if initialized with SDL_VideoInit().
- *
- * This function closes all windows, and restores the original video mode.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_VideoInit
- */
-extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
-
-/**
- * Get the name of the currently initialized video driver.
- *
- * \returns the name of the current video driver or NULL if no driver has been
- *          initialized.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetNumVideoDrivers
- * \sa SDL_GetVideoDriver
- */
-extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
-
-/**
- * Get the number of available video displays.
- *
- * \returns a number >= 1 or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetDisplayBounds
- */
-extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
-
-/**
- * Get the name of a display in UTF-8 encoding.
- *
- * \param displayIndex the index of display from which the name should be
- *                     queried
- * \returns the name of a display or NULL for an invalid display index or
- *          failure; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetNumVideoDisplays
- */
-extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);
-
-/**
- * Get the desktop area represented by a display.
- *
- * The primary display (`displayIndex` zero) is always located at 0,0.
- *
- * \param displayIndex the index of the display to query
- * \param rect the SDL_Rect structure filled in with the display bounds
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetNumVideoDisplays
- */
-extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
-
-/**
- * Get the usable desktop area represented by a display.
- *
- * The primary display (`displayIndex` zero) is always located at 0,0.
- *
- * This is the same area as SDL_GetDisplayBounds() reports, but with portions
- * reserved by the system removed. For example, on Apple's macOS, this
- * subtracts the area occupied by the menu bar and dock.
- *
- * Setting a window to be fullscreen generally bypasses these unusable areas,
- * so these are good guidelines for the maximum space available to a
- * non-fullscreen window.
- *
- * The parameter `rect` is ignored if it is NULL.
- *
- * This function also returns -1 if the parameter `displayIndex` is out of
- * range.
- *
- * \param displayIndex the index of the display to query the usable bounds
- *                     from
- * \param rect the SDL_Rect structure filled in with the display bounds
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.5.
- *
- * \sa SDL_GetDisplayBounds
- * \sa SDL_GetNumVideoDisplays
- */
-extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
-
-/**
- * Get the dots/pixels-per-inch for a display.
- *
- * Diagonal, horizontal and vertical DPI can all be optionally returned if the
- * appropriate parameter is non-NULL.
- *
- * A failure of this function usually means that either no DPI information is
- * available or the `displayIndex` is out of range.
- *
- * \param displayIndex the index of the display from which DPI information
- *                     should be queried
- * \param ddpi a pointer filled in with the diagonal DPI of the display; may
- *             be NULL
- * \param hdpi a pointer filled in with the horizontal DPI of the display; may
- *             be NULL
- * \param vdpi a pointer filled in with the vertical DPI of the display; may
- *             be NULL
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.4.
- *
- * \sa SDL_GetNumVideoDisplays
- */
-extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
-
-/**
- * Get the orientation of a display.
- *
- * \param displayIndex the index of the display to query
- * \returns The SDL_DisplayOrientation enum value of the display, or
- *          `SDL_ORIENTATION_UNKNOWN` if it isn't available.
- *
- * \since This function is available since SDL 2.0.9.
- *
- * \sa SDL_GetNumVideoDisplays
- */
-extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex);
-
-/**
- * Get the number of available display modes.
- *
- * The `displayIndex` needs to be in the range from 0 to
- * SDL_GetNumVideoDisplays() - 1.
- *
- * \param displayIndex the index of the display to query
- * \returns a number >= 1 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetDisplayMode
- * \sa SDL_GetNumVideoDisplays
- */
-extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);
-
-/**
- * Get information about a specific display mode.
- *
- * The display modes are sorted in this priority:
- *
- * - width -> largest to smallest
- * - height -> largest to smallest
- * - bits per pixel -> more colors to fewer colors
- * - packed pixel layout -> largest to smallest
- * - refresh rate -> highest to lowest
- *
- * \param displayIndex the index of the display to query
- * \param modeIndex the index of the display mode to query
- * \param mode an SDL_DisplayMode structure filled in with the mode at
- *             `modeIndex`
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetNumDisplayModes
- */
-extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,
-                                               SDL_DisplayMode * mode);
-
-/**
- * Get information about the desktop's display mode.
- *
- * There's a difference between this function and SDL_GetCurrentDisplayMode()
- * when SDL runs fullscreen and has changed the resolution. In that case this
- * function will return the previous native display mode, and not the current
- * display mode.
- *
- * \param displayIndex the index of the display to query
- * \param mode an SDL_DisplayMode structure filled in with the current display
- *             mode
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetCurrentDisplayMode
- * \sa SDL_GetDisplayMode
- * \sa SDL_SetWindowDisplayMode
- */
-extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode);
-
-/**
- * Get information about the current display mode.
- *
- * There's a difference between this function and SDL_GetDesktopDisplayMode()
- * when SDL runs fullscreen and has changed the resolution. In that case this
- * function will return the current display mode, and not the previous native
- * display mode.
- *
- * \param displayIndex the index of the display to query
- * \param mode an SDL_DisplayMode structure filled in with the current display
- *             mode
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetDesktopDisplayMode
- * \sa SDL_GetDisplayMode
- * \sa SDL_GetNumVideoDisplays
- * \sa SDL_SetWindowDisplayMode
- */
-extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode);
-
-
-/**
- * Get the closest match to the requested display mode.
- *
- * The available display modes are scanned and `closest` is filled in with the
- * closest mode matching the requested mode and returned. The mode format and
- * refresh rate default to the desktop mode if they are set to 0. The modes
- * are scanned with size being first priority, format being second priority,
- * and finally checking the refresh rate. If all the available modes are too
- * small, then NULL is returned.
- *
- * \param displayIndex the index of the display to query
- * \param mode an SDL_DisplayMode structure containing the desired display
- *             mode
- * \param closest an SDL_DisplayMode structure filled in with the closest
- *                match of the available display modes
- * \returns the passed in value `closest` or NULL if no matching video mode
- *          was available; call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetDisplayMode
- * \sa SDL_GetNumDisplayModes
- */
-extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
-
-/**
- * Get the index of the display associated with a window.
- *
- * \param window the window to query
- * \returns the index of the display containing the center of the window on
- *          success or a negative error code on failure; call SDL_GetError()
- *          for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetDisplayBounds
- * \sa SDL_GetNumVideoDisplays
- */
-extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window);
-
-/**
- * Set the display mode to use when a window is visible at fullscreen.
- *
- * This only affects the display mode used when the window is fullscreen. To
- * change the window size when the window is not fullscreen, use
- * SDL_SetWindowSize().
- *
- * \param window the window to affect
- * \param mode the SDL_DisplayMode structure representing the mode to use, or
- *             NULL to use the window's dimensions and the desktop's format
- *             and refresh rate
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowDisplayMode
- * \sa SDL_SetWindowFullscreen
- */
-extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
-                                                     const SDL_DisplayMode * mode);
-
-/**
- * Query the display mode to use when a window is visible at fullscreen.
- *
- * \param window the window to query
- * \param mode an SDL_DisplayMode structure filled in with the fullscreen
- *             display mode
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetWindowDisplayMode
- * \sa SDL_SetWindowFullscreen
- */
-extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,
-                                                     SDL_DisplayMode * mode);
-
-/**
- * Get the raw ICC profile data for the screen the window is currently on.
- *
- * Data returned should be freed with SDL_free.
- *
- * \param window the window to query
- * \param size the size of the ICC profile
- * \returns the raw ICC profile data on success or NULL on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.18.
- */
-extern DECLSPEC void* SDLCALL SDL_GetWindowICCProfile(SDL_Window * window, size_t* size);
-
-/**
- * Get the pixel format associated with the window.
- *
- * \param window the window to query
- * \returns the pixel format of the window on success or
- *          SDL_PIXELFORMAT_UNKNOWN on failure; call SDL_GetError() for more
- *          information.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
-
-/**
- * Create a window with the specified position, dimensions, and flags.
- *
- * `flags` may be any of the following OR'd together:
- *
- * - `SDL_WINDOW_FULLSCREEN`: fullscreen window
- * - `SDL_WINDOW_FULLSCREEN_DESKTOP`: fullscreen window at desktop resolution
- * - `SDL_WINDOW_OPENGL`: window usable with an OpenGL context
- * - `SDL_WINDOW_VULKAN`: window usable with a Vulkan instance
- * - `SDL_WINDOW_METAL`: window usable with a Metal instance
- * - `SDL_WINDOW_HIDDEN`: window is not visible
- * - `SDL_WINDOW_BORDERLESS`: no window decoration
- * - `SDL_WINDOW_RESIZABLE`: window can be resized
- * - `SDL_WINDOW_MINIMIZED`: window is minimized
- * - `SDL_WINDOW_MAXIMIZED`: window is maximized
- * - `SDL_WINDOW_INPUT_GRABBED`: window has grabbed input focus
- * - `SDL_WINDOW_ALLOW_HIGHDPI`: window should be created in high-DPI mode if
- *   supported (>= SDL 2.0.1)
- *
- * `SDL_WINDOW_SHOWN` is ignored by SDL_CreateWindow(). The SDL_Window is
- * implicitly shown if SDL_WINDOW_HIDDEN is not set. `SDL_WINDOW_SHOWN` may be
- * queried later using SDL_GetWindowFlags().
- *
- * On Apple's macOS, you **must** set the NSHighResolutionCapable Info.plist
- * property to YES, otherwise you will not receive a High-DPI OpenGL canvas.
- *
- * If the window is created with the `SDL_WINDOW_ALLOW_HIGHDPI` flag, its size
- * in pixels may differ from its size in screen coordinates on platforms with
- * high-DPI support (e.g. iOS and macOS). Use SDL_GetWindowSize() to query the
- * client area's size in screen coordinates, and SDL_GL_GetDrawableSize() or
- * SDL_GetRendererOutputSize() to query the drawable size in pixels.
- *
- * If the window is set fullscreen, the width and height parameters `w` and
- * `h` will not be used. However, invalid size parameters (e.g. too large) may
- * still fail. Window size is actually limited to 16384 x 16384 for all
- * platforms at window creation.
- *
- * If the window is created with any of the SDL_WINDOW_OPENGL or
- * SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function
- * (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the
- * corresponding UnloadLibrary function is called by SDL_DestroyWindow().
- *
- * If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,
- * SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail.
- *
- * If SDL_WINDOW_METAL is specified on an OS that does not support Metal,
- * SDL_CreateWindow() will fail.
- *
- * On non-Apple devices, SDL requires you to either not link to the Vulkan
- * loader or link to a dynamic library version. This limitation may be removed
- * in a future version of SDL.
- *
- * \param title the title of the window, in UTF-8 encoding
- * \param x the x position of the window, `SDL_WINDOWPOS_CENTERED`, or
- *          `SDL_WINDOWPOS_UNDEFINED`
- * \param y the y position of the window, `SDL_WINDOWPOS_CENTERED`, or
- *          `SDL_WINDOWPOS_UNDEFINED`
- * \param w the width of the window, in screen coordinates
- * \param h the height of the window, in screen coordinates
- * \param flags 0, or one or more SDL_WindowFlags OR'd together
- * \returns the window that was created or NULL on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateWindowFrom
- * \sa SDL_DestroyWindow
- */
-extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
-                                                      int x, int y, int w,
-                                                      int h, Uint32 flags);
-
-/**
- * Create an SDL window from an existing native window.
- *
- * In some cases (e.g. OpenGL) and on some platforms (e.g. Microsoft Windows)
- * the hint `SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT` needs to be configured
- * before using SDL_CreateWindowFrom().
- *
- * \param data a pointer to driver-dependent window creation data, typically
- *             your native window cast to a void*
- * \returns the window that was created or NULL on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateWindow
- * \sa SDL_DestroyWindow
- */
-extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data);
-
-/**
- * Get the numeric ID of a window.
- *
- * The numeric ID is what SDL_WindowEvent references, and is necessary to map
- * these events to specific SDL_Window objects.
- *
- * \param window the window to query
- * \returns the ID of the window on success or 0 on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowFromID
- */
-extern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window);
-
-/**
- * Get a window from a stored ID.
- *
- * The numeric ID is what SDL_WindowEvent references, and is necessary to map
- * these events to specific SDL_Window objects.
- *
- * \param id the ID of the window
- * \returns the window associated with `id` or NULL if it doesn't exist; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowID
- */
-extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id);
-
-/**
- * Get the window flags.
- *
- * \param window the window to query
- * \returns a mask of the SDL_WindowFlags associated with `window`
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateWindow
- * \sa SDL_HideWindow
- * \sa SDL_MaximizeWindow
- * \sa SDL_MinimizeWindow
- * \sa SDL_SetWindowFullscreen
- * \sa SDL_SetWindowGrab
- * \sa SDL_ShowWindow
- */
-extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window);
-
-/**
- * Set the title of a window.
- *
- * This string is expected to be in UTF-8 encoding.
- *
- * \param window the window to change
- * \param title the desired window title in UTF-8 format
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowTitle
- */
-extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,
-                                                const char *title);
-
-/**
- * Get the title of a window.
- *
- * \param window the window to query
- * \returns the title of the window in UTF-8 format or "" if there is no
- *          title.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetWindowTitle
- */
-extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window);
-
-/**
- * Set the icon for a window.
- *
- * \param window the window to change
- * \param icon an SDL_Surface structure containing the icon for the window
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
-                                               SDL_Surface * icon);
-
-/**
- * Associate an arbitrary named pointer with a window.
- *
- * `name` is case-sensitive.
- *
- * \param window the window to associate with the pointer
- * \param name the name of the pointer
- * \param userdata the associated pointer
- * \returns the previous value associated with `name`.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowData
- */
-extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
-                                                const char *name,
-                                                void *userdata);
-
-/**
- * Retrieve the data pointer associated with a window.
- *
- * \param window the window to query
- * \param name the name of the pointer
- * \returns the value associated with `name`.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetWindowData
- */
-extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
-                                                const char *name);
-
-/**
- * Set the position of a window.
- *
- * The window coordinate origin is the upper left of the display.
- *
- * \param window the window to reposition
- * \param x the x coordinate of the window in screen coordinates, or
- *          `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED`
- * \param y the y coordinate of the window in screen coordinates, or
- *          `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED`
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowPosition
- */
-extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
-                                                   int x, int y);
-
-/**
- * Get the position of a window.
- *
- * If you do not need the value for one of the positions a NULL may be passed
- * in the `x` or `y` parameter.
- *
- * \param window the window to query
- * \param x a pointer filled in with the x position of the window, in screen
- *          coordinates, may be NULL
- * \param y a pointer filled in with the y position of the window, in screen
- *          coordinates, may be NULL
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetWindowPosition
- */
-extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
-                                                   int *x, int *y);
-
-/**
- * Set the size of a window's client area.
- *
- * The window size in screen coordinates may differ from the size in pixels,
- * if the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a platform
- * with high-dpi support (e.g. iOS or macOS). Use SDL_GL_GetDrawableSize() or
- * SDL_GetRendererOutputSize() to get the real client area size in pixels.
- *
- * Fullscreen windows automatically match the size of the display mode, and
- * you should use SDL_SetWindowDisplayMode() to change their size.
- *
- * \param window the window to change
- * \param w the width of the window in pixels, in screen coordinates, must be
- *          > 0
- * \param h the height of the window in pixels, in screen coordinates, must be
- *          > 0
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowSize
- * \sa SDL_SetWindowDisplayMode
- */
-extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
-                                               int h);
-
-/**
- * Get the size of a window's client area.
- *
- * NULL can safely be passed as the `w` or `h` parameter if the width or
- * height value is not desired.
- *
- * The window size in screen coordinates may differ from the size in pixels,
- * if the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a platform
- * with high-dpi support (e.g. iOS or macOS). Use SDL_GL_GetDrawableSize(),
- * SDL_Vulkan_GetDrawableSize(), or SDL_GetRendererOutputSize() to get the
- * real client area size in pixels.
- *
- * \param window the window to query the width and height from
- * \param w a pointer filled in with the width of the window, in screen
- *          coordinates, may be NULL
- * \param h a pointer filled in with the height of the window, in screen
- *          coordinates, may be NULL
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_GetDrawableSize
- * \sa SDL_Vulkan_GetDrawableSize
- * \sa SDL_SetWindowSize
- */
-extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
-                                               int *h);
-
-/**
- * Get the size of a window's borders (decorations) around the client area.
- *
- * Note: If this function fails (returns -1), the size values will be
- * initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as if the
- * window in question was borderless.
- *
- * Note: This function may fail on systems where the window has not yet been
- * decorated by the display server (for example, immediately after calling
- * SDL_CreateWindow). It is recommended that you wait at least until the
- * window has been presented and composited, so that the window system has a
- * chance to decorate the window and provide the border dimensions to SDL.
- *
- * This function also returns -1 if getting the information is not supported.
- *
- * \param window the window to query the size values of the border
- *               (decorations) from
- * \param top pointer to variable for storing the size of the top border; NULL
- *            is permitted
- * \param left pointer to variable for storing the size of the left border;
- *             NULL is permitted
- * \param bottom pointer to variable for storing the size of the bottom
- *               border; NULL is permitted
- * \param right pointer to variable for storing the size of the right border;
- *              NULL is permitted
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.5.
- *
- * \sa SDL_GetWindowSize
- */
-extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
-                                                     int *top, int *left,
-                                                     int *bottom, int *right);
-
-/**
- * Set the minimum size of a window's client area.
- *
- * \param window the window to change
- * \param min_w the minimum width of the window in pixels
- * \param min_h the minimum height of the window in pixels
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowMinimumSize
- * \sa SDL_SetWindowMaximumSize
- */
-extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
-                                                      int min_w, int min_h);
-
-/**
- * Get the minimum size of a window's client area.
- *
- * \param window the window to query
- * \param w a pointer filled in with the minimum width of the window, may be
- *          NULL
- * \param h a pointer filled in with the minimum height of the window, may be
- *          NULL
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowMaximumSize
- * \sa SDL_SetWindowMinimumSize
- */
-extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,
-                                                      int *w, int *h);
-
-/**
- * Set the maximum size of a window's client area.
- *
- * \param window the window to change
- * \param max_w the maximum width of the window in pixels
- * \param max_h the maximum height of the window in pixels
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowMaximumSize
- * \sa SDL_SetWindowMinimumSize
- */
-extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,
-                                                      int max_w, int max_h);
-
-/**
- * Get the maximum size of a window's client area.
- *
- * \param window the window to query
- * \param w a pointer filled in with the maximum width of the window, may be
- *          NULL
- * \param h a pointer filled in with the maximum height of the window, may be
- *          NULL
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowMinimumSize
- * \sa SDL_SetWindowMaximumSize
- */
-extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
-                                                      int *w, int *h);
-
-/**
- * Set the border state of a window.
- *
- * This will add or remove the window's `SDL_WINDOW_BORDERLESS` flag and add
- * or remove the border from the actual window. This is a no-op if the
- * window's border already matches the requested state.
- *
- * You can't change the border state of a fullscreen window.
- *
- * \param window the window of which to change the border state
- * \param bordered SDL_FALSE to remove border, SDL_TRUE to add border
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowFlags
- */
-extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
-                                                   SDL_bool bordered);
-
-/**
- * Set the user-resizable state of a window.
- *
- * This will add or remove the window's `SDL_WINDOW_RESIZABLE` flag and
- * allow/disallow user resizing of the window. This is a no-op if the window's
- * resizable state already matches the requested state.
- *
- * You can't change the resizable state of a fullscreen window.
- *
- * \param window the window of which to change the resizable state
- * \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow
- *
- * \since This function is available since SDL 2.0.5.
- *
- * \sa SDL_GetWindowFlags
- */
-extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
-                                                    SDL_bool resizable);
-
-/**
- * Set the window to always be above the others.
- *
- * This will add or remove the window's `SDL_WINDOW_ALWAYS_ON_TOP` flag. This
- * will bring the window to the front and keep the window above the rest.
- *
- * \param window The window of which to change the always on top state
- * \param on_top SDL_TRUE to set the window always on top, SDL_FALSE to
- *               disable
- *
- * \since This function is available since SDL 2.0.16.
- *
- * \sa SDL_GetWindowFlags
- */
-extern DECLSPEC void SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window * window,
-                                                      SDL_bool on_top);
-
-/**
- * Show a window.
- *
- * \param window the window to show
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_HideWindow
- * \sa SDL_RaiseWindow
- */
-extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window);
-
-/**
- * Hide a window.
- *
- * \param window the window to hide
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_ShowWindow
- */
-extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window);
-
-/**
- * Raise a window above other windows and set the input focus.
- *
- * \param window the window to raise
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window);
-
-/**
- * Make a window as large as possible.
- *
- * \param window the window to maximize
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_MinimizeWindow
- * \sa SDL_RestoreWindow
- */
-extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window);
-
-/**
- * Minimize a window to an iconic representation.
- *
- * \param window the window to minimize
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_MaximizeWindow
- * \sa SDL_RestoreWindow
- */
-extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window);
-
-/**
- * Restore the size and position of a minimized or maximized window.
- *
- * \param window the window to restore
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_MaximizeWindow
- * \sa SDL_MinimizeWindow
- */
-extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
-
-/**
- * Set a window's fullscreen state.
- *
- * `flags` may be `SDL_WINDOW_FULLSCREEN`, for "real" fullscreen with a
- * videomode change; `SDL_WINDOW_FULLSCREEN_DESKTOP` for "fake" fullscreen
- * that takes the size of the desktop; and 0 for windowed mode.
- *
- * \param window the window to change
- * \param flags `SDL_WINDOW_FULLSCREEN`, `SDL_WINDOW_FULLSCREEN_DESKTOP` or 0
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowDisplayMode
- * \sa SDL_SetWindowDisplayMode
- */
-extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
-                                                    Uint32 flags);
-
-/**
- * Get the SDL surface associated with the window.
- *
- * A new surface will be created with the optimal format for the window, if
- * necessary. This surface will be freed when the window is destroyed. Do not
- * free this surface.
- *
- * This surface will be invalidated if the window is resized. After resizing a
- * window this function must be called again to return a valid surface.
- *
- * You may not combine this with 3D or the rendering API on this window.
- *
- * This function is affected by `SDL_HINT_FRAMEBUFFER_ACCELERATION`.
- *
- * \param window the window to query
- * \returns the surface associated with the window, or NULL on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_UpdateWindowSurface
- * \sa SDL_UpdateWindowSurfaceRects
- */
-extern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window);
-
-/**
- * Copy the window surface to the screen.
- *
- * This is the function you use to reflect any changes to the surface on the
- * screen.
- *
- * This function is equivalent to the SDL 1.2 API SDL_Flip().
- *
- * \param window the window to update
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowSurface
- * \sa SDL_UpdateWindowSurfaceRects
- */
-extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
-
-/**
- * Copy areas of the window surface to the screen.
- *
- * This is the function you use to reflect changes to portions of the surface
- * on the screen.
- *
- * This function is equivalent to the SDL 1.2 API SDL_UpdateRects().
- *
- * \param window the window to update
- * \param rects an array of SDL_Rect structures representing areas of the
- *              surface to copy
- * \param numrects the number of rectangles
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowSurface
- * \sa SDL_UpdateWindowSurface
- */
-extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
-                                                         const SDL_Rect * rects,
-                                                         int numrects);
-
-/**
- * Set a window's input grab mode.
- *
- * When input is grabbed, the mouse is confined to the window. This function
- * will also grab the keyboard if `SDL_HINT_GRAB_KEYBOARD` is set. To grab the
- * keyboard without also grabbing the mouse, use SDL_SetWindowKeyboardGrab().
- *
- * If the caller enables a grab while another window is currently grabbed, the
- * other window loses its grab in favor of the caller's window.
- *
- * \param window the window for which the input grab mode should be set
- * \param grabbed SDL_TRUE to grab input or SDL_FALSE to release input
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetGrabbedWindow
- * \sa SDL_GetWindowGrab
- */
-extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
-                                               SDL_bool grabbed);
-
-/**
- * Set a window's keyboard grab mode.
- *
- * Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or
- * the Meta/Super key. Note that not all system keyboard shortcuts can be
- * captured by applications (one example is Ctrl+Alt+Del on Windows).
- *
- * This is primarily intended for specialized applications such as VNC clients
- * or VM frontends. Normal games should not use keyboard grab.
- *
- * When keyboard grab is enabled, SDL will continue to handle Alt+Tab when the
- * window is full-screen to ensure the user is not trapped in your
- * application. If you have a custom keyboard shortcut to exit fullscreen
- * mode, you may suppress this behavior with
- * `SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED`.
- *
- * If the caller enables a grab while another window is currently grabbed, the
- * other window loses its grab in favor of the caller's window.
- *
- * \param window The window for which the keyboard grab mode should be set.
- * \param grabbed This is SDL_TRUE to grab keyboard, and SDL_FALSE to release.
- *
- * \since This function is available since SDL 2.0.16.
- *
- * \sa SDL_GetWindowKeyboardGrab
- * \sa SDL_SetWindowMouseGrab
- * \sa SDL_SetWindowGrab
- */
-extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window * window,
-                                                       SDL_bool grabbed);
-
-/**
- * Set a window's mouse grab mode.
- *
- * Mouse grab confines the mouse cursor to the window.
- *
- * \param window The window for which the mouse grab mode should be set.
- * \param grabbed This is SDL_TRUE to grab mouse, and SDL_FALSE to release.
- *
- * \since This function is available since SDL 2.0.16.
- *
- * \sa SDL_GetWindowMouseGrab
- * \sa SDL_SetWindowKeyboardGrab
- * \sa SDL_SetWindowGrab
- */
-extern DECLSPEC void SDLCALL SDL_SetWindowMouseGrab(SDL_Window * window,
-                                                    SDL_bool grabbed);
-
-/**
- * Get a window's input grab mode.
- *
- * \param window the window to query
- * \returns SDL_TRUE if input is grabbed, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetWindowGrab
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
-
-/**
- * Get a window's keyboard grab mode.
- *
- * \param window the window to query
- * \returns SDL_TRUE if keyboard is grabbed, and SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.16.
- *
- * \sa SDL_SetWindowKeyboardGrab
- * \sa SDL_GetWindowGrab
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowKeyboardGrab(SDL_Window * window);
-
-/**
- * Get a window's mouse grab mode.
- *
- * \param window the window to query
- * \returns SDL_TRUE if mouse is grabbed, and SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.16.
- *
- * \sa SDL_SetWindowKeyboardGrab
- * \sa SDL_GetWindowGrab
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowMouseGrab(SDL_Window * window);
-
-/**
- * Get the window that currently has an input grab enabled.
- *
- * \returns the window if input is grabbed or NULL otherwise.
- *
- * \since This function is available since SDL 2.0.4.
- *
- * \sa SDL_GetWindowGrab
- * \sa SDL_SetWindowGrab
- */
-extern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);
-
-/**
- * Confines the cursor to the specified area of a window.
- *
- * Note that this does NOT grab the cursor, it only defines the area a cursor
- * is restricted to when the window has mouse focus.
- *
- * \param window The window that will be associated with the barrier.
- * \param rect A rectangle area in window-relative coordinates. If NULL the
- *             barrier for the specified window will be destroyed.
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_GetWindowMouseRect
- * \sa SDL_SetWindowMouseGrab
- */
-extern DECLSPEC int SDLCALL SDL_SetWindowMouseRect(SDL_Window * window, const SDL_Rect * rect);
-
-/**
- * Get the mouse confinement rectangle of a window.
- *
- * \param window The window to query
- * \returns A pointer to the mouse confinement rectangle of a window, or NULL
- *          if there isn't one.
- *
- * \since This function is available since SDL 2.0.18.
- *
- * \sa SDL_SetWindowMouseRect
- */
-extern DECLSPEC const SDL_Rect * SDLCALL SDL_GetWindowMouseRect(SDL_Window * window);
-
-/**
- * Set the brightness (gamma multiplier) for a given window's display.
- *
- * Despite the name and signature, this method sets the brightness of the
- * entire display, not an individual window. A window is considered to be
- * owned by the display that contains the window's center pixel. (The index of
- * this display can be retrieved using SDL_GetWindowDisplayIndex().) The
- * brightness set will not follow the window if it is moved to another
- * display.
- *
- * Many platforms will refuse to set the display brightness in modern times.
- * You are better off using a shader to adjust gamma during rendering, or
- * something similar.
- *
- * \param window the window used to select the display whose brightness will
- *               be changed
- * \param brightness the brightness (gamma multiplier) value to set where 0.0
- *                   is completely dark and 1.0 is normal brightness
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowBrightness
- * \sa SDL_SetWindowGammaRamp
- */
-extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float brightness);
-
-/**
- * Get the brightness (gamma multiplier) for a given window's display.
- *
- * Despite the name and signature, this method retrieves the brightness of the
- * entire display, not an individual window. A window is considered to be
- * owned by the display that contains the window's center pixel. (The index of
- * this display can be retrieved using SDL_GetWindowDisplayIndex().)
- *
- * \param window the window used to select the display whose brightness will
- *               be queried
- * \returns the brightness for the display where 0.0 is completely dark and
- *          1.0 is normal brightness.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetWindowBrightness
- */
-extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
-
-/**
- * Set the opacity for a window.
- *
- * The parameter `opacity` will be clamped internally between 0.0f
- * (transparent) and 1.0f (opaque).
- *
- * This function also returns -1 if setting the opacity isn't supported.
- *
- * \param window the window which will be made transparent or opaque
- * \param opacity the opacity value (0.0f - transparent, 1.0f - opaque)
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.5.
- *
- * \sa SDL_GetWindowOpacity
- */
-extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
-
-/**
- * Get the opacity of a window.
- *
- * If transparency isn't supported on this platform, opacity will be reported
- * as 1.0f without error.
- *
- * The parameter `opacity` is ignored if it is NULL.
- *
- * This function also returns -1 if an invalid window was provided.
- *
- * \param window the window to get the current opacity value from
- * \param out_opacity the float filled in (0.0f - transparent, 1.0f - opaque)
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.5.
- *
- * \sa SDL_SetWindowOpacity
- */
-extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
-
-/**
- * Set the window as a modal for another window.
- *
- * \param modal_window the window that should be set modal
- * \param parent_window the parent window for the modal window
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.5.
- */
-extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
-
-/**
- * Explicitly set input focus to the window.
- *
- * You almost certainly want SDL_RaiseWindow() instead of this function. Use
- * this with caution, as you might give focus to a window that is completely
- * obscured by other windows.
- *
- * \param window the window that should get the input focus
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.5.
- *
- * \sa SDL_RaiseWindow
- */
-extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
-
-/**
- * Set the gamma ramp for the display that owns a given window.
- *
- * Set the gamma translation table for the red, green, and blue channels of
- * the video hardware. Each table is an array of 256 16-bit quantities,
- * representing a mapping between the input and output for that channel. The
- * input is the index into the array, and the output is the 16-bit gamma value
- * at that index, scaled to the output color precision.
- *
- * Despite the name and signature, this method sets the gamma ramp of the
- * entire display, not an individual window. A window is considered to be
- * owned by the display that contains the window's center pixel. (The index of
- * this display can be retrieved using SDL_GetWindowDisplayIndex().) The gamma
- * ramp set will not follow the window if it is moved to another display.
- *
- * \param window the window used to select the display whose gamma ramp will
- *               be changed
- * \param red a 256 element array of 16-bit quantities representing the
- *            translation table for the red channel, or NULL
- * \param green a 256 element array of 16-bit quantities representing the
- *              translation table for the green channel, or NULL
- * \param blue a 256 element array of 16-bit quantities representing the
- *             translation table for the blue channel, or NULL
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GetWindowGammaRamp
- */
-extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,
-                                                   const Uint16 * red,
-                                                   const Uint16 * green,
-                                                   const Uint16 * blue);
-
-/**
- * Get the gamma ramp for a given window's display.
- *
- * Despite the name and signature, this method retrieves the gamma ramp of the
- * entire display, not an individual window. A window is considered to be
- * owned by the display that contains the window's center pixel. (The index of
- * this display can be retrieved using SDL_GetWindowDisplayIndex().)
- *
- * \param window the window used to select the display whose gamma ramp will
- *               be queried
- * \param red a 256 element array of 16-bit quantities filled in with the
- *            translation table for the red channel, or NULL
- * \param green a 256 element array of 16-bit quantities filled in with the
- *              translation table for the green channel, or NULL
- * \param blue a 256 element array of 16-bit quantities filled in with the
- *             translation table for the blue channel, or NULL
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_SetWindowGammaRamp
- */
-extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
-                                                   Uint16 * red,
-                                                   Uint16 * green,
-                                                   Uint16 * blue);
-
-/**
- * Possible return values from the SDL_HitTest callback.
- *
- * \sa SDL_HitTest
- */
-typedef enum
-{
-    SDL_HITTEST_NORMAL,  /**< Region is normal. No special properties. */
-    SDL_HITTEST_DRAGGABLE,  /**< Region can drag entire window. */
-    SDL_HITTEST_RESIZE_TOPLEFT,
-    SDL_HITTEST_RESIZE_TOP,
-    SDL_HITTEST_RESIZE_TOPRIGHT,
-    SDL_HITTEST_RESIZE_RIGHT,
-    SDL_HITTEST_RESIZE_BOTTOMRIGHT,
-    SDL_HITTEST_RESIZE_BOTTOM,
-    SDL_HITTEST_RESIZE_BOTTOMLEFT,
-    SDL_HITTEST_RESIZE_LEFT
-} SDL_HitTestResult;
-
-/**
- * Callback used for hit-testing.
- *
- * \param win the SDL_Window where hit-testing was set on
- * \param area an SDL_Point which should be hit-tested
- * \param data what was passed as `callback_data` to SDL_SetWindowHitTest()
- * \return an SDL_HitTestResult value.
- *
- * \sa SDL_SetWindowHitTest
- */
-typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,
-                                                 const SDL_Point *area,
-                                                 void *data);
-
-/**
- * Provide a callback that decides if a window region has special properties.
- *
- * Normally windows are dragged and resized by decorations provided by the
- * system window manager (a title bar, borders, etc), but for some apps, it
- * makes sense to drag them from somewhere else inside the window itself; for
- * example, one might have a borderless window that wants to be draggable from
- * any part, or simulate its own title bar, etc.
- *
- * This function lets the app provide a callback that designates pieces of a
- * given window as special. This callback is run during event processing if we
- * need to tell the OS to treat a region of the window specially; the use of
- * this callback is known as "hit testing."
- *
- * Mouse input may not be delivered to your application if it is within a
- * special area; the OS will often apply that input to moving the window or
- * resizing the window and not deliver it to the application.
- *
- * Specifying NULL for a callback disables hit-testing. Hit-testing is
- * disabled by default.
- *
- * Platforms that don't support this functionality will return -1
- * unconditionally, even if you're attempting to disable hit-testing.
- *
- * Your callback may fire at any time, and its firing does not indicate any
- * specific behavior (for example, on Windows, this certainly might fire when
- * the OS is deciding whether to drag your window, but it fires for lots of
- * other reasons, too, some unrelated to anything you probably care about _and
- * when the mouse isn't actually at the location it is testing_). Since this
- * can fire at any time, you should try to keep your callback efficient,
- * devoid of allocations, etc.
- *
- * \param window the window to set hit-testing on
- * \param callback the function to call when doing a hit-test
- * \param callback_data an app-defined void pointer passed to **callback**
- * \returns 0 on success or -1 on error (including unsupported); call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.4.
- */
-extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,
-                                                 SDL_HitTest callback,
-                                                 void *callback_data);
-
-/**
- * Request a window to demand attention from the user.
- *
- * \param window the window to be flashed
- * \param operation the flash operation
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.16.
- */
-extern DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window * window, SDL_FlashOperation operation);
-
-/**
- * Destroy a window.
- *
- * If `window` is NULL, this function will return immediately after setting
- * the SDL error message to "Invalid window". See SDL_GetError().
- *
- * \param window the window to destroy
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_CreateWindow
- * \sa SDL_CreateWindowFrom
- */
-extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
-
-
-/**
- * Check whether the screensaver is currently enabled.
- *
- * The screensaver is disabled by default since SDL 2.0.2. Before SDL 2.0.2
- * the screensaver was enabled by default.
- *
- * The default can also be changed using `SDL_HINT_VIDEO_ALLOW_SCREENSAVER`.
- *
- * \returns SDL_TRUE if the screensaver is enabled, SDL_FALSE if it is
- *          disabled.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_DisableScreenSaver
- * \sa SDL_EnableScreenSaver
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void);
-
-/**
- * Allow the screen to be blanked by a screen saver.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_DisableScreenSaver
- * \sa SDL_IsScreenSaverEnabled
- */
-extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);
-
-/**
- * Prevent the screen from being blanked by a screen saver.
- *
- * If you disable the screensaver, it is automatically re-enabled when SDL
- * quits.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_EnableScreenSaver
- * \sa SDL_IsScreenSaverEnabled
- */
-extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void);
-
-
-/**
- *  \name OpenGL support functions
- */
-/* @{ */
-
-/**
- * Dynamically load an OpenGL library.
- *
- * This should be done after initializing the video driver, but before
- * creating any OpenGL windows. If no OpenGL library is loaded, the default
- * library will be loaded upon creation of the first OpenGL window.
- *
- * If you do this, you need to retrieve all of the GL functions used in your
- * program from the dynamic library using SDL_GL_GetProcAddress().
- *
- * \param path the platform dependent OpenGL library name, or NULL to open the
- *             default OpenGL library
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_GetProcAddress
- * \sa SDL_GL_UnloadLibrary
- */
-extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
-
-/**
- * Get an OpenGL function by name.
- *
- * If the GL library is loaded at runtime with SDL_GL_LoadLibrary(), then all
- * GL functions must be retrieved this way. Usually this is used to retrieve
- * function pointers to OpenGL extensions.
- *
- * There are some quirks to looking up OpenGL functions that require some
- * extra care from the application. If you code carefully, you can handle
- * these quirks without any platform-specific code, though:
- *
- * - On Windows, function pointers are specific to the current GL context;
- *   this means you need to have created a GL context and made it current
- *   before calling SDL_GL_GetProcAddress(). If you recreate your context or
- *   create a second context, you should assume that any existing function
- *   pointers aren't valid to use with it. This is (currently) a
- *   Windows-specific limitation, and in practice lots of drivers don't suffer
- *   this limitation, but it is still the way the wgl API is documented to
- *   work and you should expect crashes if you don't respect it. Store a copy
- *   of the function pointers that comes and goes with context lifespan.
- * - On X11, function pointers returned by this function are valid for any
- *   context, and can even be looked up before a context is created at all.
- *   This means that, for at least some common OpenGL implementations, if you
- *   look up a function that doesn't exist, you'll get a non-NULL result that
- *   is _NOT_ safe to call. You must always make sure the function is actually
- *   available for a given GL context before calling it, by checking for the
- *   existence of the appropriate extension with SDL_GL_ExtensionSupported(),
- *   or verifying that the version of OpenGL you're using offers the function
- *   as core functionality.
- * - Some OpenGL drivers, on all platforms, *will* return NULL if a function
- *   isn't supported, but you can't count on this behavior. Check for
- *   extensions you use, and if you get a NULL anyway, act as if that
- *   extension wasn't available. This is probably a bug in the driver, but you
- *   can code defensively for this scenario anyhow.
- * - Just because you're on Linux/Unix, don't assume you'll be using X11.
- *   Next-gen display servers are waiting to replace it, and may or may not
- *   make the same promises about function pointers.
- * - OpenGL function pointers must be declared `APIENTRY` as in the example
- *   code. This will ensure the proper calling convention is followed on
- *   platforms where this matters (Win32) thereby avoiding stack corruption.
- *
- * \param proc the name of an OpenGL function
- * \returns a pointer to the named OpenGL function. The returned pointer
- *          should be cast to the appropriate function signature.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_ExtensionSupported
- * \sa SDL_GL_LoadLibrary
- * \sa SDL_GL_UnloadLibrary
- */
-extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
-
-/**
- * Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_LoadLibrary
- */
-extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
-
-/**
- * Check if an OpenGL extension is supported for the current context.
- *
- * This function operates on the current GL context; you must have created a
- * context and it must be current before calling this function. Do not assume
- * that all contexts you create will have the same set of extensions
- * available, or that recreating an existing context will offer the same
- * extensions again.
- *
- * While it's probably not a massive overhead, this function is not an O(1)
- * operation. Check the extensions you care about after creating the GL
- * context and save that information somewhere instead of calling the function
- * every time you need to know.
- *
- * \param extension the name of the extension to check
- * \returns SDL_TRUE if the extension is supported, SDL_FALSE otherwise.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
-                                                           *extension);
-
-/**
- * Reset all previously set OpenGL context attributes to their default values.
- *
- * \since This function is available since SDL 2.0.2.
- *
- * \sa SDL_GL_GetAttribute
- * \sa SDL_GL_SetAttribute
- */
-extern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);
-
-/**
- * Set an OpenGL window attribute before window creation.
- *
- * This function sets the OpenGL attribute `attr` to `value`. The requested
- * attributes should be set before creating an OpenGL window. You should use
- * SDL_GL_GetAttribute() to check the values after creating the OpenGL
- * context, since the values obtained can differ from the requested ones.
- *
- * \param attr an SDL_GLattr enum value specifying the OpenGL attribute to set
- * \param value the desired value for the attribute
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_GetAttribute
- * \sa SDL_GL_ResetAttributes
- */
-extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
-
-/**
- * Get the actual value for an attribute from the current context.
- *
- * \param attr an SDL_GLattr enum value specifying the OpenGL attribute to get
- * \param value a pointer filled in with the current value of `attr`
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_ResetAttributes
- * \sa SDL_GL_SetAttribute
- */
-extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
-
-/**
- * Create an OpenGL context for an OpenGL window, and make it current.
- *
- * Windows users new to OpenGL should note that, for historical reasons, GL
- * functions added after OpenGL version 1.1 are not available by default.
- * Those functions must be loaded at run-time, either with an OpenGL
- * extension-handling library or with SDL_GL_GetProcAddress() and its related
- * functions.
- *
- * SDL_GLContext is an alias for `void *`. It's opaque to the application.
- *
- * \param window the window to associate with the context
- * \returns the OpenGL context associated with `window` or NULL on error; call
- *          SDL_GetError() for more details.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_DeleteContext
- * \sa SDL_GL_MakeCurrent
- */
-extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *
-                                                           window);
-
-/**
- * Set up an OpenGL context for rendering into an OpenGL window.
- *
- * The context must have been created with a compatible window.
- *
- * \param window the window to associate with the context
- * \param context the OpenGL context to associate with the window
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_CreateContext
- */
-extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window,
-                                               SDL_GLContext context);
-
-/**
- * Get the currently active OpenGL window.
- *
- * \returns the currently active OpenGL window on success or NULL on failure;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void);
-
-/**
- * Get the currently active OpenGL context.
- *
- * \returns the currently active OpenGL context or NULL on failure; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_MakeCurrent
- */
-extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
-
-/**
- * Get the size of a window's underlying drawable in pixels.
- *
- * This returns info useful for calling glViewport().
- *
- * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
- * drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
- * platform with high-DPI support (Apple calls this "Retina"), and not
- * disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
- *
- * \param window the window from which the drawable size should be queried
- * \param w a pointer to variable for storing the width in pixels, may be NULL
- * \param h a pointer to variable for storing the height in pixels, may be
- *          NULL
- *
- * \since This function is available since SDL 2.0.1.
- *
- * \sa SDL_CreateWindow
- * \sa SDL_GetWindowSize
- */
-extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,
-                                                    int *h);
-
-/**
- * Set the swap interval for the current OpenGL context.
- *
- * Some systems allow specifying -1 for the interval, to enable adaptive
- * vsync. Adaptive vsync works the same as vsync, but if you've already missed
- * the vertical retrace for a given frame, it swaps buffers immediately, which
- * might be less jarring for the user during occasional framerate drops. If an
- * application requests adaptive vsync and the system does not support it,
- * this function will fail and return -1. In such a case, you should probably
- * retry the call with 1 for the interval.
- *
- * Adaptive vsync is implemented for some glX drivers with
- * GLX_EXT_swap_control_tear:
- *
- * https://www.opengl.org/registry/specs/EXT/glx_swap_control_tear.txt
- *
- * and for some Windows drivers with WGL_EXT_swap_control_tear:
- *
- * https://www.opengl.org/registry/specs/EXT/wgl_swap_control_tear.txt
- *
- * Read more on the Khronos wiki:
- * https://www.khronos.org/opengl/wiki/Swap_Interval#Adaptive_Vsync
- *
- * \param interval 0 for immediate updates, 1 for updates synchronized with
- *                 the vertical retrace, -1 for adaptive vsync
- * \returns 0 on success or -1 if setting the swap interval is not supported;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_GetSwapInterval
- */
-extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
-
-/**
- * Get the swap interval for the current OpenGL context.
- *
- * If the system can't determine the swap interval, or there isn't a valid
- * current context, this function will return 0 as a safe default.
- *
- * \returns 0 if there is no vertical retrace synchronization, 1 if the buffer
- *          swap is synchronized with the vertical retrace, and -1 if late
- *          swaps happen immediately instead of waiting for the next retrace;
- *          call SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_SetSwapInterval
- */
-extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);
-
-/**
- * Update a window with OpenGL rendering.
- *
- * This is used with double-buffered OpenGL contexts, which are the default.
- *
- * On macOS, make sure you bind 0 to the draw framebuffer before swapping the
- * window, otherwise nothing will happen. If you aren't using
- * glBindFramebuffer(), this is the default and you won't have to do anything
- * extra.
- *
- * \param window the window to change
- *
- * \since This function is available since SDL 2.0.0.
- */
-extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
-
-/**
- * Delete an OpenGL context.
- *
- * \param context the OpenGL context to be deleted
- *
- * \since This function is available since SDL 2.0.0.
- *
- * \sa SDL_GL_CreateContext
- */
-extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
-
-/* @} *//* OpenGL support functions */
-
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_video_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_vulkan.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_vulkan.h
deleted file mode 100644 (file)
index ab86a0b..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 2017, Mark Callow
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_vulkan.h
- *
- *  Header file for functions to creating Vulkan surfaces on SDL windows.
- */
-
-#ifndef SDL_vulkan_h_
-#define SDL_vulkan_h_
-
-#include "SDL_video.h"
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Avoid including vulkan.h, don't define VkInstance if it's already included */
-#ifdef VULKAN_H_
-#define NO_SDL_VULKAN_TYPEDEFS
-#endif
-#ifndef NO_SDL_VULKAN_TYPEDEFS
-#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
-
-#if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
-#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
-#else
-#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
-#endif
-
-VK_DEFINE_HANDLE(VkInstance)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
-
-#endif /* !NO_SDL_VULKAN_TYPEDEFS */
-
-typedef VkInstance SDL_vulkanInstance;
-typedef VkSurfaceKHR SDL_vulkanSurface; /* for compatibility with Tizen */
-
-/**
- *  \name Vulkan support functions
- *
- *  \note SDL_Vulkan_GetInstanceExtensions & SDL_Vulkan_CreateSurface API
- *        is compatable with Tizen's implementation of Vulkan in SDL.
- */
-/* @{ */
-
-/**
- * Dynamically load the Vulkan loader library.
- *
- * This should be called after initializing the video driver, but before
- * creating any Vulkan windows. If no Vulkan loader library is loaded, the
- * default library will be loaded upon creation of the first Vulkan window.
- *
- * It is fairly common for Vulkan applications to link with libvulkan instead
- * of explicitly loading it at run time. This will work with SDL provided the
- * application links to a dynamic library and both it and SDL use the same
- * search path.
- *
- * If you specify a non-NULL `path`, an application should retrieve all of the
- * Vulkan functions it uses from the dynamic library using
- * SDL_Vulkan_GetVkGetInstanceProcAddr unless you can guarantee `path` points
- * to the same vulkan loader library the application linked to.
- *
- * On Apple devices, if `path` is NULL, SDL will attempt to find the
- * `vkGetInstanceProcAddr` address within all the Mach-O images of the current
- * process. This is because it is fairly common for Vulkan applications to
- * link with libvulkan (and historically MoltenVK was provided as a static
- * library). If it is not found, on macOS, SDL will attempt to load
- * `vulkan.framework/vulkan`, `libvulkan.1.dylib`,
- * `MoltenVK.framework/MoltenVK`, and `libMoltenVK.dylib`, in that order. On
- * iOS, SDL will attempt to load `libMoltenVK.dylib`. Applications using a
- * dynamic framework or .dylib must ensure it is included in its application
- * bundle.
- *
- * On non-Apple devices, application linking with a static libvulkan is not
- * supported. Either do not link to the Vulkan loader or link to a dynamic
- * library version.
- *
- * \param path The platform dependent Vulkan loader library name or NULL
- * \returns 0 on success or -1 if the library couldn't be loaded; call
- *          SDL_GetError() for more information.
- *
- * \since This function is available since SDL 2.0.6.
- *
- * \sa SDL_Vulkan_GetVkInstanceProcAddr
- * \sa SDL_Vulkan_UnloadLibrary
- */
-extern DECLSPEC int SDLCALL SDL_Vulkan_LoadLibrary(const char *path);
-
-/**
- * Get the address of the `vkGetInstanceProcAddr` function.
- *
- * This should be called after either calling SDL_Vulkan_LoadLibrary() or
- * creating an SDL_Window with the `SDL_WINDOW_VULKAN` flag.
- *
- * \returns the function pointer for `vkGetInstanceProcAddr` or NULL on error.
- *
- * \since This function is available since SDL 2.0.6.
- */
-extern DECLSPEC void *SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void);
-
-/**
- * Unload the Vulkan library previously loaded by SDL_Vulkan_LoadLibrary()
- *
- * \since This function is available since SDL 2.0.6.
- *
- * \sa SDL_Vulkan_LoadLibrary
- */
-extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
-
-/**
- * Get the names of the Vulkan instance extensions needed to create a surface
- * with SDL_Vulkan_CreateSurface.
- *
- * If `pNames` is NULL, then the number of required Vulkan instance extensions
- * is returned in `pCount`. Otherwise, `pCount` must point to a variable set
- * to the number of elements in the `pNames` array, and on return the variable
- * is overwritten with the number of names actually written to `pNames`. If
- * `pCount` is less than the number of required extensions, at most `pCount`
- * structures will be written. If `pCount` is smaller than the number of
- * required extensions, SDL_FALSE will be returned instead of SDL_TRUE, to
- * indicate that not all the required extensions were returned.
- *
- * The `window` parameter is currently needed to be valid as of SDL 2.0.8,
- * however, this parameter will likely be removed in future releases
- *
- * \param window A window for which the required Vulkan instance extensions
- *               should be retrieved (will be deprecated in a future release)
- * \param pCount A pointer to an unsigned int corresponding to the number of
- *               extensions to be returned
- * \param pNames NULL or a pointer to an array to be filled with required
- *               Vulkan instance extensions
- * \returns SDL_TRUE on success, SDL_FALSE on error.
- *
- * \since This function is available since SDL 2.0.6.
- *
- * \sa SDL_Vulkan_CreateSurface
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(SDL_Window *window,
-                                                                  unsigned int *pCount,
-                                                                  const char **pNames);
-
-/**
- * Create a Vulkan rendering surface for a window.
- *
- * The `window` must have been created with the `SDL_WINDOW_VULKAN` flag and
- * `instance` must have been created with extensions returned by
- * SDL_Vulkan_GetInstanceExtensions() enabled.
- *
- * \param window The window to which to attach the Vulkan surface
- * \param instance The Vulkan instance handle
- * \param surface A pointer to a VkSurfaceKHR handle to output the newly
- *                created surface
- * \returns SDL_TRUE on success, SDL_FALSE on error.
- *
- * \since This function is available since SDL 2.0.6.
- *
- * \sa SDL_Vulkan_GetInstanceExtensions
- * \sa SDL_Vulkan_GetDrawableSize
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window,
-                                                          VkInstance instance,
-                                                          VkSurfaceKHR* surface);
-
-/**
- * Get the size of the window's underlying drawable dimensions in pixels.
- *
- * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
- * drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
- * platform with high-DPI support (Apple calls this "Retina"), and not
- * disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
- *
- * \param window an SDL_Window for which the size is to be queried
- * \param w Pointer to the variable to write the width to or NULL
- * \param h Pointer to the variable to write the height to or NULL
- *
- * \since This function is available since SDL 2.0.6.
- *
- * \sa SDL_GetWindowSize
- * \sa SDL_CreateWindow
- * \sa SDL_Vulkan_CreateSurface
- */
-extern DECLSPEC void SDLCALL SDL_Vulkan_GetDrawableSize(SDL_Window * window,
-                                                        int *w, int *h);
-
-/* @} *//* Vulkan support functions */
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* SDL_vulkan_h_ */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/begin_code.h b/packages/sdl2.nuget.2.0.22/build/native/include/begin_code.h
deleted file mode 100644 (file)
index b1b1a3a..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file begin_code.h
- *
- *  This file sets things up for C dynamic library function definitions,
- *  static inlined functions, and structures aligned at 4-byte alignment.
- *  If you don't like ugly C preprocessor code, don't look at this file. :)
- */
-
-/* This shouldn't be nested -- included it around code only. */
-#ifdef _begin_code_h
-#error Nested inclusion of begin_code.h
-#endif
-#define _begin_code_h
-
-#ifndef SDL_DEPRECATED
-#  if (__GNUC__ >= 4)  /* technically, this arrived in gcc 3.1, but oh well. */
-#    define SDL_DEPRECATED __attribute__((deprecated))
-#  else
-#    define SDL_DEPRECATED
-#  endif
-#endif
-
-#ifndef SDL_UNUSED
-#  ifdef __GNUC__
-#    define SDL_UNUSED __attribute__((unused))
-#  else
-#    define SDL_UNUSED
-#  endif
-#endif
-
-/* Some compilers use a special export keyword */
-#ifndef DECLSPEC
-# if defined(__WIN32__) || defined(__WINRT__) || defined(__CYGWIN__)
-#  ifdef DLL_EXPORT
-#   define DECLSPEC __declspec(dllexport)
-#  else
-#   define DECLSPEC
-#  endif
-# elif defined(__OS2__)
-#   ifdef BUILD_SDL
-#    define DECLSPEC    __declspec(dllexport)
-#   else
-#    define DECLSPEC
-#   endif
-# else
-#  if defined(__GNUC__) && __GNUC__ >= 4
-#   define DECLSPEC __attribute__ ((visibility("default")))
-#  else
-#   define DECLSPEC
-#  endif
-# endif
-#endif
-
-/* By default SDL uses the C calling convention */
-#ifndef SDLCALL
-#if (defined(__WIN32__) || defined(__WINRT__)) && !defined(__GNUC__)
-#define SDLCALL __cdecl
-#elif defined(__OS2__) || defined(__EMX__)
-#define SDLCALL _System
-# if defined (__GNUC__) && !defined(_System)
-#  define _System /* for old EMX/GCC compat.  */
-# endif
-#else
-#define SDLCALL
-#endif
-#endif /* SDLCALL */
-
-/* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */
-#ifdef __SYMBIAN32__
-#undef DECLSPEC
-#define DECLSPEC
-#endif /* __SYMBIAN32__ */
-
-/* Force structure packing at 4 byte alignment.
-   This is necessary if the header is included in code which has structure
-   packing set to an alternate value, say for loading structures from disk.
-   The packing is reset to the previous value in close_code.h
- */
-#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
-#ifdef _MSC_VER
-#pragma warning(disable: 4103)
-#endif
-#ifdef __clang__
-#pragma clang diagnostic ignored "-Wpragma-pack"
-#endif
-#ifdef __BORLANDC__
-#pragma nopackwarning
-#endif
-#ifdef _WIN64
-/* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */
-#pragma pack(push,8)
-#else
-#pragma pack(push,4)
-#endif
-#endif /* Compiler needs structure packing set */
-
-#ifndef SDL_INLINE
-#if defined(__GNUC__)
-#define SDL_INLINE __inline__
-#elif defined(_MSC_VER) || defined(__BORLANDC__) || \
-      defined(__DMC__) || defined(__SC__) || \
-      defined(__WATCOMC__) || defined(__LCC__) || \
-      defined(__DECC) || defined(__CC_ARM)
-#define SDL_INLINE __inline
-#ifndef __inline__
-#define __inline__ __inline
-#endif
-#else
-#define SDL_INLINE inline
-#ifndef __inline__
-#define __inline__ inline
-#endif
-#endif
-#endif /* SDL_INLINE not defined */
-
-#ifndef SDL_FORCE_INLINE
-#if defined(_MSC_VER)
-#define SDL_FORCE_INLINE __forceinline
-#elif ( (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) )
-#define SDL_FORCE_INLINE __attribute__((always_inline)) static __inline__
-#else
-#define SDL_FORCE_INLINE static SDL_INLINE
-#endif
-#endif /* SDL_FORCE_INLINE not defined */
-
-#ifndef SDL_NORETURN
-#if defined(__GNUC__)
-#define SDL_NORETURN __attribute__((noreturn))
-#elif defined(_MSC_VER)
-#define SDL_NORETURN __declspec(noreturn)
-#else
-#define SDL_NORETURN
-#endif
-#endif /* SDL_NORETURN not defined */
-
-/* Apparently this is needed by several Windows compilers */
-#if !defined(__MACH__)
-#ifndef NULL
-#ifdef __cplusplus
-#define NULL 0
-#else
-#define NULL ((void *)0)
-#endif
-#endif /* NULL */
-#endif /* ! Mac OS X - breaks precompiled headers */
-
-#ifndef SDL_FALLTHROUGH
-#if (defined(__cplusplus) && __cplusplus >= 201703L) || \
-    (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L)
-#define SDL_FALLTHROUGH [[fallthrough]]
-#else
-#if defined(__has_attribute)
-#define _HAS_FALLTHROUGH __has_attribute(__fallthrough__)
-#else
-#define _HAS_FALLTHROUGH 0
-#endif /* __has_attribute */
-#if _HAS_FALLTHROUGH && \
-   ((defined(__GNUC__) && __GNUC__ >= 7) || \
-    (defined(__clang_major__) && __clang_major__ >= 10))
-#define SDL_FALLTHROUGH __attribute__((__fallthrough__))
-#else
-#define SDL_FALLTHROUGH do {} while (0) /* fallthrough */
-#endif /* _HAS_FALLTHROUGH */
-#undef _HAS_FALLTHROUGH
-#endif /* C++17 or C2x */
-#endif /* SDL_FALLTHROUGH not defined */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/close_code.h b/packages/sdl2.nuget.2.0.22/build/native/include/close_code.h
deleted file mode 100644 (file)
index dc73432..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file close_code.h
- *
- *  This file reverses the effects of begin_code.h and should be included
- *  after you finish any function and structure declarations in your headers
- */
-
-#ifndef _begin_code_h
-#error close_code.h included without matching begin_code.h
-#endif
-#undef _begin_code_h
-
-/* Reset structure packing at previous byte alignment */
-#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
-#ifdef __BORLANDC__
-#pragma nopackwarning
-#endif
-#pragma pack(pop)
-#endif /* Compiler needs structure packing set */
diff --git a/packages/sdl2.nuget.2.0.22/build/native/sdl2.nuget-propertiesui-2af5e039-b5f8-4f99-b0b6-6b64e12c6528.xml b/packages/sdl2.nuget.2.0.22/build/native/sdl2.nuget-propertiesui-2af5e039-b5f8-4f99-b0b6-6b64e12c6528.xml
deleted file mode 100644 (file)
index 683746d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ProjectSchemaDefinitions xmlns="clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework">
-  <Rule Name="ReferencedPackagescf877fbb-a85a-4aae-81b7-315b03a491b7" PageTemplate="tool" DisplayName="Referenced Packages" SwitchPrefix="/" Order="1">
-    <Rule.Categories>
-      <Category Name="sdl2.nuget" DisplayName="sdl2.nuget" />
-    </Rule.Categories>
-    <Rule.DataSource>
-      <DataSource Persistence="ProjectFile" ItemType="" />
-    </Rule.DataSource>
-    <EnumProperty Name="Linkage-sdl2.nuget" DisplayName="Linkage" Description="Which version of the .lib file to link to this library" Category="sdl2.nuget">
-      <EnumValue Name="" DisplayName="Dynamic Library (DLL)" />
-    </EnumProperty>
-  </Rule>
-</ProjectSchemaDefinitions>
\ No newline at end of file
diff --git a/packages/sdl2.nuget.2.0.22/build/native/sdl2.nuget.targets b/packages/sdl2.nuget.2.0.22/build/native/sdl2.nuget.targets
deleted file mode 100644 (file)
index 94b612b..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" InitialTargets="sdl2_nuget_init">\r
-  <PropertyGroup Label="Default initializers for properties">\r
-    <Linkage-sdl2_nuget Condition="'$(Linkage-sdl2_nuget)' == ''">dynamic</Linkage-sdl2_nuget>\r
-    <CallingConvention-sdl2_nuget Condition="'$(CallingConvention-sdl2_nuget)' == ''">cdecl</CallingConvention-sdl2_nuget>\r
-  </PropertyGroup>\r
-  <ItemDefinitionGroup>\r
-    <ClCompile>\r
-      <PreprocessorDefinitions>HAS_SDL2;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)../..//build/native/include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-    </ClCompile>\r
-    <ResourceCompile>\r
-      <AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)../..//build/native/include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-    </ResourceCompile>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Label="Win32 and dynamic" Condition="'$(Platform.ToLower())' == 'win32' And '$(Linkage-sdl2_nuget.ToLower())' == 'dynamic'">\r
-    <Link>\r
-      <AdditionalDependencies>$(MSBuildThisFileDirectory)../..//build/native/lib/Win32\dynamic\SDL2test.lib;$(MSBuildThisFileDirectory)../..//build/native/lib/Win32\dynamic\SDL2main.lib;$(MSBuildThisFileDirectory)../..//build/native/lib/Win32\dynamic\SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Label="x64 and dynamic" Condition="'$(Platform.ToLower())' == 'x64' And '$(Linkage-sdl2_nuget.ToLower())' == 'dynamic'">\r
-    <Link>\r
-      <AdditionalDependencies>$(MSBuildThisFileDirectory)../..//build/native/lib/x64\dynamic\SDL2test.lib;$(MSBuildThisFileDirectory)../..//build/native/lib/x64\dynamic\SDL2main.lib;$(MSBuildThisFileDirectory)../..//build/native/lib/x64\dynamic\SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemGroup>\r
-    <PropertyPageSchema Include="$(MSBuildThisFileDirectory)\default-propertiesui.xml" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <PropertyPageSchema Include="$(MSBuildThisFileDirectory)\sdl2.nuget-propertiesui-2af5e039-b5f8-4f99-b0b6-6b64e12c6528.xml" />\r
-  </ItemGroup>\r
-  <UsingTask TaskName="sdl2_nuget_Contains" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" TaskFactory="CodeTaskFactory">\r
-    <ParameterGroup>\r
-      <Text Output="false" ParameterType="System.String" />\r
-      <Library Output="false" Required="true" ParameterType="System.String" />\r
-      <Value Output="false" Required="true" ParameterType="System.String" />\r
-      <Result Output="true" ParameterType="System.String" />\r
-    </ParameterGroup>\r
-    <Task>\r
-      <Code>Result = ((Text ?? "").Split(';').Contains(Library) ) ? Value : String.Empty;</Code>\r
-    </Task>\r
-  </UsingTask>\r
-  <Target Name="sdl2_nuget_init">\r
-    <sdl2_nuget_Contains Text="Linkage-dynamic" Library="sdl2_nuget" Value="dynamic" Condition="'$(Linkage-sdl2_nuget)'==''">\r
-      <Output TaskParameter="Result" PropertyName="Linkage-sdl2_nuget" />\r
-    </sdl2_nuget_Contains>\r
-    <sdl2_nuget_Contains Text="CallingConvention-cdecl" Library="sdl2_nuget" Value="cdecl" Condition="'$(CallingConvention-sdl2_nuget)'==''">\r
-      <Output TaskParameter="Result" PropertyName="CallingConvention-sdl2_nuget" />\r
-    </sdl2_nuget_Contains>\r
-    <sdl2_nuget_Contains Text="CallingConvention-stdcall" Library="sdl2_nuget" Value="stdcall" Condition="'$(CallingConvention-sdl2_nuget)'==''">\r
-      <Output TaskParameter="Result" PropertyName="CallingConvention-sdl2_nuget" />\r
-    </sdl2_nuget_Contains>\r
-    <sdl2_nuget_Contains Text="CallingConvention-fastcall" Library="sdl2_nuget" Value="fastcall" Condition="'$(CallingConvention-sdl2_nuget)'==''">\r
-      <Output TaskParameter="Result" PropertyName="CallingConvention-sdl2_nuget" />\r
-    </sdl2_nuget_Contains>\r
-    <sdl2_nuget_Contains Text="CallingConvention-thiscall" Library="sdl2_nuget" Value="thiscall" Condition="'$(CallingConvention-sdl2_nuget)'==''">\r
-      <Output TaskParameter="Result" PropertyName="CallingConvention-sdl2_nuget" />\r
-    </sdl2_nuget_Contains>\r
-    <sdl2_nuget_Contains Text="CallingConvention-clrcall" Library="sdl2_nuget" Value="clrcall" Condition="'$(CallingConvention-sdl2_nuget)'==''">\r
-      <Output TaskParameter="Result" PropertyName="CallingConvention-sdl2_nuget" />\r
-    </sdl2_nuget_Contains>\r
-  </Target>\r
-</Project>
\ No newline at end of file
diff --git a/packages/sdl2.nuget.2.0.22/build/publisher-info.txt b/packages/sdl2.nuget.2.0.22/build/publisher-info.txt
deleted file mode 100644 (file)
index 9a18655..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Package Created: 27.04.2022 18:53:58
-CoApp tools version: 1.23.521.0
diff --git a/packages/sdl2.nuget.2.0.22/sdl2.nuget.2.0.22.nupkg b/packages/sdl2.nuget.2.0.22/sdl2.nuget.2.0.22.nupkg
deleted file mode 100644 (file)
index 93b0143..0000000
Binary files a/packages/sdl2.nuget.2.0.22/sdl2.nuget.2.0.22.nupkg and /dev/null differ
diff --git a/packages/sdl2.nuget.redist.2.0.22/.signature.p7s b/packages/sdl2.nuget.redist.2.0.22/.signature.p7s
deleted file mode 100644 (file)
index aba8c10..0000000
Binary files a/packages/sdl2.nuget.redist.2.0.22/.signature.p7s and /dev/null differ
diff --git a/packages/sdl2.nuget.redist.2.0.22/build/configurations.autopkg b/packages/sdl2.nuget.redist.2.0.22/build/configurations.autopkg
deleted file mode 100644 (file)
index 209e90d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-configurations {\r
-    Platform { \r
-        key : "Platform";\r
-        choices : { Win32, x64 };\r
-        Win32.aliases : { x86, win32, ia32, 386 };\r
-        x64.aliases : { x64, amd64, em64t, intel64, x86-64, x86_64 };\r
-    };\r
-    Linkage { \r
-        choices : { dynamic };\r
-    };\r
-};\r
diff --git a/packages/sdl2.nuget.redist.2.0.22/build/native/default-propertiesui.xml b/packages/sdl2.nuget.redist.2.0.22/build/native/default-propertiesui.xml
deleted file mode 100644 (file)
index 8556c8e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ProjectSchemaDefinitions xmlns="clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework">
-  <Rule Name="ProjectSettings_globals" PageTemplate="tool" DisplayName="Project Master Settings" SwitchPrefix="/" Order="1">
-    <Rule.Categories>
-      <Category Name="cpp" DisplayName="C/C++ Settings" />
-    </Rule.Categories>
-    <Rule.DataSource>
-      <DataSource Persistence="ProjectFile" ItemType="" />
-    </Rule.DataSource>
-    <EnumProperty Name="RuntimeLibrary" DisplayName="Runtime Library" Description="Specify runtime library for linking." Category="cpp" >
-      <EnumValue Name="MultiThreaded"  DisplayName="Multi-threaded" Description="Causes your application to use the multithread, static version of the run-time library.">
-      </EnumValue>
-      <EnumValue Name="MultiThreadedDebug" DisplayName="Multi-threaded Debug" Description="Defines _DEBUG and _MT. This option also causes the compiler to place the library name LIBCMTD.lib into the .obj file so that the linker will use LIBCMTD.lib to resolve external symbols.">
-      </EnumValue>
-      <EnumValue Name="MultiThreadedDLL" DisplayName="Multi-threaded DLL" Description="Causes your application to use the multithread- and DLL-specific version of the run-time library. Defines _MT and _DLL and causes the compiler to place the library name MSVCRT.lib into the .obj file.">
-      </EnumValue>
-      <EnumValue Name="MultiThreadedDebugDLL" DisplayName="Multi-threaded Debug DLL" Description="Defines _DEBUG, _MT, and _DLL and causes your application to use the debug multithread- and DLL-specific version of the run-time library. It also causes the compiler to place the library name MSVCRTD.lib into the .obj file.">
-      </EnumValue>
-    </EnumProperty>
-  </Rule>
-</ProjectSchemaDefinitions>
\ No newline at end of file
diff --git a/packages/sdl2.nuget.redist.2.0.22/build/native/sdl2.nuget.redist.targets b/packages/sdl2.nuget.redist.2.0.22/build/native/sdl2.nuget.redist.targets
deleted file mode 100644 (file)
index 9b36fca..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" InitialTargets="sdl2_nuget_redist_init;sdl2_nuget_redist_init_2">\r
-  <PropertyGroup Label="Default initializers for properties">\r
-    <Linkage-sdl2_nuget_redist Condition="'$(Linkage-sdl2_nuget_redist)' == ''">dynamic</Linkage-sdl2_nuget_redist>\r
-    <CallingConvention-sdl2_nuget_redist Condition="'$(CallingConvention-sdl2_nuget_redist)' == ''">cdecl</CallingConvention-sdl2_nuget_redist>\r
-  </PropertyGroup>\r
-  <Target Name="sdl2_nuget_redist_init">\r
-    <sdl2_nuget_redist_Contains Text="Linkage-dynamic" Library="sdl2_nuget_redist" Value="dynamic" Condition="'$(Linkage-sdl2_nuget_redist)'==''">\r
-      <Output TaskParameter="Result" PropertyName="Linkage-sdl2_nuget_redist" />\r
-    </sdl2_nuget_redist_Contains>\r
-    <sdl2_nuget_redist_Contains Text="CallingConvention-cdecl" Library="sdl2_nuget_redist" Value="cdecl" Condition="'$(CallingConvention-sdl2_nuget_redist)'==''">\r
-      <Output TaskParameter="Result" PropertyName="CallingConvention-sdl2_nuget_redist" />\r
-    </sdl2_nuget_redist_Contains>\r
-    <sdl2_nuget_redist_Contains Text="CallingConvention-stdcall" Library="sdl2_nuget_redist" Value="stdcall" Condition="'$(CallingConvention-sdl2_nuget_redist)'==''">\r
-      <Output TaskParameter="Result" PropertyName="CallingConvention-sdl2_nuget_redist" />\r
-    </sdl2_nuget_redist_Contains>\r
-    <sdl2_nuget_redist_Contains Text="CallingConvention-fastcall" Library="sdl2_nuget_redist" Value="fastcall" Condition="'$(CallingConvention-sdl2_nuget_redist)'==''">\r
-      <Output TaskParameter="Result" PropertyName="CallingConvention-sdl2_nuget_redist" />\r
-    </sdl2_nuget_redist_Contains>\r
-    <sdl2_nuget_redist_Contains Text="CallingConvention-thiscall" Library="sdl2_nuget_redist" Value="thiscall" Condition="'$(CallingConvention-sdl2_nuget_redist)'==''">\r
-      <Output TaskParameter="Result" PropertyName="CallingConvention-sdl2_nuget_redist" />\r
-    </sdl2_nuget_redist_Contains>\r
-    <sdl2_nuget_redist_Contains Text="CallingConvention-clrcall" Library="sdl2_nuget_redist" Value="clrcall" Condition="'$(CallingConvention-sdl2_nuget_redist)'==''">\r
-      <Output TaskParameter="Result" PropertyName="CallingConvention-sdl2_nuget_redist" />\r
-    </sdl2_nuget_redist_Contains>\r
-  </Target>\r
-  <Target Name="sdl2_nuget_redist_init_2">\r
-    <SetEnv Condition="'$(Platform.ToLower())' == 'win32' And '$(Linkage-sdl2_nuget_redist.ToLower())' == 'dynamic'" Name="PATH" Prefix="true" Value="$(MSBuildThisFileDirectory)../..//build/native/bin/Win32\dynamic">\r
-      <Output TaskParameter="OutputEnvironmentVariable" PropertyName="PATH" />\r
-    </SetEnv>\r
-    <SetEnv Condition="'$(Platform.ToLower())' == 'x64' And '$(Linkage-sdl2_nuget_redist.ToLower())' == 'dynamic'" Name="PATH" Prefix="true" Value="$(MSBuildThisFileDirectory)../..//build/native/bin/x64\dynamic">\r
-      <Output TaskParameter="OutputEnvironmentVariable" PropertyName="PATH" />\r
-    </SetEnv>\r
-  </Target>\r
-  <ItemGroup Label="Win32 and dynamic" Condition="'$(Platform.ToLower())' == 'win32' And '$(Linkage-sdl2_nuget_redist.ToLower())' == 'dynamic'">\r
-    <None Include="$(MSBuildThisFileDirectory)../..//build/native/bin/Win32\dynamic\SDL2.dll" Condition="(('$(AppContainerApplication.ToLower())' == 'true')) OR (('$(TargetPlatformIdentifier.ToLower())' == 'windows phone' And '$(TargetPlatformVersion)' == '8.0'))">\r
-      <DeploymentContent>true</DeploymentContent>\r
-    </None>\r
-  </ItemGroup>\r
-  <ItemGroup Label="x64 and dynamic" Condition="'$(Platform.ToLower())' == 'x64' And '$(Linkage-sdl2_nuget_redist.ToLower())' == 'dynamic'">\r
-    <None Include="$(MSBuildThisFileDirectory)../..//build/native/bin/x64\dynamic\SDL2.dll" Condition="(('$(AppContainerApplication.ToLower())' == 'true')) OR (('$(TargetPlatformIdentifier.ToLower())' == 'windows phone' And '$(TargetPlatformVersion)' == '8.0'))">\r
-      <DeploymentContent>true</DeploymentContent>\r
-    </None>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <PropertyPageSchema Include="$(MSBuildThisFileDirectory)\default-propertiesui.xml" />\r
-  </ItemGroup>\r
-  <Target Name="sdl2_nuget_redist_AfterBuild" AfterTargets="AfterBuild" />\r
-  <Target Name="sdl2_nuget_redist_AfterBuild_Win32_and_dynamic" Label="Win32 and dynamic" Condition="'$(Platform.ToLower())' == 'win32' And '$(Linkage-sdl2_nuget_redist.ToLower())' == 'dynamic'" AfterTargets="sdl2_nuget_redist_AfterBuild">\r
-    <Copy SourceFiles="$(MSBuildThisFileDirectory)../..//build/native/bin/Win32\dynamic\SDL2.dll" DestinationFolder="$(TargetDir)" SkipUnchangedFiles="true" />\r
-  </Target>\r
-  <Target Name="sdl2_nuget_redist_AfterBuild_x64_and_dynamic" Label="x64 and dynamic" Condition="'$(Platform.ToLower())' == 'x64' And '$(Linkage-sdl2_nuget_redist.ToLower())' == 'dynamic'" AfterTargets="sdl2_nuget_redist_AfterBuild">\r
-    <Copy SourceFiles="$(MSBuildThisFileDirectory)../..//build/native/bin/x64\dynamic\SDL2.dll" DestinationFolder="$(TargetDir)" SkipUnchangedFiles="true" />\r
-  </Target>\r
-  <UsingTask TaskName="sdl2_nuget_redist_Contains" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" TaskFactory="CodeTaskFactory">\r
-    <ParameterGroup>\r
-      <Text Output="false" ParameterType="System.String" />\r
-      <Library Output="false" Required="true" ParameterType="System.String" />\r
-      <Value Output="false" Required="true" ParameterType="System.String" />\r
-      <Result Output="true" ParameterType="System.String" />\r
-    </ParameterGroup>\r
-    <Task>\r
-      <Code>Result = ((Text ?? "").Split(';').Contains(Library) ) ? Value : String.Empty;</Code>\r
-    </Task>\r
-  </UsingTask>\r
-</Project>
\ No newline at end of file
diff --git a/packages/sdl2.nuget.redist.2.0.22/build/publisher-info.txt b/packages/sdl2.nuget.redist.2.0.22/build/publisher-info.txt
deleted file mode 100644 (file)
index 56141da..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Package Created: 27.04.2022 18:53:59
-CoApp tools version: 1.23.521.0
diff --git a/packages/sdl2.nuget.redist.2.0.22/sdl2.nuget.redist.2.0.22.nupkg b/packages/sdl2.nuget.redist.2.0.22/sdl2.nuget.redist.2.0.22.nupkg
deleted file mode 100644 (file)
index c1b8d06..0000000
Binary files a/packages/sdl2.nuget.redist.2.0.22/sdl2.nuget.redist.2.0.22.nupkg and /dev/null differ
diff --git a/phys.c b/phys.c
new file mode 100644 (file)
index 0000000..8d71b86
--- /dev/null
+++ b/phys.c
@@ -0,0 +1,80 @@
+// for physics functions shared by the client and server
+
+#include "phys.h"
+
+#include "quakedef.h"
+#include "cl_collision.h"
+
+
+int PHYS_NudgeOutOfSolid(prvm_prog_t *prog, prvm_edict_t *ent)
+{
+       int bump, pass;
+       trace_t stucktrace;
+       vec3_t testorigin, targetorigin;
+       vec3_t stuckmins, stuckmaxs;
+       vec_t separation;
+       model_t *worldmodel;
+
+       if (prog == SVVM_prog)
+       {
+               worldmodel = sv.worldmodel;
+               separation = sv_gameplayfix_nudgeoutofsolid_separation.value;
+       }
+       else if (prog == CLVM_prog)
+       {
+               worldmodel = cl.worldmodel;
+               separation = cl_gameplayfix_nudgeoutofsolid_separation.value;
+       }
+       else
+               Sys_Error("PHYS_NudgeOutOfSolid: cannot be called from %s VM\n", prog->name);
+
+       VectorCopy(PRVM_serveredictvector(ent, mins), stuckmins);
+       VectorCopy(PRVM_serveredictvector(ent, maxs), stuckmaxs);
+       if (worldmodel && worldmodel->brushq1.numclipnodes)
+               separation = 0.0f; // when using hulls, it can not be enlarged
+       else
+       {
+               stuckmins[0] -= separation;
+               stuckmins[1] -= separation;
+               stuckmins[2] -= separation;
+               stuckmaxs[0] += separation;
+               stuckmaxs[1] += separation;
+               stuckmaxs[2] += separation;
+       }
+
+       // first pass we try to get it out of brush entities
+       // second pass we try to get it out of world only (can't win them all)
+       for (pass = 0;pass < 2;pass++)
+       {
+               VectorCopy(PRVM_serveredictvector(ent, origin), testorigin);
+               for (bump = 0;bump < 10;bump++)
+               {
+                       if (prog == SVVM_prog) // TODO: can we refactor to use a shared TraceBox or at least a func ptr for these cases?
+                               stucktrace = SV_TraceBox(testorigin, stuckmins, stuckmaxs, testorigin, pass ? MOVE_WORLDONLY : MOVE_NOMONSTERS, ent, SV_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value);
+                       else
+                               stucktrace = CL_TraceBox(testorigin, stuckmins, stuckmaxs, testorigin, pass ? MOVE_WORLDONLY : MOVE_NOMONSTERS, ent, SV_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value, pass ? false : true, false, NULL, false);
+
+                       // Separation compared here to ensure a good location will be recognised reliably.
+                       if (-stucktrace.startdepth <= separation
+                       || (!stucktrace.bmodelstartsolid && !stucktrace.worldstartsolid)
+                       || (pass && !stucktrace.worldstartsolid))
+                       {
+                               // found a good location, use it
+                               VectorCopy(testorigin, PRVM_serveredictvector(ent, origin));
+                               return bump || pass ? 1 : -1; // -1 means it wasn't stuck
+                       }
+
+                       VectorMA(testorigin, -stucktrace.startdepth, stucktrace.startdepthnormal, targetorigin);
+                       // Trace to targetorigin so we don't set it out of the world in complex cases.
+                       if (prog == SVVM_prog)
+                               stucktrace = SV_TraceBox(testorigin, stuckmins, stuckmaxs, targetorigin, pass ? MOVE_WORLDONLY : MOVE_NOMONSTERS, ent, SV_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value);
+                       else
+                               stucktrace = CL_TraceBox(testorigin, stuckmins, stuckmaxs, targetorigin, pass ? MOVE_WORLDONLY : MOVE_NOMONSTERS, ent, SV_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value, pass ? false : true, false, NULL, false);
+                       if (stucktrace.fraction)
+                               VectorCopy(stucktrace.endpos, testorigin);
+                       else
+                               break; // Can't move it so no point doing more iterations on this pass.
+               }
+       }
+       return 0;
+}
diff --git a/phys.h b/phys.h
new file mode 100644 (file)
index 0000000..d18cfb9
--- /dev/null
+++ b/phys.h
@@ -0,0 +1,14 @@
+#ifndef PHYS_H
+#define PHYS_H
+
+#include "quakedef.h"
+
+
+/*! move an entity that is stuck out of the surface it is stuck in (can move large amounts)
+ * returns 1 if it found a better place, 0 if it remains stuck, -1 if it wasn't stuck.
+ */
+int PHYS_NudgeOutOfSolid(prvm_prog_t *prog, prvm_edict_t *ent);
+extern cvar_t cl_gameplayfix_nudgeoutofsolid_separation;
+
+
+#endif // PHYS_H guard
index 92ead5dc772a8393f7a7470fee8cec35be11a78c..32632f30f9799e100fe30abb693f4da95e5b0db0 100644 (file)
--- a/progsvm.h
+++ b/progsvm.h
@@ -233,7 +233,9 @@ extern prvm_eval_t prvm_badvalue;
 #endif
 
 //============================================================================
-#define PRVM_OP_STATE          1
+// prog->flag
+#define PRVM_OP_STATE       1
+#define PRVM_CSQC_SIMPLE    2
 
 #ifdef DP_SMALLMEMORY
 #define        PRVM_MAX_STACK_DEPTH            128
@@ -697,7 +699,7 @@ typedef struct prvm_prog_s
        const char                      *name; // [INIT]
 
        // flag - used to store general flags like PRVM_GE_SELF, etc.
-       int                             flag;
+       unsigned                        flag;
 
        const char                      **extensionstring; // [INIT]
 
@@ -717,7 +719,7 @@ typedef struct prvm_prog_s
 
 //     prvm_builtin_mem_t  *mem_list;
 
-// now passed as parameter of PRVM_LoadProgs
+// now passed as parameter of PRVM_Prog_Load
 //     char                            **required_func;
 //     int                                     numrequiredfunc;
 
@@ -822,7 +824,7 @@ void PRVM_CallProfile_f(struct cmd_state_s *cmd);
 void PRVM_PrintFunction_f(struct cmd_state_s *cmd);
 
 void PRVM_PrintState(prvm_prog_t *prog, int stack_index);
-void PRVM_Crash(prvm_prog_t *prog);
+void PRVM_Crash(void);
 void PRVM_ShortStackTrace(prvm_prog_t *prog, char *buf, size_t bufsize);
 const char *PRVM_AllocationOrigin(prvm_prog_t *prog);
 void PRVM_GarbageCollection(prvm_prog_t *prog);
@@ -901,7 +903,8 @@ void PRVM_ED_PrintNum (prvm_prog_t *prog, int ent, const char *wildcard_fieldnam
 const char *PRVM_GetString(prvm_prog_t *prog, int num);
 int PRVM_SetEngineString(prvm_prog_t *prog, const char *s);
 const char *PRVM_ChangeEngineString(prvm_prog_t *prog, int i, const char *s);
-int PRVM_SetTempString(prvm_prog_t *prog, const char *s);
+/// Takes an strlen (not a buffer size).
+int PRVM_SetTempString(prvm_prog_t *prog, const char *s, size_t slen);
 int PRVM_AllocString(prvm_prog_t *prog, size_t bufferlength, char **pointer);
 void PRVM_FreeString(prvm_prog_t *prog, int num);
 
@@ -921,7 +924,7 @@ Load a program with LoadProgs
 */
 // Load expects to be called right after Reset
 void PRVM_Prog_Init(prvm_prog_t *prog, struct cmd_state_s *cmd);
-void PRVM_Prog_Load(prvm_prog_t *prog, const char *filename, unsigned char *data, int64_t size, int numrequiredfunc, const char **required_func, int numrequiredfields, prvm_required_field_t *required_field, int numrequiredglobals, prvm_required_field_t *required_global);
+void PRVM_Prog_Load(prvm_prog_t *prog, const char *filename, unsigned char *data, fs_offset_t size, void CheckRequiredFuncs(prvm_prog_t *prog, const char *filename), int numrequiredfields, prvm_required_field_t *required_field, int numrequiredglobals, prvm_required_field_t *required_global);
 void PRVM_Prog_Reset(prvm_prog_t *prog);
 
 void PRVM_StackTrace(prvm_prog_t *prog);
index 837ad97bed27445f804927f334b6b94440882747..d72e961571fb698cda74276421b2da6609caf224 100644 (file)
@@ -110,8 +110,8 @@ void Protocol_Names(char *buffer, size_t buffersize)
        for (i = 0;protocolversioninfo[i].name;i++)
        {
                if (i > 0)
-                       strlcat(buffer, " ", buffersize);
-               strlcat(buffer, protocolversioninfo[i].name, buffersize);
+                       dp_strlcat(buffer, " ", buffersize);
+               dp_strlcat(buffer, protocolversioninfo[i].name, buffersize);
        }
 }
 
index 047262d6a979604c1cefb5096f141674bdd8b2ab..92b98dba248374ee33ee479a07bae0f8a663e69b 100644 (file)
@@ -28,9 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "qstats.h"
 struct mempool_s;
 struct sizebuf_s;
-// protocolversion_t is defined in common.h
-enum protocolversion_e;
 
+// protocolversion_t is defined in common.h
 enum protocolversion_e Protocol_EnumForName(const char *s);
 const char *Protocol_NameForEnum(enum protocolversion_e p);
 enum protocolversion_e Protocol_EnumForNumber(int n);
@@ -109,80 +108,82 @@ void Protocol_Names(char *buffer, size_t buffersize);
 #define PFLAGS_FULLDYNAMIC             128 // must be set or the light fields are ignored
 
 // if the high bit of the servercmd is set, the low bits are fast update flags:
-#define U_MOREBITS             (1<<0)
-#define U_ORIGIN1              (1<<1)
-#define U_ORIGIN2              (1<<2)
-#define U_ORIGIN3              (1<<3)
-#define U_ANGLE2               (1<<4)
-// LadyHavoc: U_NOLERP was only ever used for monsters, so I renamed it U_STEP
-#define U_STEP                 (1<<5)
-#define U_FRAME                        (1<<6)
-// just differentiates from other updates
-#define U_SIGNAL               (1<<7)
-
-#define U_ANGLE1               (1<<8)
-#define U_ANGLE3               (1<<9)
-#define U_MODEL                        (1<<10)
-#define U_COLORMAP             (1<<11)
-#define U_SKIN                 (1<<12)
-#define U_EFFECTS              (1<<13)
-#define U_LONGENTITY   (1<<14)
+#define U_MOREBITS       (1u<<0)
+#define U_ORIGIN1        (1u<<1)
+#define U_ORIGIN2        (1u<<2)
+#define U_ORIGIN3        (1u<<3)
+#define U_ANGLE2         (1u<<4)
+// LadyHavoc: U_NOLERP was uonly ever used for monsters, so I renamed it U_STEP
+#define U_STEP           (1u<<5)
+#define U_FRAME          (1u<<6)
+// just differentiates fromu other updates
+#define U_SIGNAL         (1u<<7)
+
+#define U_ANGLE1         (1u<<8)
+#define U_ANGLE3         (1u<<9)
+#define U_MODEL          (1u<<10)
+#define U_COLORMAP       (1u<<11)
+#define U_SKIN           (1u<<12)
+#define U_EFFECTS        (1u<<13)
+#define U_LONGENTITY     (1u<<14)
 
 // LadyHavoc: protocol extension
-#define U_EXTEND1              (1<<15)
+#define U_EXTEND1        (1u<<15)
 // LadyHavoc: first extend byte
-#define U_DELTA                        (1<<16) // no data, while this is set the entity is delta compressed (uses previous frame as a baseline, meaning only things that have changed from the previous frame are sent, except for the forced full update every half second)
-#define U_ALPHA                        (1<<17) // 1 byte, 0.0-1.0 maps to 0-255, not sent if exactly 1, and the entity is not sent if <=0 unless it has effects (model effects are checked as well)
-#define U_SCALE                        (1<<18) // 1 byte, scale / 16 positive, not sent if 1.0
-#define U_EFFECTS2             (1<<19) // 1 byte, this is .effects & 0xFF00 (second byte)
-#define U_GLOWSIZE             (1<<20) // 1 byte, encoding is float/4.0, unsigned, not sent if 0
-#define U_GLOWCOLOR            (1<<21) // 1 byte, palette index, default is 254 (white), this IS used for darklight (allowing colored darklight), however the particles from a darklight are always black, not sent if default value (even if glowsize or glowtrail is set)
-#define U_COLORMOD             (1<<22) // 1 byte, 3 bit red, 3 bit green, 2 bit blue, this lets you tint an object artifically, so you could make a red rocket, or a blue fiend...
-#define U_EXTEND2              (1<<23) // another byte to follow
+#define U_DELTA          (1u<<16) ///< no data, while this is set the entity is delta compressed (uses previous frame as a baseline, meaning only things that have changed from the previous frame are sent, except for the forced full update every half second)
+#define U_ALPHA          (1u<<17) ///< 1 byte, 0.0-1.0 maps to 0-255, not sent if exactly 1, and the entity is not sent if <=0 unless it has effects (model effects are checked as well)
+#define U_SCALE          (1u<<18) ///< 1 byte, scale / 16 positive, not sent if 1.0
+#define U_EFFECTS2       (1u<<19) ///< 1 byte, this is .effects & 0xFF00 (second byte)
+#define U_GLOWSIZE       (1u<<20) ///< 1 byte, encoding is float/4.0, unsigned, not sent if 0
+#define U_GLOWCOLOR      (1u<<21) ///< 1 byte, palette index, default is 254 (white), this IS used for darklight (allowing colored darklight), however the particles from a darklight are always black, not sent if default value (even if glowsize or glowtrail is set)
+#define U_COLORMOD       (1u<<22) ///< 1 byte, 3 bit red, 3 bit green, 2 bit blue, this lets you tint an object artifically, so you could make a red rocket, or a blue fiend...
+#define U_EXTEND2        (1u<<23) ///< another byte to follow
 // LadyHavoc: second extend byte
-#define U_GLOWTRAIL            (1<<24) // leaves a trail of particles (of color .glowcolor, or black if it is a negative glowsize)
-#define U_VIEWMODEL            (1<<25) // attachs the model to the view (origin and angles become relative to it), only shown to owner, a more powerful alternative to .weaponmodel and such
-#define U_FRAME2               (1<<26) // 1 byte, this is .frame & 0xFF00 (second byte)
-#define U_MODEL2               (1<<27) // 1 byte, this is .modelindex & 0xFF00 (second byte)
-#define U_EXTERIORMODEL        (1<<28) // causes this model to not be drawn when using a first person view (third person will draw it, first person will not)
-#define U_UNUSED29             (1<<29) // future expansion
-#define U_UNUSED30             (1<<30) // future expansion
-#define U_EXTEND3              (1<<31) // another byte to follow, future expansion
-
-#define        SU_VIEWHEIGHT   (1<<0)
-#define        SU_IDEALPITCH   (1<<1)
-#define        SU_PUNCH1               (1<<2)
-#define        SU_PUNCH2               (1<<3)
-#define        SU_PUNCH3               (1<<4)
-#define        SU_VELOCITY1    (1<<5)
-#define        SU_VELOCITY2    (1<<6)
-#define        SU_VELOCITY3    (1<<7)
-//define       SU_AIMENT               (1<<8)  AVAILABLE BIT
-#define        SU_ITEMS                (1<<9)
-#define        SU_ONGROUND             (1<<10)         // no data follows, the bit is it
-#define        SU_INWATER              (1<<11)         // no data follows, the bit is it
-#define        SU_WEAPONFRAME  (1<<12)
-#define        SU_ARMOR                (1<<13)
-#define        SU_WEAPON               (1<<14)
-#define SU_EXTEND1             (1<<15)
+#define U_GLOWTRAIL      (1u<<24) ///< leaves a trail of particles (of color .glowcolor, or black if it is a negative glowsize)
+#define U_VIEWMODEL      (1u<<25) ///< attachs the model to the view (origin and angles become relative to it), only shown to owner, a more powerful alternative to .weaponmodel and such
+#define U_FRAME2         (1u<<26) ///< 1 byte, this is .frame & 0xFF00 (second byte)
+#define U_MODEL2         (1u<<27) ///< 1 byte, this is .modelindex & 0xFF00 (second byte)
+#define U_EXTERIORMODEL  (1u<<28) ///< causes this model to not be drawn when using a first person view (third person will draw it, first person will not)
+#define U_UNUSED29       (1u<<29) ///< future expansion
+#define U_UNUSED30       (1u<<30) ///< future expansion
+#define U_EXTEND3        (1u<<31) ///< another byte to follow, future expansion
+// UBSan: unsigned literals because left shifting by 31 causes signed overflow, although it works as expected on x86.
+
+#define SU_VIEWHEIGHT    (1u<<0)
+#define SU_IDEALPITCH    (1u<<1)
+#define SU_PUNCH1        (1u<<2)
+#define SU_PUNCH2        (1u<<3)
+#define SU_PUNCH3        (1u<<4)
+#define SU_VELOCITY1     (1u<<5)
+#define SU_VELOCITY2     (1u<<6)
+#define SU_VELOCITY3     (1u<<7)
+//#define SU_AIMENT        (1u<<8)  AVAILABLE BIT
+#define SU_ITEMS         (1u<<9)
+#define SU_ONGROUND      (1u<<10) ///< no data follows, the bit is it
+#define SU_INWATER       (1u<<11) ///< no data follows, the bit is it
+#define SU_WEAPONFRAME   (1u<<12)
+#define SU_ARMOR         (1u<<13)
+#define SU_WEAPON        (1u<<14)
+#define SU_EXTEND1       (1u<<15)
 // first extend byte
-#define SU_PUNCHVEC1   (1<<16)
-#define SU_PUNCHVEC2   (1<<17)
-#define SU_PUNCHVEC3   (1<<18)
-#define SU_VIEWZOOM            (1<<19) // byte factor (0 = 0.0 (not valid), 255 = 1.0)
-#define SU_UNUSED20            (1<<20)
-#define SU_UNUSED21            (1<<21)
-#define SU_UNUSED22            (1<<22)
-#define SU_EXTEND2             (1<<23) // another byte to follow, future expansion
+#define SU_PUNCHVEC1     (1u<<16)
+#define SU_PUNCHVEC2     (1u<<17)
+#define SU_PUNCHVEC3     (1u<<18)
+#define SU_VIEWZOOM      (1u<<19) ///< byte factor (0 = 0.0 (not valid), 255 = 1.0)
+#define SU_UNUSED20      (1u<<20)
+#define SU_UNUSED21      (1u<<21)
+#define SU_UNUSED22      (1u<<22)
+#define SU_EXTEND2       (1u<<23) ///< another byte to follow, future expansion
 // second extend byte
-#define SU_UNUSED24            (1<<24)
-#define SU_UNUSED25            (1<<25)
-#define SU_UNUSED26            (1<<26)
-#define SU_UNUSED27            (1<<27)
-#define SU_UNUSED28            (1<<28)
-#define SU_UNUSED29            (1<<29)
-#define SU_UNUSED30            (1<<30)
-#define SU_EXTEND3             (1<<31) // another byte to follow, future expansion
+#define SU_UNUSED24      (1u<<24)
+#define SU_UNUSED25      (1u<<25)
+#define SU_UNUSED26      (1u<<26)
+#define SU_UNUSED27      (1u<<27)
+#define SU_UNUSED28      (1u<<28)
+#define SU_UNUSED29      (1u<<29)
+#define SU_UNUSED30      (1u<<30)
+#define SU_EXTEND3       (1u<<31) ///< another byte to follow, future expansion
+// UBSan: unsigned literals because left shifting by 31 causes signed overflow, although it works as expected on x86.
 
 // a sound with no channel is a local only sound
 #define        SND_VOLUME              (1<<0)          // a byte
@@ -609,43 +610,44 @@ entityframe_database_t;
 // order of the bits to minimize overhead from extend bytes
 
 // enough to describe a nail, gib, shell casing, bullet hole, or rocket
-#define E_ORIGIN1              (1<<0)
-#define E_ORIGIN2              (1<<1)
-#define E_ORIGIN3              (1<<2)
-#define E_ANGLE1               (1<<3)
-#define E_ANGLE2               (1<<4)
-#define E_ANGLE3               (1<<5)
-#define E_MODEL1               (1<<6)
-#define E_EXTEND1              (1<<7)
+#define E_ORIGIN1        (1u<<0)
+#define E_ORIGIN2        (1u<<1)
+#define E_ORIGIN3        (1u<<2)
+#define E_ANGLE1         (1u<<3)
+#define E_ANGLE2         (1u<<4)
+#define E_ANGLE3         (1u<<5)
+#define E_MODEL1         (1u<<6)
+#define E_EXTEND1        (1u<<7)
 
 // enough to describe almost anything
-#define E_FRAME1               (1<<8)
-#define E_EFFECTS1             (1<<9)
-#define E_ALPHA                        (1<<10)
-#define E_SCALE                        (1<<11)
-#define E_COLORMAP             (1<<12)
-#define E_SKIN                 (1<<13)
-#define E_FLAGS                        (1<<14)
-#define E_EXTEND2              (1<<15)
+#define E_FRAME1         (1u<<8)
+#define E_EFFECTS1       (1u<<9)
+#define E_ALPHA          (1u<<10)
+#define E_SCALE          (1u<<11)
+#define E_COLORMAP       (1u<<12)
+#define E_SKIN           (1u<<13)
+#define E_FLAGS          (1u<<14)
+#define E_EXTEND2        (1u<<15)
 
 // players, custom color glows, high model numbers
-#define E_FRAME2               (1<<16)
-#define E_MODEL2               (1<<17)
-#define E_EFFECTS2             (1<<18)
-#define E_GLOWSIZE             (1<<19)
-#define E_GLOWCOLOR            (1<<20)
-#define E_LIGHT                        (1<<21)
-#define E_LIGHTPFLAGS  (1<<22)
-#define E_EXTEND3              (1<<23)
-
-#define E_SOUND1               (1<<24)
-#define E_SOUNDVOL             (1<<25)
-#define E_SOUNDATTEN   (1<<26)
-#define E_TAGATTACHMENT        (1<<27)
-#define E_LIGHTSTYLE   (1<<28)
-#define E_UNUSED6              (1<<29)
-#define E_UNUSED7              (1<<30)
-#define E_EXTEND4              (1<<31)
+#define E_FRAME2         (1u<<16)
+#define E_MODEL2         (1u<<17)
+#define E_EFFECTS2       (1u<<18)
+#define E_GLOWSIZE       (1u<<19)
+#define E_GLOWCOLOR      (1u<<20)
+#define E_LIGHT          (1u<<21)
+#define E_LIGHTPFLAGS    (1u<<22)
+#define E_EXTEND3        (1u<<23)
+
+#define E_SOUND1         (1u<<24)
+#define E_SOUNDVOL       (1u<<25)
+#define E_SOUNDATTEN     (1u<<26)
+#define E_TAGATTACHMENT  (1u<<27)
+#define E_LIGHTSTYLE     (1u<<28)
+#define E_UNUSED6        (1u<<29)
+#define E_UNUSED7        (1u<<30)
+#define E_EXTEND4        (1u<<31)
+// UBSan: unsigned literals because left shifting by 31 causes signed overflow, although it works as expected on x86.
 
 // returns difference between two states as E_ flags
 int EntityState_DeltaBits(const entity_state_t *o, const entity_state_t *n);
@@ -736,89 +738,90 @@ qbool EntityFrame4_WriteFrame(struct sizebuf_s *msg, int maxsize, entityframe4_d
 // reads a frame from the network stream
 void EntityFrame4_CL_ReadFrame(void);
 
-// reset all entity fields (typically used if status changed)
-#define E5_FULLUPDATE (1<<0)
-// E5_ORIGIN32=0: short[3] = s->origin[0] * 8, s->origin[1] * 8, s->origin[2] * 8
-// E5_ORIGIN32=1: float[3] = s->origin[0], s->origin[1], s->origin[2]
-#define E5_ORIGIN (1<<1)
-// E5_ANGLES16=0: byte[3] = s->angle[0] * 256 / 360, s->angle[1] * 256 / 360, s->angle[2] * 256 / 360
-// E5_ANGLES16=1: short[3] = s->angle[0] * 65536 / 360, s->angle[1] * 65536 / 360, s->angle[2] * 65536 / 360
-#define E5_ANGLES (1<<2)
-// E5_MODEL16=0: byte = s->modelindex
-// E5_MODEL16=1: short = s->modelindex
-#define E5_MODEL (1<<3)
-// E5_FRAME16=0: byte = s->frame
-// E5_FRAME16=1: short = s->frame
-#define E5_FRAME (1<<4)
-// byte = s->skin
-#define E5_SKIN (1<<5)
-// E5_EFFECTS16=0 && E5_EFFECTS32=0: byte = s->effects
-// E5_EFFECTS16=1 && E5_EFFECTS32=0: short = s->effects
-// E5_EFFECTS16=0 && E5_EFFECTS32=1: int = s->effects
-// E5_EFFECTS16=1 && E5_EFFECTS32=1: int = s->effects
-#define E5_EFFECTS (1<<6)
-// bits >= (1<<8)
-#define E5_EXTEND1 (1<<7)
-
-// byte = s->renderflags
-#define E5_FLAGS (1<<8)
-// byte = bound(0, s->alpha * 255, 255)
-#define E5_ALPHA (1<<9)
-// byte = bound(0, s->scale * 16, 255)
-#define E5_SCALE (1<<10)
-// flag
-#define E5_ORIGIN32 (1<<11)
-// flag
-#define E5_ANGLES16 (1<<12)
-// flag
-#define E5_MODEL16 (1<<13)
-// byte = s->colormap
-#define E5_COLORMAP (1<<14)
-// bits >= (1<<16)
-#define E5_EXTEND2 (1<<15)
-
-// short = s->tagentity
-// byte = s->tagindex
-#define E5_ATTACHMENT (1<<16)
-// short[4] = s->light[0], s->light[1], s->light[2], s->light[3]
-// byte = s->lightstyle
-// byte = s->lightpflags
-#define E5_LIGHT (1<<17)
-// byte = s->glowsize
-// byte = s->glowcolor
-#define E5_GLOW (1<<18)
-// short = s->effects
-#define E5_EFFECTS16 (1<<19)
-// int = s->effects
-#define E5_EFFECTS32 (1<<20)
-// flag
-#define E5_FRAME16 (1<<21)
-// byte[3] = s->colormod[0], s->colormod[1], s->colormod[2]
-#define E5_COLORMOD (1<<22)
-// bits >= (1<<24)
-#define E5_EXTEND3 (1<<23)
-
-// byte[3] = s->glowmod[0], s->glowmod[1], s->glowmod[2]
-#define E5_GLOWMOD (1<<24)
-// byte type=0 short frames[1] short times[1]
-// byte type=1 short frames[2] short times[2] byte lerps[2]
-// byte type=2 short frames[3] short times[3] byte lerps[3]
-// byte type=3 short frames[4] short times[4] byte lerps[4]
-// byte type=4 short modelindex byte numbones {short pose7s[7]}
-// see also RENDER_COMPLEXANIMATION
-#define E5_COMPLEXANIMATION (1<<25)
-// ushort traileffectnum
-#define E5_TRAILEFFECTNUM (1<<26)
-// unused
-#define E5_UNUSED27 (1<<27)
-// unused
-#define E5_UNUSED28 (1<<28)
-// unused
-#define E5_UNUSED29 (1<<29)
-// unused
-#define E5_UNUSED30 (1<<30)
-// bits2 > 0
-#define E5_EXTEND4 (1<<31)
+/// reset all entity fields (typically used if status changed)
+#define E5_FULLUPDATE        (1u<<0)
+/// E5_ORIGIN32=0: short[3] = s->origin[0] * 8, s->origin[1] * 8, s->origin[2] * 8
+/// E5_ORIGIN32=1: float[3] = s->origin[0], s->origin[1], s->origin[2]
+#define E5_ORIGIN            (1u<<1)
+/// E5_ANGLES16=0: byte[3] = s->angle[0] * 256 / 360, s->angle[1] * 256 / 360, s->angle[2] * 256 / 360
+/// E5_ANGLES16=1: short[3] = s->angle[0] * 65536 / 360, s->angle[1] * 65536 / 360, s->angle[2] * 65536 / 360
+#define E5_ANGLES            (1u<<2)
+/// E5_MODEL16=0: byte = s->modelindex
+/// E5_MODEL16=1: short = s->modelindex
+#define E5_MODEL             (1u<<3)
+/// E5_FRAME16=0: byte = s->frame
+/// E5_FRAME16=1: short = s->frame
+#define E5_FRAME             (1u<<4)
+/// byte = s->skin
+#define E5_SKIN              (1u<<5)
+/// E5_EFFECTS16=0 && E5_EFFECTS32=0: byte = s->effects
+/// E5_EFFECTS16=1 && E5_EFFECTS32=0: short = s->effects
+/// E5_EFFECTS16=0 && E5_EFFECTS32=1: int = s->effects
+/// E5_EFFECTS16=1 && E5_EFFECTS32=1: int = s->effects
+#define E5_EFFECTS           (1u<<6)
+/// bits >= (1<<8)
+#define E5_EXTEND1           (1u<<7)
+
+/// byte = s->renderflags
+#define E5_FLAGS             (1u<<8)
+/// byte = bound(0, s->alpha * 255, 255)
+#define E5_ALPHA             (1u<<9)
+/// byte = bound(0, s->scale * 16, 255)
+#define E5_SCALE             (1u<<10)
+/// flag
+#define E5_ORIGIN32          (1u<<11)
+/// flag
+#define E5_ANGLES16          (1u<<12)
+/// flag
+#define E5_MODEL16           (1u<<13)
+/// byte = s->colormap
+#define E5_COLORMAP          (1u<<14)
+/// bits >= (1<<16)
+#define E5_EXTEND2           (1u<<15)
+
+/// short = s->tagentity
+/// byte = s->tagindex
+#define E5_ATTACHMENT        (1u<<16)
+/// short[4] = s->light[0], s->light[1], s->light[2], s->light[3]
+/// byte = s->lightstyle
+/// byte = s->lightpflags
+#define E5_LIGHT             (1u<<17)
+/// byte = s->glowsize
+/// byte = s->glowcolor
+#define E5_GLOW              (1u<<18)
+/// short = s->effects
+#define E5_EFFECTS16         (1u<<19)
+/// int = s->effects
+#define E5_EFFECTS32         (1u<<20)
+/// flag
+#define E5_FRAME16           (1u<<21)
+/// byte[3] = s->colormod[0], s->colormod[1], s->colormod[2]
+#define E5_COLORMOD          (1u<<22)
+/// bits >= (1<<24)
+#define E5_EXTEND3           (1u<<23)
+
+/// byte[3] = s->glowmod[0], s->glowmod[1], s->glowmod[2]
+#define E5_GLOWMOD           (1u<<24)
+/// byte type=0 short frames[1] short times[1]
+/// byte type=1 short frames[2] short times[2] byte lerps[2]
+/// byte type=2 short frames[3] short times[3] byte lerps[3]
+/// byte type=3 short frames[4] short times[4] byte lerps[4]
+/// byte type=4 short modelindex byte numbones {short pose7s[7]}
+/// see also RENDER_COMPLEXANIMATION
+#define E5_COMPLEXANIMATION  (1u<<25)
+/// ushort traileffectnum
+#define E5_TRAILEFFECTNUM    (1u<<26)
+/// unused
+#define E5_UNUSED27          (1u<<27)
+/// unused
+#define E5_UNUSED28          (1u<<28)
+/// unused
+#define E5_UNUSED29          (1u<<29)
+/// unused
+#define E5_UNUSED30          (1u<<30)
+/// bits2 > 0
+#define E5_EXTEND4           (1u<<31)
+// UBSan: unsigned literals because left shifting by 31 causes signed overflow, although it works as expected on x86.
 
 #define ENTITYFRAME5_MAXPACKETLOGS 64
 #define ENTITYFRAME5_MAXSTATES 1024
index 3ef0b74cf939fc417757249a4e328f1a5d0dcfb8..1fb432c9824d4db3f4727924035e7c910df685ad 100644 (file)
@@ -27,12 +27,16 @@ void VM_Warning(prvm_prog_t *prog, const char *fmt, ...)
        va_list argptr;
        char msg[MAX_INPUTLINE];
        static double recursive = -1;
+       int outfd = sys.outfd;
+
+       // set output to stderr
+       sys.outfd = fileno(stderr);
 
        va_start(argptr,fmt);
        dpvsnprintf(msg,sizeof(msg),fmt,argptr);
        va_end(argptr);
 
-       Con_Printf(CON_WARN "%s", msg);
+       Con_Printf(CON_WARN "%s VM warning: %s", prog->name, msg);
 
        // TODO: either add a cvar/cmd to control the state dumping or replace some of the calls with Con_Printf [9/13/2006 Black]
        if(prvm_backtraceforwarnings.integer && recursive != host.realtime) // NOTE: this compares to the time, just in case if PRVM_PrintState causes a Host_Error and keeps recursive set
@@ -41,6 +45,9 @@ void VM_Warning(prvm_prog_t *prog, const char *fmt, ...)
                PRVM_PrintState(prog, 0);
                recursive = -1;
        }
+
+       // restore configured outfd
+       sys.outfd = outfd;
 }
 
 
@@ -58,13 +65,13 @@ void VM_CheckEmptyString(prvm_prog_t *prog, const char *s)
                prog->error_cmd("%s: Bad string", prog->name);
 }
 
-qbool PRVM_ConsoleCommand (prvm_prog_t *prog, const char *text, int *func, qbool preserve_self, int curself, double ptime, qbool prog_loaded, const char *error_message)
+qbool PRVM_ConsoleCommand(prvm_prog_t *prog, const char *text, size_t textlen, int *func, qbool preserve_self, int curself, double ptime, const char *error_message)
 {
        int restorevm_tempstringsbuf_cursize;
        int save_self = 0; // hush compiler warning
        qbool r = false;
 
-       if(!prog_loaded)
+       if(!prog->loaded)
                return false;
 
        if(func)
@@ -75,7 +82,7 @@ qbool PRVM_ConsoleCommand (prvm_prog_t *prog, const char *text, int *func, qbool
                        PRVM_gameglobalfloat(time) = ptime;
                PRVM_gameglobaledict(self) = curself;
                restorevm_tempstringsbuf_cursize = prog->tempstringsbuf.cursize;
-               PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, text);
+               PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, text, textlen);
                prog->ExecuteProgram(prog, *func, error_message);
                prog->tempstringsbuf.cursize = restorevm_tempstringsbuf_cursize;
                if(preserve_self)
@@ -264,20 +271,42 @@ void VM_RemoveEdictSkeleton(prvm_prog_t *prog, prvm_edict_t *ed)
 //============================================================================
 //BUILT-IN FUNCTIONS
 
-void VM_VarString(prvm_prog_t *prog, int first, char *out, int outlength)
+#ifdef WIN32
+       // memccpy() is standard in POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD, C23.
+       // Microsoft supports it, but apparently complains if we use it.
+       #undef memccpy
+       #define memccpy _memccpy
+#endif
+size_t VM_VarString(prvm_prog_t *prog, int first, char *out, size_t outsize)
 {
        int i;
        const char *s;
-       char *outend;
+       char *p;
+       char *outend = out + outsize - 1;
 
-       outend = out + outlength - 1;
+       // bones_was_here: && out < outend improves perf significantly in some tests that don't trigger the warning,
+       // which seems odd, surely it would only help when the warning is printed?
        for (i = first;i < prog->argc && out < outend;i++)
        {
                s = PRVM_G_STRING((OFS_PARM0+i*3));
-               while (out < outend && *s)
-                       *out++ = *s++;
+               if (*s)
+               {
+                       // like dp_stpecpy but with a VM_Warning for use with `prvm_backtraceforwarnings 1`
+                       p = (char *)memccpy(out, s, '\0', (outend + 1) - out);
+                       if (p)
+                               out = p - 1;
+                       else
+                       {
+                               VM_Warning(prog, "%lu of %lu bytes available, will truncate %lu byte string \"%s\"\n", (unsigned long)(outend - out), (unsigned long)outsize - 1, (unsigned long)strlen(s), s);
+                               out = outend;
+                               *out = '\0';
+                       }
+               }
+               else
+                       *out = '\0';
        }
-       *out++ = 0;
+
+       return outsize - ((outend + 1) - out);
 }
 
 /*
@@ -321,6 +350,10 @@ static qbool checkextension(prvm_prog_t *prog, const char *name)
                        if (!strcasecmp("DP_QC_DIGEST_SHA256", name))
                                return Crypto_Available();
 
+                       // special shreck for libcurl
+                       if (!strcasecmp("DP_QC_URI_GET", name) || !strcasecmp("DP_QC_URI_POST", name))
+                               return Curl_Available();
+
                        return true;
                }
        }
@@ -347,7 +380,7 @@ error(value)
 void VM_error(prvm_prog_t *prog)
 {
        prvm_edict_t    *ed;
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
 
        VM_VarString(prog, 0, string, sizeof(string));
        Con_Printf(CON_ERROR "======%s ERROR in %s:\n%s\n", prog->name, PRVM_GetString(prog, prog->xfunction->s_name), string);
@@ -370,7 +403,7 @@ objerror(value)
 void VM_objerror(prvm_prog_t *prog)
 {
        prvm_edict_t    *ed;
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
 
        VM_VarString(prog, 0, string, sizeof(string));
        Con_Printf(CON_ERROR "======OBJECT ERROR======\n"); // , prog->name, PRVM_GetString(prog->xfunction->s_name), string); // or include them? FIXME
@@ -391,7 +424,7 @@ print(...[string])
 */
 void VM_print(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
 
        VM_VarString(prog, 0, string, sizeof(string));
        Con_Print(string);
@@ -408,7 +441,7 @@ bprint(...[string])
 */
 void VM_bprint(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
 
        if(!sv.active)
        {
@@ -433,7 +466,7 @@ void VM_sprint(prvm_prog_t *prog)
 {
        client_t        *client;
        int                     clientnum;
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
 
        VM_SAFEPARMCOUNTRANGE(1, 8, VM_sprint);
 
@@ -465,7 +498,7 @@ centerprint(value)
 */
 void VM_centerprint(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
 
        VM_SAFEPARMCOUNTRANGE(1, 8, VM_centerprint);
        VM_VarString(prog, 0, string, sizeof(string));
@@ -570,7 +603,7 @@ void VM_vectoangles(prvm_prog_t *prog)
 =================
 VM_random
 
-Returns a number from 0<= num < 1
+Returns a random number > 0 and < 1
 
 float random()
 =================
@@ -634,36 +667,18 @@ void VM_break(prvm_prog_t *prog)
 
 /*
 =================
-VM_localcmd_local
+VM_localcmd
 
-Sends text over to the client's execution buffer
+Appends text to the command buffer
 
 [localcmd (string, ...) or]
 cmd (string, ...)
 =================
 */
-void VM_localcmd_local(prvm_prog_t *prog)
+void VM_localcmd(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
-       VM_SAFEPARMCOUNTRANGE(1, 8, VM_localcmd_local);
-       VM_VarString(prog, 0, string, sizeof(string));
-       Cbuf_AddText(cmd_local, string);
-}
-
-/*
-=================
-VM_localcmd_server
-
-Sends text over to the server's execution buffer
-
-[localcmd (string, ...) or]
-cmd (string, ...)
-=================
-*/
-void VM_localcmd_server(prvm_prog_t *prog)
-{
-       char string[VM_STRINGTEMP_LENGTH];
-       VM_SAFEPARMCOUNTRANGE(1, 8, VM_localcmd_server);
+       char string[VM_TEMPSTRING_MAXSIZE];
+       VM_SAFEPARMCOUNTRANGE(1, 8, VM_localcmd);
        VM_VarString(prog, 0, string, sizeof(string));
        Cbuf_AddText(cmd_local, string);
 }
@@ -684,7 +699,7 @@ float cvar (string)
 */
 void VM_cvar(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
        VM_SAFEPARMCOUNTRANGE(1,8,VM_cvar);
        VM_VarString(prog, 0, string, sizeof(string));
        VM_CheckEmptyString(prog, string);
@@ -706,7 +721,7 @@ float CVAR_TYPEFLAG_READONLY = 32;
 */
 void VM_cvar_type(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
        cvar_t *cvar;
        int ret;
 
@@ -746,11 +761,18 @@ const string      VM_cvar_string (string, ...)
 */
 void VM_cvar_string(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
+       char cvar_name[VM_TEMPSTRING_MAXSIZE];
+
        VM_SAFEPARMCOUNTRANGE(1,8,VM_cvar_string);
-       VM_VarString(prog, 0, string, sizeof(string));
-       VM_CheckEmptyString(prog, string);
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, PRVM_Cvar_ReadOk(prog, string) ? Cvar_VariableString(prog->console_cmd->cvars, string, prog->console_cmd->cvars_flagsmask) : "");
+       VM_VarString(prog, 0, cvar_name, sizeof(cvar_name));
+       VM_CheckEmptyString(prog, cvar_name);
+       if (PRVM_Cvar_ReadOk(prog, cvar_name))
+       {
+               const char *cvar_string = Cvar_VariableString(prog->console_cmd->cvars, cvar_name, prog->console_cmd->cvars_flagsmask);
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cvar_string, strlen(cvar_string));
+       }
+       else
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "", 0);
 }
 
 
@@ -763,11 +785,14 @@ const string      VM_cvar_defstring (string, ...)
 */
 void VM_cvar_defstring(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
+       char cvar_name[VM_TEMPSTRING_MAXSIZE];
+       const char *cvar_defstring;
+
        VM_SAFEPARMCOUNTRANGE(1,8,VM_cvar_defstring);
-       VM_VarString(prog, 0, string, sizeof(string));
-       VM_CheckEmptyString(prog, string);
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, Cvar_VariableDefString(prog->console_cmd->cvars, string, prog->console_cmd->cvars_flagsmask));
+       VM_VarString(prog, 0, cvar_name, sizeof(cvar_name));
+       VM_CheckEmptyString(prog, cvar_name);
+       cvar_defstring = Cvar_VariableDefString(prog->console_cmd->cvars, cvar_name, prog->console_cmd->cvars_flagsmask);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cvar_defstring, strlen(cvar_defstring));
 }
 
 /*
@@ -779,11 +804,14 @@ const string      VM_cvar_description (string, ...)
 */
 void VM_cvar_description(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
+       char cvar_name[VM_TEMPSTRING_MAXSIZE];
+       const char *cvar_desc;
+
        VM_SAFEPARMCOUNTRANGE(1,8,VM_cvar_description);
-       VM_VarString(prog, 0, string, sizeof(string));
-       VM_CheckEmptyString(prog, string);
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, Cvar_VariableDescription(prog->console_cmd->cvars, string, prog->console_cmd->cvars_flagsmask));
+       VM_VarString(prog, 0, cvar_name, sizeof(cvar_name));
+       VM_CheckEmptyString(prog, cvar_name);
+       cvar_desc = Cvar_VariableDescription(prog->console_cmd->cvars, cvar_name, prog->console_cmd->cvars_flagsmask);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cvar_desc, strlen(cvar_desc));
 }
 /*
 =================
@@ -795,12 +823,25 @@ void cvar_set (string,string, ...)
 void VM_cvar_set(prvm_prog_t *prog)
 {
        const char *name;
-       char string[VM_STRINGTEMP_LENGTH];
+       char value[VM_TEMPSTRING_MAXSIZE];
+       cvar_t *cvar;
+
        VM_SAFEPARMCOUNTRANGE(2,8,VM_cvar_set);
-       VM_VarString(prog, 1, string, sizeof(string));
        name = PRVM_G_STRING(OFS_PARM0);
        VM_CheckEmptyString(prog, name);
-       Cvar_Set(prog->console_cmd->cvars, name, string);
+       cvar = Cvar_FindVar(prog->console_cmd->cvars, name, prog->console_cmd->cvars_flagsmask);
+       if (!cvar)
+       {
+               VM_Warning(prog, "VM_cvar_set: variable %s not found\n", name);
+               return;
+       }
+       if (cvar->flags & CF_READONLY)
+       {
+               VM_Warning(prog, "VM_cvar_set: variable %s is read-only\n", cvar->name);
+               return;
+       }
+       VM_VarString(prog, 1, value, sizeof(value));
+       Cvar_SetQuick(cvar, value);
 }
 
 /*
@@ -812,7 +853,7 @@ dprint(...[string])
 */
 void VM_dprint(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
        VM_SAFEPARMCOUNTRANGE(1, 8, VM_dprint);
        VM_VarString(prog, 0, string, sizeof(string));
 #if 1
@@ -834,16 +875,17 @@ void VM_ftos(prvm_prog_t *prog)
 {
        prvm_vec_t v;
        char s[128];
+       size_t slen;
 
        VM_SAFEPARMCOUNT(1, VM_ftos);
 
        v = PRVM_G_FLOAT(OFS_PARM0);
 
        if ((prvm_vec_t)((prvm_int_t)v) == v)
-               dpsnprintf(s, sizeof(s), "%.0f", v);
+               slen = dpsnprintf(s, sizeof(s), "%.0f", v);
        else
-               dpsnprintf(s, sizeof(s), "%f", v);
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, s);
+               slen = dpsnprintf(s, sizeof(s), "%f", v);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, s, slen);
 }
 
 /*
@@ -875,11 +917,12 @@ string    vtos(vector)
 void VM_vtos(prvm_prog_t *prog)
 {
        char s[512];
+       size_t slen;
 
        VM_SAFEPARMCOUNT(1,VM_vtos);
 
-       dpsnprintf (s, sizeof(s), "'%5.1f %5.1f %5.1f'", PRVM_G_VECTOR(OFS_PARM0)[0], PRVM_G_VECTOR(OFS_PARM0)[1], PRVM_G_VECTOR(OFS_PARM0)[2]);
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, s);
+       slen = dpsnprintf(s, sizeof(s), "'%5.1f %5.1f %5.1f'", PRVM_G_VECTOR(OFS_PARM0)[0], PRVM_G_VECTOR(OFS_PARM0)[1], PRVM_G_VECTOR(OFS_PARM0)[2]);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, s, slen);
 }
 
 /*
@@ -893,11 +936,12 @@ string    etos(entity)
 void VM_etos(prvm_prog_t *prog)
 {
        char s[128];
+       size_t slen;
 
        VM_SAFEPARMCOUNT(1, VM_etos);
 
-       dpsnprintf (s, sizeof(s), "entity %i", PRVM_G_EDICTNUM(OFS_PARM0));
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, s);
+       slen = dpsnprintf(s, sizeof(s), "entity %i", PRVM_G_EDICTNUM(OFS_PARM0));
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, s, slen);
 }
 
 /*
@@ -909,7 +953,7 @@ float stof(...[string])
 */
 void VM_stof(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
        VM_SAFEPARMCOUNTRANGE(1, 8, VM_stof);
        VM_VarString(prog, 0, string, sizeof(string));
        PRVM_G_FLOAT(OFS_RETURN) = atof(string);
@@ -976,8 +1020,10 @@ void VM_strftime(prvm_prog_t *prog)
 #else
        struct tm *tm;
 #endif
-       char fmt[VM_STRINGTEMP_LENGTH];
-       char result[VM_STRINGTEMP_LENGTH];
+       char fmt[VM_TEMPSTRING_MAXSIZE];
+       char result[VM_TEMPSTRING_MAXSIZE];
+       size_t result_len;
+
        VM_SAFEPARMCOUNTRANGE(2, 8, VM_strftime);
        VM_VarString(prog, 1, fmt, sizeof(fmt));
        t = time(NULL);
@@ -999,11 +1045,11 @@ void VM_strftime(prvm_prog_t *prog)
                return;
        }
 #if _MSC_VER >= 1400
-       strftime(result, sizeof(result), fmt, &tm);
+       result_len = strftime(result, sizeof(result), fmt, &tm);
 #else
-       strftime(result, sizeof(result), fmt, tm);
+       result_len = strftime(result, sizeof(result), fmt, tm);
 #endif
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, result);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, result, result_len);
 }
 
 /*
@@ -1214,7 +1260,7 @@ void VM_findchainfloat(prvm_prog_t *prog)
        else
                chainfield = prog->fieldoffsets.chain;
        if (chainfield < 0)
-               prog->error_cmd("VM_findchain: %s doesnt have the specified chain field !", prog->name);
+               prog->error_cmd("VM_findchainfloat: %s doesnt have the specified chain field !", prog->name);
 
        chain = (prvm_edict_t *)prog->edicts;
 
@@ -1300,7 +1346,7 @@ void VM_findchainflags(prvm_prog_t *prog)
        else
                chainfield = prog->fieldoffsets.chain;
        if (chainfield < 0)
-               prog->error_cmd("VM_findchain: %s doesnt have the specified chain field !", prog->name);
+               prog->error_cmd("VM_findchainflags: %s doesnt have the specified chain field !", prog->name);
 
        chain = (prvm_edict_t *)prog->edicts;
 
@@ -1690,7 +1736,7 @@ float     registercvar (string name, string value[, float flags])
 void VM_registercvar(prvm_prog_t *prog)
 {
        const char *name, *value;
-       int     flags;
+       unsigned flags;
 
        VM_SAFEPARMCOUNTRANGE(2, 3, VM_registercvar);
 
@@ -1950,7 +1996,7 @@ string    fgets(float fhandle)
 void VM_fgets(prvm_prog_t *prog)
 {
        int c, end;
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
        int filenum;
 
        VM_SAFEPARMCOUNT(1,VM_fgets);
@@ -1975,10 +2021,10 @@ void VM_fgets(prvm_prog_t *prog)
                c = FS_Getc(prog->openfiles[filenum]);
                if (c == '\r' || c == '\n' || c < 0)
                        break;
-               if (end < VM_STRINGTEMP_LENGTH - 1)
+               if (end < VM_TEMPSTRING_MAXSIZE - 1)
                        string[end++] = c;
        }
-       string[end] = 0;
+       string[end] = '\0';
        // remove \n following \r
        if (c == '\r')
        {
@@ -1989,7 +2035,7 @@ void VM_fgets(prvm_prog_t *prog)
        if (developer_extra.integer)
                Con_DPrintf("fgets: %s: %s\n", prog->name, string);
        if (c >= 0 || end)
-               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string);
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string, end);
 }
 
 /*
@@ -2002,8 +2048,8 @@ fputs(float fhandle, string s)
 //void(float fhandle, string s) fputs = #113; // writes a line of text to the end of the file
 void VM_fputs(prvm_prog_t *prog)
 {
-       int stringlength;
-       char string[VM_STRINGTEMP_LENGTH];
+       size_t stringlength;
+       char string[VM_TEMPSTRING_MAXSIZE];
        int filenum;
 
        VM_SAFEPARMCOUNT(2,VM_fputs);
@@ -2019,8 +2065,8 @@ void VM_fputs(prvm_prog_t *prog)
                VM_Warning(prog, "VM_fputs: no such file handle %i (or file has been closed) in %s\n", filenum, prog->name);
                return;
        }
-       VM_VarString(prog, 1, string, sizeof(string));
-       if ((stringlength = (int)strlen(string)))
+       stringlength = VM_VarString(prog, 1, string, sizeof(string));
+       if (stringlength)
                FS_Write(prog->openfiles[filenum], string, stringlength);
        if (developer_extra.integer)
                Con_DPrintf("fputs: %s: %s\n", prog->name, string);
@@ -2088,7 +2134,7 @@ void VM_entityfieldname(prvm_prog_t *prog)
        if (i < 0 || i >= prog->numfielddefs)
        {
                VM_Warning(prog, "VM_entityfieldname: %s: field index out of bounds\n", prog->name);
-               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "");
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "", 0);
                return;
        }
 
@@ -2140,8 +2186,8 @@ void VM_getentityfieldstring(prvm_prog_t *prog)
        
        if (i < 0 || i >= prog->numfielddefs)
        {
-        VM_Warning(prog, "VM_entityfielddata: %s: field index out of bounds\n", prog->name);
-               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "");
+               VM_Warning(prog, "VM_entityfielddata: %s: field index out of bounds\n", prog->name);
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "", 0);
                return;
        }
        
@@ -2151,7 +2197,7 @@ void VM_getentityfieldstring(prvm_prog_t *prog)
        ent = PRVM_G_EDICT(OFS_PARM1);
        if(ent->free)
        {
-               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "");
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "", 0);
                VM_Warning(prog, "VM_entityfielddata: %s: entity %i is free !\n", prog->name, PRVM_NUM_FOR_EDICT(ent));
                return;
        }
@@ -2164,11 +2210,12 @@ void VM_getentityfieldstring(prvm_prog_t *prog)
                        break;
        if (j == prvm_type_size[type])
        {
-               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "");
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "", 0);
                return;
        }
-               
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, PRVM_UglyValueString(prog, (etype_t)d->type, val, valuebuf, sizeof(valuebuf)));
+
+       PRVM_UglyValueString(prog, (etype_t)d->type, val, valuebuf, sizeof(valuebuf));
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, valuebuf, strlen(valuebuf));
 }
 
 // KrimZon - DP_QC_ENTITYDATA
@@ -2234,14 +2281,15 @@ string  strdecolorize(string s)
 // string (string s) strdecolorize = #472; // returns the passed in string with color codes stripped
 void VM_strdecolorize(prvm_prog_t *prog)
 {
-       char szNewString[VM_STRINGTEMP_LENGTH];
+       char szNewString[VM_TEMPSTRING_MAXSIZE];
+       size_t szNewString_len;
        const char *szString;
 
        // Prepare Strings
        VM_SAFEPARMCOUNT(1,VM_strdecolorize);
        szString = PRVM_G_STRING(OFS_PARM0);
-       COM_StringDecolorize(szString, 0, szNewString, sizeof(szNewString), true);
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, szNewString);
+       szNewString_len = COM_StringDecolorize(szString, 0, szNewString, sizeof(szNewString), true);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, szNewString, szNewString_len);
 }
 
 // DRESK - String Length (not counting color codes)
@@ -2280,16 +2328,17 @@ string  strtolower(string s)
 // string (string s) strtolower = #480; // returns passed in string in lowercase form
 void VM_strtolower(prvm_prog_t *prog)
 {
-       char szNewString[VM_STRINGTEMP_LENGTH];
+       char szNewString[VM_TEMPSTRING_MAXSIZE];
+       size_t szNewString_len;
        const char *szString;
 
        // Prepare Strings
        VM_SAFEPARMCOUNT(1,VM_strtolower);
        szString = PRVM_G_STRING(OFS_PARM0);
 
-       COM_ToLowerString(szString, szNewString, sizeof(szNewString) );
+       szNewString_len = COM_ToLowerString(szString, szNewString, sizeof(szNewString) );
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, szNewString);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, szNewString, szNewString_len);
 }
 
 /*
@@ -2302,35 +2351,38 @@ string  strtoupper(string s)
 // string (string s) strtoupper = #481; // returns passed in string in uppercase form
 void VM_strtoupper(prvm_prog_t *prog)
 {
-       char szNewString[VM_STRINGTEMP_LENGTH];
+       char szNewString[VM_TEMPSTRING_MAXSIZE];
+       size_t szNewString_len;
        const char *szString;
 
        // Prepare Strings
        VM_SAFEPARMCOUNT(1,VM_strtoupper);
        szString = PRVM_G_STRING(OFS_PARM0);
 
-       COM_ToUpperString(szString, szNewString, sizeof(szNewString) );
+       szNewString_len = COM_ToUpperString(szString, szNewString, sizeof(szNewString) );
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, szNewString);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, szNewString, szNewString_len);
 }
 
 /*
 =========
 VM_strcat
 
-string strcat(string,string,...[string])
+string strcat(string s, string...)
 =========
 */
-//string(string s1, string s2) strcat = #115;
-// concatenates two strings (for example "abc", "def" would return "abcdef")
+//string(string s, string...) strcat = #115;
+// concatenates strings (for example "abc", "def" would return "abcdef")
 // and returns as a tempstring
 void VM_strcat(prvm_prog_t *prog)
 {
-       char s[VM_STRINGTEMP_LENGTH];
+       char s[VM_TEMPSTRING_MAXSIZE];
+       size_t slen;
+
        VM_SAFEPARMCOUNTRANGE(1, 8, VM_strcat);
 
-       VM_VarString(prog, 0, s, sizeof(s));
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, s);
+       slen = VM_VarString(prog, 0, s, sizeof(s));
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, s, slen);
 }
 
 /*
@@ -2348,7 +2400,7 @@ void VM_substring(prvm_prog_t *prog)
        int u_slength = 0, u_start;
        size_t u_length;
        const char *s;
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
 
        VM_SAFEPARMCOUNT(3,VM_substring);
 
@@ -2394,7 +2446,7 @@ void VM_substring(prvm_prog_t *prog)
        u_start = u8_byteofs(s, start, NULL);
        if (u_start < 0)
        {
-               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "");
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "", 0);
                return;
        }
        u_length = u8_bytelen(s + u_start, length);
@@ -2402,8 +2454,8 @@ void VM_substring(prvm_prog_t *prog)
                u_length = sizeof(string)-1;
        
        memcpy(string, s + u_start, u_length);
-       string[u_length] = 0;
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string);
+       string[u_length] = '\0';
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string, u_length);
 }
 
 /*
@@ -2418,7 +2470,7 @@ void VM_strreplace(prvm_prog_t *prog)
 {
        int i, j, si;
        const char *search, *replace, *subject;
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
        int search_len, replace_len, subject_len;
 
        VM_SAFEPARMCOUNT(3,VM_strreplace);
@@ -2470,7 +2522,7 @@ void VM_strreplace(prvm_prog_t *prog)
                        string[si++] = subject[i];
        string[si] = '\0';
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string, si);
 }
 
 /*
@@ -2485,7 +2537,7 @@ void VM_strireplace(prvm_prog_t *prog)
 {
        int i, j, si;
        const char *search, *replace, *subject;
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
        int search_len, replace_len, subject_len;
 
        VM_SAFEPARMCOUNT(3, VM_strireplace);
@@ -2537,7 +2589,7 @@ void VM_strireplace(prvm_prog_t *prog)
                        string[si++] = subject[i];
        string[si] = '\0';
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string, si);
 }
 
 /*
@@ -2550,7 +2602,7 @@ vector    stov(string s)
 //vector(string s) stov = #117; // returns vector value from a string
 void VM_stov(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
 
        VM_SAFEPARMCOUNT(1,VM_stov);
 
@@ -2569,13 +2621,12 @@ string  strzone(string s)
 void VM_strzone(prvm_prog_t *prog)
 {
        char *out;
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
        size_t alloclen;
 
        VM_SAFEPARMCOUNT(1,VM_strzone);
 
-       VM_VarString(prog, 0, string, sizeof(string));
-       alloclen = strlen(string) + 1;
+       alloclen = VM_VarString(prog, 0, string, sizeof(string)) + 1;
        PRVM_G_INT(OFS_RETURN) = PRVM_AllocString(prog, alloclen, &out);
        memcpy(out, string, alloclen);
 }
@@ -2605,17 +2656,17 @@ float tokenize(string s)
 //this function originally written by KrimZon, made shorter by LadyHavoc
 //20040203: rewritten by LadyHavoc (no longer uses allocations)
 static int num_tokens = 0;
-static int tokens[VM_STRINGTEMP_LENGTH / 2];
-static int tokens_startpos[VM_STRINGTEMP_LENGTH / 2];
-static int tokens_endpos[VM_STRINGTEMP_LENGTH / 2];
-static char tokenize_string[VM_STRINGTEMP_LENGTH];
+static int tokens[VM_TEMPSTRING_MAXSIZE / 2];
+static int tokens_startpos[VM_TEMPSTRING_MAXSIZE / 2];
+static int tokens_endpos[VM_TEMPSTRING_MAXSIZE / 2];
+static char tokenize_string[VM_TEMPSTRING_MAXSIZE];
 void VM_tokenize (prvm_prog_t *prog)
 {
        const char *p;
 
        VM_SAFEPARMCOUNT(1,VM_tokenize);
 
-       strlcpy(tokenize_string, PRVM_G_STRING(OFS_PARM0), sizeof(tokenize_string));
+       dp_strlcpy(tokenize_string, PRVM_G_STRING(OFS_PARM0), sizeof(tokenize_string));
        p = tokenize_string;
 
        num_tokens = 0;
@@ -2632,7 +2683,7 @@ void VM_tokenize (prvm_prog_t *prog)
                if(!COM_ParseToken_VM_Tokenize(&p, false))
                        break;
                tokens_endpos[num_tokens] = p - tokenize_string;
-               tokens[num_tokens] = PRVM_SetTempString(prog, com_token);
+               tokens[num_tokens] = PRVM_SetTempString(prog, com_token, com_token_len);
                ++num_tokens;
        }
 
@@ -2646,7 +2697,7 @@ void VM_tokenize_console (prvm_prog_t *prog)
 
        VM_SAFEPARMCOUNT(1, VM_tokenize_console);
 
-       strlcpy(tokenize_string, PRVM_G_STRING(OFS_PARM0), sizeof(tokenize_string));
+       dp_strlcpy(tokenize_string, PRVM_G_STRING(OFS_PARM0), sizeof(tokenize_string));
        p = tokenize_string;
 
        num_tokens = 0;
@@ -2663,7 +2714,7 @@ void VM_tokenize_console (prvm_prog_t *prog)
                if(!COM_ParseToken_Console(&p))
                        break;
                tokens_endpos[num_tokens] = p - tokenize_string;
-               tokens[num_tokens] = PRVM_SetTempString(prog, com_token);
+               tokens[num_tokens] = PRVM_SetTempString(prog, com_token, com_token_len);
                ++num_tokens;
        }
 
@@ -2696,7 +2747,7 @@ void VM_tokenizebyseparator (prvm_prog_t *prog)
 
        VM_SAFEPARMCOUNTRANGE(2, 8,VM_tokenizebyseparator);
 
-       strlcpy(tokenize_string, PRVM_G_STRING(OFS_PARM0), sizeof(tokenize_string));
+       dp_strlcpy(tokenize_string, PRVM_G_STRING(OFS_PARM0), sizeof(tokenize_string));
        p = tokenize_string;
 
        numseparators = 0;
@@ -2739,8 +2790,8 @@ void VM_tokenizebyseparator (prvm_prog_t *prog)
                tokens_endpos[num_tokens] = p0 - tokenize_string;
                if (j >= (int)sizeof(tokentext))
                        break;
-               tokentext[j++] = 0;
-               tokens[num_tokens++] = PRVM_SetTempString(prog, token);
+               tokentext[j++] = '\0';
+               tokens[num_tokens++] = PRVM_SetTempString(prog, token, j - 1);
                if (!*p)
                        break;
        }
@@ -3064,13 +3115,21 @@ float   mod(float val, float m)
 */
 void VM_modulo(prvm_prog_t *prog)
 {
-       prvm_int_t val, m;
+       vec_t val, m;
+
        VM_SAFEPARMCOUNT(2, VM_modulo);
 
-       val = (prvm_int_t) PRVM_G_FLOAT(OFS_PARM0);
-       m       = (prvm_int_t) PRVM_G_FLOAT(OFS_PARM1);
+       val = PRVM_G_FLOAT(OFS_PARM0);
+       m   = PRVM_G_FLOAT(OFS_PARM1);
 
-       PRVM_G_FLOAT(OFS_RETURN) = (prvm_vec_t) (val % m);
+       // matches how gmqcc implements % when mod() builtin isn't defined, and FTEQW mod()
+       if (m)
+               PRVM_G_FLOAT(OFS_RETURN) = val - m * (prvm_int_t)(val / m);
+       else
+       {
+               VM_Warning(prog, "Attempted modulo of %f by zero\n", val);
+               PRVM_G_FLOAT(OFS_RETURN) = 0;
+       }
 }
 
 static void VM_Search_Init(prvm_prog_t *prog)
@@ -3207,6 +3266,7 @@ string    search_getfilename(float handle, float num)
 void VM_search_getfilename(prvm_prog_t *prog)
 {
        int handle, filenum;
+
        VM_SAFEPARMCOUNT(2, VM_search_getfilename);
 
        handle = (int)PRVM_G_FLOAT(OFS_PARM0);
@@ -3228,7 +3288,9 @@ void VM_search_getfilename(prvm_prog_t *prog)
                return;
        }
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, prog->opensearches[handle]->filenames[filenum]);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog,
+                                                   prog->opensearches[handle]->filenames[filenum],
+                                                   strlen(prog->opensearches[handle]->filenames[filenum]));
 }
 
 /*
@@ -3252,11 +3314,11 @@ void VM_chr(prvm_prog_t *prog)
        
        char tmp[8];
        int len;
-       VM_SAFEPARMCOUNT(1, VM_chr);
 
+       VM_SAFEPARMCOUNT(1, VM_chr);
        len = u8_fromchar((Uchar)PRVM_G_FLOAT(OFS_PARM0), tmp, sizeof(tmp));
-       tmp[len] = 0;
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, tmp);
+       tmp[len] = '\0';
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, tmp, len);
 }
 
 /*
@@ -3268,10 +3330,12 @@ string keynumtostring(float keynum)
 */
 void VM_keynumtostring (prvm_prog_t *prog)
 {
-       char tinystr[2];
-       VM_SAFEPARMCOUNT(1, VM_keynumtostring);
+       char tinystr[TINYSTR_LEN];
+       const char *str; // Key_KeynumToString doesn't always return tinystr
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, Key_KeynumToString((int)PRVM_G_FLOAT(OFS_PARM0), tinystr, sizeof(tinystr)));
+       VM_SAFEPARMCOUNT(1, VM_keynumtostring);
+       str = Key_KeynumToString((int)PRVM_G_FLOAT(OFS_PARM0), tinystr, sizeof(tinystr));
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, str, strlen(str));
 }
 
 /*
@@ -3288,7 +3352,8 @@ void M_FindKeysForCommand(const char *command, int *keys);
 void VM_findkeysforcommand(prvm_prog_t *prog)
 {
        const char *cmd;
-       char ret[VM_STRINGTEMP_LENGTH];
+       char ret[VM_TEMPSTRING_MAXSIZE];
+       size_t ret_len;
        int keys[FKFC_NUMKEYS];
        int i;
        int bindmap;
@@ -3308,9 +3373,9 @@ void VM_findkeysforcommand(prvm_prog_t *prog)
 
        ret[0] = 0;
        for(i = 0; i < FKFC_NUMKEYS; i++)
-               strlcat(ret, va(vabuf, sizeof(vabuf), " \'%i\'", keys[i]), sizeof(ret));
+               ret_len = dp_strlcat(ret, va(vabuf, sizeof(vabuf), " \'%i\'", keys[i]), sizeof(ret));
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, ret);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, ret, ret_len);
 }
 
 /*
@@ -3337,13 +3402,15 @@ string getkeybind(float key, float bindmap)
 void VM_getkeybind (prvm_prog_t *prog)
 {
        int bindmap;
+       const char *bind;
+
        VM_SAFEPARMCOUNTRANGE(1, 2, VM_getkeybind);
        if(prog->argc == 2)
                bindmap = bound(-1, PRVM_G_FLOAT(OFS_PARM1), MAX_BINDMAPS-1);
        else
                bindmap = 0; // consistent to "bind"
-
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, Key_GetBind((int)PRVM_G_FLOAT(OFS_PARM0), bindmap));
+       bind = Key_GetBind((int)PRVM_G_FLOAT(OFS_PARM0), bindmap);
+       PRVM_G_INT(OFS_RETURN) = bind ? PRVM_SetTempString(prog, bind, strlen(bind)) : 0;
 }
 
 /*
@@ -3584,7 +3651,7 @@ string altstr_prepare(string)
 void VM_altstr_prepare(prvm_prog_t *prog)
 {
        const char *instr, *in;
-       char outstr[VM_STRINGTEMP_LENGTH];
+       char outstr[VM_TEMPSTRING_MAXSIZE];
        size_t outpos;
 
        VM_SAFEPARMCOUNT( 1, VM_altstr_prepare );
@@ -3601,9 +3668,9 @@ void VM_altstr_prepare(prvm_prog_t *prog)
                else
                        outstr[outpos++] = *in;
        }
-       outstr[outpos] = 0;
 
-       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog,  outstr );
+       outstr[outpos] = '\0';
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, outstr, outpos);
 }
 
 /*
@@ -3618,7 +3685,7 @@ void VM_altstr_get(prvm_prog_t *prog)
        const char *altstr, *pos;
        char *out;
        int count, size;
-       char outstr[VM_STRINGTEMP_LENGTH];
+       char outstr[VM_TEMPSTRING_MAXSIZE];
 
        VM_SAFEPARMCOUNT( 2, VM_altstr_get );
 
@@ -3650,8 +3717,8 @@ void VM_altstr_get(prvm_prog_t *prog)
                else
                        *out = *pos;
 
-       *out = 0;
-       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog,  outstr );
+       *out = '\0';
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, outstr, out - outstr);
 }
 
 /*
@@ -3667,7 +3734,7 @@ void VM_altstr_set(prvm_prog_t *prog)
        const char *altstr, *str;
        const char *in;
        char *out;
-       char outstr[VM_STRINGTEMP_LENGTH];
+       char outstr[VM_TEMPSTRING_MAXSIZE];
 
        VM_SAFEPARMCOUNT( 3, VM_altstr_set );
 
@@ -3694,8 +3761,8 @@ void VM_altstr_set(prvm_prog_t *prog)
                if( *in == '\'' || (*in == '\\' && !*++in) )
                        break;
 
-       strlcpy(out, in, outstr + sizeof(outstr) - out);
-       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog,  outstr );
+       out += dp_strlcpy(out, in, outstr + sizeof(outstr) - out);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, outstr, out - outstr);
 }
 
 /*
@@ -3711,7 +3778,7 @@ void VM_altstr_ins(prvm_prog_t *prog)
        const char *set;
        const char *in;
        char *out;
-       char outstr[VM_STRINGTEMP_LENGTH];
+       char outstr[VM_TEMPSTRING_MAXSIZE];
 
        VM_SAFEPARMCOUNT(3, VM_altstr_ins);
 
@@ -3733,8 +3800,8 @@ void VM_altstr_ins(prvm_prog_t *prog)
        for( ; *set ; *out++ = *set++ );
        *out++ = '\'';
 
-       strlcpy(out, in, outstr + sizeof(outstr) - out);
-       PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog,  outstr );
+       out += dp_strlcpy(out, in, outstr + sizeof(outstr) - out);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, outstr, out - outstr);
 }
 
 
@@ -3797,7 +3864,7 @@ static int BufStr_SortStringsDOWN (const void *in1, const void *in2)
        return strncmp(b, a, stringbuffers_sortlength);
 }
 
-prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, int flags, const char *format)
+prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, unsigned flags, const char *format)
 {
        prvm_stringbuffer_t *stringbuffer;
        int i;
@@ -4061,10 +4128,12 @@ string buf_implode(float bufhandle, string glue) = #465;
 void VM_buf_implode (prvm_prog_t *prog)
 {
        prvm_stringbuffer_t *stringbuffer;
-       char                    k[VM_STRINGTEMP_LENGTH];
-       const char              *sep;
-       int                             i;
-       size_t                  l;
+       char k[VM_TEMPSTRING_MAXSIZE];
+       size_t k_len;
+       const char *sep;
+       int i;
+       size_t l;
+
        VM_SAFEPARMCOUNT(2, VM_buf_implode);
 
        stringbuffer = (prvm_stringbuffer_t *)Mem_ExpandableArray_RecordAtIndex(&prog->stringbuffersarray, (int)PRVM_G_FLOAT(OFS_PARM0));
@@ -4077,7 +4146,8 @@ void VM_buf_implode (prvm_prog_t *prog)
        if(!stringbuffer->num_strings)
                return;
        sep = PRVM_G_STRING(OFS_PARM1);
-       k[0] = 0;
+       k[0] = '\0';
+       k_len = 0;
        for(l = i = 0;i < stringbuffer->num_strings;i++)
        {
                if(stringbuffer->strings[i])
@@ -4085,11 +4155,11 @@ void VM_buf_implode (prvm_prog_t *prog)
                        l += (i > 0 ? strlen(sep) : 0) + strlen(stringbuffer->strings[i]);
                        if (l >= sizeof(k) - 1)
                                break;
-                       strlcat(k, sep, sizeof(k));
-                       strlcat(k, stringbuffer->strings[i], sizeof(k));
+                       dp_strlcat(k, sep, sizeof(k));
+                       k_len = dp_strlcat(k, stringbuffer->strings[i], sizeof(k));
                }
        }
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, k);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, k, k_len);
 }
 
 /*
@@ -4119,7 +4189,7 @@ void VM_bufstr_get (prvm_prog_t *prog)
                return;
        }
        if (strindex < stringbuffer->num_strings && stringbuffer->strings[strindex])
-               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, stringbuffer->strings[strindex]);
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, stringbuffer->strings[strindex], strlen(stringbuffer->strings[strindex]));
 }
 
 /*
@@ -4249,7 +4319,7 @@ void VM_buf_loadfile(prvm_prog_t *prog)
 {
        size_t alloclen;
        prvm_stringbuffer_t *stringbuffer;
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
        int strindex, c, end;
        const char *filename;
        char vabuf[1024];
@@ -4290,7 +4360,7 @@ void VM_buf_loadfile(prvm_prog_t *prog)
                        c = FS_Getc(file);
                        if (c == '\r' || c == '\n' || c < 0)
                                break;
-                       if (end < VM_STRINGTEMP_LENGTH - 1)
+                       if (end < VM_TEMPSTRING_MAXSIZE - 1)
                                string[end++] = c;
                }
                string[end] = 0;
@@ -4494,7 +4564,7 @@ float bufstr_find(float bufhandle, string match, float matchrule, float startpos
 void VM_bufstr_find(prvm_prog_t *prog)
 {
        prvm_stringbuffer_t *stringbuffer;
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
        int matchrule, matchlen, i, step;
        const char *match;
 
@@ -4521,7 +4591,7 @@ void VM_bufstr_find(prvm_prog_t *prog)
                match = PRVM_G_STRING(OFS_PARM1);
        else
        {
-               strlcpy(string, PRVM_G_STRING(OFS_PARM1), sizeof(string));
+               dp_strlcpy(string, PRVM_G_STRING(OFS_PARM1), sizeof(string));
                match = detect_match_rule(string, &matchrule);
        }
        matchlen = (int)strlen(match);
@@ -4531,7 +4601,7 @@ void VM_bufstr_find(prvm_prog_t *prog)
        step = (prog->argc > 4) ? (int)PRVM_G_FLOAT(OFS_PARM4) : 1;
        while(i < stringbuffer->num_strings)
        {
-               if (stringbuffer->strings[i] && match_rule(stringbuffer->strings[i], VM_STRINGTEMP_LENGTH, match, matchlen, matchrule))
+               if (stringbuffer->strings[i] && match_rule(stringbuffer->strings[i], VM_TEMPSTRING_MAXSIZE, match, matchlen, matchrule))
                {
                        PRVM_G_FLOAT(OFS_RETURN) = i;
                        break;
@@ -4549,7 +4619,7 @@ float matchpattern(string s, string pattern, float matchrule, float startpos) =
 void VM_matchpattern(prvm_prog_t *prog)
 {
        const char *s, *match;
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
        int matchrule, l;
 
        VM_SAFEPARMCOUNTRANGE(2, 4, VM_matchpattern);
@@ -4567,7 +4637,7 @@ void VM_matchpattern(prvm_prog_t *prog)
                match = PRVM_G_STRING(OFS_PARM1);
        else
        {
-               strlcpy(string, PRVM_G_STRING(OFS_PARM1), sizeof(string));
+               dp_strlcpy(string, PRVM_G_STRING(OFS_PARM1), sizeof(string));
                match = detect_match_rule(string, &matchrule);
        }
 
@@ -4577,7 +4647,7 @@ void VM_matchpattern(prvm_prog_t *prog)
                s += max(0, min((unsigned int)PRVM_G_FLOAT(OFS_PARM3), strlen(s)-1));
 
        // match
-       PRVM_G_FLOAT(OFS_RETURN) = match_rule(s, VM_STRINGTEMP_LENGTH, match, l, matchrule);
+       PRVM_G_FLOAT(OFS_RETURN) = match_rule(s, VM_TEMPSTRING_MAXSIZE, match, l, matchrule);
 }
 
 /*
@@ -4786,15 +4856,15 @@ void VM_changepitch (prvm_prog_t *prog)
 
 void VM_uncolorstring (prvm_prog_t *prog)
 {
-       char szNewString[VM_STRINGTEMP_LENGTH];
+       char szNewString[VM_TEMPSTRING_MAXSIZE];
+       size_t szNewString_len;
        const char *szString;
 
        // Prepare Strings
        VM_SAFEPARMCOUNT(1, VM_uncolorstring);
        szString = PRVM_G_STRING(OFS_PARM0);
-       COM_StringDecolorize(szString, 0, szNewString, sizeof(szNewString), true);
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, szNewString);
-       
+       szNewString_len = COM_StringDecolorize(szString, 0, szNewString, sizeof(szNewString), true);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, szNewString, szNewString_len);
 }
 
 // #221 float(string str, string sub[, float startpos]) strstrofs (FTE_STRINGS)
@@ -4859,11 +4929,12 @@ void VM_chr2str (prvm_prog_t *prog)
        char t[9 * 4 + 1];
        int i;
        size_t len = 0;
+
        VM_SAFEPARMCOUNTRANGE(0, 8, VM_chr2str);
        for(i = 0; i < prog->argc && len < sizeof(t)-1; ++i)
                len += u8_fromchar((Uchar)PRVM_G_FLOAT(OFS_PARM0+i*3), t + len, sizeof(t)-1);
-       t[len] = 0;
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, t);
+       t[len] = '\0';
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, t, len);
 }
 
 static int chrconv_number(int i, int base, int conv)
@@ -4950,8 +5021,10 @@ static int chrchar_alpha(int i, int basec, int baset, int convc, int convt, int
 //bulk convert a string. change case or colouring.
 void VM_strconv (prvm_prog_t *prog)
 {
-       int ccase, redalpha, rednum, len, i;
-       unsigned char resbuf[VM_STRINGTEMP_LENGTH];
+       int ccase, redalpha, rednum;
+       unsigned i;
+       size_t resbuf_len;
+       unsigned char resbuf[VM_TEMPSTRING_MAXSIZE];
        unsigned char *result = resbuf;
 
        VM_SAFEPARMCOUNTRANGE(3, 8, VM_strconv);
@@ -4959,10 +5032,9 @@ void VM_strconv (prvm_prog_t *prog)
        ccase = (int) PRVM_G_FLOAT(OFS_PARM0);  //0 same, 1 lower, 2 upper
        redalpha = (int) PRVM_G_FLOAT(OFS_PARM1);       //0 same, 1 white, 2 red,  5 alternate, 6 alternate-alternate
        rednum = (int) PRVM_G_FLOAT(OFS_PARM2); //0 same, 1 white, 2 red, 3 redspecial, 4 whitespecial, 5 alternate, 6 alternate-alternate
-       VM_VarString(prog, 3, (char *) resbuf, sizeof(resbuf));
-       len = (int)strlen((char *) resbuf);
+       resbuf_len = VM_VarString(prog, 3, (char *) resbuf, sizeof(resbuf));
 
-       for (i = 0; i < len; i++, result++)     //should this be done backwards?
+       for (i = 0; i < resbuf_len; i++, result++)      //should this be done backwards?
        {
                if (*result >= '0' && *result <= '9')   //normal numbers...
                        *result = chrconv_number(*result, '0', rednum);
@@ -4991,24 +5063,26 @@ void VM_strconv (prvm_prog_t *prog)
        }
        *result = '\0';
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, (char *) resbuf);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, (char *)resbuf, result - resbuf);
 }
 
 // #225 string(float chars, string s, ...) strpad (FTE_STRINGS)
 void VM_strpad (prvm_prog_t *prog)
 {
-       char src[VM_STRINGTEMP_LENGTH];
-       char destbuf[VM_STRINGTEMP_LENGTH];
+       char src[VM_TEMPSTRING_MAXSIZE];
+       char destbuf[VM_TEMPSTRING_MAXSIZE];
+       size_t destbuf_len;
        int pad;
+
        VM_SAFEPARMCOUNTRANGE(1, 8, VM_strpad);
        pad = (int) PRVM_G_FLOAT(OFS_PARM0);
        VM_VarString(prog, 1, src, sizeof(src));
 
        // note: < 0 = left padding, > 0 = right padding,
        // this is reverse logic of printf!
-       dpsnprintf(destbuf, sizeof(destbuf), "%*s", -pad, src);
+       destbuf_len = dpsnprintf(destbuf, sizeof(destbuf), "%*s", -pad, src);
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, destbuf);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, destbuf, destbuf_len);
 }
 
 // #226 string(string info, string key, string value, ...) infoadd (FTE_STRINGS)
@@ -5016,19 +5090,19 @@ void VM_strpad (prvm_prog_t *prog)
 void VM_infoadd (prvm_prog_t *prog)
 {
        const char *info, *key;
-       char value[VM_STRINGTEMP_LENGTH];
-       char temp[VM_STRINGTEMP_LENGTH];
+       char value[VM_TEMPSTRING_MAXSIZE];
+       char temp[VM_TEMPSTRING_MAXSIZE];
 
        VM_SAFEPARMCOUNTRANGE(2, 8, VM_infoadd);
        info = PRVM_G_STRING(OFS_PARM0);
        key = PRVM_G_STRING(OFS_PARM1);
        VM_VarString(prog, 2, value, sizeof(value));
 
-       strlcpy(temp, info, VM_STRINGTEMP_LENGTH);
+       dp_strlcpy(temp, info, VM_TEMPSTRING_MAXSIZE);
 
-       InfoString_SetValue(temp, VM_STRINGTEMP_LENGTH, key, value);
+       InfoString_SetValue(temp, VM_TEMPSTRING_MAXSIZE, key, value);
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, temp);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, temp, strlen(temp));
 }
 
 // #227 string(string info, string key) infoget (FTE_STRINGS)
@@ -5037,15 +5111,15 @@ void VM_infoget (prvm_prog_t *prog)
 {
        const char *info;
        const char *key;
-       char value[VM_STRINGTEMP_LENGTH];
+       char value[VM_TEMPSTRING_MAXSIZE];
 
        VM_SAFEPARMCOUNT(2, VM_infoget);
        info = PRVM_G_STRING(OFS_PARM0);
        key = PRVM_G_STRING(OFS_PARM1);
 
-       InfoString_GetValue(info, key, value, VM_STRINGTEMP_LENGTH);
+       InfoString_GetValue(info, key, value, VM_TEMPSTRING_MAXSIZE);
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, value);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, value, strlen(value));
 }
 
 //#228 float(string s1, string s2, float len) strncmp (FTE_STRINGS)
@@ -5088,11 +5162,13 @@ void VM_strncasecmp (prvm_prog_t *prog)
 void VM_crc16(prvm_prog_t *prog)
 {
        float insensitive;
-       char s[VM_STRINGTEMP_LENGTH];
+       char s[VM_TEMPSTRING_MAXSIZE];
+       size_t slen;
+
        VM_SAFEPARMCOUNTRANGE(2, 8, VM_crc16);
        insensitive = PRVM_G_FLOAT(OFS_PARM0);
-       VM_VarString(prog, 1, s, sizeof(s));
-       PRVM_G_FLOAT(OFS_RETURN) = (unsigned short) ((insensitive ? CRC_Block_CaseInsensitive : CRC_Block) ((unsigned char *) s, strlen(s)));
+       slen = VM_VarString(prog, 1, s, sizeof(s));
+       PRVM_G_FLOAT(OFS_RETURN) = (unsigned short) ((insensitive ? CRC_Block_CaseInsensitive : CRC_Block) ((unsigned char *) s, slen));
 }
 
 // #639 float(string digest, string data, ...) digest_hex
@@ -5104,15 +5180,14 @@ void VM_digest_hex(prvm_prog_t *prog)
        char outhex[65];
        int outlen;
 
-       char s[VM_STRINGTEMP_LENGTH];
-       int len;
+       char s[VM_TEMPSTRING_MAXSIZE];
+       size_t len;
 
        VM_SAFEPARMCOUNTRANGE(2, 8, VM_digest_hex);
        digest = PRVM_G_STRING(OFS_PARM0);
        if(!digest)
                digest = "";
-       VM_VarString(prog, 1, s, sizeof(s));
-       len = (int)strlen(s);
+       len = VM_VarString(prog, 1, s, sizeof(s));
 
        outlen = 0;
 
@@ -5137,8 +5212,8 @@ void VM_digest_hex(prvm_prog_t *prog)
                        outhex[2*i]   = hexmap[(out[i] >> 4) & 15];
                        outhex[2*i+1] = hexmap[(out[i] >> 0) & 15];
                }
-               outhex[2*i] = 0;
-               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, outhex);
+               outhex[2*i] = '\0';
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, outhex, 2*i);
        }
        else
                PRVM_G_INT(OFS_RETURN) = 0;
@@ -5164,7 +5239,7 @@ void VM_SetTraceGlobals(prvm_prog_t *prog, const trace_t *trace)
        PRVM_gameglobalfloat(trace_dpstartcontents) = trace->startsupercontents;
        PRVM_gameglobalfloat(trace_dphitcontents) = trace->hitsupercontents;
        PRVM_gameglobalfloat(trace_dphitq3surfaceflags) = trace->hitq3surfaceflags;
-       PRVM_gameglobalstring(trace_dphittexturename) = trace->hittexture ? PRVM_SetTempString(prog, trace->hittexture->name) : 0;
+       PRVM_gameglobalstring(trace_dphittexturename) = trace->hittexture ? PRVM_SetTempString(prog, trace->hittexture->name, strlen(trace->hittexture->name)) : 0;
 }
 
 void VM_ClearTraceGlobals(prvm_prog_t *prog)
@@ -5208,8 +5283,8 @@ void VM_Cmd_Reset(prvm_prog_t *prog)
 // does URI escaping on a string (replace evil stuff by %AB escapes)
 void VM_uri_escape (prvm_prog_t *prog)
 {
-       char src[VM_STRINGTEMP_LENGTH];
-       char dest[VM_STRINGTEMP_LENGTH];
+       char src[VM_TEMPSTRING_MAXSIZE];
+       char dest[VM_TEMPSTRING_MAXSIZE];
        char *p, *q;
        static const char *hex = "0123456789ABCDEF";
 
@@ -5232,17 +5307,17 @@ void VM_uri_escape (prvm_prog_t *prog)
                        *q++ = hex[ *(unsigned char *)p       & 0xF];
                }
        }
-       *q++ = 0;
+       *q = '\0';
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, dest);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, dest, q - dest);
 }
 
 // #510 string(string input, ...) uri_unescape (DP_QC_URI_ESCAPE)
 // does URI unescaping on a string (get back the evil stuff)
 void VM_uri_unescape (prvm_prog_t *prog)
 {
-       char src[VM_STRINGTEMP_LENGTH];
-       char dest[VM_STRINGTEMP_LENGTH];
+       char src[VM_TEMPSTRING_MAXSIZE];
+       char dest[VM_TEMPSTRING_MAXSIZE];
        char *p, *q;
        int hi, lo;
 
@@ -5279,9 +5354,9 @@ nohex:
                // otherwise:
                *q++ = *p++;
        }
-       *q++ = 0;
+       *q = '\0';
 
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, dest);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, dest, q - dest);
 }
 
 // #502 string(string filename) whichpack (DP_QC_WHICHPACK)
@@ -5294,7 +5369,7 @@ void VM_whichpack (prvm_prog_t *prog)
        fn = PRVM_G_STRING(OFS_PARM0);
        pack = FS_WhichPack(fn);
 
-       PRVM_G_INT(OFS_RETURN) = pack ? PRVM_SetTempString(prog, pack) : 0;
+       PRVM_G_INT(OFS_RETURN) = pack ? PRVM_SetTempString(prog, pack, strlen(pack)) : 0;
 }
 
 typedef struct
@@ -5332,11 +5407,11 @@ static void uri_to_string_callback(int status, size_t length_received, unsigned
        {
                if(length_received >= sizeof(handle->buffer))
                        length_received = sizeof(handle->buffer) - 1;
-               handle->buffer[length_received] = 0;
+               handle->buffer[length_received] = '\0';
 
                PRVM_G_FLOAT(OFS_PARM0) = handle->id;
                PRVM_G_FLOAT(OFS_PARM1) = status;
-               PRVM_G_INT(OFS_PARM2) = PRVM_SetTempString(prog, handle->buffer);
+               PRVM_G_INT(OFS_PARM2) = PRVM_SetTempString(prog, handle->buffer, length_received);
                prog->ExecuteProgram(prog, PRVM_allfunction(URI_Get_Callback), "QC function URI_Get_Callback is missing");
        }
 
@@ -5443,7 +5518,7 @@ void VM_uri_get (prvm_prog_t *prog)
                        // POST: we sign postdata \0 query string
                        size_t ll;
                        handle->sigdata = (char *)Z_Malloc(8192);
-                       strlcpy(handle->sigdata, "X-D0-Blind-ID-Detached-Signature: ", 8192);
+                       dp_strlcpy(handle->sigdata, "X-D0-Blind-ID-Detached-Signature: ", 8192);
                        l = strlen(handle->sigdata);
                        handle->siglen = Crypto_SignDataDetached(handle->postdata, handle->postlen + 1 + lq, postkeyid, handle->sigdata + l, 8192 - l);
                        if(!handle->siglen)
@@ -5463,7 +5538,7 @@ void VM_uri_get (prvm_prog_t *prog)
                        handle->sigdata[handle->siglen] = 0;
                }
 out1:
-               strlcpy(handle->posttype, posttype, sizeof(handle->posttype));
+               dp_strlcpy(handle->posttype, posttype, sizeof(handle->posttype));
                ret = Curl_Begin_ToMemory_POST(url, handle->sigdata, 0, handle->posttype, handle->postdata, handle->postlen, (unsigned char *) handle->buffer, sizeof(handle->buffer), uri_to_string_callback, handle);
        }
        else
@@ -5473,7 +5548,7 @@ out1:
                        // GET: we sign JUST the query string
                        size_t l, ll;
                        handle->sigdata = (char *)Z_Malloc(8192);
-                       strlcpy(handle->sigdata, "X-D0-Blind-ID-Detached-Signature: ", 8192);
+                       dp_strlcpy(handle->sigdata, "X-D0-Blind-ID-Detached-Signature: ", 8192);
                        l = strlen(handle->sigdata);
                        handle->siglen = Crypto_SignDataDetached(query_string, lq, postkeyid, handle->sigdata + l, 8192 - l);
                        if(!handle->siglen)
@@ -5516,6 +5591,7 @@ void VM_netaddress_resolve (prvm_prog_t *prog)
 {
        const char *ip;
        char normalized[128];
+       size_t normalized_len;
        int port;
        lhnetaddress_t addr;
 
@@ -5526,10 +5602,10 @@ void VM_netaddress_resolve (prvm_prog_t *prog)
        if(prog->argc > 1)
                port = (int) PRVM_G_FLOAT(OFS_PARM1);
 
-       if(LHNETADDRESS_FromString(&addr, ip, port) && LHNETADDRESS_ToString(&addr, normalized, sizeof(normalized), prog->argc > 1))
-               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, normalized);
+       if(LHNETADDRESS_FromString(&addr, ip, port) && (normalized_len = LHNETADDRESS_ToString(&addr, normalized, sizeof(normalized), prog->argc > 1)))
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, normalized, normalized_len);
        else
-               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "");
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "", 0);
 }
 
 //string(prvm_prog_t *prog) getextresponse = #624; // returns the next extResponse packet that was sent to this client
@@ -5544,7 +5620,7 @@ void VM_CL_getextresponse (prvm_prog_t *prog)
                int first;
                --cl_net_extresponse_count;
                first = (cl_net_extresponse_last + NET_EXTRESPONSE_MAX - cl_net_extresponse_count) % NET_EXTRESPONSE_MAX;
-               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cl_net_extresponse[first]);
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, cl_net_extresponse[first], strlen(cl_net_extresponse[first]));
        }
 }
 
@@ -5559,7 +5635,42 @@ void VM_SV_getextresponse (prvm_prog_t *prog)
                int first;
                --sv_net_extresponse_count;
                first = (sv_net_extresponse_last + NET_EXTRESPONSE_MAX - sv_net_extresponse_count) % NET_EXTRESPONSE_MAX;
-               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, sv_net_extresponse[first]);
+               PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, sv_net_extresponse[first], strlen(sv_net_extresponse[first]));
+       }
+}
+
+// DP_QC_NUDGEOUTOFSOLID
+// float(entity ent) nudgeoutofsolid = #567;
+void VM_nudgeoutofsolid(prvm_prog_t *prog)
+{
+       prvm_edict_t *ent;
+
+       VM_SAFEPARMCOUNTRANGE(1, 1, VM_nudgeoutofsolid);
+
+       ent = PRVM_G_EDICT(OFS_PARM0);
+       if (ent == prog->edicts)
+       {
+               VM_Warning(prog, "nudgeoutofsolid: can not modify world entity\n");
+               PRVM_G_FLOAT(OFS_RETURN) = 0;
+               return;
+       }
+       if (ent->free)
+       {
+               VM_Warning(prog, "nudgeoutofsolid: can not modify free entity\n");
+               PRVM_G_FLOAT(OFS_RETURN) = 0;
+               return;
+       }
+
+       PRVM_G_FLOAT(OFS_RETURN) = PHYS_NudgeOutOfSolid(prog, ent);
+
+       if (PRVM_G_FLOAT(OFS_RETURN) > 0)
+       {
+               if (prog == SVVM_prog)
+                       SV_LinkEdict(ent);
+               else if (prog == CLVM_prog)
+                       CL_LinkEdict(ent);
+               else
+                       Sys_Error("PHYS_NudgeOutOfSolid: cannot be called from %s VM\n", prog->name);
        }
 }
 
@@ -5977,9 +6088,10 @@ verbatim:
                                break;
                }
        }
+
 finished:
-       *o = 0;
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, outbuf);
+       *o = '\0';
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, outbuf, o - outbuf);
 }
 
 
@@ -6305,11 +6417,12 @@ void VM_getsurfacetexture(prvm_prog_t *prog)
 {
        model_t *model;
        msurface_t *surface;
+
        VM_SAFEPARMCOUNT(2, VM_getsurfacetexture);
        PRVM_G_INT(OFS_RETURN) = OFS_NULL;
        if (!(model = getmodel(prog, PRVM_G_EDICT(OFS_PARM0))) || !(surface = getsurface(model, (int)PRVM_G_FLOAT(OFS_PARM1))))
                return;
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, surface->texture->name);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, surface->texture->name, strlen(surface->texture->name));
 }
 //PF_getsurfacenearpoint, // #438 float(entity e, vector p) getsurfacenearpoint = #438;
 void VM_getsurfacenearpoint(prvm_prog_t *prog)
index a5555cde87db8ca68f0fb71380fcc4ada18f1842..292e8f556b7da7c0b1d4c84f2f447c1a6f63a5d2 100644 (file)
@@ -212,13 +212,14 @@ float     getserverlistindexforkey(string key)
 
 #define        VM_RETURN_EDICT(e)              (prog->globals.ip[OFS_RETURN] = PRVM_EDICT_TO_PROG(e))
 
-#define VM_STRINGTEMP_LENGTH MAX_INPUTLINE
+#define VM_TEMPSTRING_MAXSIZE MAX_INPUTLINE
 
 // general functions
 void VM_CheckEmptyString (prvm_prog_t *prog, const char *s);
-void VM_VarString(prvm_prog_t *prog, int first, char *out, int outlength);
-qbool PRVM_ConsoleCommand (prvm_prog_t *prog, const char *text, int *func, qbool preserve_self, int curself, double ptime, qbool prog_loaded, const char *error_message);
-prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, int flags, const char *format);
+/// Returns the length of the *out string excluding the \0 terminator.
+size_t VM_VarString(prvm_prog_t *prog, int first, char *out, size_t outsize);
+qbool PRVM_ConsoleCommand(prvm_prog_t *prog, const char *text, size_t textlen, int *func, qbool preserve_self, int curself, double ptime, const char *error_message);
+prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, unsigned flags, const char *format);
 void BufStr_Set(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer, int strindex, const char *str);
 void BufStr_Del(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer);
 void BufStr_Flush(prvm_prog_t *prog);
@@ -238,8 +239,7 @@ void VM_vectoangles (prvm_prog_t *prog);
 void VM_random (prvm_prog_t *prog);
 void VM_localsound(prvm_prog_t *prog);
 void VM_break (prvm_prog_t *prog);
-void VM_localcmd_local(prvm_prog_t *prog);
-void VM_localcmd_server(prvm_prog_t *prog);
+void VM_localcmd(prvm_prog_t *prog);
 void VM_cvar (prvm_prog_t *prog);
 void VM_cvar_string(prvm_prog_t *prog);
 void VM_cvar_type (prvm_prog_t *prog);
@@ -484,6 +484,7 @@ void VM_getsurfacetriangle(prvm_prog_t *prog);
 void VM_physics_enable(prvm_prog_t *prog);
 void VM_physics_addforce(prvm_prog_t *prog);
 void VM_physics_addtorque(prvm_prog_t *prog);
+void VM_nudgeoutofsolid(prvm_prog_t *prog);
 
 void VM_coverage(prvm_prog_t *prog);
 
index ea8392751e9760f2aff73c0881557e1f7c608557..8b847f7be41ebf21044b3061aea0a99c3177db5a 100644 (file)
@@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "quakedef.h"
 #include "progsvm.h"
 #include "csprogs.h"
+#include "prvm_cmds.h"
 
 prvm_prog_t prvm_prog_list[PRVM_PROG_MAX];
 
@@ -45,8 +46,11 @@ cvar_t prvm_breakpointdump = {CF_CLIENT | CF_SERVER, "prvm_breakpointdump", "0",
 cvar_t prvm_reuseedicts_startuptime = {CF_CLIENT | CF_SERVER, "prvm_reuseedicts_startuptime", "2", "allows immediate re-use of freed entity slots during start of new level (value in seconds)"};
 cvar_t prvm_reuseedicts_neverinsameframe = {CF_CLIENT | CF_SERVER, "prvm_reuseedicts_neverinsameframe", "1", "never allows re-use of freed entity slots during same frame"};
 cvar_t prvm_garbagecollection_enable = {CF_CLIENT | CF_SERVER, "prvm_garbagecollection_enable", "1", "automatically scan for and free resources that are not referenced by the code being executed in the VM"};
-cvar_t prvm_garbagecollection_notify = {CF_CLIENT | CF_SERVER, "prvm_garbagecollection_notify", "0", "print out a notification for each resource freed by garbage collection"};
-cvar_t prvm_garbagecollection_scan_limit = {CF_CLIENT | CF_SERVER, "prvm_garbagecollection_scan_limit", "10000", "scan this many fields or resources per frame to free up unreferenced resources"};
+cvar_t prvm_garbagecollection_notify = {CF_CLIENT | CF_SERVER, "prvm_garbagecollection_notify", "0", "print out a notification for each resource freed by garbage collection (set developer >= 1 to see these)"};
+/// At 50k in Xonotic with 8 bots scans take about: 24s server, 25s menu, 9s client.
+/// At 50k in Quake 1.5: 2.2s server, 0.14s client.
+/// At 50k impact on high FPS benchmarks is negligible, at 100k impact is low but measurable.
+cvar_t prvm_garbagecollection_scan_limit = {CF_CLIENT | CF_SERVER, "prvm_garbagecollection_scan_limit", "50000", "scan this many fields or resources per second to free up unreferenced resources"};
 cvar_t prvm_garbagecollection_strings = {CF_CLIENT | CF_SERVER, "prvm_garbagecollection_strings", "1", "automatically call strunzone() on strings that are not referenced"};
 cvar_t prvm_stringdebug = {CF_CLIENT | CF_SERVER, "prvm_stringdebug", "0", "Print debug and warning messages related to strings"};
 
@@ -220,8 +224,9 @@ const char *PRVM_AllocationOrigin(prvm_prog_t *prog)
        if(prog->leaktest_active)
        if(prog->depth > 0) // actually in QC code and not just parsing the entities block of a map/savegame
        {
-               buf = (char *)PRVM_Alloc(256);
-               PRVM_ShortStackTrace(prog, buf, 256);
+               // bones_was_here: this is the smallest 64 multiple that avoids truncation in Xonotic (was 256)
+               buf = (char *)PRVM_Alloc(448);
+               PRVM_ShortStackTrace(prog, buf, 448);
        }
        return buf;
 }
@@ -297,7 +302,11 @@ prvm_edict_t *PRVM_ED_Alloc(prvm_prog_t *prog)
 PRVM_ED_Free
 
 Marks the edict as free
+
 FIXME: walk all entities and NULL out references to this entity
+bones_was_here: do not want, that would break chains immediately!
+Currently chains aren't broken by removing an entity, at least with prvm_reuseedicts_neverinsameframe 1
+which is very handy and some QC code will depend on it.
 =================
 */
 void PRVM_ED_Free(prvm_prog_t *prog, prvm_edict_t *ed)
@@ -444,7 +453,7 @@ static char *PRVM_ValueString (prvm_prog_t *prog, etype_t type, prvm_eval_t *val
        switch (type)
        {
        case ev_string:
-               strlcpy (line, PRVM_GetString (prog, val->string), linelength);
+               dp_strlcpy (line, PRVM_GetString (prog, val->string), linelength);
                break;
        case ev_entity:
                n = val->edict;
@@ -551,7 +560,7 @@ char *PRVM_UglyValueString (prvm_prog_t *prog, etype_t type, prvm_eval_t *val, c
                if ((unsigned int)val->function < (unsigned int)prog->progs_numfunctions)
                {
                        f = prog->functions + val->function;
-                       strlcpy (line, PRVM_GetString (prog, f->s_name), linelength);
+                       dp_strlcpy (line, PRVM_GetString (prog, f->s_name), linelength);
                }
                else
                        dpsnprintf (line, linelength, "bad function %" PRVM_PRIi " (invalid!)", val->function);
@@ -693,10 +702,10 @@ void PRVM_ED_Print(prvm_prog_t *prog, prvm_edict_t *ed, const char *wildcard_fie
                        tempstring2[sizeof(tempstring2)-1] = 0;
                        name = tempstring2;
                }
-               strlcat(tempstring, name, sizeof(tempstring));
+               dp_strlcat(tempstring, name, sizeof(tempstring));
                for (l = strlen(name);l < 14;l++)
-                       strlcat(tempstring, " ", sizeof(tempstring));
-               strlcat(tempstring, " ", sizeof(tempstring));
+                       dp_strlcat(tempstring, " ", sizeof(tempstring));
+               dp_strlcat(tempstring, " ", sizeof(tempstring));
 
                name = PRVM_ValueString(prog, (etype_t)d->type, val, valuebuf, sizeof(valuebuf));
                if (strlen(name) > sizeof(tempstring2)-4)
@@ -706,8 +715,8 @@ void PRVM_ED_Print(prvm_prog_t *prog, prvm_edict_t *ed, const char *wildcard_fie
                        tempstring2[sizeof(tempstring2)-1] = 0;
                        name = tempstring2;
                }
-               strlcat(tempstring, name, sizeof(tempstring));
-               strlcat(tempstring, "\n", sizeof(tempstring));
+               dp_strlcat(tempstring, name, sizeof(tempstring));
+               dp_strlcat(tempstring, "\n", sizeof(tempstring));
                if (strlen(tempstring) >= sizeof(tempstring)/2)
                {
                        Con_Print(tempstring);
@@ -942,7 +951,7 @@ void PRVM_ED_ParseGlobals (prvm_prog_t *prog, const char *data)
                if (developer_entityparsing.integer)
                        Con_Printf("Key: \"%s\"", com_token);
 
-               strlcpy (keyname, com_token, sizeof(keyname));
+               dp_strlcpy (keyname, com_token, sizeof(keyname));
 
                // parse value
                if (!COM_ParseToken_Simple(&data, false, true, true))
@@ -1118,7 +1127,7 @@ static void PRVM_GameCommand(cmd_state_t *cmd, const char *whichprogs, const cha
                s = Cmd_Args(cmd);
 
                restorevm_tempstringsbuf_cursize = prog->tempstringsbuf.cursize;
-               PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, s ? s : "");
+               PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, s ? s : "", s ? strlen(s) : 0);
                prog->ExecuteProgram(prog, PRVM_allfunction(GameCommand), "QC function GameCommand is missing");
                prog->tempstringsbuf.cursize = restorevm_tempstringsbuf_cursize;
        }
@@ -1292,7 +1301,7 @@ const char *PRVM_ED_ParseEdict (prvm_prog_t *prog, const char *data, prvm_edict_
                // and allow them to be turned into vectors. (FIXME...)
                if (!strcmp(com_token, "angle"))
                {
-                       strlcpy (com_token, "angles", sizeof(com_token));
+                       dp_strlcpy (com_token, "angles", sizeof(com_token));
                        anglehack = true;
                }
                else
@@ -1300,9 +1309,9 @@ const char *PRVM_ED_ParseEdict (prvm_prog_t *prog, const char *data, prvm_edict_
 
                // FIXME: change light to _light to get rid of this hack
                if (!strcmp(com_token, "light"))
-                       strlcpy (com_token, "light_lev", sizeof(com_token));    // hack for single light def
+                       dp_strlcpy (com_token, "light_lev", sizeof(com_token)); // hack for single light def
 
-               strlcpy (keyname, com_token, sizeof(keyname));
+               dp_strlcpy (keyname, com_token, sizeof(keyname));
 
                // another hack to fix keynames with trailing spaces
                n = strlen(keyname);
@@ -1342,7 +1351,7 @@ const char *PRVM_ED_ParseEdict (prvm_prog_t *prog, const char *data, prvm_edict_
                if (anglehack)
                {
                        char    temp[32];
-                       strlcpy (temp, com_token, sizeof(temp));
+                       dp_strlcpy (temp, com_token, sizeof(temp));
                        dpsnprintf (com_token, sizeof(com_token), "0 %s 0", temp);
                }
 
@@ -1848,7 +1857,8 @@ static po_t *PRVM_PO_Load(const char *filename, const char *filename2, mempool_t
                                        break;
                                if((size_t)(q - p) >= (size_t) sizeof(inbuf))
                                        break;
-                               strlcpy(inbuf, p, q - p); // not - 1, because this adds a NUL
+                               memcpy(inbuf, p, q - p - 1);
+                               inbuf[q - p - 1] = '\0';
                                PRVM_PO_ParseString(decodedbuf + decodedpos, inbuf, sizeof(decodedbuf) - decodedpos);
                                decodedpos += strlen(decodedbuf + decodedpos);
                                if(*q == '\r')
@@ -1943,7 +1953,7 @@ static void PRVM_LoadLNO( prvm_prog_t *prog, const char *progname ) {
        char filename[512];
 
        FS_StripExtension( progname, filename, sizeof( filename ) );
-       strlcat( filename, ".lno", sizeof( filename ) );
+       dp_strlcat( filename, ".lno", sizeof( filename ) );
 
        lno = FS_LoadFile( filename, tempmempool, false, &filesize );
        if( !lno ) {
@@ -1966,12 +1976,12 @@ static void PRVM_LoadLNO( prvm_prog_t *prog, const char *progname ) {
        }
 
        header = (unsigned int *) lno;
-       if( header[ 0 ] == *(unsigned int *) "LNOF" &&
-               LittleLong( header[ 1 ] ) == 1 &&
-               (unsigned int)LittleLong( header[ 2 ] ) == (unsigned int)prog->progs_numglobaldefs &&
-               (unsigned int)LittleLong( header[ 3 ] ) == (unsigned int)prog->progs_numglobals &&
-               (unsigned int)LittleLong( header[ 4 ] ) == (unsigned int)prog->progs_numfielddefs &&
-               (unsigned int)LittleLong( header[ 5 ] ) == (unsigned int)prog->progs_numstatements )
+       if (memcmp(lno, "LNOF", 4) == 0
+       && LittleLong( header[ 1 ] ) == 1
+       && (unsigned int)LittleLong( header[ 2 ] ) == (unsigned int)prog->progs_numglobaldefs
+       && (unsigned int)LittleLong( header[ 3 ] ) == (unsigned int)prog->progs_numglobals
+       && (unsigned int)LittleLong( header[ 4 ] ) == (unsigned int)prog->progs_numfielddefs
+       && (unsigned int)LittleLong( header[ 5 ] ) == (unsigned int)prog->progs_numstatements)
        {
                prog->statement_linenums = (int *)Mem_Alloc(prog->progs_mempool, prog->progs_numstatements * sizeof( int ) );
                memcpy( prog->statement_linenums, header + 6, prog->progs_numstatements * sizeof( int ) );
@@ -1988,11 +1998,11 @@ static void PRVM_LoadLNO( prvm_prog_t *prog, const char *progname ) {
 
 /*
 ===============
-PRVM_LoadProgs
+PRVM_Prog_Load
 ===============
 */
 static void PRVM_UpdateBreakpoints(prvm_prog_t *prog);
-void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * data, fs_offset_t size, int numrequiredfunc, const char **required_func, int numrequiredfields, prvm_required_field_t *required_field, int numrequiredglobals, prvm_required_field_t *required_global)
+void PRVM_Prog_Load(prvm_prog_t *prog, const char *filename, unsigned char *data, fs_offset_t size, void CheckRequiredFuncs(prvm_prog_t *prog, const char *filename), int numrequiredfields, prvm_required_field_t *required_field, int numrequiredglobals, prvm_required_field_t *required_global)
 {
        int i;
        dprograms_t *dprograms;
@@ -2026,7 +2036,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
        int structtype = 0;
 
        if (prog->loaded)
-               prog->error_cmd("PRVM_LoadProgs: there is already a %s program loaded!", prog->name );
+               prog->error_cmd("%s: there is already a %s program loaded!", __func__, prog->name);
 
        Host_LockSession(); // all progs can use the session cvar
        Crypto_LoadKeys(); // all progs might use the keys at init time
@@ -2039,7 +2049,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
        else
                dprograms = (dprograms_t *)FS_LoadFile (filename, prog->progs_mempool, false, &filesize);
        if (dprograms == NULL || filesize < (fs_offset_t)sizeof(dprograms_t))
-               prog->error_cmd("PRVM_LoadProgs: couldn't load %s for %s", filename, prog->name);
+               prog->error_cmd("%s: couldn't load \"%s\" for %s", __func__, filename, prog->name);
        // TODO bounds check header fields (e.g. numstatements), they must never go behind end of file
 
        prog->profiletime = Sys_DirtyTime();
@@ -2132,7 +2142,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                prog->functions[i].locals = LittleLong(infunctions[i].locals);
                memcpy(prog->functions[i].parm_size, infunctions[i].parm_size, sizeof(infunctions[i].parm_size));
                if(prog->functions[i].first_statement >= prog->numstatements)
-                       prog->error_cmd("PRVM_LoadProgs: out of bounds function statement (function %d) in %s", i, prog->name);
+                       prog->error_cmd("%s: out of bounds function statement (function %d) in %s", __func__, i, prog->name);
                // TODO bounds check parm_start, s_name, s_file, numparms, locals, parm_size
        }
 
@@ -2180,7 +2190,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                {
                        prog->fielddefs[i].type = LittleLong(infielddefs32[i].type);
                        if (prog->fielddefs[i].type & DEF_SAVEGLOBAL)
-                               prog->error_cmd("PRVM_LoadProgs: prog->fielddefs[i].type & DEF_SAVEGLOBAL in %s", prog->name);
+                               prog->error_cmd("%s: prog->fielddefs[i].type & DEF_SAVEGLOBAL in %s", __func__, prog->name);
                        prog->fielddefs[i].ofs = LittleLong(infielddefs32[i].ofs);
                        prog->fielddefs[i].s_name = LittleLong(infielddefs32[i].s_name);
                        // TODO bounds check ofs, s_name
@@ -2191,7 +2201,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                {
                        prog->fielddefs[i].type = (unsigned short)LittleShort(infielddefs16[i].type);
                        if (prog->fielddefs[i].type & DEF_SAVEGLOBAL)
-                               prog->error_cmd("PRVM_LoadProgs: prog->fielddefs[i].type & DEF_SAVEGLOBAL in %s", prog->name);
+                               prog->error_cmd("%s: prog->fielddefs[i].type & DEF_SAVEGLOBAL in %s", __func__, prog->name);
                        prog->fielddefs[i].ofs = (unsigned short)LittleShort(infielddefs16[i].ofs);
                        prog->fielddefs[i].s_name = LittleLong(infielddefs16[i].s_name);
                        // TODO bounds check ofs, s_name
@@ -2263,7 +2273,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                case OP_IFNOT:
                        b = (short)b;
                        if (a >= prog->progs_numglobals || b + i < 0 || b + i >= prog->progs_numstatements)
-                               prog->error_cmd("PRVM_LoadProgs: out of bounds IF/IFNOT (statement %d) in %s", i, prog->name);
+                               prog->error_cmd("%s: out of bounds IF/IFNOT (statement %d) in %s", __func__, i, prog->name);
                        prog->statements[i].op = op;
                        prog->statements[i].operand[0] = remapglobal(a);
                        prog->statements[i].operand[1] = -1;
@@ -2273,7 +2283,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                case OP_GOTO:
                        a = (short)a;
                        if (a + i < 0 || a + i >= prog->progs_numstatements)
-                               prog->error_cmd("PRVM_LoadProgs: out of bounds GOTO (statement %d) in %s", i, prog->name);
+                               prog->error_cmd("%s: out of bounds GOTO (statement %d) in %s", __func__, i, prog->name);
                        prog->statements[i].op = op;
                        prog->statements[i].operand[0] = -1;
                        prog->statements[i].operand[1] = -1;
@@ -2281,7 +2291,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                        prog->statements[i].jumpabsolute = i + a;
                        break;
                default:
-                       Con_DPrintf("PRVM_LoadProgs: unknown opcode %d at statement %d in %s\n", (int)op, i, prog->name);
+                       Con_DPrintf("%s: unknown opcode %d at statement %d in %s\n", __func__, (int)op, i, prog->name);
 
                        //make sure its something well defined.
                        prog->statements[i].op = OP_BOUNDCHECK;
@@ -2394,7 +2404,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                case OP_LOAD_FNC:
                case OP_LOAD_V:
                        if (a >= prog->progs_numglobals || b >= prog->progs_numglobals || c >= prog->progs_numglobals)
-                               prog->error_cmd("PRVM_LoadProgs: out of bounds global index (statement %d)", i);
+                               prog->error_cmd("%s: out of bounds global index (statement %d)", __func__, i);
                        prog->statements[i].op = op;
                        prog->statements[i].operand[0] = remapglobal(a);
                        prog->statements[i].operand[1] = remapglobal(b);
@@ -2408,7 +2418,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                case OP_NOT_FNC:
                case OP_NOT_ENT:
                        if (a >= prog->progs_numglobals || c >= prog->progs_numglobals)
-                               prog->error_cmd("PRVM_LoadProgs: out of bounds global index (statement %d) in %s", i, prog->name);
+                               prog->error_cmd("%s: out of bounds global index (statement %d) in %s", __func__, i, prog->name);
                        prog->statements[i].op = op;
                        prog->statements[i].operand[0] = remapglobal(a);
                        prog->statements[i].operand[1] = -1;
@@ -2422,7 +2432,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                case OP_STOREP_S:
                case OP_STOREP_FNC:
                        if (c)  //Spike -- DP is alergic to pointers in QC. Try to avoid too many nasty surprises.
-                               Con_DPrintf("PRVM_LoadProgs: storep-with-offset is not permitted in %s\n", prog->name);
+                               Con_DPrintf("%s: storep-with-offset is not permitted in %s\n", __func__, prog->name);
                        //fallthrough
                case OP_STORE_F:
                case OP_STORE_ENT:
@@ -2433,7 +2443,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                case OP_STOREP_V:
                case OP_STORE_V:
                        if (a >= prog->progs_numglobals || b >= prog->progs_numglobals)
-                               prog->error_cmd("PRVM_LoadProgs: out of bounds global index (statement %d) in %s", i, prog->name);
+                               prog->error_cmd("%s: out of bounds global index (statement %d) in %s", __func__, i, prog->name);
                        prog->statements[i].op = op;
                        prog->statements[i].operand[0] = remapglobal(a);
                        prog->statements[i].operand[1] = remapglobal(b);
@@ -2458,9 +2468,9 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                case OP_DONE:
                case OP_RETURN:
                        if ( a >= prog->progs_numglobals)
-                               prog->error_cmd("PRVM_LoadProgs: out of bounds global index (statement %d) in %s", i, prog->name);
+                               prog->error_cmd("%s: out of bounds global index (statement %d) in %s", __func__, i, prog->name);
                        if (b || c)     //Spike -- added this check just as a diagnostic...
-                               Con_DPrintf("PRVM_LoadProgs: unexpected offset on call opcode in %s. Hexen2 format is not supported\n", prog->name);
+                               Con_DPrintf("%s: unexpected offset on call opcode in %s. Hexen2 format is not supported\n", __func__, prog->name);
                        prog->statements[i].op = op;
                        prog->statements[i].operand[0] = remapglobal(a);
                        prog->statements[i].operand[1] = -1;
@@ -2471,7 +2481,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
        }
        if(prog->numstatements < 1)
        {
-               prog->error_cmd("PRVM_LoadProgs: empty program in %s", prog->name);
+               prog->error_cmd("%s: empty program in %s", __func__, prog->name);
        }
        else switch(prog->statements[prog->numstatements - 1].op)
        {
@@ -2480,7 +2490,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                case OP_DONE:
                        break;
                default:
-                       prog->error_cmd("PRVM_LoadProgs: program may fall off the edge (does not end with RETURN, GOTO or DONE) in %s", prog->name);
+                       prog->error_cmd("%s: program may fall off the edge (does not end with RETURN, GOTO or DONE) in %s", __func__, prog->name);
                        break;
        }
 
@@ -2489,10 +2499,9 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                Mem_Free(dprograms);
        dprograms = NULL;
 
-       // check required functions
-       for(i=0 ; i < numrequiredfunc ; i++)
-               if(PRVM_ED_FindFunction(prog, required_func[i]) == 0)
-                       prog->error_cmd("%s: %s not found in %s",prog->name, required_func[i], filename);
+       prog->flag = 0;
+       // expected to not return (call prog->error_cmd) if checks fail
+       CheckRequiredFuncs(prog, filename);
 
        PRVM_LoadLNO(prog, filename);
 
@@ -2588,14 +2597,14 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                {
                        prvm_eval_t *val = PRVM_GLOBALFIELDVALUE(prog->globaldefs[i].ofs);
                        cvar = Cvar_FindVar(prog->console_cmd->cvars, name + 9, prog->console_cmd->cvars_flagsmask);
-                       //Con_Printf("PRVM_LoadProgs: autocvar global %s in %s, processing...\n", name, prog->name);
+                       //Con_Printf("%s: autocvar global %s in %s, processing...\n", __func__, name, prog->name);
                        if(!cvar)
                        {
                                const char *value;
                                char buf[128];
                                int prec[3];
                                float f;
-                               Con_DPrintf("PRVM_LoadProgs: no cvar for autocvar global %s in %s, creating...\n", name, prog->name);
+                               Con_DPrintf("%s: no cvar for autocvar global %s in %s, creating...\n", __func__, name, prog->name);
                                switch(prog->globaldefs[i].type & ~DEF_SAVEGLOBAL)
                                {
                                        case ev_float:
@@ -2634,7 +2643,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                                                value = PRVM_GetString(prog, val->string);
                                                break;
                                        default:
-                                               Con_Printf("PRVM_LoadProgs: invalid type of autocvar global %s in %s\n", name, prog->name);
+                                               Con_Printf("%s: invalid type of autocvar global %s in %s\n", __func__, name, prog->name);
                                                goto fail;
                                }
                                cvar = Cvar_Get(prog->console_cmd->cvars, name + 9, value, prog->console_cmd->cvars_flagsmask, NULL);
@@ -2644,7 +2653,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                                        cvar->globaldefindex_stringno[prog - prvm_prog_list] = val->string;
                                }
                                if(!cvar)
-                                       prog->error_cmd("PRVM_LoadProgs: could not create cvar for autocvar global %s in %s", name, prog->name);
+                                       prog->error_cmd("%s: could not create cvar for autocvar global %s in %s", __func__, name, prog->name);
                                cvar->globaldefindex[prog - prvm_prog_list] = i;
                        }
                        else if((cvar->flags & CF_PRIVATE) == 0)
@@ -2678,13 +2687,13 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da
                                                cvar->globaldefindex_stringno[prog - prvm_prog_list] = val->string;
                                                break;
                                        default:
-                                               Con_Printf("PRVM_LoadProgs: invalid type of autocvar global %s in %s\n", name, prog->name);
+                                               Con_Printf("%s: invalid type of autocvar global %s in %s\n", __func__, name, prog->name);
                                                goto fail;
                                }
                                cvar->globaldefindex[prog - prvm_prog_list] = i;
                        }
                        else
-                               Con_Printf("PRVM_LoadProgs: private cvar for autocvar global %s in %s\n", name, prog->name);
+                               Con_Printf("%s: private cvar for autocvar global %s in %s\n", __func__, name, prog->name);
                }
 fail:
                ;
@@ -2696,8 +2705,6 @@ fail:
 
        // set flags & mdef_ts in prog
 
-       prog->flag = 0;
-
        PRVM_FindOffsets(prog);
 
        prog->init_cmd(prog);
@@ -2778,32 +2785,32 @@ static void PRVM_Fields_f(cmd_state_t *cmd)
                switch(d->type & ~DEF_SAVEGLOBAL)
                {
                case ev_string:
-                       strlcat(tempstring, "string   ", sizeof(tempstring));
+                       dp_strlcat(tempstring, "string   ", sizeof(tempstring));
                        break;
                case ev_entity:
-                       strlcat(tempstring, "entity   ", sizeof(tempstring));
+                       dp_strlcat(tempstring, "entity   ", sizeof(tempstring));
                        break;
                case ev_function:
-                       strlcat(tempstring, "function ", sizeof(tempstring));
+                       dp_strlcat(tempstring, "function ", sizeof(tempstring));
                        break;
                case ev_field:
-                       strlcat(tempstring, "field    ", sizeof(tempstring));
+                       dp_strlcat(tempstring, "field    ", sizeof(tempstring));
                        break;
                case ev_void:
-                       strlcat(tempstring, "void     ", sizeof(tempstring));
+                       dp_strlcat(tempstring, "void     ", sizeof(tempstring));
                        break;
                case ev_float:
-                       strlcat(tempstring, "float    ", sizeof(tempstring));
+                       dp_strlcat(tempstring, "float    ", sizeof(tempstring));
                        break;
                case ev_vector:
-                       strlcat(tempstring, "vector   ", sizeof(tempstring));
+                       dp_strlcat(tempstring, "vector   ", sizeof(tempstring));
                        break;
                case ev_pointer:
-                       strlcat(tempstring, "pointer  ", sizeof(tempstring));
+                       dp_strlcat(tempstring, "pointer  ", sizeof(tempstring));
                        break;
                default:
                        dpsnprintf (tempstring2, sizeof(tempstring2), "bad type %i ", d->type & ~DEF_SAVEGLOBAL);
-                       strlcat(tempstring, tempstring2, sizeof(tempstring));
+                       dp_strlcat(tempstring, tempstring2, sizeof(tempstring));
                        break;
                }
                if (strlen(name) > sizeof(tempstring2)-4)
@@ -2813,12 +2820,12 @@ static void PRVM_Fields_f(cmd_state_t *cmd)
                        tempstring2[sizeof(tempstring2)-1] = 0;
                        name = tempstring2;
                }
-               strlcat(tempstring, name, sizeof(tempstring));
+               dp_strlcat(tempstring, name, sizeof(tempstring));
                for (j = (int)strlen(name);j < 25;j++)
-                       strlcat(tempstring, " ", sizeof(tempstring));
+                       dp_strlcat(tempstring, " ", sizeof(tempstring));
                dpsnprintf(tempstring2, sizeof(tempstring2), "%5d", counts[i]);
-               strlcat(tempstring, tempstring2, sizeof(tempstring));
-               strlcat(tempstring, "\n", sizeof(tempstring));
+               dp_strlcat(tempstring, tempstring2, sizeof(tempstring));
+               dp_strlcat(tempstring, "\n", sizeof(tempstring));
                if (strlen(tempstring) >= sizeof(tempstring)/2)
                {
                        Con_Print(tempstring);
@@ -3069,7 +3076,7 @@ static void PRVM_Breakpoint_f(cmd_state_t *cmd)
 
        {
                debug_data_t *debug = &debug_data[prog - prvm_prog_list];
-               strlcpy(debug->break_statement, Cmd_Argv(cmd, 2), sizeof(debug->break_statement));
+               dp_strlcpy(debug->break_statement, Cmd_Argv(cmd, 2), sizeof(debug->break_statement));
        }
        PRVM_UpdateBreakpoints(prog);
 }
@@ -3098,7 +3105,7 @@ static void PRVM_GlobalWatchpoint_f(cmd_state_t *cmd)
 
        {
                debug_data_t *debug = &debug_data[prog - prvm_prog_list];
-               strlcpy(debug->watch_global, Cmd_Argv(cmd, 2), sizeof(debug->watch_global));
+               dp_strlcpy(debug->watch_global, Cmd_Argv(cmd, 2), sizeof(debug->watch_global));
        }
        PRVM_UpdateBreakpoints(prog);
 }
@@ -3128,7 +3135,7 @@ static void PRVM_EdictWatchpoint_f(cmd_state_t *cmd)
        {
                debug_data_t *debug = &debug_data[prog - prvm_prog_list];
                debug->watch_edict = atoi(Cmd_Argv(cmd, 2));
-               strlcpy(debug->watch_field, Cmd_Argv(cmd, 3), sizeof(debug->watch_field));
+               dp_strlcpy(debug->watch_field, Cmd_Argv(cmd, 3), sizeof(debug->watch_field));
        }
        PRVM_UpdateBreakpoints(prog);
 }
@@ -3140,6 +3147,8 @@ PRVM_Init
 */
 void PRVM_Init (void)
 {
+       unsigned int i;
+
        Cmd_AddCommand(CF_SHARED, "prvm_edict", PRVM_ED_PrintEdict_f, "print all data about an entity number in the selected VM (server, client, menu)");
        Cmd_AddCommand(CF_SHARED, "prvm_edicts", PRVM_ED_PrintEdicts_f, "prints all data about all entities in the selected VM (server, client, menu)");
        Cmd_AddCommand(CF_SHARED, "prvm_edictcount", PRVM_ED_Count_f, "prints number of active entities in the selected VM (server, client, menu)");
@@ -3184,6 +3193,18 @@ void PRVM_Init (void)
        prvm_runawaycheck = !Sys_CheckParm("-norunaway");
 
        //VM_Cmd_Init();
+
+       // LadyHavoc: report supported extensions
+       Con_DPrintf("\nQuakeC extensions for server and client:");
+       for (i = 0; vm_sv_extensions[i]; i++)
+               Con_DPrintf(" %s", vm_sv_extensions[i]);
+       Con_DPrintf("\n");
+#ifdef CONFIG_MENU
+       Con_DPrintf("\nQuakeC extensions for menu:");
+       for (i = 0; vm_m_extensions[i]; i++)
+               Con_DPrintf(" %s", vm_m_extensions[i]);
+       Con_DPrintf("\n");
+#endif
 }
 
 /*
@@ -3347,27 +3368,27 @@ int PRVM_SetEngineString(prvm_prog_t *prog, const char *s)
 //  restores it on return, so multiple recursive calls can share the same
 //  buffer)
 // the buffer size is automatically grown as needed
-
-int PRVM_SetTempString(prvm_prog_t *prog, const char *s)
+int PRVM_SetTempString(prvm_prog_t *prog, const char *s, size_t slen)
 {
-       int size;
+       size_t size;
        char *t;
-       if (!s)
+
+       if (!s || slen >= VM_TEMPSTRING_MAXSIZE)
                return 0;
-       size = (int)strlen(s) + 1;
+       size = slen + 1;
        if (developer_insane.integer)
-               Con_DPrintf("PRVM_SetTempString: cursize %i, size %i\n", prog->tempstringsbuf.cursize, size);
-       if (prog->tempstringsbuf.maxsize < prog->tempstringsbuf.cursize + size)
+               Con_DPrintf("PRVM_SetTempString %s: cursize %i, new tempstring size %lu\n", prog->name, prog->tempstringsbuf.cursize, (unsigned long)size);
+       if ((size_t)prog->tempstringsbuf.maxsize < prog->tempstringsbuf.cursize + size)
        {
                sizebuf_t old = prog->tempstringsbuf;
                if (prog->tempstringsbuf.cursize + size >= 1<<28)
-                       prog->error_cmd("PRVM_SetTempString: ran out of tempstring memory!  (refusing to grow tempstring buffer over 256MB, cursize %i, size %i)\n", prog->tempstringsbuf.cursize, size);
+                       prog->error_cmd("PRVM_SetTempString %s: ran out of tempstring memory!  (refusing to grow tempstring buffer over 256MB, cursize %i, new tempstring size %lu)\n", prog->name, prog->tempstringsbuf.cursize, (unsigned long)size);
                prog->tempstringsbuf.maxsize = max(prog->tempstringsbuf.maxsize, 65536);
-               while (prog->tempstringsbuf.maxsize < prog->tempstringsbuf.cursize + size)
+               while ((size_t)prog->tempstringsbuf.maxsize < prog->tempstringsbuf.cursize + size)
                        prog->tempstringsbuf.maxsize *= 2;
                if (prog->tempstringsbuf.maxsize != old.maxsize || prog->tempstringsbuf.data == NULL)
                {
-                       Con_DPrintf("PRVM_SetTempString: enlarging tempstrings buffer (%iKB -> %iKB)\n", old.maxsize/1024, prog->tempstringsbuf.maxsize/1024);
+                       Con_DPrintf("PRVM_SetTempString %s: enlarging tempstrings buffer (%iKB -> %iKB)\n", prog->name, old.maxsize/1024, prog->tempstringsbuf.maxsize/1024);
                        prog->tempstringsbuf.data = (unsigned char *) Mem_Alloc(prog->progs_mempool, prog->tempstringsbuf.maxsize);
                        if (old.data)
                        {
@@ -3408,16 +3429,16 @@ int PRVM_AllocString(prvm_prog_t *prog, size_t bufferlength, char **pointer)
 void PRVM_FreeString(prvm_prog_t *prog, int num)
 {
        if (num == 0)
-               prog->error_cmd("PRVM_FreeString: attempt to free a NULL string");
+               prog->error_cmd("PRVM_FreeString %s: attempt to free a NULL string", prog->name);
        else if (num >= 0 && num < prog->stringssize)
-               prog->error_cmd("PRVM_FreeString: attempt to free a constant string");
+               prog->error_cmd("PRVM_FreeString %s: attempt to free a constant string", prog->name);
        else if (num >= PRVM_KNOWNSTRINGBASE && num < PRVM_KNOWNSTRINGBASE + prog->numknownstrings)
        {
                num = num - PRVM_KNOWNSTRINGBASE;
                if (!prog->knownstrings[num])
-                       prog->error_cmd("PRVM_FreeString: attempt to free a non-existent or already freed string");
+                       prog->error_cmd("PRVM_FreeString %s: attempt to free a non-existent or already freed string", prog->name);
                if (!prog->knownstrings_flags[num])
-                       prog->error_cmd("PRVM_FreeString: attempt to free a string owned by the engine");
+                       prog->error_cmd("PRVM_FreeString %s: attempt to free a string owned by the engine", prog->name);
                PRVM_Free((char *)prog->knownstrings[num]);
                if(prog->leaktest_active)
                        if(prog->knownstrings_origin[num])
@@ -3427,7 +3448,7 @@ void PRVM_FreeString(prvm_prog_t *prog, int num)
                prog->firstfreeknownstring = min(prog->firstfreeknownstring, num);
        }
        else
-               prog->error_cmd("PRVM_FreeString: invalid string offset %i", num);
+               prog->error_cmd("PRVM_FreeString %s: invalid string offset %i", prog->name, num);
 }
 
 static qbool PRVM_IsStringReferenced(prvm_prog_t *prog, string_t string)
@@ -3683,7 +3704,7 @@ void PRVM_LeakTest(prvm_prog_t *prog)
 
 void PRVM_GarbageCollection(prvm_prog_t *prog)
 {
-       int limit = prvm_garbagecollection_scan_limit.integer;
+       int limit = prvm_garbagecollection_scan_limit.integer * (prog == SVVM_prog ? sv.frametime : cl.realframetime);
        prvm_prog_garbagecollection_state_t *gc = &prog->gc;
        if (!prvm_garbagecollection_enable.integer)
                return;
@@ -3802,5 +3823,6 @@ void PRVM_GarbageCollection(prvm_prog_t *prog)
        case PRVM_GC_RESET:
        default:
                memset(gc, 0, sizeof(*gc));
+//             Con_Printf("%s%s GC: reset @ %f frametime %f scan_limit per frame %i\n", prog == SVVM_prog ? "^6" : "^5", prog->name, host.realtime, prog == SVVM_prog ? sv.frametime : cl.realframetime, limit);
        }
 }
index fd0ff40b9f5fe802adea919a93cc0e288c68a419..d29aa7f559f7c68d44c382d53ce8eedbab0672c4 100644 (file)
@@ -431,17 +431,19 @@ void PRVM_StackTrace (prvm_prog_t *prog)
 
 void PRVM_ShortStackTrace(prvm_prog_t *prog, char *buf, size_t bufsize)
 {
-       mfunction_t     *f;
-       int                     i;
+       mfunction_t *f;
+       int i;
        char vabuf[1024];
+       char *p;
 
        if(prog)
        {
-               dpsnprintf(buf, bufsize, "(%s) ", prog->name);
+               i = dpsnprintf(buf, bufsize, "(%s) ", prog->name);
+               p = buf + max(0, i);
        }
        else
        {
-               strlcpy(buf, "<NO PROG>", bufsize);
+               dp_strlcpy(buf, "<NO PROG>", bufsize);
                return;
        }
 
@@ -450,13 +452,14 @@ void PRVM_ShortStackTrace(prvm_prog_t *prog, char *buf, size_t bufsize)
        for (i = prog->depth;i > 0;i--)
        {
                f = prog->stack[i].f;
-
-               if(strlcat(buf,
+               p = dp_stpecpy(
+                       p,
+                       buf + bufsize,
                        f
                                ? va(vabuf, sizeof(vabuf), "%s:%s(%i) ", PRVM_GetString(prog, f->s_file), PRVM_GetString(prog, f->s_name), prog->stack[i].s - f->first_statement)
-                               : "<NULL> ",
-                       bufsize
-               ) >= bufsize)
+                               : "<NULL> "
+                       );
+               if (p == buf + bufsize)
                        break;
        }
 }
@@ -712,26 +715,30 @@ void PRVM_PrintState(prvm_prog_t *prog, int stack_index)
 }
 
 extern cvar_t prvm_errordump;
-void PRVM_Crash(prvm_prog_t *prog)
+void PRVM_Crash(void)
 {
+       prvm_prog_t *prog;
        char vabuf[1024];
+       int i;
 
-       cl.csqc_loaded = false;
-
-       if (prog == NULL)
-               return;
-       if (!prog->loaded)
-               return;
+       // determine which program crashed
+       for (i = 0; i < PRVM_PROG_MAX; ++i)
+               if (PRVM_GetProg(i)->loaded && PRVM_GetProg(i)->depth > 0)
+                       break;
+       if (i >= PRVM_PROG_MAX)
+               return; // none of them crashed
+       prog = PRVM_GetProg(i);
 
-       PRVM_serverfunction(SV_Shutdown) = 0; // don't call SV_Shutdown on crash
+       Con_Printf("QuakeC crash report for %s:\n", prog->name);
+       PRVM_PrintState(prog, 0);
 
-       if( prog->depth > 0 )
-       {
-               Con_Printf("QuakeC crash report for %s:\n", prog->name);
-               PRVM_PrintState(prog, 0);
-       }
+       // don't call graceful shutdown on crash
+       if (prog == SVVM_prog)
+               PRVM_serverfunction(SV_Shutdown) = 0;
+       else if (prog == CLVM_prog)
+               PRVM_clientfunction(CSQC_Shutdown) = 0;
 
-       if(prvm_errordump.integer)
+       if(prvm_errordump.integer && (prog == SVVM_prog || prog == CLVM_prog))
        {
                // make a savegame
                SV_Savegame_to(prog, va(vabuf, sizeof(vabuf), "crash-%s.dmp", prog->name));
@@ -740,12 +747,6 @@ void PRVM_Crash(prvm_prog_t *prog)
        // dump the stack so host_error can shutdown functions
        prog->depth = 0;
        prog->localstack_used = 0;
-
-       // delete all tempstrings (FIXME: is this safe in VM->engine->VM recursion?)
-       prog->tempstringsbuf.cursize = 0;
-
-       // reset the prog pointer
-       prog = NULL;
 }
 
 /*
@@ -1023,7 +1024,7 @@ cleanup:
        if (prog == SVVM_prog)
                SV_FlushBroadcastMessages();
 }
-#endif
+#endif // CONFIG_MENU
 
 /*
 ====================
@@ -1132,7 +1133,7 @@ cleanup:
        if (prog == SVVM_prog)
                SV_FlushBroadcastMessages();
 }
-#endif
+#endif // PROFILING
 
 /*
 ====================
index d9331426cf6e11ee873bf8ab3f34af3f19d6270e..a386aa67b673528186be7ab828a7c6f44738caa3 100644 (file)
@@ -377,11 +377,8 @@ int i;
                                }
                                else
                                {
-                                       if (developer.integer)
-                                       {
-                                               PRE_ERROR();
-                                               VM_Warning(prog, "Attempted division by zero in %s\n", prog->name );
-                                       }
+                                       PRE_ERROR();
+                                       VM_Warning(prog, "Attempted division of %f by zero\n", OPA->_float);
                                        OPC->_float = 0.0f;
                                }
                                DISPATCH_OPCODE();
@@ -492,7 +489,7 @@ int i;
                                        if ((prvm_uint_t)OPB->_int < cached_entityfields && !cached_allowworldwrites)
                                        {
                                                PRE_ERROR();
-                                               VM_Warning(prog, "Attempted assignment to NULL entity field .%s (%i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name);
+                                               VM_Warning(prog, "Attempted assignment to world.%s (edictnum 0 field %i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name);
                                        }
                                }
                                ptr = (prvm_eval_t *)(cached_edictsfields + OPB->_int);
@@ -510,7 +507,7 @@ int i;
                                        if ((prvm_uint_t)OPB->_int < cached_entityfields && !cached_allowworldwrites)
                                        {
                                                PRE_ERROR();
-                                               VM_Warning(prog, "Attempted assignment to NULL entity field .%s (%i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name);
+                                               VM_Warning(prog, "Attempted assignment to world.%s (edictnum 0 field %i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name);
                                        }
                                }
                                // refresh the garbage collection on the string - this guards
@@ -534,7 +531,7 @@ int i;
                                        if ((prvm_uint_t)OPB->_int < cached_entityfields && !cached_allowworldwrites)
                                        {
                                                PRE_ERROR();
-                                               VM_Warning(prog, "Attempted assignment to NULL entity field .%s (%i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name);
+                                               VM_Warning(prog, "Attempted assignment to world.%s (edictnum 0 field %i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name);
                                        }
                                }
                                ptr = (prvm_eval_t *)(cached_edictsfields + OPB->_int);
@@ -560,7 +557,7 @@ int i;
                                if (OPA->edict == 0 && !cached_allowworldwrites)
                                {
                                        PRE_ERROR();
-                                       prog->error_cmd("Forbidden assignment to NULL entity in %s", prog->name);
+                                       prog->error_cmd("Forbidden assignment to world (edictnum 0) in %s", prog->name);
                                        goto cleanup;
                                }
 #endif
index 97a2defbcc3d5a0a5fbcd3caef342d97545f9cbd..aea8da3e9f0720a1396d4cf1761888860e186eb2 100644 (file)
@@ -94,6 +94,8 @@ PRVM_DECLARE_clientfunction(CSQC_Parse_StuffCmd)
 PRVM_DECLARE_clientfunction(CSQC_Parse_TempEntity)
 PRVM_DECLARE_clientfunction(CSQC_Shutdown)
 PRVM_DECLARE_clientfunction(CSQC_UpdateView)
+PRVM_DECLARE_clientfunction(CSQC_DrawHud)
+PRVM_DECLARE_clientfunction(CSQC_DrawScores)
 PRVM_DECLARE_clientfunction(GameCommand)
 PRVM_DECLARE_clientfunction(URI_Get_Callback)
 PRVM_DECLARE_clientglobaledict(other)
@@ -416,6 +418,8 @@ PRVM_DECLARE_function(CSQC_Parse_StuffCmd)
 PRVM_DECLARE_function(CSQC_Parse_TempEntity)
 PRVM_DECLARE_function(CSQC_Shutdown)
 PRVM_DECLARE_function(CSQC_UpdateView)
+PRVM_DECLARE_function(CSQC_DrawHud)
+PRVM_DECLARE_function(CSQC_DrawScores)
 PRVM_DECLARE_function(ClientConnect)
 PRVM_DECLARE_function(ClientDisconnect)
 PRVM_DECLARE_function(ClientKill)
diff --git a/qdefs.h b/qdefs.h
index 9371f06eecc703be1efc0afb15305e2ffcf729f8..a79230db806274eecef1399a97b923f3ee5f0e78 100644 (file)
--- a/qdefs.h
+++ b/qdefs.h
@@ -91,7 +91,7 @@
 #define SERVERLIST_ANDMASKCOUNT                5
 #define SERVERLIST_ORMASKCOUNT         5
 #else
-#define        MAX_INPUTLINE                   16384 ///< maximum length of console commandline, QuakeC strings, and many other text processing buffers
+#define        MAX_INPUTLINE                   16384 ///< maximum size of console commandline, QuakeC strings, and many other text processing buffers
 #define        CON_TEXTSIZE                    1048576 ///< max scrollback buffer characters in console
 #define        CON_MAXLINES                    16384 ///< max scrollback buffer lines in console
 #define        HIST_TEXTSIZE                   262144 ///< max command history buffer characters in console
index ec5c72b6efb29fbb305e5d0f0ed17bb542fd3a24..510b4ec20bc7b4d90ae6228d96ffcb42c5814a11 100644 (file)
@@ -35,14 +35,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #define MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE 0x00000004
 
 // stock defines
-
-#define        IT_SHOTGUN                              1
-#define        IT_SUPER_SHOTGUN                2
-#define        IT_NAILGUN                              4
-#define        IT_SUPER_NAILGUN                8
-#define        IT_GRENADE_LAUNCHER             16
-#define        IT_ROCKET_LAUNCHER              32
-#define        IT_LIGHTNING                    64
+#define IT_SHOTGUN              1
+#define IT_SUPER_SHOTGUN        2
+#define IT_NAILGUN              4
+#define IT_SUPER_NAILGUN        8
+#define IT_GRENADE_LAUNCHER     16
+#define IT_ROCKET_LAUNCHER      32
+#define IT_LIGHTNING            64
 #define IT_SUPER_LIGHTNING      128
 #define IT_SHELLS               256
 #define IT_NAILS                512
@@ -55,14 +54,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #define IT_SUPERHEALTH          65536
 #define IT_KEY1                 131072
 #define IT_KEY2                 262144
-#define        IT_INVISIBILITY                 524288
-#define        IT_INVULNERABILITY              1048576
-#define        IT_SUIT                                 2097152
-#define        IT_QUAD                                 4194304
-#define IT_SIGIL1               (1<<28)
-#define IT_SIGIL2               (1<<29)
-#define IT_SIGIL3               (1<<30)
-#define IT_SIGIL4               (1<<31)
+#define IT_INVISIBILITY         524288
+#define IT_INVULNERABILITY      1048576
+#define IT_SUIT                 2097152
+#define IT_QUAD                 4194304
+#define IT_SIGIL1               (1u<<28)
+#define IT_SIGIL2               (1u<<29)
+#define IT_SIGIL3               (1u<<30)
+#define IT_SIGIL4               (1u<<31)
+// UBSan: unsigned literals because left shifting by 31 causes signed overflow, although it works as expected on x86.
 
 //===========================================
 // AK nexuiz changed and added defines
@@ -140,6 +140,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "progs.h"
 #include "progsvm.h"
 #include "server.h"
+#include "phys.h"
 
 #include "input.h"
 #include "keys.h"
index 96e33e2f4761fe5908e85aa9257bf37b4242f19d..dd76b6cae9d4be1fcf74b17d74e09f2e85a0838e 100644 (file)
@@ -84,6 +84,7 @@ void R_Modules_Restart_f(cmd_state_t *cmd)
 {
        CL_StartVideo();
        Con_Print("Restarting renderer\n");
+       SCR_BeginLoadingPlaque(false);
        R_Modules_Shutdown();
        R_Modules_Start();
 }
index 7363602ac2839a1c6d7e27c70d993d1f65233748..2c5cecd34b75bbf65a2017dce825bf46ede3f39b 100644 (file)
@@ -232,7 +232,7 @@ cvar_t r_shadow_bouncegrid_subsamples = {CF_CLIENT | CF_ARCHIVE, "r_shadow_bounc
 cvar_t r_shadow_bouncegrid_threaded = {CF_CLIENT | CF_ARCHIVE, "r_shadow_bouncegrid_threaded", "1", "enables use of taskqueue_maxthreads to perform the traces and slice rendering of bouncegrid"};
 cvar_t r_coronas = {CF_CLIENT | CF_ARCHIVE, "r_coronas", "0", "brightness of corona flare effects around certain lights, 0 disables corona effects"};
 cvar_t r_coronas_occlusionsizescale = {CF_CLIENT | CF_ARCHIVE, "r_coronas_occlusionsizescale", "0.1", "size of light source for corona occlusion checksum the proportion of hidden pixels controls corona intensity"};
-cvar_t r_coronas_occlusionquery = {CF_CLIENT | CF_ARCHIVE, "r_coronas_occlusionquery", "0", "fades coronas according to visibility"};
+cvar_t r_coronas_occlusionquery = {CF_CLIENT | CF_ARCHIVE, "r_coronas_occlusionquery", "0", "fades coronas according to visibility, requires OpenGL 4.4"};
 cvar_t gl_flashblend = {CF_CLIENT | CF_ARCHIVE, "gl_flashblend", "0", "render bright coronas for dynamic lights instead of actual lighting, fast but ugly"};
 cvar_t r_editlights = {CF_CLIENT, "r_editlights", "0", "enables .rtlights file editing mode"};
 cvar_t r_editlights_cursordistance = {CF_CLIENT, "r_editlights_cursordistance", "1024", "maximum distance of cursor from eye"};
@@ -1226,7 +1226,7 @@ static unsigned int R_Shadow_MakeTextures_SamplePoint(float x, float y, float z)
        float dist = sqrt(x*x+y*y+z*z);
        float intensity = dist < 1 ? ((1.0f - dist) * r_shadow_lightattenuationlinearscale.value / (r_shadow_lightattenuationdividebias.value + dist*dist)) : 0;
        // note this code could suffer byte order issues except that it is multiplying by an integer that reads the same both ways
-       return (unsigned char)bound(0, intensity * 256.0f, 255) * 0x01010101;
+       return bound(0, (unsigned int)(intensity * 256.0f), 255) * 0x01010101U;
 }
 
 static void R_Shadow_MakeTextures(void)
@@ -2959,7 +2959,7 @@ void R_Shadow_RenderLighting(int texturenumsurfaces, const msurface_t **textures
                VectorNegate(specularcolor, specularcolor);
                GL_BlendEquationSubtract(true);
        }
-       RSurf_SetupDepthAndCulling();
+       RSurf_SetupDepthAndCulling(false);
        switch (r_shadow_rendermode)
        {
        case R_SHADOW_RENDERMODE_VISIBLELIGHTING:
@@ -2996,7 +2996,7 @@ void R_RTLight_Update(rtlight_t *rtlight, int isstatic, matrix4x4_t *matrix, vec
        VectorCopy(color, rtlight->color);
        rtlight->cubemapname[0] = 0;
        if (cubemapname && cubemapname[0])
-               strlcpy(rtlight->cubemapname, cubemapname, sizeof(rtlight->cubemapname));
+               dp_strlcpy(rtlight->cubemapname, cubemapname, sizeof(rtlight->cubemapname));
        rtlight->shadow = shadow;
        rtlight->corona = corona;
        rtlight->style = style;
@@ -4561,7 +4561,8 @@ void R_Shadow_DrawCoronas(void)
        {
        case RENDERPATH_GL32:
        case RENDERPATH_GLES2:
-               usequery = r_coronas_occlusionquery.integer;
+               // buffer binding target GL_QUERY_BUFFER: Core since version 4.4
+               usequery = r_coronas_occlusionquery.integer && vid.support.glversion >= 44;
 #ifndef USE_GLES2
                if (usequery)
                {
@@ -4675,7 +4676,7 @@ static void R_Shadow_UpdateWorldLight(dlight_t *light, vec3_t origin, vec3_t ang
        light->style = style;
        light->shadow = shadowenable;
        light->corona = corona;
-       strlcpy(light->cubemapname, cubemapname, sizeof(light->cubemapname));
+       dp_strlcpy(light->cubemapname, cubemapname, sizeof(light->cubemapname));
        light->coronasizescale = coronasizescale;
        light->ambientscale = ambientscale;
        light->diffusescale = diffusescale;
@@ -5099,14 +5100,14 @@ void R_Shadow_LoadWorldLightsFromMap_LightArghliteTyrlite(void)
                        if (com_token[0] == '}')
                                break; // end of entity
                        if (com_token[0] == '_')
-                               strlcpy(key, com_token + 1, sizeof(key));
+                               dp_strlcpy(key, com_token + 1, sizeof(key));
                        else
-                               strlcpy(key, com_token, sizeof(key));
+                               dp_strlcpy(key, com_token, sizeof(key));
                        while (key[strlen(key)-1] == ' ') // remove trailing spaces
                                key[strlen(key)-1] = 0;
                        if (!COM_ParseToken_Simple(&data, false, false, true))
                                break; // error
-                       strlcpy(value, com_token, sizeof(value));
+                       dp_strlcpy(value, com_token, sizeof(value));
 
                        // now that we have the key pair worked out...
                        if (!strcmp("light", key))
@@ -5318,7 +5319,7 @@ void R_Shadow_EditLights_Reload_f(cmd_state_t *cmd)
 {
        if (!cl.worldmodel)
                return;
-       strlcpy(r_shadow_mapname, cl.worldname, sizeof(r_shadow_mapname));
+       dp_strlcpy(r_shadow_mapname, cl.worldname, sizeof(r_shadow_mapname));
        R_Shadow_ClearWorldLights();
        if (r_shadow_realtime_world_importlightentitiesfrommap.integer <= 1)
        {
@@ -5391,7 +5392,7 @@ static void R_Shadow_EditLights_Edit_f(cmd_state_t *cmd)
        radius = r_shadow_selectedlight->radius;
        style = r_shadow_selectedlight->style;
        if (*r_shadow_selectedlight->cubemapname)
-               strlcpy(cubemapname, r_shadow_selectedlight->cubemapname, sizeof(cubemapname));
+               dp_strlcpy(cubemapname, r_shadow_selectedlight->cubemapname, sizeof(cubemapname));
        else
                cubemapname[0] = 0;
        shadows = r_shadow_selectedlight->shadow;
@@ -5595,7 +5596,7 @@ static void R_Shadow_EditLights_Edit_f(cmd_state_t *cmd)
                        return;
                }
                if (Cmd_Argc(cmd) == 3)
-                       strlcpy(cubemapname, Cmd_Argv(cmd, 2), sizeof(cubemapname));
+                       dp_strlcpy(cubemapname, Cmd_Argv(cmd, 2), sizeof(cubemapname));
                else
                        cubemapname[0] = 0;
        }
@@ -5926,7 +5927,7 @@ static void R_Shadow_EditLights_CopyInfo_f(cmd_state_t *cmd)
        r_shadow_bufferlight.radius = r_shadow_selectedlight->radius;
        r_shadow_bufferlight.style = r_shadow_selectedlight->style;
        if (*r_shadow_selectedlight->cubemapname)
-               strlcpy(r_shadow_bufferlight.cubemapname, r_shadow_selectedlight->cubemapname, sizeof(r_shadow_bufferlight.cubemapname));
+               dp_strlcpy(r_shadow_bufferlight.cubemapname, r_shadow_selectedlight->cubemapname, sizeof(r_shadow_bufferlight.cubemapname));
        else
                r_shadow_bufferlight.cubemapname[0] = 0;
        r_shadow_bufferlight.shadow = r_shadow_selectedlight->shadow;
diff --git a/r_sky.c b/r_sky.c
index 7fd1463dbc7239c60c998ea3124db9ca861234a5..67ece7289ce60c8d8bc4e89f31c0af1114216bce 100644 (file)
--- a/r_sky.c
+++ b/r_sky.c
@@ -157,7 +157,7 @@ int R_SetSkyBox(const char *sky)
                return false;
        }
 
-       strlcpy(skyname, sky, sizeof(skyname));
+       dp_strlcpy(skyname, sky, sizeof(skyname));
 
        return R_LoadSkyBox();
 }
@@ -432,7 +432,7 @@ void R_Sky(void)
                //GL_Clear(GL_DEPTH_BUFFER_BIT);
        }
        */
-       GL_Scissor(0, 0, r_fb.screentexturewidth, r_fb.screentextureheight);
+       GL_Scissor(r_refdef.view.viewport.x, r_refdef.view.viewport.y, r_refdef.view.viewport.width, r_refdef.view.viewport.height);
 }
 
 //===============================================================
index 6dfc7938f917c294aa551e31af936c77f44e1e26..55c43e7ed8a7272a689baa23a463c6c434091e98 100644 (file)
--- a/r_stats.c
+++ b/r_stats.c
@@ -218,10 +218,10 @@ void R_TimeReport(const char *desc)
 
        if (speedstringcount + length > (vid_conwidth.integer / 8))
        {
-               strlcat(r_speeds_timestring, "\n", sizeof(r_speeds_timestring));
+               dp_strlcat(r_speeds_timestring, "\n", sizeof(r_speeds_timestring));
                speedstringcount = 0;
        }
-       strlcat(r_speeds_timestring, tempbuf, sizeof(r_speeds_timestring));
+       dp_strlcat(r_speeds_timestring, tempbuf, sizeof(r_speeds_timestring));
        speedstringcount += length;
 }
 
index bb9b2426a263294b82f4663177daa88a7b1ebb06..fe21b6000a1e266cb987ae4dc3ddaf7c440664e2 100644 (file)
--- a/render.h
+++ b/render.h
@@ -46,7 +46,7 @@ typedef enum shaderlanguage_e
 }
 shaderlanguage_t;
 
-// this enum selects which of the glslshadermodeinfo entries should be used
+/// this enum selects which of the glslshadermodeinfo entries should be used
 typedef enum shadermode_e
 {
        SHADERMODE_GENERIC, ///< (particles/HUD/etc) vertex color, optionally multiplied by one texture
@@ -70,39 +70,40 @@ typedef enum shadermode_e
 }
 shadermode_t;
 
-#define SHADERPERMUTATION_DIFFUSE (1<<0) ///< (lightsource) whether to use directional shading
-#define SHADERPERMUTATION_VERTEXTEXTUREBLEND (1<<1) ///< indicates this is a two-layer material blend based on vertex alpha (q3bsp)
-#define        SHADERPERMUTATION_VIEWTINT (1<<2) ///< view tint (postprocessing only), use vertex colors (generic only)
-#define        SHADERPERMUTATION_COLORMAPPING (1<<3) ///< indicates this is a colormapped skin
-#define        SHADERPERMUTATION_SATURATION (1<<4) ///< saturation (postprocessing only)
-#define        SHADERPERMUTATION_FOGINSIDE (1<<5) ///< tint the color by fog color or black if using additive blend mode
-#define        SHADERPERMUTATION_FOGOUTSIDE (1<<6) ///< tint the color by fog color or black if using additive blend mode
-#define        SHADERPERMUTATION_FOGHEIGHTTEXTURE (1<<7) ///< fog color and density determined by texture mapped on vertical axis
-#define        SHADERPERMUTATION_FOGALPHAHACK (1<<8) ///< fog color and density determined by texture mapped on vertical axis
-#define        SHADERPERMUTATION_GAMMARAMPS (1<<9) ///< gamma (postprocessing only)
-#define        SHADERPERMUTATION_CUBEFILTER (1<<10) ///< (lightsource) use cubemap light filter
-#define        SHADERPERMUTATION_GLOW (1<<11) ///< (lightmap) blend in an additive glow texture
-#define        SHADERPERMUTATION_BLOOM (1<<12) ///< bloom (postprocessing only)
-#define        SHADERPERMUTATION_SPECULAR (1<<13) ///< (lightsource or deluxemapping) render specular effects
-#define        SHADERPERMUTATION_POSTPROCESSING (1<<14) ///< user defined postprocessing (postprocessing only)
-#define        SHADERPERMUTATION_REFLECTION (1<<15) ///< normalmap-perturbed reflection of the scene infront of the surface, preformed as an overlay on the surface
-#define        SHADERPERMUTATION_OFFSETMAPPING (1<<16) ///< adjust texcoords to roughly simulate a displacement mapped surface
-#define        SHADERPERMUTATION_OFFSETMAPPING_RELIEFMAPPING (1<<17) ///< adjust texcoords to accurately simulate a displacement mapped surface (requires OFFSETMAPPING to also be set!)
-#define        SHADERPERMUTATION_SHADOWMAP2D (1<<18) ///< (lightsource) use shadowmap texture as light filter
-#define        SHADERPERMUTATION_SHADOWMAPVSDCT (1<<19) ///< (lightsource) use virtual shadow depth cube texture for shadowmap indexing
-#define        SHADERPERMUTATION_SHADOWMAPORTHO (1<<20) ///< (lightsource) use orthographic shadowmap projection
-#define        SHADERPERMUTATION_DEFERREDLIGHTMAP (1<<21) ///< (lightmap) read Texture_ScreenDiffuse/Specular textures and add them on top of lightmapping
-#define        SHADERPERMUTATION_ALPHAKILL (1<<22) ///< (deferredgeometry) discard pixel if diffuse texture alpha below 0.5, (generic) apply global alpha
-#define        SHADERPERMUTATION_REFLECTCUBE (1<<23) ///< fake reflections using global cubemap (not HDRI light probe)
-#define        SHADERPERMUTATION_NORMALMAPSCROLLBLEND (1<<24) ///< (water) counter-direction normalmaps scrolling
-#define        SHADERPERMUTATION_BOUNCEGRID (1<<25) ///< (lightmap) use Texture_BounceGrid as an additional source of ambient light
-#define        SHADERPERMUTATION_BOUNCEGRIDDIRECTIONAL (1<<26) ///< (lightmap) use 16-component pixels in bouncegrid texture for directional lighting rather than standard 4-component
-#define SHADERPERMUTATION_TRIPPY (1<<27) ///< use trippy vertex shader effect
-#define        SHADERPERMUTATION_DEPTHRGB (1<<28) ///< read/write depth values in RGB color coded format for older hardware without depth samplers
-#define        SHADERPERMUTATION_ALPHAGEN_VERTEX (1<<29) ///< alphaGen vertex
-#define        SHADERPERMUTATION_SKELETAL (1<<30) ///< (skeletal models) use skeletal matrices to deform vertices (gpu-skinning)
-#define        SHADERPERMUTATION_OCCLUDE (1<<31) ///< use occlusion buffer for corona
-#define        SHADERPERMUTATION_COUNT 32 ///< size of shaderpermutationinfo array
+#define SHADERPERMUTATION_DIFFUSE (1u<<0) ///< (lightsource) whether to use directional shading
+#define SHADERPERMUTATION_VERTEXTEXTUREBLEND (1u<<1) ///< indicates this is a two-layer material blend based on vertex alpha (q3bsp)
+#define SHADERPERMUTATION_VIEWTINT (1u<<2) ///< view tint (postprocessing only), use vertex colors (generic only)
+#define SHADERPERMUTATION_COLORMAPPING (1u<<3) ///< indicates this is a colormapped skin
+#define SHADERPERMUTATION_SATURATION (1u<<4) ///< saturation (postprocessing only)
+#define SHADERPERMUTATION_FOGINSIDE (1u<<5) ///< tint the color by fog color or black if using additive blend mode
+#define SHADERPERMUTATION_FOGOUTSIDE (1u<<6) ///< tint the color by fog color or black if using additive blend mode
+#define SHADERPERMUTATION_FOGHEIGHTTEXTURE (1u<<7) ///< fog color and density determined by texture mapped on vertical axis
+#define SHADERPERMUTATION_FOGALPHAHACK (1u<<8) ///< fog color and density determined by texture mapped on vertical axis
+#define SHADERPERMUTATION_GAMMARAMPS (1u<<9) ///< gamma (postprocessing only)
+#define SHADERPERMUTATION_CUBEFILTER (1u<<10) ///< (lightsource) use cubemap light filter
+#define SHADERPERMUTATION_GLOW (1u<<11) ///< (lightmap) blend in an additive glow texture
+#define SHADERPERMUTATION_BLOOM (1u<<12) ///< bloom (postprocessing only)
+#define SHADERPERMUTATION_SPECULAR (1u<<13) ///< (lightsource or deluxemapping) render specular effects
+#define SHADERPERMUTATION_POSTPROCESSING (1u<<14) ///< user defined postprocessing (postprocessing only)
+#define SHADERPERMUTATION_REFLECTION (1u<<15) ///< normalmap-perturbed reflection of the scene infront of the surface, preformed as an overlay on the surface
+#define SHADERPERMUTATION_OFFSETMAPPING (1u<<16) ///< adjust texcoords to roughly simulate a displacement mapped surface
+#define SHADERPERMUTATION_OFFSETMAPPING_RELIEFMAPPING (1u<<17) ///< adjust texcoords to accurately simulate a displacement mapped surface (requires OFFSETMAPPING to also be set!)
+#define SHADERPERMUTATION_SHADOWMAP2D (1u<<18) ///< (lightsource) use shadowmap texture as light filter
+#define SHADERPERMUTATION_SHADOWMAPVSDCT (1u<<19) ///< (lightsource) use virtual shadow depth cube texture for shadowmap indexing
+#define SHADERPERMUTATION_SHADOWMAPORTHO (1u<<20) ///< (lightsource) use orthographic shadowmap projection
+#define SHADERPERMUTATION_DEFERREDLIGHTMAP (1u<<21) ///< (lightmap) read Texture_ScreenDiffuse/Specular textures and add them on top of lightmapping
+#define SHADERPERMUTATION_ALPHAKILL (1u<<22) ///< (deferredgeometry) discard pixel if diffuse texture alpha below 0.5, (generic) apply global alpha
+#define SHADERPERMUTATION_REFLECTCUBE (1u<<23) ///< fake reflections using global cubemap (not HDRI light probe)
+#define SHADERPERMUTATION_NORMALMAPSCROLLBLEND (1u<<24) ///< (water) counter-direction normalmaps scrolling
+#define SHADERPERMUTATION_BOUNCEGRID (1u<<25) ///< (lightmap) use Texture_BounceGrid as an additional source of ambient light
+#define SHADERPERMUTATION_BOUNCEGRIDDIRECTIONAL (1u<<26) ///< (lightmap) use 16-component pixels in bouncegrid texture for directional lighting rather than standard 4-component
+#define SHADERPERMUTATION_TRIPPY (1u<<27) ///< use trippy vertex shader effect
+#define SHADERPERMUTATION_DEPTHRGB (1u<<28) ///< read/write depth values in RGB color coded format for older hardware without depth samplers
+#define SHADERPERMUTATION_ALPHAGEN_VERTEX (1u<<29) ///< alphaGen vertex
+#define SHADERPERMUTATION_SKELETAL (1u<<30) ///< (skeletal models) use skeletal matrices to deform vertices (gpu-skinning)
+#define SHADERPERMUTATION_OCCLUDE (1u<<31) ///< use occlusion buffer for corona
+#define SHADERPERMUTATION_COUNT 32u ///< size of shaderpermutationinfo array
+// UBSan: unsigned literals because left shifting by 31 causes signed overflow, although it works as expected on x86.
 
 // 1.0f / N table
 extern float ixtable[4096];
@@ -236,9 +237,9 @@ r_viewport_type_t;
 
 typedef struct r_viewport_s
 {
-       matrix4x4_t cameramatrix; // from entity (transforms from camera entity to world)
-       matrix4x4_t viewmatrix; // actual matrix for rendering (transforms to viewspace)
-       matrix4x4_t projectmatrix; // actual projection matrix (transforms from viewspace to screen)
+       matrix4x4_t cameramatrix;  ///< from entity (transforms from camera entity to world)
+       matrix4x4_t viewmatrix;    ///< actual matrix for rendering (transforms to viewspace)
+       matrix4x4_t projectmatrix; ///< actual projection matrix (transforms from viewspace to screen)
        int x;
        int y;
        int z;
@@ -246,7 +247,7 @@ typedef struct r_viewport_s
        int height;
        int depth;
        r_viewport_type_t type;
-       float screentodepth[2]; // used by deferred renderer to calculate linear depth from device depth coordinates
+       float screentodepth[2];    ///< used by deferred renderer to calculate linear depth from device depth coordinates
 }
 r_viewport_t;
 
@@ -271,17 +272,17 @@ typedef struct r_refdef_view_s
        int numfrustumplanes;
        mplane_t frustum[6];
        qbool useclipplane;
-       qbool usecustompvs; // uses r_refdef.viewcache.pvsbits as-is rather than computing it
+       qbool usecustompvs; ///< uses r_refdef.viewcache.pvsbits as-is rather than computing it
        mplane_t clipplane;
        float frustum_x, frustum_y;
        vec3_t frustumcorner[4];
-       // if turned off it renders an ortho view
+       /// if turned off it renders an ortho view
        int useperspective;
-       // allows visibility culling based on the view origin (e.g. pvs and R_CanSeeBox)
-       // this is turned off by:
-       // r_trippy
-       // !r_refdef.view.useperspective
-       // (sometimes) r_refdef.view.useclipplane
+       /// allows visibility culling based on the view origin (e.g. pvs and R_CanSeeBox)
+       /// this is turned off by:
+       /// r_trippy
+       /// !r_refdef.view.useperspective
+       /// (sometimes) r_refdef.view.useclipplane
        int usevieworiginculling;
        float ortho_x, ortho_y;
 
@@ -292,19 +293,19 @@ typedef struct r_refdef_view_s
        int width;
        int height;
        int depth;
-       r_viewport_t viewport; // note: if r_viewscale is used, the viewport.width and viewport.height may be less than width and height
+       r_viewport_t viewport; ///< note: if r_viewscale is used, the viewport.width and viewport.height may be less than width and height
 
-       // which color components to allow (for anaglyph glasses)
+       /// which color components to allow (for anaglyph glasses)
        int colormask[4];
 
-       // global RGB color multiplier for rendering
+       /// global RGB color multiplier for rendering
        float colorscale;
 
-       // whether to call R_ClearScreen before rendering stuff
+       /// whether to call R_ClearScreen before rendering stuff
        qbool clear;
-       // if true, don't clear or do any post process effects (bloom, etc)
+       /// if true, don't clear or do any post process effects (bloom, etc)
        qbool isoverlay;
-       // if true, this is the MAIN view (which is, after CSQC, copied into the scene for use e.g. by r_speeds 1, showtex, prydon cursor)
+       /// if true, this is the MAIN view (which is, after CSQC, copied into the scene for use e.g. by r_speeds 1, showtex, prydon cursor)
        qbool ismain;
 
        // whether to draw r_showtris and such, this is only true for the main
@@ -316,7 +317,7 @@ typedef struct r_refdef_view_s
        int cullface_front;
        int cullface_back;
 
-       // render quality (0 to 1) - affects r_drawparticles_drawdistance and others
+       /// render quality (0 to 1) - affects r_drawparticles_drawdistance and others
        float quality;
 }
 r_refdef_view_t;
@@ -332,8 +333,8 @@ typedef struct r_refdef_viewcache_s
 
        // these properties are generated by R_View_Update()
 
-       // which entities are currently visible for this viewpoint
-       // (the used range is 0...r_refdef.scene.numentities)
+       /// which entities are currently visible for this viewpoint
+       /// (the used range is 0...r_refdef.scene.numentities)
        unsigned char *entityvisible;
 
        // flag arrays used for visibility checking on world model
@@ -341,7 +342,7 @@ typedef struct r_refdef_viewcache_s
        unsigned char *world_pvsbits;
        unsigned char *world_leafvisible;
        unsigned char *world_surfacevisible;
-       // if true, the view is currently in a leaf without pvs data
+       /// if true, the view is currently in a leaf without pvs data
        qbool world_novis;
 }
 r_refdef_viewcache_t;
@@ -349,24 +350,24 @@ r_refdef_viewcache_t;
 // TODO: really think about which fields should go into scene and which one should stay in refdef [1/7/2008 Black]
 // maybe also refactor some of the functions to support different setting sources (ie. fogenabled, etc.) for different scenes
 typedef struct r_refdef_scene_s {
-       // whether to call S_ExtraUpdate during render to reduce sound chop
+       /// whether to call S_ExtraUpdate during render to reduce sound chop
        qbool extraupdate;
 
-       // (client gameworld) time for rendering time based effects
+       /// (client gameworld) time for rendering time based effects
        double time;
 
-       // the world
+       /// the world
        entity_render_t *worldentity;
 
-       // same as worldentity->model
+       /// same as worldentity->model
        model_t *worldmodel;
 
-       // renderable entities (excluding world)
+       /// renderable entities (excluding world)
        entity_render_t **entities;
        int numentities;
        int maxentities;
 
-       // field of temporary entities that is reset each (client) frame
+       /// field of temporary entities that is reset each (client) frame
        entity_render_t *tempentities;
        int numtempentities;
        int maxtempentities;
@@ -378,10 +379,10 @@ typedef struct r_refdef_scene_s {
        int numlights;
 
        // intensities for light styles right now, controls rtlights
-       float rtlightstylevalue[MAX_LIGHTSTYLES];       // float fraction of base light value
+       float rtlightstylevalue[MAX_LIGHTSTYLES]; ///< float fraction of base light value
        // 8.8bit fixed point intensities for light styles
        // controls intensity lightmap layers
-       unsigned short lightstylevalue[MAX_LIGHTSTYLES];        // 8.8 fraction of base light value
+       unsigned short lightstylevalue[MAX_LIGHTSTYLES]; ///< 8.8 fraction of base light value
 
        // adds brightness to the whole scene, separate from lightmapintensity
        // see CL_UpdateEntityShading
@@ -554,8 +555,6 @@ extern cvar_t r_render;
 extern cvar_t r_renderview;
 extern cvar_t r_waterwarp;
 
-extern cvar_t r_textureunits;
-
 extern cvar_t r_glsl_offsetmapping;
 extern cvar_t r_glsl_offsetmapping_reliefmapping;
 extern cvar_t r_glsl_offsetmapping_scale;
@@ -780,7 +779,7 @@ void R_HDR_UpdateIrisAdaptation(const vec3_t point);
 
 void RSurf_ActiveModelEntity(const entity_render_t *ent, qbool wantnormals, qbool wanttangents, qbool prepass);
 void RSurf_ActiveCustomEntity(const matrix4x4_t *matrix, const matrix4x4_t *inversematrix, int entflags, double shadertime, float r, float g, float b, float a, int numvertices, const float *vertex3f, const float *texcoord2f, const float *normal3f, const float *svector3f, const float *tvector3f, const float *color4f, int numtriangles, const int *element3i, const unsigned short *element3s, qbool wantnormals, qbool wanttangents);
-void RSurf_SetupDepthAndCulling(void);
+void RSurf_SetupDepthAndCulling(bool ui);
 
 extern int r_textureframe; ///< used only by R_GetCurrentTexture, incremented per view and per UI render
 texture_t *R_GetCurrentTexture(texture_t *t);
@@ -976,6 +975,7 @@ void R_Model_Sprite_Draw(entity_render_t *ent);
 struct prvm_prog_s;
 void R_UpdateFog(void);
 qbool CL_VM_UpdateView(double frametime);
+void CL_VM_DrawHud(double frametime);
 void SCR_DrawConsole(void);
 void R_Shadow_EditLights_DrawSelectedLightProperties(void);
 void R_DecalSystem_Reset(decalsystem_t *decalsystem);
diff --git a/sbar.c b/sbar.c
index be13963350a42847b088fb9afd0c7aa9427a8ea9..69707e448cbb54b87f5b11b13dcc34c8d509aec1 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -116,7 +116,6 @@ cvar_t crosshair_color_alpha = {CF_CLIENT | CF_ARCHIVE, "crosshair_color_alpha",
 cvar_t crosshair_size = {CF_CLIENT | CF_ARCHIVE, "crosshair_size", "1", "adjusts size of the crosshair on the screen"};
 
 static void Sbar_MiniDeathmatchOverlay (int x, int y);
-static void Sbar_DeathmatchOverlay (void);
 static void Sbar_IntermissionOverlay (void);
 static void Sbar_FinaleOverlay (void);
 
@@ -359,11 +358,8 @@ static void sbar_newmap(void)
 
 void Sbar_Init (void)
 {
-       if(gamemode == GAME_NORMAL) // Workaround so Quake doesn't trample on Xonotic.
-       {
-               Cmd_AddCommand(CF_CLIENT, "+showscores", Sbar_ShowScores_f, "show scoreboard");
-               Cmd_AddCommand(CF_CLIENT, "-showscores", Sbar_DontShowScores_f, "hide scoreboard");
-       }
+       Cmd_AddCommand(CF_CLIENT, "+showscores", Sbar_ShowScores_f, "show scoreboard");
+       Cmd_AddCommand(CF_CLIENT, "-showscores", Sbar_DontShowScores_f, "hide scoreboard");
        Cvar_RegisterVariable(&cl_showfps);
        Cvar_RegisterVariable(&cl_showsound);
        Cvar_RegisterVariable(&cl_showblur);
@@ -395,6 +391,8 @@ void Sbar_Init (void)
        Cvar_RegisterVariable(&sbar_miniscoreboard_size);
        Cvar_RegisterVariable(&sbar_info_pos);
        Cvar_RegisterVariable(&cl_deathscoreboard);
+       // This name is used by QuakeSpasm-based engines and is read by the Alkaline 1.2 CSQC
+       Cvar_RegisterVirtual(&sbar_alpha_bg, "scr_sbaralpha");
 
        Cvar_RegisterVariable(&crosshair_color_red);
        Cvar_RegisterVariable(&crosshair_color_green);
@@ -623,7 +621,7 @@ void Sbar_SortFrags (void)
                                                teamname = "Total Team Score";
                                                break;
                                }
-                               strlcpy(teams[teamlines-1].name, teamname, sizeof(teams[teamlines-1].name));
+                               dp_strlcpy(teams[teamlines-1].name, teamname, sizeof(teams[teamlines-1].name));
 
                                teams[teamlines-1].frags = 0;
                                teams[teamlines-1].colors = color + 16 * color;
@@ -685,7 +683,7 @@ static void Sbar_SoloScoreboard (void)
                Sbar_DrawString(8+22*8, 4, va(vabuf, sizeof(vabuf), "Secrets:%3i", cl.stats[STAT_SECRETS]));
 
        // format is like this: e1m1:The Sligpate Complex
-       dpsnprintf(str, sizeof(str), "%s:%s", cl.worldbasename, cl.worldmessage);
+       dpsnprintf(str, sizeof(str), "%s:%.39s", cl.worldbasename, cl.worldmessage);
 
        // if there's a newline character, terminate the string there
        if (strchr(str, '\n'))
@@ -894,7 +892,7 @@ static void Sbar_DrawInventory (void)
 
        // items
        for (i=0 ; i<6 ; i++)
-               if (cl.stats[STAT_ITEMS] & (1<<(17+i)))
+               if (cl.stats[STAT_ITEMS] & (1u<<(17+i)))
                {
                        //MED 01/04/97 changed keys
                        if (!(gamemode == GAME_HIPNOTIC || gamemode == GAME_QUOTH) || (i>1))
@@ -906,7 +904,7 @@ static void Sbar_DrawInventory (void)
        if (gamemode == GAME_HIPNOTIC || gamemode == GAME_QUOTH)
        {
                for (i=0 ; i<2 ; i++)
-                       if (cl.stats[STAT_ITEMS] & (1<<(24+i)))
+                       if (cl.stats[STAT_ITEMS] & (1u<<(24+i)))
                                Sbar_DrawPic (288 + i*16, -16, hsb_items[i]);
        }
 
@@ -914,14 +912,14 @@ static void Sbar_DrawInventory (void)
        {
                // new rogue items
                for (i=0 ; i<2 ; i++)
-                       if (cl.stats[STAT_ITEMS] & (1<<(29+i)))
+                       if (cl.stats[STAT_ITEMS] & (1u<<(29+i)))
                                Sbar_DrawPic (288 + i*16, -16, rsb_items[i]);
        }
        else
        {
                // sigils
                for (i=0 ; i<4 ; i++)
-                       if (cl.stats[STAT_ITEMS] & (1<<(28+i)))
+                       if (cl.stats[STAT_ITEMS] & (1u<<(28+i)))
                                Sbar_DrawPic (320-32 + i*8, -16, sb_sigil[i]);
        }
 }
@@ -1144,12 +1142,12 @@ void Sbar_ShowFPS(void)
        }
        if (cl_showtime.integer)
        {
-               strlcpy(timestring, Sys_TimeString(cl_showtime_format.string), sizeof(timestring));
+               dp_strlcpy(timestring, Sys_TimeString(cl_showtime_format.string), sizeof(timestring));
                fps_strings++;
        }
        if (cl_showdate.integer)
        {
-               strlcpy(datestring, Sys_TimeString(cl_showdate_format.string), sizeof(datestring));
+               dp_strlcpy(datestring, Sys_TimeString(cl_showdate_format.string), sizeof(datestring));
                fps_strings++;
        }
        if (cl_showblur.integer)
@@ -1217,13 +1215,13 @@ void Sbar_ShowFPS(void)
                svtrace.fraction = 2.0;
                cltrace.fraction = 2.0;
                // ray hits models (even animated ones) and ignores translucent materials
-               if (SVVM_prog != NULL)
+               if (sv.active)
                        svtrace = SV_TraceLine(org, dest, MOVE_HITMODEL, NULL, SUPERCONTENTS_SOLID, 0, MATERIALFLAGMASK_TRANSLUCENT, collision_extendmovelength.value);
                cltrace = CL_TraceLine(org, dest, MOVE_HITMODEL, NULL, SUPERCONTENTS_SOLID, 0, MATERIALFLAGMASK_TRANSLUCENT, collision_extendmovelength.value, true, false, &hitnetentity, true, true);
                if (cltrace.hittexture)
-                       strlcpy(texstring, cltrace.hittexture->name, sizeof(texstring));
+                       dp_strlcpy(texstring, cltrace.hittexture->name, sizeof(texstring));
                else
-                       strlcpy(texstring, "(no texture hit)", sizeof(texstring));
+                       dp_strlcpy(texstring, "(no texture hit)", sizeof(texstring));
                fps_strings++;
                if (svtrace.fraction < cltrace.fraction)
                {
@@ -1233,11 +1231,11 @@ void Sbar_ShowFPS(void)
                                dpsnprintf(entstring, sizeof(entstring), "server entity %i", (int)PRVM_EDICT_TO_PROG(svtrace.ent));
                        }
                        else
-                               strlcpy(entstring, "(no entity hit)", sizeof(entstring));
+                               dp_strlcpy(entstring, "(no entity hit)", sizeof(entstring));
                }
                else
                {
-                       if (CLVM_prog != NULL && cltrace.ent != NULL)
+                       if (cltrace.ent != NULL)
                        {
                                prvm_prog_t *prog = CLVM_prog;
                                dpsnprintf(entstring, sizeof(entstring), "client entity %i", (int)PRVM_EDICT_TO_PROG(cltrace.ent));
@@ -1245,9 +1243,9 @@ void Sbar_ShowFPS(void)
                        else if (hitnetentity > 0)
                                dpsnprintf(entstring, sizeof(entstring), "network entity %i", hitnetentity);
                        else if (hitnetentity == 0)
-                               strlcpy(entstring, "world entity", sizeof(entstring));
+                               dp_strlcpy(entstring, "world entity", sizeof(entstring));
                        else
-                               strlcpy(entstring, "(no entity hit)", sizeof(entstring));
+                               dp_strlcpy(entstring, "(no entity hit)", sizeof(entstring));
                }
                fps_strings++;
        }
diff --git a/sbar.h b/sbar.h
index 8f82d15b8dfcd8b34babab0adb2ee1776523fe7c..5de4c91d468368a4ea8b5c5304bec4bbdd2bc31b 100644 (file)
--- a/sbar.h
+++ b/sbar.h
@@ -38,5 +38,8 @@ void Sbar_ShowFPS_Update(void);
 int Sbar_GetSortedPlayerIndex (int index);
 void Sbar_SortFrags (void);
 
+extern cvar_t cl_deathscoreboard;
+void Sbar_DeathmatchOverlay (void);
+
 #endif
 
index 01d264ca72a7540eb8ce826b844009ea075e8d04..b018ad1eec10862788f2a04abdfc6a21d126de19 100644 (file)
--- a/screen.h
+++ b/screen.h
@@ -31,12 +31,9 @@ void CL_UpdateScreen (void);
 void SCR_CenterPrint(const char *str);
 
 void SCR_BeginLoadingPlaque (qbool startup);
+void SCR_DeferLoadingPlaque (qbool startup);
 void SCR_EndLoadingPlaque (void);
 
-// invoke refresh of loading plaque (nothing else seen)
-void SCR_UpdateLoadingScreen(qbool clear, qbool startup);
-void SCR_UpdateLoadingScreenIfShown(void);
-
 // pushes an item on the loading screen
 void SCR_PushLoadingScreen (const char *msg, float len_in_parent);
 void SCR_PopLoadingScreen (qbool redraw);
@@ -44,7 +41,7 @@ void SCR_ClearLoadingScreen (qbool redraw);
 
 void SCR_CaptureVideo_SoundFrame(const struct portable_samplepair_s *paintbuffer, size_t length);
 
-extern float scr_con_current; // current height of displayed console
+extern unsigned int scr_con_current; // current height of displayed console
 
 extern int sb_lines;
 
index 5ae7befde0f911157127168a7305f1f8d6db6a0d..a3e0436bbbfcba02c6cc4a2f20318c6cd89262e1 100644 (file)
--- a/server.h
+++ b/server.h
@@ -34,20 +34,6 @@ typedef struct server_static_s
        qbool changelevel_issued;
        /// server infostring
        char serverinfo[MAX_SERVERINFO_STRING];
-       // performance data
-       float perf_cpuload;
-       float perf_lost;
-       float perf_offset_avg;
-       float perf_offset_max;
-       float perf_offset_sdev;
-       // temporary performance data accumulators
-       float perf_acc_realtime;
-       float perf_acc_sleeptime;
-       float perf_acc_lost;
-       float perf_acc_offset;
-       float perf_acc_offset_squared;
-       float perf_acc_offset_max;
-       int perf_acc_offset_samples;
 
        // csqc stuff
        unsigned char *csqc_progdata;
@@ -88,9 +74,25 @@ typedef struct server_s
        protocolversion_t protocol;
 
        double time;
-
        double frametime;
 
+       unsigned int spawnframe; // signals SV_Frame() to reset its timers
+
+       // performance data
+       float perf_cpuload;
+       float perf_lost;
+       float perf_offset_avg;
+       float perf_offset_max;
+       float perf_offset_sdev;
+       // temporary performance data accumulators
+       float perf_acc_realtime;
+       float perf_acc_sleeptime;
+       float perf_acc_lost;
+       float perf_acc_offset;
+       float perf_acc_offset_squared;
+       float perf_acc_offset_max;
+       int perf_acc_offset_samples;
+
        // used by PF_checkclient
        int lastcheck;
        double lastchecktime;
@@ -103,10 +105,7 @@ typedef struct server_s
        /// collision culling data
        world_t world;
 
-       /// map name
-       char name[64]; // %s followed by entrance name
        // variants of map name
-       char worldmessage[40]; // map title (not related to filename)
        char worldbasename[MAX_QPATH]; // %s
        char worldname[MAX_QPATH]; // maps/%s.bsp
        char worldnamenoextension[MAX_QPATH]; // maps/%s
@@ -415,6 +414,7 @@ extern cvar_t sv_allowdownloads_archive;
 extern cvar_t sv_allowdownloads_config;
 extern cvar_t sv_allowdownloads_dlcache;
 extern cvar_t sv_allowdownloads_inarchive;
+extern cvar_t sv_areagrid_link_SOLID_NOT;
 extern cvar_t sv_areagrid_mingridsize;
 extern cvar_t sv_checkforpacketsduringsleep;
 extern cvar_t sv_clmovement_enable;
@@ -469,6 +469,7 @@ extern cvar_t sv_gravity;
 extern cvar_t sv_idealpitchscale;
 extern cvar_t sv_jumpstep;
 extern cvar_t sv_jumpvelocity;
+extern cvar_t sv_legacy_bbox_expand;
 extern cvar_t sv_maxairspeed;
 extern cvar_t sv_maxrate;
 extern cvar_t sv_maxspeed;
@@ -566,10 +567,6 @@ void SV_LinkEdict_TouchAreaGrid_Call(prvm_edict_t *touch, prvm_edict_t *ent); //
  * returns true if it found a better place
  */
 qbool SV_UnstickEntity (prvm_edict_t *ent);
-/*! move an entity that is stuck out of the surface it is stuck in (can move large amounts)
- * returns true if it found a better place
- */
-qbool SV_NudgeOutOfSolid(prvm_edict_t *ent);
 
 /// calculates hitsupercontentsmask for a generic qc entity
 int SV_GenericHitSuperContentsMask(const prvm_edict_t *edict);
@@ -626,6 +623,6 @@ void SV_PreSpawn_f(cmd_state_t *cmd);
 void SV_Spawn_f(cmd_state_t *cmd);
 void SV_Begin_f(cmd_state_t *cmd);
 
-qbool SV_VM_ConsoleCommand (const char *text);
+qbool SV_VM_ConsoleCommand(const char *text, size_t textlen);
 
 #endif
index ebf84b9bfd599e29601877a9e12971fa4116b872..03d7e33e76ae59c9892810a11809bb2532dac5b3 100644 (file)
@@ -183,6 +183,7 @@ cvar_t snd_spatialization_prologic_frontangle = {CF_CLIENT | CF_ARCHIVE, "snd_sp
 cvar_t snd_spatialization_occlusion = {CF_CLIENT | CF_ARCHIVE, "snd_spatialization_occlusion", "1", "enable occlusion testing on spatialized sounds, which simply quiets sounds that are blocked by the world; 1 enables PVS method, 2 enables LineOfSight method, 3 enables both"};
 
 // Cvars declared in snd_main.h (shared with other snd_*.c files)
+cvar_t snd_waterfx = {CF_CLIENT | CF_ARCHIVE, "snd_waterfx", "1", "underwater sound filter strength"};
 cvar_t _snd_mixahead = {CF_CLIENT | CF_ARCHIVE, "_snd_mixahead", "0.15", "how much sound to mix ahead of time"};
 cvar_t snd_streaming = {CF_CLIENT | CF_ARCHIVE, "snd_streaming", "1", "enables keeping compressed ogg sound files compressed, decompressing them only as needed, otherwise they will be decompressed completely at load (may use a lot of memory); when set to 2, streaming is performed even if this would waste memory"};
 cvar_t snd_streaming_length = {CF_CLIENT | CF_ARCHIVE, "snd_streaming_length", "1", "decompress sounds completely if they are less than this play time when snd_streaming is 1"};
@@ -276,9 +277,9 @@ static void S_Play_Common (cmd_state_t *cmd, float fvol, float attenuation)
        while (i < Cmd_Argc (cmd))
        {
                // Get the name, and appends ".wav" as an extension if there's none
-               strlcpy (name, Cmd_Argv(cmd, i), sizeof (name));
+               dp_strlcpy (name, Cmd_Argv(cmd, i), sizeof (name));
                if (!strrchr (name, '.'))
-                       strlcat (name, ".wav", sizeof (name));
+                       dp_strlcat (name, ".wav", sizeof (name));
                i++;
 
                // If we need to get the volume from the command line
@@ -661,6 +662,8 @@ void S_Startup (void)
 #ifdef CONFIG_VIDEO_CAPTURE
        recording_sound = false;
 #endif
+
+       CDAudio_Startup();
 }
 
 void S_Shutdown(void)
@@ -668,6 +671,8 @@ void S_Shutdown(void)
        if (snd_renderbuffer == NULL)
                return;
 
+       CDAudio_Shutdown();
+
        oldpaintedtime = snd_renderbuffer->endframe;
 
        if (simsound)
@@ -808,6 +813,7 @@ void S_Init(void)
        Cvar_RegisterVariable(&ambient_fade);
        Cvar_RegisterVariable(&snd_noextraupdate);
        Cvar_RegisterVariable(&snd_show);
+       Cvar_RegisterVariable(&snd_waterfx);
        Cvar_RegisterVariable(&_snd_mixahead);
        Cvar_RegisterVariable(&snd_swapstereo); // for people with backwards sound wiring
        Cvar_RegisterVariable(&snd_channellayout);
@@ -824,6 +830,8 @@ void S_Init(void)
 #ifdef USEXMP
        XMP_OpenLibrary ();
 #endif
+
+       CDAudio_Init();
 }
 
 
@@ -921,7 +929,7 @@ sfx_t *S_FindName (const char *name)
        // Add a sfx_t struct for this sound
        sfx = (sfx_t *)Mem_Alloc (snd_mempool, sizeof (*sfx));
        memset (sfx, 0, sizeof(*sfx));
-       strlcpy (sfx->name, name, sizeof (sfx->name));
+       dp_strlcpy (sfx->name, name, sizeof (sfx->name));
        sfx->memsize = sizeof(*sfx);
        sfx->next = known_sfx;
        known_sfx = sfx;
@@ -1220,7 +1228,7 @@ static void SND_Spatialize_WithSfx(channel_t *ch, qbool isstatic, sfx_t *sfx)
                {
                        //Con_Printf("-- entnum %i origin %f %f %f neworigin %f %f %f\n", ch->entnum, ch->origin[0], ch->origin[1], ch->origin[2], cl.entities[ch->entnum].state_current.origin[0], cl.entities[ch->entnum].state_current.origin[1], cl.entities[ch->entnum].state_current.origin[2]);
 
-                       if (ch->entnum > MAX_EDICTS)
+                       if (CLVM_prog->loaded && ch->entnum > MAX_EDICTS)
                                if (!CL_VM_GetEntitySoundOrigin(ch->entnum, ch->origin))
                                        ch->entnum = MAX_EDICTS; // entity was removed, disown sound
                }
@@ -1234,7 +1242,7 @@ static void SND_Spatialize_WithSfx(channel_t *ch, qbool isstatic, sfx_t *sfx)
                        else
                                Matrix4x4_OriginFromMatrix(&cl.entities[ch->entnum].render.matrix, ch->origin);
                }
-               else if (cl.csqc_server2csqcentitynumber[ch->entnum])
+               else if (CLVM_prog->loaded && cl.csqc_server2csqcentitynumber[ch->entnum])
                {
                        //Con_Printf("-- entnum %i (client %i) origin %f %f %f neworigin %f %f %f\n", ch->entnum, cl.csqc_server2csqcentitynumber[ch->entnum], ch->origin[0], ch->origin[1], ch->origin[2], cl.entities[ch->entnum].state_current.origin[0], cl.entities[ch->entnum].state_current.origin[1], cl.entities[ch->entnum].state_current.origin[2]);
 
@@ -1844,7 +1852,6 @@ void S_StaticSound (sfx_t *sfx, vec3_t origin, float fvol, float attenuation)
        S_PlaySfxOnChannel (sfx, target_chan, CHANNELFLAG_FORCELOOP, origin, fvol, attenuation, true, 0, 0, 0, 1.0f);
 }
 
-
 /*
 ===================
 S_UpdateAmbientSounds
@@ -1864,7 +1871,10 @@ static void S_UpdateAmbientSounds (void)
        if (cl.worldmodel && cl.worldmodel->brush.AmbientSoundLevelsForPoint)
                cl.worldmodel->brush.AmbientSoundLevelsForPoint(cl.worldmodel, listener_origin, ambientlevels, sizeof(ambientlevels));
 
+
        // Calc ambient sound levels
+       S_SetUnderwaterIntensity();
+
        for (ambient_channel = 0 ; ambient_channel< NUM_AMBIENTS ; ambient_channel++)
        {
                chan = &channels[ambient_channel];
index ff5e43f188a37f0aeef8ba4fbfaff6c2583024d2..1ce9e1693ebf1c5a4ef31d0be142ebce90e61ac6 100644 (file)
@@ -125,6 +125,7 @@ extern snd_ringbuffer_t *snd_renderbuffer;
 extern qbool snd_threaded; // enables use of snd_usethreadedmixing, provided that no sound hacks are in effect (like timedemo)
 extern qbool snd_usethreadedmixing; // if true, the main thread does not mix sound, soundtime does not advance, and neither does snd_renderbuffer->endframe, instead the audio thread will call S_MixToBuffer as needed
 
+extern struct cvar_s snd_waterfx;
 extern struct cvar_s _snd_mixahead;
 extern struct cvar_s snd_swapstereo;
 extern struct cvar_s snd_streaming;
@@ -152,6 +153,8 @@ extern qbool simsound;
 //         Architecture-independent functions
 // ====================================================================
 
+void S_SetUnderwaterIntensity(void);
+
 void S_MixToBuffer(void *stream, unsigned int frames);
 
 qbool S_LoadSound (struct sfx_s *sfx, qbool complain);
index 736d6ea1964f54ab7d11485daafde3d5d498f039..d8ea1dbe3764a297ead5aef44712325d5d901ee4 100644 (file)
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -310,6 +310,66 @@ static void S_ConvertPaintBuffer(portable_sampleframe_t *painted_ptr, void *rb_p
 }
 
 
+
+/*
+===============================================================================
+
+UNDERWATER EFFECT
+
+Muffles the intensity of sounds when the player is underwater
+
+===============================================================================
+*/
+
+static struct
+{
+       float intensity;
+       float alpha;
+       float accum[SND_LISTENERS];
+}
+underwater = {0.f, 1.f, {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}};
+
+void S_SetUnderwaterIntensity(void)
+{
+       float target = cl.view_underwater ? bound(0.f, snd_waterfx.value, 2.f) : 0.f;
+
+       if (underwater.intensity < target)
+       {
+               underwater.intensity += cl.realframetime * 4.f;
+               underwater.intensity = min(underwater.intensity, target);
+       }
+       else if (underwater.intensity > target)
+       {
+               underwater.intensity -= cl.realframetime * 4.f;
+               underwater.intensity = max(underwater.intensity, target);
+       }
+
+       underwater.alpha = underwater.intensity ? exp(-underwater.intensity * log(12.f)) : 1.f;
+}
+
+static void S_UnderwaterFilter(int endtime)
+{
+       int i;
+       int sl;
+
+       if (!underwater.intensity)
+       {
+               if (endtime > 0)
+                       for (sl = 0; sl < SND_LISTENERS; sl++)
+                               underwater.accum[sl] = paintbuffer[endtime-1].sample[sl];
+               return;
+       }
+
+       for (i = 0; i < endtime; i++)
+               for (sl = 0; sl < SND_LISTENERS; sl++)
+               {
+                       underwater.accum[sl] += underwater.alpha * (paintbuffer[i].sample[sl] - underwater.accum[sl]);
+                       paintbuffer[i].sample[sl] = underwater.accum[sl];
+               }
+}
+
+
+
 /*
 ===============================================================================
 
@@ -580,6 +640,9 @@ void S_MixToBuffer(void *stream, unsigned int bufferframes)
 
                S_SoftClipPaintBuffer(paintbuffer, totalmixframes, snd_renderbuffer->format.width, snd_renderbuffer->format.channels);
 
+               S_UnderwaterFilter(totalmixframes);
+
+
 #ifdef CONFIG_VIDEO_CAPTURE
                if (!snd_usethreadedmixing)
                        S_CaptureAVISound(paintbuffer, totalmixframes);
index 036f4c63f1588cae58155a02479a9ec77f9ae1b7..138b2c09c0c78cecf275a77f2172795b19796d2e 100644 (file)
@@ -49,8 +49,6 @@ command from the console.  Active clients are kicked off.
 */
 static void SV_Map_f(cmd_state_t *cmd)
 {
-       char level[MAX_QPATH];
-
        if (Cmd_Argc(cmd) != 2)
        {
                Con_Print("map <levelname> : start a new game (kicks off all players)\n");
@@ -78,8 +76,7 @@ static void SV_Map_f(cmd_state_t *cmd)
                host.hook.ToggleMenu();
 
        svs.serverflags = 0;                    // haven't completed an episode yet
-       strlcpy(level, Cmd_Argv(cmd, 1), sizeof(level));
-       SV_SpawnServer(level);
+       SV_SpawnServer(Cmd_Argv(cmd, 1));
 
        if(sv.active && host.hook.ConnectLocal != NULL)
                host.hook.ConnectLocal();
@@ -94,8 +91,6 @@ Goes to a new map, taking all clients along
 */
 static void SV_Changelevel_f(cmd_state_t *cmd)
 {
-       char level[MAX_QPATH];
-
        if (Cmd_Argc(cmd) != 2)
        {
                Con_Print("changelevel <levelname> : continue game on a new level\n");
@@ -104,7 +99,7 @@ static void SV_Changelevel_f(cmd_state_t *cmd)
 
        if (!sv.active)
        {
-               Con_Printf("You must be running a server to changelevel. Use 'map %s' instead\n", Cmd_Argv(cmd, 1));
+               SV_Map_f(cmd);
                return;
        }
 
@@ -112,8 +107,7 @@ static void SV_Changelevel_f(cmd_state_t *cmd)
                host.hook.ToggleMenu();
 
        SV_SaveSpawnparms ();
-       strlcpy(level, Cmd_Argv(cmd, 1), sizeof(level));
-       SV_SpawnServer(level);
+       SV_SpawnServer(Cmd_Argv(cmd, 1));
        
        if(sv.active && host.hook.ConnectLocal != NULL)
                host.hook.ConnectLocal();
@@ -128,8 +122,6 @@ Restarts the current server for a dead player
 */
 static void SV_Restart_f(cmd_state_t *cmd)
 {
-       char mapname[MAX_QPATH];
-
        if (Cmd_Argc(cmd) != 1)
        {
                Con_Print("restart : restart current level\n");
@@ -144,8 +136,7 @@ static void SV_Restart_f(cmd_state_t *cmd)
        if(host.hook.ToggleMenu)
                host.hook.ToggleMenu();
 
-       strlcpy(mapname, sv.name, sizeof(mapname));
-       SV_SpawnServer(mapname);
+       SV_SpawnServer(sv.worldbasename);
        
        if(sv.active && host.hook.ConnectLocal != NULL)
                host.hook.ConnectLocal();
@@ -157,11 +148,11 @@ static void SV_Restart_f(cmd_state_t *cmd)
 static void SV_DisableCheats_c(cvar_t *var)
 {
        prvm_prog_t *prog = SVVM_prog;
-       int i = 0;
+       int i;
 
-       if (var->value == 0)
+       if (prog->loaded && var->value == 0)
        {
-               while (svs.clients[i].edict)
+               for (i = 0; i < svs.maxclients; ++i)
                {
                        if (((int)PRVM_serveredictfloat(svs.clients[i].edict, flags) & FL_GODMODE))
                                PRVM_serveredictfloat(svs.clients[i].edict, flags) = (int)PRVM_serveredictfloat(svs.clients[i].edict, flags) ^ FL_GODMODE;
@@ -173,7 +164,6 @@ static void SV_DisableCheats_c(cvar_t *var)
                                noclip_anglehack = false;
                                PRVM_serveredictfloat(svs.clients[i].edict, movetype) = MOVETYPE_WALK;
                        }
-                       i++;
                }
        }
 }
@@ -469,7 +459,7 @@ static void SV_Say(cmd_state_t *cmd, qbool teamonly)
                p2[-1] = 0;
                p2--;
        }
-       strlcat(text, "\n", sizeof(text));
+       dp_strlcat(text, "\n", sizeof(text));
 
        // note: save is not a valid edict if fromServer is true
        save = host_client;
@@ -736,10 +726,11 @@ static void SV_Status_f(cmd_state_t *cmd)
        for (players = 0, i = 0;i < svs.maxclients;i++)
                if (svs.clients[i].active)
                        players++;
+
        print ("host:     %s\n", Cvar_VariableString (&cvars_all, "hostname", CF_SERVER));
-       print ("version:  %s build %s (gamename %s)\n", gamename, buildstring, gamenetworkfiltername);
+       print ("version:  %s\n", engineversion);
        print ("protocol: %i (%s)\n", Protocol_NumberForEnum(sv.protocol), Protocol_NameForEnum(sv.protocol));
-       print ("map:      %s\n", sv.name);
+       print ("map:      %s\n", sv.worldbasename);
        print ("timing:   %s\n", SV_TimingReport(vabuf, sizeof(vabuf)));
        print ("players:  %i active (%i max)\n\n", players, svs.maxclients);
 
@@ -779,9 +770,9 @@ static void SV_Status_f(cmd_state_t *cmd)
                }
 
                if(sv_status_privacy.integer && cmd->source != src_local && LHNETADDRESS_GetAddressType(&host_client->netconnection->peeraddress) != LHNETADDRESSTYPE_LOOP)
-                       strlcpy(ip, client->netconnection ? "hidden" : "botclient", 48);
+                       dp_strlcpy(ip, client->netconnection ? "hidden" : "botclient", 48);
                else
-                       strlcpy(ip, (client->netconnection && *client->netconnection->address) ? client->netconnection->address : "botclient", 48);
+                       dp_strlcpy(ip, (client->netconnection && *client->netconnection->address) ? client->netconnection->address : "botclient", 48);
 
                frags = client->frags;
 
@@ -837,7 +828,7 @@ void SV_Name(int clientnum)
        {
                if (host_client->begun)
                        SV_BroadcastPrintf("\003%s ^7changed name to ^3%s\n", host_client->old_name, host_client->name);
-               strlcpy(host_client->old_name, host_client->name, sizeof(host_client->old_name));
+               dp_strlcpy(host_client->old_name, host_client->name, sizeof(host_client->old_name));
                // send notification to all clients
                MSG_WriteByte (&sv.reliable_datagram, svc_updatename);
                MSG_WriteByte (&sv.reliable_datagram, clientnum);
@@ -866,7 +857,7 @@ static void SV_Name_f(cmd_state_t *cmd)
        else
                newNameSource = Cmd_Args(cmd);
 
-       strlcpy(newName, newNameSource, sizeof(newName));
+       dp_strlcpy(newName, newNameSource, sizeof(newName));
 
        if (cmd->source == src_local)
                return;
@@ -880,7 +871,7 @@ static void SV_Name_f(cmd_state_t *cmd)
        host_client->nametime = host.realtime + max(0.0f, sv_namechangetimer.value);
 
        // point the string back at updateclient->name to keep it safe
-       strlcpy (host_client->name, newName, sizeof (host_client->name));
+       dp_strlcpy (host_client->name, newName, sizeof (host_client->name));
 
        for (i = 0, j = 0;host_client->name[i];i++)
                if (host_client->name[i] != '\r' && host_client->name[i] != '\n')
@@ -1138,9 +1129,9 @@ static void SV_Playermodel_f(cmd_state_t *cmd)
                return;
 
        if (Cmd_Argc (cmd) == 2)
-               strlcpy (newPath, Cmd_Argv(cmd, 1), sizeof (newPath));
+               dp_strlcpy (newPath, Cmd_Argv(cmd, 1), sizeof (newPath));
        else
-               strlcpy (newPath, Cmd_Args(cmd), sizeof (newPath));
+               dp_strlcpy (newPath, Cmd_Args(cmd), sizeof (newPath));
 
        for (i = 0, j = 0;newPath[i];i++)
                if (newPath[i] != '\r' && newPath[i] != '\n')
@@ -1158,11 +1149,11 @@ static void SV_Playermodel_f(cmd_state_t *cmd)
        */
 
        // point the string back at updateclient->name to keep it safe
-       strlcpy (host_client->playermodel, newPath, sizeof (host_client->playermodel));
+       dp_strlcpy (host_client->playermodel, newPath, sizeof (host_client->playermodel));
        PRVM_serveredictstring(host_client->edict, playermodel) = PRVM_SetEngineString(prog, host_client->playermodel);
        if (strcmp(host_client->old_model, host_client->playermodel))
        {
-               strlcpy(host_client->old_model, host_client->playermodel, sizeof(host_client->old_model));
+               dp_strlcpy(host_client->old_model, host_client->playermodel, sizeof(host_client->old_model));
                /*// send notification to all clients
                MSG_WriteByte (&sv.reliable_datagram, svc_updatepmodel);
                MSG_WriteByte (&sv.reliable_datagram, host_client - svs.clients);
@@ -1185,9 +1176,9 @@ static void SV_Playerskin_f(cmd_state_t *cmd)
                return;
 
        if (Cmd_Argc (cmd) == 2)
-               strlcpy (newPath, Cmd_Argv(cmd, 1), sizeof (newPath));
+               dp_strlcpy (newPath, Cmd_Argv(cmd, 1), sizeof (newPath));
        else
-               strlcpy (newPath, Cmd_Args(cmd), sizeof (newPath));
+               dp_strlcpy (newPath, Cmd_Args(cmd), sizeof (newPath));
 
        for (i = 0, j = 0;newPath[i];i++)
                if (newPath[i] != '\r' && newPath[i] != '\n')
@@ -1205,13 +1196,13 @@ static void SV_Playerskin_f(cmd_state_t *cmd)
        */
 
        // point the string back at updateclient->name to keep it safe
-       strlcpy (host_client->playerskin, newPath, sizeof (host_client->playerskin));
+       dp_strlcpy (host_client->playerskin, newPath, sizeof (host_client->playerskin));
        PRVM_serveredictstring(host_client->edict, playerskin) = PRVM_SetEngineString(prog, host_client->playerskin);
        if (strcmp(host_client->old_skin, host_client->playerskin))
        {
                //if (host_client->begun)
                //      SV_BroadcastPrintf("%s changed skin to %s\n", host_client->name, host_client->playerskin);
-               strlcpy(host_client->old_skin, host_client->playerskin, sizeof(host_client->old_skin));
+               dp_strlcpy(host_client->old_skin, host_client->playerskin, sizeof(host_client->old_skin));
                /*// send notification to all clients
                MSG_WriteByte (&sv.reliable_datagram, svc_updatepskin);
                MSG_WriteByte (&sv.reliable_datagram, host_client - svs.clients);
@@ -1613,7 +1604,7 @@ void SV_InitOperatorCommands(void)
        Cmd_AddCommand(CF_SERVER | CF_SERVER_FROM_CLIENT, "status", SV_Status_f, "print server status information");
        Cmd_AddCommand(CF_SHARED, "map", SV_Map_f, "kick everyone off the server and start a new level");
        Cmd_AddCommand(CF_SHARED, "restart", SV_Restart_f, "restart current level");
-       Cmd_AddCommand(CF_SHARED, "changelevel", SV_Changelevel_f, "change to another level, bringing along all connected clients");
+       Cmd_AddCommand(CF_SHARED, "changelevel", SV_Changelevel_f, "change to another level, bringing along all connected clients (or start a new level if none is loaded)");
        Cmd_AddCommand(CF_SHARED | CF_SERVER_FROM_CLIENT, "say", SV_Say_f, "send a chat message to everyone on the server");
        Cmd_AddCommand(CF_SERVER_FROM_CLIENT, "say_team", SV_Say_Team_f, "send a chat message to your team on the server");
        Cmd_AddCommand(CF_SHARED | CF_SERVER_FROM_CLIENT, "tell", SV_Tell_f, "send a chat message to only one person on the server");
index 08ebe8411bb0e8615fef4bed77fd99d8ce0a8479..de267620568d8b404ac39e24be2488c7c9ecdc20 100644 (file)
--- a/sv_demo.c
+++ b/sv_demo.c
@@ -11,7 +11,7 @@ void SV_StartDemoRecording(client_t *client, const char *filename, int forcetrac
        if(client->sv_demo_file != NULL)
                return; // we already have a demo
 
-       strlcpy(name, filename, sizeof(name));
+       dp_strlcpy(name, filename, sizeof(name));
        FS_DefaultExtension(name, ".dem", sizeof(name));
 
        Con_Printf("Recording demo for # %d (%s) to %s\n", PRVM_NUM_FOR_EDICT(client->edict), client->netaddress, name);
index 8b5cfb84d7dbd95ab4e1d742c215a0b5bd30148b..f35abf3fe2aba1764441059aae8d740ceb740436 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -72,6 +72,7 @@ cvar_t sv_allowdownloads_archive = {CF_SERVER, "sv_allowdownloads_archive", "0",
 cvar_t sv_allowdownloads_config = {CF_SERVER, "sv_allowdownloads_config", "0", "whether to allow downloads of config files (cfg)"};
 cvar_t sv_allowdownloads_dlcache = {CF_SERVER, "sv_allowdownloads_dlcache", "0", "whether to allow downloads of dlcache files (dlcache/)"};
 cvar_t sv_allowdownloads_inarchive = {CF_SERVER, "sv_allowdownloads_inarchive", "0", "whether to allow downloads from archives (pak/pk3)"};
+cvar_t sv_areagrid_link_SOLID_NOT = {CF_SERVER | CF_NOTIFY, "sv_areagrid_link_SOLID_NOT", "1", "set to 0 to prevent SOLID_NOT entities from being linked to the area grid, and unlink any that are already linked (in the code paths that would otherwise link them), for better performance"};
 cvar_t sv_areagrid_mingridsize = {CF_SERVER | CF_NOTIFY, "sv_areagrid_mingridsize", "128", "minimum areagrid cell size, smaller values work better for lots of small objects, higher values for large objects"};
 cvar_t sv_checkforpacketsduringsleep = {CF_SERVER, "sv_checkforpacketsduringsleep", "0", "uses select() function to wait between frames which can be interrupted by packets being received, instead of Sleep()/usleep()/SDL_Sleep() functions which do not check for packets"};
 cvar_t sv_clmovement_enable = {CF_SERVER, "sv_clmovement_enable", "1", "whether to allow clients to use cl_movement prediction, which can cause choppy movement on the server which may annoy other players"};
@@ -82,16 +83,16 @@ cvar_t sv_cullentities_nevercullbmodels = {CF_SERVER, "sv_cullentities_nevercull
 cvar_t sv_cullentities_pvs = {CF_SERVER, "sv_cullentities_pvs", "1", "fast but loose culling of hidden entities"};
 cvar_t sv_cullentities_stats = {CF_SERVER, "sv_cullentities_stats", "0", "displays stats on network entities culled by various methods for each client"};
 cvar_t sv_cullentities_trace = {CF_SERVER, "sv_cullentities_trace", "0", "somewhat slow but very tight culling of hidden entities, minimizes network traffic and makes wallhack cheats useless"};
-cvar_t sv_cullentities_trace_delay = {CF_SERVER, "sv_cullentities_trace_delay", "1", "number of seconds until the entity gets actually culled"};
+cvar_t sv_cullentities_trace_delay = {CF_SERVER, "sv_cullentities_trace_delay", "1", "number of seconds until the entity gets actually culled (also applies to portal camera eyes even if sv_cullentities_trace is 0)"};
 cvar_t sv_cullentities_trace_delay_players = {CF_SERVER, "sv_cullentities_trace_delay_players", "0.2", "number of seconds until the entity gets actually culled if it is a player entity"};
-cvar_t sv_cullentities_trace_enlarge = {CF_SERVER, "sv_cullentities_trace_enlarge", "0", "box enlargement for entity culling"};
-cvar_t sv_cullentities_trace_expand = {CF_SERVER, "sv_cullentities_trace_expand", "0", "box is expanded by this many units for entity culling"};
-cvar_t sv_cullentities_trace_eyejitter = {CF_SERVER, "sv_cullentities_trace_eyejitter", "16", "jitter the eye by this much for each trace"};
+cvar_t sv_cullentities_trace_enlarge = {CF_SERVER, "sv_cullentities_trace_enlarge", "0", "box enlargement for entity culling (also applies to portal camera eyes even if sv_cullentities_trace is 0)"};
+cvar_t sv_cullentities_trace_expand = {CF_SERVER, "sv_cullentities_trace_expand", "0", "box is expanded by this many units for entity culling (also applies to portal camera eyes even if sv_cullentities_trace is 0)"};
+cvar_t sv_cullentities_trace_eyejitter = {CF_SERVER, "sv_cullentities_trace_eyejitter", "16", "jitter the eye by this much for each trace (also applies to portal camera eyes even if sv_cullentities_trace is 0)"};
 cvar_t sv_cullentities_trace_prediction = {CF_SERVER, "sv_cullentities_trace_prediction", "1", "also trace from the predicted player position"};
-cvar_t sv_cullentities_trace_prediction_time = {CF_SERVER, "sv_cullentities_trace_prediction_time", "0.2", "how many seconds of prediction to use"};
+cvar_t sv_cullentities_trace_prediction_time = {CF_SERVER, "sv_cullentities_trace_prediction_time", "0.2", "maximum ping time to predict in seconds"};
 cvar_t sv_cullentities_trace_entityocclusion = {CF_SERVER, "sv_cullentities_trace_entityocclusion", "0", "also check if doors and other bsp models are in the way"};
 cvar_t sv_cullentities_trace_samples = {CF_SERVER, "sv_cullentities_trace_samples", "2", "number of samples to test for entity culling"};
-cvar_t sv_cullentities_trace_samples_extra = {CF_SERVER, "sv_cullentities_trace_samples_extra", "2", "number of samples to test for entity culling when the entity affects its surroundings by e.g. dlight"};
+cvar_t sv_cullentities_trace_samples_extra = {CF_SERVER, "sv_cullentities_trace_samples_extra", "2", "number of samples to test for entity culling when the entity affects its surroundings by e.g. dlight (also applies to portal camera eyes even if sv_cullentities_trace is 0)"};
 cvar_t sv_cullentities_trace_samples_players = {CF_SERVER, "sv_cullentities_trace_samples_players", "8", "number of samples to test for entity culling when the entity is a player entity"};
 cvar_t sv_cullentities_trace_spectators = {CF_SERVER, "sv_cullentities_trace_spectators", "0", "enables trace entity culling for clients that are spectating"};
 cvar_t sv_debugmove = {CF_SERVER | CF_NOTIFY, "sv_debugmove", "0", "disables collision detection optimizations for debugging purposes"};
@@ -112,7 +113,7 @@ cvar_t sv_gameplayfix_grenadebouncedownslopes = {CF_SERVER, "sv_gameplayfix_gren
 cvar_t sv_gameplayfix_multiplethinksperframe = {CF_SERVER, "sv_gameplayfix_multiplethinksperframe", "1", "allows entities to think more often than the server framerate, primarily useful for very high fire rate weapons"};
 cvar_t sv_gameplayfix_noairborncorpse = {CF_SERVER, "sv_gameplayfix_noairborncorpse", "1", "causes entities (corpses, items, etc) sitting ontop of moving entities (players) to fall when the moving entity (player) is no longer supporting them"};
 cvar_t sv_gameplayfix_noairborncorpse_allowsuspendeditems = {CF_SERVER, "sv_gameplayfix_noairborncorpse_allowsuspendeditems", "1", "causes entities sitting ontop of objects that are instantaneously remove to float in midair (special hack to allow a common level design trick for floating items)"};
-cvar_t sv_gameplayfix_nudgeoutofsolid = {CF_SERVER, "sv_gameplayfix_nudgeoutofsolid", "0", "attempts to fix physics errors (where an object ended up in solid for some reason)"};
+cvar_t sv_gameplayfix_nudgeoutofsolid = {CF_SERVER, "sv_gameplayfix_nudgeoutofsolid", "1", "attempts to fix physics errors where an object ended up in solid for some reason, supersedes sv_gameplayfix_unstickentities"};
 cvar_t sv_gameplayfix_nudgeoutofsolid_separation = {CF_SERVER, "sv_gameplayfix_nudgeoutofsolid_separation", "0.03125", "keep objects this distance apart to prevent collision issues on seams"};
 cvar_t sv_gameplayfix_q2airaccelerate = {CF_SERVER, "sv_gameplayfix_q2airaccelerate", "0", "Quake2-style air acceleration"};
 cvar_t sv_gameplayfix_nogravityonground = {CF_SERVER, "sv_gameplayfix_nogravityonground", "0", "turn off gravity when on ground (to get rid of sliding)"};
@@ -125,15 +126,15 @@ cvar_t sv_gameplayfix_swiminbmodels = {CF_SERVER, "sv_gameplayfix_swiminbmodels"
 cvar_t sv_gameplayfix_upwardvelocityclearsongroundflag = {CF_SERVER, "sv_gameplayfix_upwardvelocityclearsongroundflag", "1", "prevents monsters, items, and most other objects from being stuck to the floor when pushed around by damage, and other situations in mods"};
 cvar_t sv_gameplayfix_downtracesupportsongroundflag = {CF_SERVER, "sv_gameplayfix_downtracesupportsongroundflag", "1", "prevents very short moves from clearing onground (which may make the player stick to the floor at high netfps), fixes groundentity not being set when walking onto a mover with sv_gameplayfix_nogravityonground"};
 cvar_t sv_gameplayfix_q1bsptracelinereportstexture = {CF_SERVER, "sv_gameplayfix_q1bsptracelinereportstexture", "1", "enables mods to get accurate trace_texture results on q1bsp by using a surface-hitting traceline implementation rather than the standard solidbsp method, q3bsp always reports texture accurately"};
-cvar_t sv_gameplayfix_unstickplayers = {CF_SERVER, "sv_gameplayfix_unstickplayers", "1", "big hack to try and fix the rare case of MOVETYPE_WALK entities getting stuck in the world clipping hull."};
-cvar_t sv_gameplayfix_unstickentities = {CF_SERVER, "sv_gameplayfix_unstickentities", "1", "hack to check if entities are crossing world collision hull and try to move them to the right position"};
+cvar_t sv_gameplayfix_unstickplayers = {CF_SERVER, "sv_gameplayfix_unstickplayers", "0", "big hack to try and fix the rare case of MOVETYPE_WALK entities getting stuck in the world clipping hull."};
+cvar_t sv_gameplayfix_unstickentities = {CF_SERVER, "sv_gameplayfix_unstickentities", "1", "hack to check if entities are crossing world collision hull and try to move them to the right position, superseded by sv_gameplayfix_nudgeoutofsolid"};
 cvar_t sv_gameplayfix_fixedcheckwatertransition = {CF_SERVER, "sv_gameplayfix_fixedcheckwatertransition", "1", "fix two very stupid bugs in SV_CheckWaterTransition when watertype is CONTENTS_EMPTY (the bugs causes waterlevel to be 1 on first frame, -1 on second frame - the fix makes it 0 on both frames)"};
-cvar_t sv_gameplayfix_customstats = {CF_SERVER, "sv_gameplayfix_customstats", "0", "Disable stats higher than 220, for use by certain games such as Xonotic"};
 cvar_t sv_gravity = {CF_SERVER | CF_NOTIFY, "sv_gravity","800", "how fast you fall (512 = roughly earth gravity)"};
 cvar_t sv_init_frame_count = {CF_SERVER, "sv_init_frame_count", "2", "number of frames to run to allow everything to settle before letting clients connect"};
 cvar_t sv_idealpitchscale = {CF_SERVER, "sv_idealpitchscale","0.8", "how much to look up/down slopes and stairs when not using freelook"};
 cvar_t sv_jumpstep = {CF_SERVER | CF_NOTIFY, "sv_jumpstep", "0", "whether you can step up while jumping"};
 cvar_t sv_jumpvelocity = {CF_SERVER, "sv_jumpvelocity", "270", "cvar that can be used by QuakeC code for jump velocity"};
+cvar_t sv_legacy_bbox_expand = {CF_SERVER, "sv_legacy_bbox_expand", "1", "before linking an entity to the area grid, decrease its mins and increase its maxs by '1 1 1', or '15 15 1' if it has flag FL_ITEM (this is the Quake/QuakeWorld behaviour); disable to make SVQC bboxes consistent with CSQC which never does this expansion"};
 cvar_t sv_maxairspeed = {CF_SERVER, "sv_maxairspeed", "30", "maximum speed a player can accelerate to when airborn (note that it is possible to completely stop by moving the opposite direction)"};
 cvar_t sv_maxrate = {CF_SERVER | CF_ARCHIVE | CF_NOTIFY, "sv_maxrate", "1000000", "upper limit on client rate cvar, should reflect your network connection quality"};
 cvar_t sv_maxspeed = {CF_SERVER | CF_NOTIFY, "sv_maxspeed", "320", "maximum speed a player can accelerate to when on ground (can be exceeded by tricks)"};
@@ -142,6 +143,7 @@ cvar_t sv_nostep = {CF_SERVER | CF_NOTIFY, "sv_nostep","0", "prevents MOVETYPE_S
 cvar_t sv_playerphysicsqc = {CF_SERVER | CF_NOTIFY, "sv_playerphysicsqc", "1", "enables QuakeC function to override player physics"};
 cvar_t sv_progs = {CF_SERVER, "sv_progs", "progs.dat", "selects which quakec progs.dat file to run" };
 cvar_t sv_protocolname = {CF_SERVER, "sv_protocolname", "DP7", "selects network protocol to host for (values include QUAKE, QUAKEDP, NEHAHRAMOVIE, DP1 and up)"};
+cvar_t sv_qcstats = {CF_SERVER, "sv_qcstats", "0", "Disables engine sending of stats 220 and above, for use by certain games such as Xonotic, NOTE: it's strongly recommended that SVQC send correct STAT_MOVEVARS_TICRATE and STAT_MOVEVARS_TIMESCALE"};
 cvar_t sv_random_seed = {CF_SERVER, "sv_random_seed", "", "random seed; when set, on every map start this random seed is used to initialize the random number generator. Don't touch it unless for benchmarking or debugging"};
 cvar_t host_limitlocal = {CF_SERVER, "host_limitlocal", "0", "whether to apply rate limiting to the local player in a listen server (only useful for testing)"};
 cvar_t sv_sound_land = {CF_SERVER, "sv_sound_land", "demon/dland2.wav", "sound to play when MOVETYPE_STEP entity hits the ground at high speed (empty cvar disables the sound)"};
@@ -158,10 +160,15 @@ cvar_t sv_warsowbunny_turnaccel = {CF_SERVER, "sv_warsowbunny_turnaccel", "0", "
 cvar_t sv_warsowbunny_backtosideratio = {CF_SERVER, "sv_warsowbunny_backtosideratio", "0.8", "lower values make it easier to change direction without losing speed; the drawback is \"understeering\" in sharp turns"};
 cvar_t sv_onlycsqcnetworking = {CF_SERVER, "sv_onlycsqcnetworking", "0", "disables legacy entity networking code for higher performance (except on clients, which can still be legacy)"};
 cvar_t sv_areadebug = {CF_SERVER, "sv_areadebug", "0", "disables physics culling for debugging purposes (only for development)"};
+
 cvar_t sys_ticrate = {CF_SERVER | CF_ARCHIVE, "sys_ticrate","0.0138889", "how long a server frame is in seconds, 0.05 is 20fps server rate, 0.1 is 10fps (can not be set higher than 0.1), 0 runs as many server frames as possible (makes games against bots a little smoother, overwhelms network players), 0.0138889 matches QuakeWorld physics"};
+cvar_t sv_maxphysicsframesperserverframe = {CF_SERVER, "sv_maxphysicsframesperserverframe","10", "maximum number of physics frames per server frame"};
+cvar_t sv_lagreporting_always = {CF_SERVER, "sv_lagreporting_always", "0", "report lag even in singleplayer, listen, or an empty dedicated server"};
+cvar_t sv_lagreporting_strict = {CF_SERVER, "sv_lagreporting_strict", "0", "log any extra frames run to catch up after a holdup (only applies when sv_maxphysicsframesperserverframe > 1)"};
+cvar_t sv_threaded = {CF_SERVER, "sv_threaded", "0", "enables a separate thread for server code, improving performance, especially when hosting a game while playing, EXPERIMENTAL, may be crashy"};
+
 cvar_t teamplay = {CF_SERVER | CF_NOTIFY, "teamplay","0", "teamplay mode, values depend on mod but typically 0 = no teams, 1 = no team damage no self damage, 2 = team damage and self damage, some mods support 3 = no team damage but can damage self"};
 cvar_t timelimit = {CF_SERVER | CF_NOTIFY, "timelimit","0", "ends level at this time (in minutes)"};
-cvar_t sv_threaded = {CF_SERVER, "sv_threaded", "0", "enables a separate thread for server code, improving performance, especially when hosting a game while playing, EXPERIMENTAL, may be crashy"};
 
 cvar_t sv_rollspeed = {CF_CLIENT, "sv_rollspeed", "200", "how much strafing is necessary to tilt the view"};
 cvar_t sv_rollangle = {CF_CLIENT, "sv_rollangle", "2.0", "how much to tilt the view when strafing"};
@@ -205,7 +212,7 @@ cvar_t sv_autodemo_perclient_discardable = {CF_SERVER | CF_ARCHIVE, "sv_autodemo
 
 cvar_t halflifebsp = {CF_SERVER, "halflifebsp", "0", "indicates the current map is hlbsp format (useful to know because of different bounding box sizes)"};
 cvar_t sv_mapformat_is_quake2 = {CF_SERVER, "sv_mapformat_is_quake2", "0", "indicates the current map is q2bsp format (useful to know because of different entity behaviors, .frame on submodels and other things)"};
-cvar_t sv_mapformat_is_quake3 = {CF_SERVER, "sv_mapformat_is_quake3", "0", "indicates the current map is q2bsp format (useful to know because of different entity behaviors)"};
+cvar_t sv_mapformat_is_quake3 = {CF_SERVER, "sv_mapformat_is_quake3", "0", "indicates the current map is q3bsp format (useful to know because of different entity behaviors)"};
 
 cvar_t sv_writepicture_quality = {CF_SERVER | CF_ARCHIVE, "sv_writepicture_quality", "10", "WritePicture quality offset (higher means better quality, but slower)"};
 
@@ -258,12 +265,11 @@ static const char *standardeffectnames[EFFECT_TOTAL] =
        "SVC_PARTICLE"
 };
 
-#define SV_REQFUNCS 0
-#define sv_reqfuncs NULL
 
-//#define SV_REQFUNCS (sizeof(sv_reqfuncs) / sizeof(const char *))
-//static const char *sv_reqfuncs[] = {
-//};
+static void SV_CheckRequiredFuncs(prvm_prog_t *prog, const char *filename)
+{
+       // no required funcs?!
+}
 
 #define SV_REQFIELDS (sizeof(sv_reqfields) / sizeof(prvm_required_field_t))
 
@@ -450,7 +456,6 @@ static void SV_ServerOptions (void)
        i = Sys_CheckParm ("-dedicated");
        if (i || !cl_available)
        {
-               cls.state = ca_dedicated;
                // check for -dedicated specifying how many players
                if (i && i + 1 < sys.argc && atoi (sys.argv[i+1]) >= 1)
                        svs.maxclients = atoi (sys.argv[i+1]);
@@ -550,6 +555,7 @@ void SV_Init (void)
        Cvar_RegisterVariable (&sv_allowdownloads_config);
        Cvar_RegisterVariable (&sv_allowdownloads_dlcache);
        Cvar_RegisterVariable (&sv_allowdownloads_inarchive);
+       Cvar_RegisterVariable (&sv_areagrid_link_SOLID_NOT);
        Cvar_RegisterVariable (&sv_areagrid_mingridsize);
        Cvar_RegisterVariable (&sv_checkforpacketsduringsleep);
        Cvar_RegisterVariable (&sv_clmovement_enable);
@@ -606,12 +612,13 @@ void SV_Init (void)
        Cvar_RegisterVariable (&sv_gameplayfix_unstickplayers);
        Cvar_RegisterVariable (&sv_gameplayfix_unstickentities);
        Cvar_RegisterVariable (&sv_gameplayfix_fixedcheckwatertransition);
-       Cvar_RegisterVariable (&sv_gameplayfix_customstats);
+       Cvar_RegisterVariable (&sv_qcstats);
        Cvar_RegisterVariable (&sv_gravity);
        Cvar_RegisterVariable (&sv_init_frame_count);
        Cvar_RegisterVariable (&sv_idealpitchscale);
        Cvar_RegisterVariable (&sv_jumpstep);
        Cvar_RegisterVariable (&sv_jumpvelocity);
+       Cvar_RegisterVariable (&sv_legacy_bbox_expand);
        Cvar_RegisterVariable (&sv_maxairspeed);
        Cvar_RegisterVariable (&sv_maxrate);
        Cvar_RegisterVariable (&sv_maxspeed);
@@ -637,10 +644,15 @@ void SV_Init (void)
        Cvar_RegisterVariable (&sv_warsowbunny_backtosideratio);
        Cvar_RegisterVariable (&sv_onlycsqcnetworking);
        Cvar_RegisterVariable (&sv_areadebug);
+
        Cvar_RegisterVariable (&sys_ticrate);
+       Cvar_RegisterVariable (&sv_maxphysicsframesperserverframe);
+       Cvar_RegisterVariable (&sv_lagreporting_always);
+       Cvar_RegisterVariable (&sv_lagreporting_strict);
+       Cvar_RegisterVariable (&sv_threaded);
+
        Cvar_RegisterVariable (&teamplay);
        Cvar_RegisterVariable (&timelimit);
-       Cvar_RegisterVariable (&sv_threaded);
 
        Cvar_RegisterVariable (&sv_rollangle);
        Cvar_RegisterVariable (&sv_rollspeed);
@@ -783,7 +795,7 @@ void SV_SendServerinfo (client_t *client)
 
        SZ_Clear (&client->netconnection->message);
        MSG_WriteByte (&client->netconnection->message, svc_print);
-       dpsnprintf (message, sizeof (message), "\nServer: %s build %s (progs %i crc)\n", gamename, buildstring, prog->filecrc);
+       dpsnprintf (message, sizeof (message), "\nServer: %s (progs %i crc)\n", engineversion, prog->filecrc);
        MSG_WriteString (&client->netconnection->message,message);
 
        SV_StopDemoRecording(client); // to split up demos into different files
@@ -946,8 +958,8 @@ void SV_ConnectClient (int clientnum, netconn_t *netconnection)
                                );
        }
 
-       strlcpy(client->name, "unconnected", sizeof(client->name));
-       strlcpy(client->old_name, "unconnected", sizeof(client->old_name));
+       dp_strlcpy(client->name, "unconnected", sizeof(client->name));
+       dp_strlcpy(client->old_name, "unconnected", sizeof(client->old_name));
        client->prespawned = false;
        client->spawned = false;
        client->begun = false;
@@ -1224,7 +1236,7 @@ static void SV_Download_f(cmd_state_t *cmd)
 
        Download_CheckExtensions(cmd);
 
-       strlcpy(host_client->download_name, Cmd_Argv(cmd, 1), sizeof(host_client->download_name));
+       dp_strlcpy(host_client->download_name, Cmd_Argv(cmd, 1), sizeof(host_client->download_name));
        extension = FS_FileExtension(host_client->download_name);
 
        // host_client is asking to download a specified file
@@ -1237,7 +1249,7 @@ static void SV_Download_f(cmd_state_t *cmd)
                extensions[0] = '\0';
                
                if(host_client->download_deflate)
-                       strlcat(extensions, " deflate", sizeof(extensions));
+                       dp_strlcat(extensions, " deflate", sizeof(extensions));
                
                Con_DPrintf("Downloading %s to %s\n", host_client->download_name, host_client->name);
 
@@ -1392,7 +1404,7 @@ int SV_ModelIndex(const char *s, int precachemode)
        // testing
        //if (precachemode == 2)
        //      return 0;
-       strlcpy(filename, s, sizeof(filename));
+       dp_strlcpy(filename, s, sizeof(filename));
        for (i = 2;i < limit;i++)
        {
                if (!sv.model_precache[i][0])
@@ -1406,7 +1418,7 @@ int SV_ModelIndex(const char *s, int precachemode)
                                }
                                if (precachemode == 1)
                                        Con_Printf("SV_ModelIndex(\"%s\"): not precached (fix your code), precaching anyway\n", filename);
-                               strlcpy(sv.model_precache[i], filename, sizeof(sv.model_precache[i]));
+                               dp_strlcpy(sv.model_precache[i], filename, sizeof(sv.model_precache[i]));
                                if (sv.state == ss_loading)
                                {
                                        // running from SV_SpawnServer which is launched from the client console command interpreter
@@ -1455,7 +1467,7 @@ int SV_SoundIndex(const char *s, int precachemode)
        // testing
        //if (precachemode == 2)
        //      return 0;
-       strlcpy(filename, s, sizeof(filename));
+       dp_strlcpy(filename, s, sizeof(filename));
        for (i = 1;i < limit;i++)
        {
                if (!sv.sound_precache[i][0])
@@ -1469,7 +1481,7 @@ int SV_SoundIndex(const char *s, int precachemode)
                                }
                                if (precachemode == 1)
                                        Con_Printf("SV_SoundIndex(\"%s\"): not precached (fix your code), precaching anyway\n", filename);
-                               strlcpy(sv.sound_precache[i], filename, sizeof(sv.sound_precache[i]));
+                               dp_strlcpy(sv.sound_precache[i], filename, sizeof(sv.sound_precache[i]));
                                if (sv.state != ss_loading)
                                {
                                        MSG_WriteByte(&sv.reliable_datagram, svc_precache);
@@ -1510,7 +1522,7 @@ int SV_ParticleEffectIndex(const char *name)
                sv.particleeffectnamesloaded = true;
                memset(sv.particleeffectname, 0, sizeof(sv.particleeffectname));
                for (i = 0;i < EFFECT_TOTAL;i++)
-                       strlcpy(sv.particleeffectname[i], standardeffectnames[i], sizeof(sv.particleeffectname[i]));
+                       dp_strlcpy(sv.particleeffectname[i], standardeffectnames[i], sizeof(sv.particleeffectname[i]));
                for (filepass = 0;;filepass++)
                {
                        if (filepass == 0)
@@ -1534,7 +1546,7 @@ int SV_ParticleEffectIndex(const char *name)
                                                break;
                                        if (argc < 16)
                                        {
-                                               strlcpy(argv[argc], com_token, sizeof(argv[argc]));
+                                               dp_strlcpy(argv[argc], com_token, sizeof(argv[argc]));
                                                argc++;
                                        }
                                }
@@ -1555,7 +1567,7 @@ int SV_ParticleEffectIndex(const char *name)
                                                        }
                                                        else
                                                        {
-                                                               strlcpy(sv.particleeffectname[effectnameindex], argv[1], sizeof(sv.particleeffectname[effectnameindex]));
+                                                               dp_strlcpy(sv.particleeffectname[effectnameindex], argv[1], sizeof(sv.particleeffectname[effectnameindex]));
                                                                break;
                                                        }
                                                }
@@ -1708,7 +1720,7 @@ static void SV_Prepare_CSQC(void)
 
                sv.csqc_progsize = (int)progsize;
                sv.csqc_progcrc = CRC_Block(svs.csqc_progdata, progsize);
-               strlcpy(sv.csqc_progname, csqc_progname.string, sizeof(sv.csqc_progname));
+               dp_strlcpy(sv.csqc_progname, csqc_progname.string, sizeof(sv.csqc_progname));
                Con_DPrintf("server detected csqc progs file \"%s\" with size %i and crc %i\n", sv.csqc_progname, sv.csqc_progsize, sv.csqc_progcrc);
 
                Con_DPrint("Compressing csprogs.dat\n");
@@ -1760,6 +1772,21 @@ int SV_IsLocalServer(void)
        return (host_isclient.integer && sv.active ? svs.maxclients : 0);
 }
 
+static void SV_VM_Shutdown(qbool prog_reset)
+{
+       prvm_prog_t *prog = SVVM_prog;
+
+       if(prog->loaded && PRVM_serverfunction(SV_Shutdown))
+       {
+               func_t s = PRVM_serverfunction(SV_Shutdown);
+               PRVM_serverglobalfloat(time) = sv.time;
+               PRVM_serverfunction(SV_Shutdown) = 0; // prevent it from getting called again
+               prog->ExecuteProgram(prog, s,"SV_Shutdown() required");
+       }
+       if (prog_reset)
+               PRVM_Prog_Reset(prog);
+}
+
 /*
 ================
 SV_SpawnServer
@@ -1776,21 +1803,26 @@ void SV_SpawnServer (const char *map)
        char *entities;
        model_t *worldmodel;
        char modelname[sizeof(sv.worldname)];
+       const char *canonicalname;
        char vabuf[1024];
 
        Con_Printf("SpawnServer: %s\n", map);
 
        dpsnprintf (modelname, sizeof(modelname), "maps/%s.bsp", map);
 
-       if (!FS_FileExists(modelname))
+       if (!(canonicalname = FS_FileExists(modelname)))
        {
                dpsnprintf (modelname, sizeof(modelname), "maps/%s", map);
-               if (!FS_FileExists(modelname))
+               if (!(canonicalname = FS_FileExists(modelname)))
                {
-                       Con_Printf("SpawnServer: no map file named %s\n", modelname);
+                       Con_Printf(CON_ERROR "SpawnServer: no map file named %s.bsp\n", modelname);
                        return;
                }
        }
+       // if it's not in a pak canonicalname will be the same pointer as modelname
+       // if it's in a pak canonicalname may differ by case
+       if (modelname != canonicalname)
+               dp_strlcpy(modelname, canonicalname, sizeof(modelname));
 
 //     SV_LockThreadMutex();
 
@@ -1803,16 +1835,7 @@ void SV_SpawnServer (const char *map)
        }
 
        if(sv.active)
-       {
-               World_End(&sv.world);
-               if(PRVM_serverfunction(SV_Shutdown))
-               {
-                       func_t s = PRVM_serverfunction(SV_Shutdown);
-                       PRVM_serverglobalfloat(time) = sv.time;
-                       PRVM_serverfunction(SV_Shutdown) = 0; // prevent it from getting called again
-                       prog->ExecuteProgram(prog, s,"SV_Shutdown() required");
-               }
-       }
+               SV_VM_Shutdown(false);
 
        // free q3 shaders so that any newly downloaded shaders will be active
        Mod_FreeQ3Shaders();
@@ -1820,7 +1843,7 @@ void SV_SpawnServer (const char *map)
        worldmodel = Mod_ForName(modelname, false, developer.integer > 0, NULL);
        if (!worldmodel || !worldmodel->TraceBox)
        {
-               Con_Printf("Couldn't load map %s\n", modelname);
+               Con_Printf(CON_ERROR "Couldn't load map %s\n", modelname);
 
                if(!host_isclient.integer)
                        Sys_MakeProcessMean();
@@ -1886,6 +1909,10 @@ void SV_SpawnServer (const char *map)
 // set up the new server
 //
        memset (&sv, 0, sizeof(sv));
+
+       // tell SV_Frame() to reset its timers
+       sv.spawnframe = host.framecount;
+
        // if running a local client, make sure it doesn't try to access the last
        // level's data which is no longer valiud
        cls.signon = 0;
@@ -1905,10 +1932,10 @@ void SV_SpawnServer (const char *map)
        sv.active = true;
 
        // set level base name variables for later use
-       strlcpy (sv.name, map, sizeof (sv.name));
-       strlcpy(sv.worldname, modelname, sizeof(sv.worldname));
+       dp_strlcpy(sv.worldname, modelname, sizeof(sv.worldname));
        FS_StripExtension(sv.worldname, sv.worldnamenoextension, sizeof(sv.worldnamenoextension));
-       strlcpy(sv.worldbasename, !strncmp(sv.worldnamenoextension, "maps/", 5) ? sv.worldnamenoextension + 5 : sv.worldnamenoextension, sizeof(sv.worldbasename));
+       dp_strlcpy(sv.worldbasename, !strncasecmp(sv.worldnamenoextension, "maps/", 5) ? sv.worldnamenoextension + 5 : sv.worldnamenoextension, sizeof(sv.worldbasename));
+//     dp_strlcpy(sv.name, sv.worldbasename, sizeof (sv.name)); // TODO can we just remove this now?
        //Cvar_SetQuick(&sv_worldmessage, sv.worldmessage); // set later after QC is spawned
        Cvar_SetQuick(&sv_worldname, sv.worldname);
        Cvar_SetQuick(&sv_worldnamenoextension, sv.worldnamenoextension);
@@ -1959,17 +1986,17 @@ void SV_SpawnServer (const char *map)
        World_SetSize(&sv.world, sv.worldname, sv.worldmodel->normalmins, sv.worldmodel->normalmaxs, prog);
        World_Start(&sv.world);
 
-       strlcpy(sv.sound_precache[0], "", sizeof(sv.sound_precache[0]));
+       dp_strlcpy(sv.sound_precache[0], "", sizeof(sv.sound_precache[0]));
 
-       strlcpy(sv.model_precache[0], "", sizeof(sv.model_precache[0]));
-       strlcpy(sv.model_precache[1], sv.worldname, sizeof(sv.model_precache[1]));
+       dp_strlcpy(sv.model_precache[0], "", sizeof(sv.model_precache[0]));
+       dp_strlcpy(sv.model_precache[1], sv.worldname, sizeof(sv.model_precache[1]));
        for (i = 1;i < sv.worldmodel->brush.numsubmodels && i+1 < MAX_MODELS;i++)
        {
                dpsnprintf(sv.model_precache[i+1], sizeof(sv.model_precache[i+1]), "*%i", i);
                sv.models[i+1] = Mod_ForName (sv.model_precache[i+1], false, false, sv.worldname);
        }
        if(i < sv.worldmodel->brush.numsubmodels)
-               Con_Printf("Too many submodels (MAX_MODELS is %i)\n", MAX_MODELS);
+               Con_Printf(CON_WARN "Too many submodels (MAX_MODELS is %i)\n", MAX_MODELS);
 
 //
 // load the rest of the entities
@@ -1992,7 +2019,7 @@ void SV_SpawnServer (const char *map)
        else
                PRVM_serverglobalfloat(deathmatch) = deathmatch.integer;
 
-       PRVM_serverglobalstring(mapname) = PRVM_SetEngineString(prog, sv.name);
+       PRVM_serverglobalstring(mapname) = PRVM_SetEngineString(prog, sv.worldbasename);
 
 // serverflags are for cross level information (sigils)
        PRVM_serverglobalfloat(serverflags) = svs.serverflags;
@@ -2074,9 +2101,8 @@ void SV_SpawnServer (const char *map)
                }
        }
 
-       // update the map title cvar
-       strlcpy(sv.worldmessage, PRVM_GetString(prog, PRVM_serveredictstring(prog->edicts, message)), sizeof(sv.worldmessage)); // map title (not related to filename)
-       Cvar_SetQuick(&sv_worldmessage, sv.worldmessage);
+       // update the map title cvar (not related to filename)
+       Cvar_SetQuick(&sv_worldmessage, PRVM_GetString(prog, PRVM_serveredictstring(prog->edicts, message)));
 
        Con_Printf("Server spawned.\n");
        NetConn_Heartbeat (2);
@@ -2096,7 +2122,6 @@ This only happens at the end of a game, not between levels
 */
 void SV_Shutdown(void)
 {
-       prvm_prog_t *prog = SVVM_prog;
        int i;
 
        SV_LockThreadMutex();
@@ -2109,22 +2134,13 @@ void SV_Shutdown(void)
        NetConn_Heartbeat(2);
        NetConn_Heartbeat(2);
 
-// make sure all the clients know we're disconnecting
-       World_End(&sv.world);
-       if(prog->loaded)
-       {
-               if(PRVM_serverfunction(SV_Shutdown))
-               {
-                       func_t s = PRVM_serverfunction(SV_Shutdown);
-                       PRVM_serverglobalfloat(time) = sv.time;
-                       PRVM_serverfunction(SV_Shutdown) = 0; // prevent it from getting called again
-                       prog->ExecuteProgram(prog, s,"SV_Shutdown() required");
-               }
-       }
+       // make sure all the clients know we're disconnecting
        for (i = 0, host_client = svs.clients;i < svs.maxclients;i++, host_client++)
                if (host_client->active)
                        SV_DropClient(false, "Server shutting down"); // server shutdown
 
+       SV_VM_Shutdown(true);
+
        NetConn_CloseServerPorts();
 
        sv.active = false;
@@ -2153,7 +2169,7 @@ static void SVVM_end_increase_edicts(prvm_prog_t *prog)
 
        // link every entity except world
        for (i = 1, ent = prog->edicts;i < prog->num_edicts;i++, ent++)
-               if (!ent->free && !VectorCompare(PRVM_serveredictvector(ent, absmin), PRVM_serveredictvector(ent, absmax)))
+               if (!ent->free)
                        SV_LinkEdict(ent);
 }
 
@@ -2329,7 +2345,7 @@ static void SV_VM_Setup(void)
        prog->error_cmd             = Host_Error;
        prog->ExecuteProgram        = SVVM_ExecuteProgram;
 
-       PRVM_Prog_Load(prog, sv_progs.string, NULL, 0, SV_REQFUNCS, sv_reqfuncs, SV_REQFIELDS, sv_reqfields, SV_REQGLOBALS, sv_reqglobals);
+       PRVM_Prog_Load(prog, sv_progs.string, NULL, 0, SV_CheckRequiredFuncs, SV_REQFIELDS, sv_reqfields, SV_REQGLOBALS, sv_reqglobals);
 
        // some mods compiled with scrambling compilers lack certain critical
        // global names and field names such as "self" and "time" and "nextthink"
@@ -2499,55 +2515,61 @@ Returns a time report string, for example for
 */
 const char *SV_TimingReport(char *buf, size_t buflen)
 {
-       return va(buf, buflen, "%.1f%% CPU, %.2f%% lost, offset avg %.1fms, max %.1fms, sdev %.1fms", svs.perf_cpuload * 100, svs.perf_lost * 100, svs.perf_offset_avg * 1000, svs.perf_offset_max * 1000, svs.perf_offset_sdev * 1000);
+       return va(buf, buflen, "%.1f%% CPU, %.2f%% lost, offset avg %.1fms, max %.1fms, sdev %.1fms", sv.perf_cpuload * 100, sv.perf_lost * 100, sv.perf_offset_avg * 1000, sv.perf_offset_max * 1000, sv.perf_offset_sdev * 1000);
 }
 
-extern cvar_t host_maxwait;
 extern cvar_t host_framerate;
-extern cvar_t cl_maxphysicsframesperserverframe;
 double SV_Frame(double time)
 {
        static double sv_timer;
        int i;
        char vabuf[1024];
-       qbool playing = false;
+       qbool reporting = false;
+
+       // reset timer after level change
+       if (host.framecount == sv.spawnframe || host.framecount == sv.spawnframe + 1)
+               sv_timer = time = host.sleeptime = 0;
 
        if (!svs.threaded)
        {
-               svs.perf_acc_sleeptime = host.sleeptime;
-               svs.perf_acc_realtime += time;
+               sv.perf_acc_sleeptime += host.sleeptime;
+               sv.perf_acc_realtime += time;
 
-               // Look for clients who have spawned
-               for (i = 0, host_client = svs.clients; i < svs.maxclients; i++, host_client++)
-                       if(host_client->begun && host_client->netconnection)
-                               playing = true;
+               if (sv_lagreporting_always.integer)
+                       reporting = true;
+               else if (cls.state == ca_dedicated)
+               {
+                       // Report lag if there's players, so they know it wasn't the network or their machine
+                       for (i = 0; i < svs.maxclients; ++i)
+                       {
+                               if (svs.clients[i].begun && svs.clients[i].netconnection)
+                               {
+                                       reporting = true;
+                                       break;
+                               }
+                       }
+               }
 
-               if(svs.perf_acc_realtime > 5)
+               if(sv.perf_acc_realtime > 5)
                {
-                       svs.perf_cpuload = 1 - svs.perf_acc_sleeptime / svs.perf_acc_realtime;
-                       svs.perf_lost = svs.perf_acc_lost / svs.perf_acc_realtime;
+                       sv.perf_cpuload = 1 - sv.perf_acc_sleeptime / sv.perf_acc_realtime;
+                       sv.perf_lost = sv.perf_acc_lost / sv.perf_acc_realtime;
 
-                       if(svs.perf_acc_offset_samples > 0)
+                       if(sv.perf_acc_offset_samples > 0)
                        {
-                               svs.perf_offset_max = svs.perf_acc_offset_max;
-                               svs.perf_offset_avg = svs.perf_acc_offset / svs.perf_acc_offset_samples;
-                               svs.perf_offset_sdev = sqrt(svs.perf_acc_offset_squared / svs.perf_acc_offset_samples - svs.perf_offset_avg * svs.perf_offset_avg);
+                               sv.perf_offset_max = sv.perf_acc_offset_max;
+                               sv.perf_offset_avg = sv.perf_acc_offset / sv.perf_acc_offset_samples;
+                               sv.perf_offset_sdev = sv.perf_acc_offset_squared / sv.perf_acc_offset_samples - sv.perf_offset_avg * sv.perf_offset_avg;
+                               sv.perf_offset_sdev = sv.perf_offset_sdev > 0 ? sqrt(sv.perf_offset_sdev) : 0;
                        }
 
-                       if(svs.perf_lost > 0 && developer_extra.integer && playing) // only complain if anyone is looking
-                               Con_DPrintf("Server can't keep up: %s\n", SV_TimingReport(vabuf, sizeof(vabuf)));
-               }
+                       if (sv.perf_lost > 0 && reporting)
+                               SV_BroadcastPrintf("\003" CON_WARN "Server lag report: %s\n", SV_TimingReport(vabuf, sizeof(vabuf)));
 
-               if(svs.perf_acc_realtime > 5 || sv.time < 10)
-               {
-                       /*
-                        * Don't accumulate time for the first 10 seconds of a match
-                        * so things can settle
-                        */
-                       svs.perf_acc_realtime = svs.perf_acc_sleeptime =
-                       svs.perf_acc_lost = svs.perf_acc_offset =
-                       svs.perf_acc_offset_squared = svs.perf_acc_offset_max =
-                       svs.perf_acc_offset_samples = host.sleeptime = 0;
+                       sv.perf_acc_realtime = sv.perf_acc_sleeptime =
+                       sv.perf_acc_lost = sv.perf_acc_offset =
+                       sv.perf_acc_offset_squared = sv.perf_acc_offset_max =
+                       sv.perf_acc_offset_samples = 0;
                }
 
                /*
@@ -2573,7 +2595,7 @@ double SV_Frame(double time)
        if (sv_timer > 0.1)
        {
                if (!svs.threaded)
-                       svs.perf_acc_lost += (sv_timer - 0.1);
+                       sv.perf_acc_lost += (sv_timer - 0.1);
                sv_timer = 0.1;
        }
 
@@ -2600,7 +2622,8 @@ double SV_Frame(double time)
                {
                        advancetime = sys_ticrate.value;
                        // listen servers can run multiple server frames per client frame
-                       framelimit = cl_maxphysicsframesperserverframe.integer;
+                       if (sv_maxphysicsframesperserverframe.integer > 0)
+                               framelimit = sv_maxphysicsframesperserverframe.integer;
                        aborttime = Sys_DirtyTime() + 0.1;
                }
 
@@ -2616,12 +2639,12 @@ double SV_Frame(double time)
                                offset = 0;
 
                        offset += sv_timer;
-                       ++svs.perf_acc_offset_samples;
-                       svs.perf_acc_offset += offset;
-                       svs.perf_acc_offset_squared += offset * offset;
+                       ++sv.perf_acc_offset_samples;
+                       sv.perf_acc_offset += offset;
+                       sv.perf_acc_offset_squared += offset * offset;
                        
-                       if(svs.perf_acc_offset_max < offset)
-                               svs.perf_acc_offset_max = offset;
+                       if(sv.perf_acc_offset_max < offset)
+                               sv.perf_acc_offset_max = offset;
                }
 
                // only advance time if not paused
@@ -2645,6 +2668,9 @@ double SV_Frame(double time)
                                break;
                }
 
+               if (framecount > 1 && sv_lagreporting_strict.integer && reporting)
+                       SV_BroadcastPrintf(CON_WARN "Server lag report: caught up %.1fms by running %d extra frames\n", advancetime * (framecount - 1) * 1000, framecount - 1);
+
                R_TimeReport("serverphysics");
 
                // send all messages to the clients
@@ -2671,7 +2697,7 @@ double SV_Frame(double time)
        if (sv_timer >= 0)
        {
                if (!svs.threaded)
-                       svs.perf_acc_lost += sv_timer;
+                       sv.perf_acc_lost += sv_timer;
                sv_timer = 0;
        }
 
@@ -2684,7 +2710,6 @@ static int SV_ThreadFunc(void *voiddata)
        qbool playing = false;
        double sv_timer = 0;
        double sv_deltarealtime, sv_oldrealtime, sv_realtime;
-       double wait;
        int i;
        char vabuf[1024];
        sv_realtime = Sys_DirtyTime();
@@ -2701,7 +2726,7 @@ static int SV_ThreadFunc(void *voiddata)
 
                sv_timer += sv_deltarealtime;
 
-               svs.perf_acc_realtime += sv_deltarealtime;
+               sv.perf_acc_realtime += sv_deltarealtime;
 
                // at this point we start doing real server work, and must block on any client activity pertaining to the server (such as executing SV_SpawnServer)
                SV_LockThreadMutex();
@@ -2717,22 +2742,22 @@ static int SV_ThreadFunc(void *voiddata)
                {
                        // don't accumulate time for the first 10 seconds of a match
                        // so things can settle
-                       svs.perf_acc_realtime = svs.perf_acc_sleeptime = svs.perf_acc_lost = svs.perf_acc_offset = svs.perf_acc_offset_squared = svs.perf_acc_offset_max = svs.perf_acc_offset_samples = 0;
+                       sv.perf_acc_realtime = sv.perf_acc_sleeptime = sv.perf_acc_lost = sv.perf_acc_offset = sv.perf_acc_offset_squared = sv.perf_acc_offset_max = sv.perf_acc_offset_samples = 0;
                }
-               else if(svs.perf_acc_realtime > 5)
+               else if(sv.perf_acc_realtime > 5)
                {
-                       svs.perf_cpuload = 1 - svs.perf_acc_sleeptime / svs.perf_acc_realtime;
-                       svs.perf_lost = svs.perf_acc_lost / svs.perf_acc_realtime;
-                       if(svs.perf_acc_offset_samples > 0)
+                       sv.perf_cpuload = 1 - sv.perf_acc_sleeptime / sv.perf_acc_realtime;
+                       sv.perf_lost = sv.perf_acc_lost / sv.perf_acc_realtime;
+                       if(sv.perf_acc_offset_samples > 0)
                        {
-                               svs.perf_offset_max = svs.perf_acc_offset_max;
-                               svs.perf_offset_avg = svs.perf_acc_offset / svs.perf_acc_offset_samples;
-                               svs.perf_offset_sdev = sqrt(svs.perf_acc_offset_squared / svs.perf_acc_offset_samples - svs.perf_offset_avg * svs.perf_offset_avg);
+                               sv.perf_offset_max = sv.perf_acc_offset_max;
+                               sv.perf_offset_avg = sv.perf_acc_offset / sv.perf_acc_offset_samples;
+                               sv.perf_offset_sdev = sqrt(sv.perf_acc_offset_squared / sv.perf_acc_offset_samples - sv.perf_offset_avg * sv.perf_offset_avg);
                        }
-                       if(svs.perf_lost > 0 && developer_extra.integer)
+                       if(sv.perf_lost > 0 && developer_extra.integer)
                                if(playing)
                                        Con_DPrintf("Server can't keep up: %s\n", SV_TimingReport(vabuf, sizeof(vabuf)));
-                       svs.perf_acc_realtime = svs.perf_acc_sleeptime = svs.perf_acc_lost = svs.perf_acc_offset = svs.perf_acc_offset_squared = svs.perf_acc_offset_max = svs.perf_acc_offset_samples = 0;
+                       sv.perf_acc_realtime = sv.perf_acc_sleeptime = sv.perf_acc_lost = sv.perf_acc_offset = sv.perf_acc_offset_squared = sv.perf_acc_offset_max = sv.perf_acc_offset_samples = 0;
                }
 
                // get new packets
@@ -2743,21 +2768,10 @@ static int SV_ThreadFunc(void *voiddata)
                }
 
                // if the accumulators haven't become positive yet, wait a while
-               wait = sv_timer * -1000000.0;
-               if (wait >= 1)
+               if (sv_timer < 0)
                {
-                       double time0, delta;
                        SV_UnlockThreadMutex(); // don't keep mutex locked while sleeping
-                       if (host_maxwait.value <= 0)
-                               wait = min(wait, 1000000.0);
-                       else
-                               wait = min(wait, host_maxwait.value * 1000.0);
-                       if(wait < 1)
-                               wait = 1; // because we cast to int
-                       time0 = Sys_DirtyTime();
-                       Sys_Sleep((int)wait);
-                       delta = Sys_DirtyTime() - time0;if (delta < 0 || delta >= 1800) delta = 0;
-                       svs.perf_acc_sleeptime += delta;
+                       sv.perf_acc_sleeptime += Sys_Sleep(-sv_timer);
                        continue;
                }
 
@@ -2775,11 +2789,11 @@ static int SV_ThreadFunc(void *voiddata)
                        if(advancetime > 0)
                        {
                                offset = sv_timer + (Sys_DirtyTime() - sv_realtime); // LadyHavoc: FIXME: I don't understand this line
-                               ++svs.perf_acc_offset_samples;
-                               svs.perf_acc_offset += offset;
-                               svs.perf_acc_offset_squared += offset * offset;
-                               if(svs.perf_acc_offset_max < offset)
-                                       svs.perf_acc_offset_max = offset;
+                               ++sv.perf_acc_offset_samples;
+                               sv.perf_acc_offset += offset;
+                               sv.perf_acc_offset_squared += offset * offset;
+                               if(sv.perf_acc_offset_max < offset)
+                                       sv.perf_acc_offset_max = offset;
                        }
 
                        // only advance time if not paused
@@ -2817,7 +2831,7 @@ static int SV_ThreadFunc(void *voiddata)
                // if there is some time remaining from this frame, reset the timers
                if (sv_timer >= 0)
                {
-                       svs.perf_acc_lost += sv_timer;
+                       sv.perf_acc_lost += sv_timer;
                        sv_timer = 0;
                }
        }
index f2b515935fd2fd7707da4327e2fb9c4af32c35d3..411a7c969b748382a723df0a2ef2d28983d17d63 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -409,7 +409,7 @@ SV_Move
 ==================
 */
 #if COLLISIONPARANOID >= 1
-trace_t SV_TraceBox_(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, float extend)
+static trace_t SV_TraceBox_(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, float extend)
 #else
 trace_t SV_TraceBox(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, float extend)
 #endif
@@ -588,17 +588,17 @@ finished:
 }
 
 #if COLLISIONPARANOID >= 1
-trace_t SV_TraceBox(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask)
+trace_t SV_TraceBox(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, float extend)
 {
        prvm_prog_t *prog = SVVM_prog;
        int endstuck;
        trace_t trace;
        vec3_t temp;
-       trace = SV_TraceBox_(start, mins, maxs, end, type, passedict, hitsupercontentsmask, skipsupercontentsmask, skipmaterialflagsmask);
+       trace = SV_TraceBox_(start, mins, maxs, end, type, passedict, hitsupercontentsmask, skipsupercontentsmask, skipmaterialflagsmask, extend);
        if (passedict)
        {
                VectorCopy(trace.endpos, temp);
-               endstuck = SV_TraceBox_(temp, mins, maxs, temp, type, passedict, hitsupercontentsmask, skipsupercontentsmask, skipmaterialflagsmask).startsolid;
+               endstuck = SV_TraceBox_(temp, mins, maxs, temp, type, passedict, hitsupercontentsmask, skipsupercontentsmask, skipmaterialflagsmask, extend).startsolid;
 #if COLLISIONPARANOID < 3
                if (trace.startsolid || endstuck)
 #endif
@@ -875,35 +875,36 @@ void SV_LinkEdict (prvm_edict_t *ent)
                VectorAdd(PRVM_serveredictvector(ent, origin), PRVM_serveredictvector(ent, maxs), maxs);
        }
 
-//
-// to make items easier to pick up and allow them to be grabbed off
-// of shelves, the abs sizes are expanded
-//
-       if ((int)PRVM_serveredictfloat(ent, flags) & FL_ITEM)
-       {
-               mins[0] -= 15;
-               mins[1] -= 15;
-               mins[2] -= 1;
-               maxs[0] += 15;
-               maxs[1] += 15;
-               maxs[2] += 1;
-       }
-       else
+       if (sv_legacy_bbox_expand.integer)
        {
-               // because movement is clipped an epsilon away from an actual edge,
-               // we must fully check even when bounding boxes don't quite touch
-               mins[0] -= 1;
-               mins[1] -= 1;
-               mins[2] -= 1;
-               maxs[0] += 1;
-               maxs[1] += 1;
-               maxs[2] += 1;
+               if ((int)PRVM_serveredictfloat(ent, flags) & FL_ITEM)
+               {
+                       // to make items easier to pick up and allow them to be grabbed off
+                       // of shelves, the abs sizes are expanded
+                       mins[0] -= 15;
+                       mins[1] -= 15;
+                       mins[2] -= 1;
+                       maxs[0] += 15;
+                       maxs[1] += 15;
+                       maxs[2] += 1;
+               }
+               else
+               {
+                       // because movement is clipped an epsilon away from an actual edge,
+                       // we must fully check even when bounding boxes don't quite touch
+                       mins[0] -= 1;
+                       mins[1] -= 1;
+                       mins[2] -= 1;
+                       maxs[0] += 1;
+                       maxs[1] += 1;
+                       maxs[2] += 1;
+               }
        }
 
        VectorCopy(mins, PRVM_serveredictvector(ent, absmin));
        VectorCopy(maxs, PRVM_serveredictvector(ent, absmax));
 
-       World_LinkEdict(&sv.world, ent, mins, maxs);
+       World_LinkEdict(&sv.world, ent, mins, maxs, sv_areagrid_link_SOLID_NOT.integer);
 }
 
 /*
@@ -1040,12 +1041,12 @@ void SV_CheckVelocity (prvm_edict_t *ent)
 //
        for (i=0 ; i<3 ; i++)
        {
-               if (PRVM_IS_NAN(PRVM_serveredictvector(ent, velocity)[i]))
+               if (isnan(PRVM_serveredictvector(ent, velocity)[i]))
                {
                        Con_Printf("Got a NaN velocity on entity #%i (%s)\n", PRVM_NUM_FOR_EDICT(ent), PRVM_GetString(prog, PRVM_serveredictstring(ent, classname)));
                        PRVM_serveredictvector(ent, velocity)[i] = 0;
                }
-               if (PRVM_IS_NAN(PRVM_serveredictvector(ent, origin)[i]))
+               if (isnan(PRVM_serveredictvector(ent, origin)[i]))
                {
                        Con_Printf("Got a NaN origin on entity #%i (%s)\n", PRVM_NUM_FOR_EDICT(ent), PRVM_GetString(prog, PRVM_serveredictstring(ent, classname)));
                        PRVM_serveredictvector(ent, origin)[i] = 0;
@@ -1193,13 +1194,12 @@ If stepnormal is not NULL, the plane normal of any vertical wall hit will be sto
 ============
 */
 static float SV_Gravity (prvm_edict_t *ent);
-static qbool SV_PushEntity (trace_t *trace, prvm_edict_t *ent, vec3_t push, qbool dolink);
+static qbool SV_PushEntity (trace_t *trace, prvm_edict_t *ent, vec3_t push, qbool dolink, qbool checkstuck);
 #define MAX_CLIP_PLANES 5
 static int SV_FlyMove (prvm_edict_t *ent, float time, qbool applygravity, float *stepnormal, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, float stepheight)
 {
        prvm_prog_t *prog = SVVM_prog;
-       int blocked, bumpcount;
-       int i, j, numplanes;
+       unsigned int i, j, numplanes, blocked, bumpcount;
        float d, time_left, gravity;
        vec3_t dir, push, planes[MAX_CLIP_PLANES];
        prvm_vec3_t primal_velocity, original_velocity, new_velocity, restore_velocity;
@@ -1237,7 +1237,7 @@ static int SV_FlyMove (prvm_edict_t *ent, float time, qbool applygravity, float
                        break;
 
                VectorScale(PRVM_serveredictvector(ent, velocity), time_left, push);
-               if(!SV_PushEntity(&trace, ent, push, false))
+               if(!SV_PushEntity(&trace, ent, push, false, true))
                {
                        // we got teleported by a touch function
                        // let's abort the move
@@ -1247,7 +1247,7 @@ static int SV_FlyMove (prvm_edict_t *ent, float time, qbool applygravity, float
 
                // this code is used by MOVETYPE_WALK and MOVETYPE_STEP and SV_UnstickEntity
                // abort move if we're stuck in the world (and didn't make it out)
-               if (trace.worldstartsolid && trace.allsolid)
+               if (trace.worldstartsolid && trace.allsolid && trace.startdepth < 0)
                {
                        VectorCopy(restore_velocity, PRVM_serveredictvector(ent, velocity));
                        return 3;
@@ -1287,20 +1287,20 @@ static int SV_FlyMove (prvm_edict_t *ent, float time, qbool applygravity, float
                        VectorSet(steppush, 0, 0, stepheight);
                        VectorScale(PRVM_serveredictvector(ent, velocity), time_left, push);
                        VectorCopy(PRVM_serveredictvector(ent, origin), org);
-                       if(!SV_PushEntity(&steptrace, ent, steppush, false))
+                       if(!SV_PushEntity(&steptrace, ent, steppush, false, true))
                        {
                                blocked |= 8;
                                break;
                        }
                        //Con_Printf("%f %f %f : ", PRVM_serveredictvector(ent, origin)[0], PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2]);
-                       if(!SV_PushEntity(&steptrace2, ent, push, false))
+                       if(!SV_PushEntity(&steptrace2, ent, push, false, true))
                        {
                                blocked |= 8;
                                break;
                        }
                        //Con_Printf("%f %f %f : ", PRVM_serveredictvector(ent, origin)[0], PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2]);
                        VectorSet(steppush, 0, 0, org[2] - PRVM_serveredictvector(ent, origin)[2]);
-                       if(!SV_PushEntity(&steptrace3, ent, steppush, false))
+                       if(!SV_PushEntity(&steptrace3, ent, steppush, false, true))
                        {
                                blocked |= 8;
                                break;
@@ -1331,6 +1331,14 @@ static int SV_FlyMove (prvm_edict_t *ent, float time, qbool applygravity, float
                        if (stepnormal)
                                VectorCopy(trace.plane.normal, stepnormal);
                }
+
+               // Unlike some other movetypes Quake's SV_FlyMove calls SV_Impact only after setting ONGROUND which id1 fiends rely on.
+               // If we stepped up (sv_gameplayfix_stepmultipletimes) this will impact the steptrace2 plane instead of the original.
+               if (PRVM_serveredictfloat(ent, solid) >= SOLID_TRIGGER && trace.ent)
+                       SV_Impact(ent, &trace);
+               if (ent->free)
+                       return blocked; // removed by the impact function
+
                if (trace.fraction >= 0.001)
                {
                        // actually covered some distance
@@ -1542,46 +1550,6 @@ static qbool SV_NudgeOutOfSolid_PivotIsKnownGood(prvm_edict_t *ent, vec3_t pivot
        return true;
 }
 
-qbool SV_NudgeOutOfSolid(prvm_edict_t *ent)
-{
-       prvm_prog_t *prog = SVVM_prog;
-       int bump, pass;
-       trace_t stucktrace;
-       vec3_t stuckorigin;
-       vec3_t stuckmins, stuckmaxs;
-       vec_t nudge;
-       vec_t separation = sv_gameplayfix_nudgeoutofsolid_separation.value;
-       if (sv.worldmodel && sv.worldmodel->brushq1.numclipnodes)
-               separation = 0.0f; // when using hulls, it can not be enlarged
-       VectorCopy(PRVM_serveredictvector(ent, mins), stuckmins);
-       VectorCopy(PRVM_serveredictvector(ent, maxs), stuckmaxs);
-       stuckmins[0] -= separation;
-       stuckmins[1] -= separation;
-       stuckmins[2] -= separation;
-       stuckmaxs[0] += separation;
-       stuckmaxs[1] += separation;
-       stuckmaxs[2] += separation;
-       // first pass we try to get it out of brush entities
-       // second pass we try to get it out of world only (can't win them all)
-       for (pass = 0;pass < 2;pass++)
-       {
-               VectorCopy(PRVM_serveredictvector(ent, origin), stuckorigin);
-               for (bump = 0;bump < 10;bump++)
-               {
-                       stucktrace = SV_TraceBox(stuckorigin, stuckmins, stuckmaxs, stuckorigin, pass ? MOVE_WORLDONLY : MOVE_NOMONSTERS, ent, SV_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value);
-                       if (!stucktrace.bmodelstartsolid || stucktrace.startdepth >= 0)
-                       {
-                               // found a good location, use it
-                               VectorCopy(stuckorigin, PRVM_serveredictvector(ent, origin));
-                               return true;
-                       }
-                       nudge = -stucktrace.startdepth;
-                       VectorMA(stuckorigin, nudge, stucktrace.startdepthnormal, stuckorigin);
-               }
-       }
-       return false;
-}
-
 /*
 ============
 SV_PushEntity
@@ -1591,7 +1559,7 @@ The trace struct is filled with the trace that has been done.
 Returns true if the push did not result in the entity being teleported by QC code.
 ============
 */
-static qbool SV_PushEntity (trace_t *trace, prvm_edict_t *ent, vec3_t push, qbool dolink)
+static qbool SV_PushEntity (trace_t *trace, prvm_edict_t *ent, vec3_t push, qbool dolink, qbool checkstuck)
 {
        prvm_prog_t *prog = SVVM_prog;
        int solid;
@@ -1606,12 +1574,6 @@ static qbool SV_PushEntity (trace_t *trace, prvm_edict_t *ent, vec3_t push, qboo
        VectorCopy(PRVM_serveredictvector(ent, mins), mins);
        VectorCopy(PRVM_serveredictvector(ent, maxs), maxs);
 
-       // move start position out of solids
-       if (sv_gameplayfix_nudgeoutofsolid.integer && sv_gameplayfix_nudgeoutofsolid_separation.value >= 0)
-       {
-               SV_NudgeOutOfSolid(ent);
-       }
-
        VectorCopy(PRVM_serveredictvector(ent, origin), start);
        VectorAdd(start, push, end);
 
@@ -1625,9 +1587,37 @@ static qbool SV_PushEntity (trace_t *trace, prvm_edict_t *ent, vec3_t push, qboo
                type = MOVE_NORMAL;
 
        *trace = SV_TraceBox(start, mins, maxs, end, type, ent, SV_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value);
-       // fail the move if stuck in world
-       if (trace->worldstartsolid)
-               return true;
+       // abort move if we're stuck in the world (and didn't make it out)
+       if (trace->worldstartsolid && trace->allsolid && trace->startdepth < 0 && checkstuck)
+       {
+               // checking startdepth eliminates many false positives on Q1BSP with mod_q1bsp_polygoncollisions 0
+               // but it's still not guaranteed that we're stuck in a bmodel at this point
+               if (sv_gameplayfix_nudgeoutofsolid.integer && sv_gameplayfix_nudgeoutofsolid_separation.value >= 0)
+               {
+                       switch (PHYS_NudgeOutOfSolid(prog, ent))
+                       {
+                               case 0:
+                                       Con_Printf(CON_WARN "NudgeOutOfSolid couldn't fix stuck entity %i (classname \"%s\").\n", (int)PRVM_EDICT_TO_PROG(ent), PRVM_GetString(prog, PRVM_serveredictstring(ent, classname)));
+                                       return true; // definitely stuck in a bmodel
+                               case 1:
+                                       Con_DPrintf("NudgeOutOfSolid fixed stuck entity %i (classname \"%s\") with offset %f %f %f.\n", (int)PRVM_EDICT_TO_PROG(ent), PRVM_GetString(prog, PRVM_serveredictstring(ent, classname)), PRVM_serveredictvector(ent, origin)[0] - start[0], PRVM_serveredictvector(ent, origin)[1] - start[1], PRVM_serveredictvector(ent, origin)[2] - start[2]);
+                                       VectorCopy(PRVM_serveredictvector(ent, origin), start);
+                                       VectorAdd(start, push, end);
+                                       *trace = SV_TraceBox(start, mins, maxs, end, type, ent, SV_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value);
+
+                               // definitely not stuck in a bmodel, move may proceed
+                       }
+               }
+               else if (sv_gameplayfix_unstickentities.integer && SV_UnstickEntity(ent))
+               {
+                       // bones_was_here: pretty sure we can deprecate sv_gameplayfix_unstickentities, sv_gameplayfix_nudgeoutofsolid is much nicer
+                       VectorCopy(PRVM_serveredictvector(ent, origin), start);
+                       VectorAdd(start, push, end);
+                       *trace = SV_TraceBox(start, mins, maxs, end, type, ent, SV_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value);
+               }
+               else
+                       return true; // assuming stuck, bones_was_here TODO: always use PHYS_NudgeOutOfSolid (remove sv_gameplayfix_nudgeoutofsolid)?
+       }
 
        VectorCopy(trace->endpos, PRVM_serveredictvector(ent, origin));
 
@@ -1644,10 +1634,12 @@ static qbool SV_PushEntity (trace_t *trace, prvm_edict_t *ent, vec3_t push, qboo
 #endif
 
        if (dolink)
+       {
                SV_LinkEdict_TouchAreaGrid(ent);
 
-       if((PRVM_serveredictfloat(ent, solid) >= SOLID_TRIGGER && trace->ent && (!((int)PRVM_serveredictfloat(ent, flags) & FL_ONGROUND) || PRVM_serveredictedict(ent, groundentity) != PRVM_EDICT_TO_PROG(trace->ent))))
-               SV_Impact (ent, trace);
+               if((PRVM_serveredictfloat(ent, solid) >= SOLID_TRIGGER && trace->ent && (!((int)PRVM_serveredictfloat(ent, flags) & FL_ONGROUND) || PRVM_serveredictedict(ent, groundentity) != PRVM_EDICT_TO_PROG(trace->ent))))
+                       SV_Impact (ent, trace);
+       }
 
        if(ent->priv.required->mark == PRVM_EDICT_MARK_SETORIGIN_CAUGHT)
        {
@@ -1893,7 +1885,7 @@ static void SV_PushMove (prvm_edict_t *pusher, float movetime)
 
                // try moving the contacted entity
                PRVM_serveredictfloat(pusher, solid) = SOLID_NOT;
-               if(!SV_PushEntity (&trace, check, move, true))
+               if(!SV_PushEntity(&trace, check, move, true, true))
                {
                        // entity "check" got teleported
                        PRVM_serveredictvector(check, angles)[1] += trace.fraction * moveangle[1];
@@ -1925,7 +1917,7 @@ static void SV_PushMove (prvm_edict_t *pusher, float movetime)
                        {
                                // hack to invoke all necessary movement triggers
                                VectorClear(move2);
-                               if(!SV_PushEntity(&trace2, check, move2, true))
+                               if(!SV_PushEntity(&trace2, check, move2, true, true))
                                {
                                        // entity "check" got teleported
                                        continue;
@@ -2410,7 +2402,7 @@ static void SV_WalkMove (prvm_edict_t *ent)
                // move up
                VectorClear (upmove);
                upmove[2] = sv_stepheight.value;
-               if(!SV_PushEntity(&trace, ent, upmove, true))
+               if(!SV_PushEntity(&trace, ent, upmove, true, true))
                {
                        // we got teleported when upstepping... must abort the move
                        return;
@@ -2462,7 +2454,7 @@ static void SV_WalkMove (prvm_edict_t *ent)
        // move down
        VectorClear (downmove);
        downmove[2] = -sv_stepheight.value + start_velocity[2]*sv.frametime;
-       if(!SV_PushEntity (&downtrace, ent, downmove, true))
+       if(!SV_PushEntity(&downtrace, ent, downmove, true, true))
        {
                // we got teleported when downstepping... must abort the move
                return;
@@ -2664,19 +2656,12 @@ void SV_Physics_Toss (prvm_edict_t *ent)
        {
        // move origin
                VectorScale(PRVM_serveredictvector(ent, velocity), movetime, move);
-               if(!SV_PushEntity(&trace, ent, move, true))
+               // The buzzsaw traps in r2m6 and r2m7 use MOVETYPE_FLY and rely on moving while stuck in the world.
+               // Quake movetypes checked allsolid only in SV_FlyMove().
+               if(!SV_PushEntity(&trace, ent, move, true, PRVM_serveredictfloat(ent, movetype) != MOVETYPE_FLY))
                        return; // teleported
                if (ent->free)
                        return;
-               if (trace.bmodelstartsolid && sv_gameplayfix_unstickentities.integer)
-               {
-                       // try to unstick the entity
-                       SV_UnstickEntity(ent);
-                       if(!SV_PushEntity(&trace, ent, move, true))
-                               return; // teleported
-                       if (ent->free)
-                               return;
-               }
                if (trace.fraction == 1)
                        break;
                movetime *= 1 - min(1, trace.fraction);
@@ -2964,6 +2949,7 @@ static void SV_Physics_ClientEntity_NoThink (prvm_edict_t *ent)
        }
 }
 
+// asynchronous path
 void SV_Physics_ClientMove(void)
 {
        prvm_prog_t *prog = SVVM_prog;
index b90f748775029e8b2ff0b9640fdfef52bd768961..414e97a9b7a4716fee30f3bbc36cdb7a47cf1ee5 100644 (file)
--- a/sv_save.c
+++ b/sv_save.c
@@ -76,7 +76,7 @@ void SV_Savegame_to(prvm_prog_t *prog, const char *name)
                for (i=0 ; i<NUM_SPAWN_PARMS ; i++)
                        FS_Printf(f, "%f\n", svs.clients[0].spawn_parms[i]);
                FS_Printf(f, "%d\n", current_skill);
-               FS_Printf(f, "%s\n", sv.name);
+               FS_Printf(f, "%s\n", sv.worldbasename);
                FS_Printf(f, "%f\n",sv.time);
        }
        else
@@ -231,7 +231,7 @@ void SV_Savegame_f(cmd_state_t *cmd)
                return;
        }
 
-       strlcpy (name, Cmd_Argv(cmd, 1), sizeof (name));
+       dp_strlcpy (name, Cmd_Argv(cmd, 1), sizeof (name));
        FS_DefaultExtension (name, ".sav", sizeof (name));
 
        SV_Savegame_to(prog, name);
@@ -265,7 +265,7 @@ void SV_Loadgame_f(cmd_state_t *cmd)
                return;
        }
 
-       strlcpy (filename, Cmd_Argv(cmd, 1), sizeof(filename));
+       dp_strlcpy (filename, Cmd_Argv(cmd, 1), sizeof(filename));
        FS_DefaultExtension (filename, ".sav", sizeof (filename));
 
        Con_Printf("Loading game from %s...\n", filename);
@@ -320,7 +320,7 @@ void SV_Loadgame_f(cmd_state_t *cmd)
 
        // mapname
        COM_ParseToken_Simple(&t, false, false, true);
-       strlcpy (mapname, com_token, sizeof(mapname));
+       dp_strlcpy (mapname, com_token, sizeof(mapname));
 
        if(developer_entityparsing.integer)
                Con_Printf("SV_Loadgame_f: loading time\n");
@@ -362,7 +362,7 @@ void SV_Loadgame_f(cmd_state_t *cmd)
                        t = start;
                        break;
                }
-               strlcpy(sv.lightstyles[i], com_token, sizeof(sv.lightstyles[i]));
+               dp_strlcpy(sv.lightstyles[i], com_token, sizeof(sv.lightstyles[i]));
        }
 
        if(developer_entityparsing.integer)
@@ -437,7 +437,7 @@ void SV_Loadgame_f(cmd_state_t *cmd)
                        PRVM_ED_ParseEdict (prog, start, ent);
 
                        // link it into the bsp tree
-                       if (!ent->free && !VectorCompare(PRVM_serveredictvector(ent, absmin), PRVM_serveredictvector(ent, absmax)))
+                       if (!ent->free)
                                SV_LinkEdict(ent);
                }
 
@@ -481,7 +481,7 @@ void SV_Loadgame_f(cmd_state_t *cmd)
                                        i = atoi(com_token);
                                        COM_ParseToken_Simple(&t, false, false, true);
                                        if (i >= 0 && i < MAX_LIGHTSTYLES)
-                                               strlcpy(sv.lightstyles[i], com_token, sizeof(sv.lightstyles[i]));
+                                               dp_strlcpy(sv.lightstyles[i], com_token, sizeof(sv.lightstyles[i]));
                                        else
                                                Con_Printf("unsupported lightstyle %i \"%s\"\n", i, com_token);
                                }
@@ -492,7 +492,7 @@ void SV_Loadgame_f(cmd_state_t *cmd)
                                        COM_ParseToken_Simple(&t, false, false, true);
                                        if (i >= 0 && i < MAX_MODELS)
                                        {
-                                               strlcpy(sv.model_precache[i], com_token, sizeof(sv.model_precache[i]));
+                                               dp_strlcpy(sv.model_precache[i], com_token, sizeof(sv.model_precache[i]));
                                                sv.models[i] = Mod_ForName (sv.model_precache[i], true, false, sv.model_precache[i][0] == '*' ? sv.worldname : NULL);
                                        }
                                        else
@@ -504,7 +504,7 @@ void SV_Loadgame_f(cmd_state_t *cmd)
                                        i = atoi(com_token);
                                        COM_ParseToken_Simple(&t, false, false, true);
                                        if (i >= 0 && i < MAX_SOUNDS)
-                                               strlcpy(sv.sound_precache[i], com_token, sizeof(sv.sound_precache[i]));
+                                               dp_strlcpy(sv.sound_precache[i], com_token, sizeof(sv.sound_precache[i]));
                                        else
                                                Con_Printf("unsupported sound %i \"%s\"\n", i, com_token);
                                }
index 3e125f3a58560589759d398858a43608d280f3e7..a8a44347724791acfc0f179655e2c010ae2dd65a 100644 (file)
--- a/sv_send.c
+++ b/sv_send.c
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "sv_demo.h"
 
 extern cvar_t sv_airaccel_qw_stretchfactor;
-extern cvar_t sv_gameplayfix_customstats;
+extern cvar_t sv_qcstats;
 extern cvar_t sv_warsowbunny_airforwardaccel;
 extern cvar_t sv_warsowbunny_accel;
 extern cvar_t sv_warsowbunny_topspeed;
@@ -956,13 +956,12 @@ void SV_MarkWriteEntityStateToClient(entity_state_t *s, client_t *client)
                                        s->specialvisibilityradius
                                                ? sv_cullentities_trace_samples_extra.integer
                                                : sv_cullentities_trace_samples.integer;
-                               float enlarge = sv_cullentities_trace_enlarge.value;
 
                                if(samples > 0)
                                {
                                        int eyeindex;
                                        for (eyeindex = 0;eyeindex < sv.writeentitiestoclient_numeyes;eyeindex++)
-                                               if(SV_CanSeeBox(samples, sv_cullentities_trace_eyejitter.value, enlarge, sv_cullentities_trace_expand.value, sv.writeentitiestoclient_eyes[eyeindex], ed->priv.server->cullmins, ed->priv.server->cullmaxs))
+                                               if(SV_CanSeeBox(samples, sv_cullentities_trace_eyejitter.value, sv_cullentities_trace_enlarge.value, sv_cullentities_trace_expand.value, sv.writeentitiestoclient_eyes[eyeindex], ed->priv.server->cullmins, ed->priv.server->cullmaxs))
                                                        break;
                                        if(eyeindex < sv.writeentitiestoclient_numeyes)
                                                svs.clients[sv.writeentitiestoclient_clientnumber].visibletime[s->number] =
@@ -971,7 +970,7 @@ void SV_MarkWriteEntityStateToClient(entity_state_t *s, client_t *client)
                                                                        ? sv_cullentities_trace_delay_players.value
                                                                        : sv_cullentities_trace_delay.value
                                                        );
-                                       else if (host.realtime > svs.clients[sv.writeentitiestoclient_clientnumber].visibletime[s->number])
+                                       else if ((float)host.realtime > svs.clients[sv.writeentitiestoclient_clientnumber].visibletime[s->number])
                                        {
                                                sv.writeentitiestoclient_stats_culled_trace++;
                                                return;
@@ -995,15 +994,12 @@ void SV_AddCameraEyes(void)
        prvm_prog_t *prog = SVVM_prog;
        int e, i, j, k;
        prvm_edict_t *ed;
-       static int cameras[MAX_LEVELNETWORKEYES];
-       static vec3_t camera_origins[MAX_LEVELNETWORKEYES];
-       static int eye_levels[MAX_CLIENTNETWORKEYES];
+       int cameras[MAX_LEVELNETWORKEYES];
+       vec3_t camera_origins[MAX_LEVELNETWORKEYES];
+       int eye_levels[MAX_CLIENTNETWORKEYES] = {0};
        int n_cameras = 0;
        vec3_t mi, ma;
 
-       for(i = 0; i < sv.writeentitiestoclient_numeyes; ++i)
-               eye_levels[i] = 0;
-
        // check line of sight to portal entities and add them to PVS
        for (e = 1, ed = PRVM_NEXT_EDICT(prog->edicts);e < prog->num_edicts;e++, ed = PRVM_NEXT_EDICT(ed))
        {
@@ -1045,7 +1041,12 @@ void SV_AddCameraEyes(void)
                for(k = 0; k < sv.writeentitiestoclient_numeyes; ++k)
                if(eye_levels[k] <= MAX_EYE_RECURSION)
                {
-                       if(SV_CanSeeBox(sv_cullentities_trace_samples.integer, sv_cullentities_trace_eyejitter.value, sv_cullentities_trace_enlarge.value, sv_cullentities_trace_expand.value, sv.writeentitiestoclient_eyes[k], mi, ma))
+                       if(SV_CanSeeBox(sv_cullentities_trace_samples_extra.integer, sv_cullentities_trace_eyejitter.value, sv_cullentities_trace_enlarge.value, sv_cullentities_trace_expand.value, sv.writeentitiestoclient_eyes[k], mi, ma))
+                               svs.clients[sv.writeentitiestoclient_clientnumber].visibletime[cameras[j]] = host.realtime + sv_cullentities_trace_delay.value;
+
+                       // bones_was_here: this use of visibletime doesn't conflict because sv_cullentities_trace doesn't consider portal entities
+                       // the explicit cast prevents float precision differences that cause the condition to fail
+                       if ((float)host.realtime <= svs.clients[sv.writeentitiestoclient_clientnumber].visibletime[cameras[j]])
                        {
                                eye_levels[sv.writeentitiestoclient_numeyes] = eye_levels[k] + 1;
                                VectorCopy(camera_origins[j], sv.writeentitiestoclient_eyes[sv.writeentitiestoclient_numeyes]);
@@ -1153,7 +1154,7 @@ void SV_WriteClientdataToMessage (client_t *client, prvm_edict_t *ent, sizebuf_t
        s = PRVM_GetString(prog, PRVM_serveredictstring(ent, weaponmodel));
        if (strcmp(s, client->weaponmodel))
        {
-               strlcpy(client->weaponmodel, s, sizeof(client->weaponmodel));
+               dp_strlcpy(client->weaponmodel, s, sizeof(client->weaponmodel));
                client->weaponmodelindex = SV_ModelIndex(s, 1);
        }
 
@@ -1204,7 +1205,7 @@ void SV_WriteClientdataToMessage (client_t *client, prvm_edict_t *ent, sizebuf_t
        //stats[STAT_SECRETS] = PRVM_serverglobalfloat(found_secrets);
        //stats[STAT_MONSTERS] = PRVM_serverglobalfloat(killed_monsters);
 
-       if(!sv_gameplayfix_customstats.integer)
+       if(!sv_qcstats.integer)
        {
                statsf[STAT_MOVEVARS_AIRACCEL_QW_STRETCHFACTOR] = sv_airaccel_qw_stretchfactor.value;
                statsf[STAT_MOVEVARS_AIRCONTROL_PENALTY] = sv_aircontrol_penalty.value;
@@ -1613,7 +1614,7 @@ static void SV_UpdateToReliableMessages (void)
                // always point the string back at host_client->name to keep it safe
                //strlcpy (host_client->name, name, sizeof (host_client->name));
                if (name != host_client->name) // prevent buffer overlap SIGABRT on Mac OSX
-                       strlcpy (host_client->name, name, sizeof (host_client->name));
+                       dp_strlcpy (host_client->name, name, sizeof (host_client->name));
                SV_Name(i);
 
                // DP_SV_CLIENTCOLORS
@@ -1634,7 +1635,7 @@ static void SV_UpdateToReliableMessages (void)
                // always point the string back at host_client->name to keep it safe
                //strlcpy (host_client->playermodel, model, sizeof (host_client->playermodel));
                if (model != host_client->playermodel) // prevent buffer overlap SIGABRT on Mac OSX
-                       strlcpy (host_client->playermodel, model, sizeof (host_client->playermodel));
+                       dp_strlcpy (host_client->playermodel, model, sizeof (host_client->playermodel));
                PRVM_serveredictstring(host_client->edict, playermodel) = PRVM_SetEngineString(prog, host_client->playermodel);
 
                // NEXUIZ_PLAYERSKIN
@@ -1644,7 +1645,7 @@ static void SV_UpdateToReliableMessages (void)
                // always point the string back at host_client->name to keep it safe
                //strlcpy (host_client->playerskin, skin, sizeof (host_client->playerskin));
                if (skin != host_client->playerskin) // prevent buffer overlap SIGABRT on Mac OSX
-                       strlcpy (host_client->playerskin, skin, sizeof (host_client->playerskin));
+                       dp_strlcpy (host_client->playerskin, skin, sizeof (host_client->playerskin));
                PRVM_serveredictstring(host_client->edict, playerskin) = PRVM_SetEngineString(prog, host_client->playerskin);
 
                // TODO: add an extension name for this [1/17/2008 Black]
index 6a621bac6d293c9ec2a573187e7ee821f1f805c9..58bef9bfb0a3f44a31ac9ec3270af7a91c19f75a 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -987,6 +987,7 @@ void SV_ReadClientMessage(void)
        prvm_prog_t *prog = SVVM_prog;
        int netcmd, num, start;
        char *s, *p, *q;
+       size_t slen;
 
        if(sv_autodemo_perclient.integer >= 2)
                SV_WriteDemoMessage(host_client, &(host_client->netconnection->message), true);
@@ -1035,7 +1036,8 @@ void SV_ReadClientMessage(void)
                        // allow reliable messages now as the client is done with initial loading
                        if (host_client->sendsignon == 2)
                                host_client->sendsignon = 0;
-                       s = MSG_ReadString(&sv_message, sv_readstring, sizeof(sv_readstring));
+                       slen = MSG_ReadString_len(&sv_message, sv_readstring, sizeof(sv_readstring));
+                       s = sv_readstring;
                        q = NULL;
                        for(p = s; *p; ++p) switch(*p)
                        {
@@ -1054,19 +1056,19 @@ void SV_ReadClientMessage(void)
                        if (strncasecmp(s, "spawn", 5) == 0
                         || strncasecmp(s, "begin", 5) == 0
                         || strncasecmp(s, "prespawn", 8) == 0)
-                               Cmd_ExecuteString (cmd_serverfromclient, s, src_client, true);
+                               Cmd_ExecuteString(cmd_serverfromclient, s, slen, src_client, true);
                        else if (PRVM_serverfunction(SV_ParseClientCommand))
                        {
                                int restorevm_tempstringsbuf_cursize;
                                restorevm_tempstringsbuf_cursize = prog->tempstringsbuf.cursize;
-                               PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, s);
+                               PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, s, slen);
                                PRVM_serverglobalfloat(time) = sv.time;
                                PRVM_serverglobaledict(self) = PRVM_EDICT_TO_PROG(host_client->edict);
                                prog->ExecuteProgram(prog, PRVM_serverfunction(SV_ParseClientCommand), "QC function SV_ParseClientCommand is missing");
                                prog->tempstringsbuf.cursize = restorevm_tempstringsbuf_cursize;
                        }
                        else
-                               Cmd_ExecuteString (cmd_serverfromclient, s, src_client, true);
+                               Cmd_ExecuteString(cmd_serverfromclient, s, slen, src_client, true);
                        break;
 
 clc_stringcmd_invalid:
index 672ff70d1f8e7116237d6f81737fe2b8012a014b..4ad07559b7473ba25fbf1fe0007c88c3ee19795a 100644 (file)
@@ -100,6 +100,7 @@ const char *vm_sv_extensions[] = {
 "DP_QC_ENTITYSTRING",
 "DP_QC_ETOS",
 "DP_QC_EXTRESPONSEPACKET",
+"DP_QC_FINDBOX",
 "DP_QC_FINDCHAIN",
 "DP_QC_FINDCHAINFLAGS",
 "DP_QC_FINDCHAINFLOAT",
@@ -107,6 +108,7 @@ const char *vm_sv_extensions[] = {
 "DP_QC_FINDFLAGS",
 "DP_QC_FINDFLOAT",
 "DP_QC_FS_SEARCH",
+"DP_QC_FS_SEARCH_PACKFILE",
 "DP_QC_GETLIGHT",
 "DP_QC_GETSURFACE",
 "DP_QC_GETSURFACETRIANGLE",
@@ -119,6 +121,7 @@ const char *vm_sv_extensions[] = {
 "DP_QC_LOG",
 "DP_QC_MINMAXBOUND",
 "DP_QC_MULTIPLETEMPSTRINGS",
+"DP_QC_NUDGEOUTOFSOLID",
 "DP_QC_NUM_FOR_EDICT",
 "DP_QC_RANDOMVEC",
 "DP_QC_SINCOSSQRTPOW",
@@ -228,7 +231,6 @@ const char *vm_sv_extensions[] = {
 "TW_SV_STEPCONTROL",
 "ZQ_PAUSE",
 "DP_RM_CLIPGROUP",
-"DP_QC_FS_SEARCH_PACKFILE",
 NULL
 //"EXT_CSQC" // not ready yet
 };
@@ -373,7 +375,7 @@ static void VM_SV_sprint(prvm_prog_t *prog)
 {
        client_t        *client;
        int                     entnum;
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
 
        VM_SAFEPARMCOUNTRANGE(2, 8, VM_SV_sprint);
 
@@ -415,7 +417,7 @@ static void VM_SV_centerprint(prvm_prog_t *prog)
 {
        client_t        *client;
        int                     entnum;
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
 
        VM_SAFEPARMCOUNTRANGE(2, 8, VM_SV_centerprint);
 
@@ -660,7 +662,7 @@ static void VM_SV_traceline(prvm_prog_t *prog)
        move = (int)PRVM_G_FLOAT(OFS_PARM2);
        ent = PRVM_G_EDICT(OFS_PARM3);
 
-       if (VEC_IS_NAN(v1[0]) || VEC_IS_NAN(v1[1]) || VEC_IS_NAN(v1[2]) || VEC_IS_NAN(v2[0]) || VEC_IS_NAN(v2[1]) || VEC_IS_NAN(v2[2]))
+       if (isnan(v1[0]) || isnan(v1[1]) || isnan(v1[2]) || isnan(v2[0]) || isnan(v2[1]) || isnan(v2[2]))
                prog->error_cmd("%s: NAN errors detected in traceline('%f %f %f', '%f %f %f', %i, entity %i)\n", prog->name, v1[0], v1[1], v1[2], v2[0], v2[1], v2[2], move, PRVM_EDICT_TO_PROG(ent));
 
        trace = SV_TraceLine(v1, v2, move, ent, SV_GenericHitSuperContentsMask(ent), 0, 0, collision_extendtracelinelength.value);
@@ -699,7 +701,7 @@ static void VM_SV_tracebox(prvm_prog_t *prog)
        move = (int)PRVM_G_FLOAT(OFS_PARM4);
        ent = PRVM_G_EDICT(OFS_PARM5);
 
-       if (VEC_IS_NAN(v1[0]) || VEC_IS_NAN(v1[1]) || VEC_IS_NAN(v1[2]) || VEC_IS_NAN(v2[0]) || VEC_IS_NAN(v2[1]) || VEC_IS_NAN(v2[2]))
+       if (isnan(v1[0]) || isnan(v1[1]) || isnan(v1[2]) || isnan(v2[0]) || isnan(v2[1]) || isnan(v2[2]))
                prog->error_cmd("%s: NAN errors detected in tracebox('%f %f %f', '%f %f %f', '%f %f %f', '%f %f %f', %i, entity %i)\n", prog->name, v1[0], v1[1], v1[2], m1[0], m1[1], m1[2], m2[0], m2[1], m2[2], v2[0], v2[1], v2[2], move, PRVM_EDICT_TO_PROG(ent));
 
        trace = SV_TraceBox(v1, m1, m2, v2, move, ent, SV_GenericHitSuperContentsMask(ent), 0, 0, collision_extendtraceboxlength.value);
@@ -960,7 +962,7 @@ static void VM_SV_stuffcmd(prvm_prog_t *prog)
 {
        int             entnum;
        client_t        *old;
-       char    string[VM_STRINGTEMP_LENGTH];
+       char    string[VM_TEMPSTRING_MAXSIZE];
 
        VM_SAFEPARMCOUNTRANGE(2, 8, VM_SV_stuffcmd);
 
@@ -1005,7 +1007,7 @@ static void VM_SV_findradius(prvm_prog_t *prog)
        else
                chainfield = prog->fieldoffsets.chain;
        if (chainfield < 0)
-               prog->error_cmd("VM_findchain: %s doesnt have the specified chain field !", prog->name);
+               prog->error_cmd("VM_SV_findradius: %s doesnt have the specified chain field !", prog->name);
 
        chain = (prvm_edict_t *)prog->edicts;
 
@@ -1056,6 +1058,50 @@ static void VM_SV_findradius(prvm_prog_t *prog)
        VM_RETURN_EDICT(chain);
 }
 
+/*
+=================
+VM_SV_findbox
+
+Returns a chain of entities that are touching a box (a simpler findradius); supports DP_QC_FINDCHAIN_TOFIELD
+
+findbox (mins, maxs)
+=================
+*/
+static void VM_SV_findbox(prvm_prog_t *prog)
+{
+       prvm_edict_t *chain;
+       int i, numtouchedicts;
+       static prvm_edict_t *touchedicts[MAX_EDICTS];
+       int chainfield;
+
+       VM_SAFEPARMCOUNTRANGE(2, 3, VM_SV_findbox);
+
+       if(prog->argc == 3)
+               chainfield = PRVM_G_INT(OFS_PARM2);
+       else
+               chainfield = prog->fieldoffsets.chain;
+       if (chainfield < 0)
+               prog->error_cmd("VM_SV_findbox: %s doesnt have the specified chain field !", prog->name);
+
+       chain = (prvm_edict_t *)prog->edicts;
+
+       numtouchedicts = SV_EntitiesInBox(PRVM_G_VECTOR(OFS_PARM0), PRVM_G_VECTOR(OFS_PARM1), MAX_EDICTS, touchedicts);
+       if (numtouchedicts > MAX_EDICTS)
+       {
+               // this never happens
+               Con_Printf("SV_EntitiesInBox returned %i edicts, max was %i\n", numtouchedicts, MAX_EDICTS);
+               numtouchedicts = MAX_EDICTS;
+       }
+       for (i = 0; i < numtouchedicts; ++i)
+       {
+               prog->xfunction->builtinsprofile++;
+               PRVM_EDICTFIELDEDICT(touchedicts[i], chainfield) = PRVM_EDICT_TO_PROG(chain);
+               chain = touchedicts[i];
+       }
+
+       VM_RETURN_EDICT(chain);
+}
+
 static void VM_SV_precache_sound(prvm_prog_t *prog)
 {
        VM_SAFEPARMCOUNT(1, VM_SV_precache_sound);
@@ -1133,12 +1179,18 @@ VM_SV_droptofloor
 void() droptofloor
 ===============
 */
-
+inline static qbool droptofloor_bsp_failcond(trace_t *trace)
+{
+       if (sv.worldmodel->brush.isq3bsp || sv.worldmodel->brush.isq2bsp)
+               return trace->startsolid;
+       else
+               return trace->allsolid || trace->fraction == 1;
+}
 static void VM_SV_droptofloor(prvm_prog_t *prog)
 {
-       prvm_edict_t            *ent;
-       vec3_t          end, entorigin, entmins, entmaxs;
-       trace_t         trace;
+       prvm_edict_t *ent;
+       vec3_t        end;
+       trace_t       trace;
 
        VM_SAFEPARMCOUNTRANGE(0, 2, VM_SV_droptofloor); // allow 2 parameters because the id1 defs.qc had an incorrect prototype
 
@@ -1157,58 +1209,71 @@ static void VM_SV_droptofloor(prvm_prog_t *prog)
                return;
        }
 
-       VectorCopy (PRVM_serveredictvector(ent, origin), end);
-       end[2] -= 256;
-
        if (sv_gameplayfix_droptofloorstartsolid_nudgetocorrect.integer)
-               SV_NudgeOutOfSolid(ent);
-
-       VectorCopy(PRVM_serveredictvector(ent, origin), entorigin);
-       VectorCopy(PRVM_serveredictvector(ent, mins), entmins);
-       VectorCopy(PRVM_serveredictvector(ent, maxs), entmaxs);
-       trace = SV_TraceBox(entorigin, entmins, entmaxs, end, MOVE_NORMAL, ent, SV_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value);
-       if (trace.startsolid && sv_gameplayfix_droptofloorstartsolid.integer)
-       {
-               vec3_t offset, org;
-               VectorSet(offset, 0.5f * (PRVM_serveredictvector(ent, mins)[0] + PRVM_serveredictvector(ent, maxs)[0]), 0.5f * (PRVM_serveredictvector(ent, mins)[1] + PRVM_serveredictvector(ent, maxs)[1]), PRVM_serveredictvector(ent, mins)[2]);
-               VectorAdd(PRVM_serveredictvector(ent, origin), offset, org);
-               trace = SV_TraceLine(org, end, MOVE_NORMAL, ent, SV_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value);
-               VectorSubtract(trace.endpos, offset, trace.endpos);
-               if (trace.startsolid)
-               {
-                       Con_DPrintf("droptofloor at %f %f %f - COULD NOT FIX BADLY PLACED ENTITY\n", PRVM_serveredictvector(ent, origin)[0], PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2]);
-                       SV_LinkEdict(ent);
-                       PRVM_serveredictfloat(ent, flags) = (int)PRVM_serveredictfloat(ent, flags) | FL_ONGROUND;
-                       PRVM_serveredictedict(ent, groundentity) = 0;
-                       PRVM_G_FLOAT(OFS_RETURN) = 1;
-               }
-               else if (trace.fraction < 1)
+       {
+               int n = PHYS_NudgeOutOfSolid(prog, ent);
+               if (!n)
+                       VM_Warning(prog, "droptofloor at \"%f %f %f\": sv_gameplayfix_droptofloorstartsolid_nudgetocorrect COULD NOT FIX badly placed entity \"%s\" before drop\n", PRVM_gameedictvector(ent, origin)[0], PRVM_gameedictvector(ent, origin)[1], PRVM_gameedictvector(ent, origin)[2], PRVM_GetString(prog, PRVM_gameedictstring(ent, classname)));
+               else if (n > 0)
+                       VM_Warning(prog, "droptofloor at \"%f %f %f\": sv_gameplayfix_droptofloorstartsolid_nudgetocorrect FIXED badly placed entity \"%s\" before drop\n", PRVM_gameedictvector(ent, origin)[0], PRVM_gameedictvector(ent, origin)[1], PRVM_gameedictvector(ent, origin)[2], PRVM_GetString(prog, PRVM_gameedictstring(ent, classname)));
+       }
+
+       VectorCopy (PRVM_serveredictvector(ent, origin), end);
+       if (sv.worldmodel->brush.isq3bsp)
+               end[2] -= 4096;
+       else if (sv.worldmodel->brush.isq2bsp)
+               end[2] -= 128;
+       else
+               end[2] -= 256; // Quake, QuakeWorld
+
+       /* bones_was_here: not using SV_GenericHitSuperContentsMask(ent) anymore because it was setting:
+        * items:    SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY
+        * monsters: SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY | SUPERCONTENTS_PLAYERCLIP
+        * explobox: SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY | SUPERCONTENTS_CORPSE
+        * which caused (startsolid == true) when, for example, a health was touching a monster.
+        * Changing MOVE_NORMAL also fixes that, but other engines are using MOVE_NORMAL here.
+        */
+       trace = SV_TraceBox(PRVM_serveredictvector(ent, origin), PRVM_serveredictvector(ent, mins), PRVM_serveredictvector(ent, maxs), end, MOVE_NORMAL, ent, SUPERCONTENTS_SOLID, 0, 0, collision_extendmovelength.value);
+       if (droptofloor_bsp_failcond(&trace))
+       {
+               if (sv_gameplayfix_droptofloorstartsolid.integer)
                {
-                       Con_DPrintf("droptofloor at %f %f %f - FIXED BADLY PLACED ENTITY\n", PRVM_serveredictvector(ent, origin)[0], PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2]);
-                       VectorCopy (trace.endpos, PRVM_serveredictvector(ent, origin));
+                       vec3_t offset, org;
+
+                       offset[0] = 0.5f * (PRVM_serveredictvector(ent, mins)[0] + PRVM_serveredictvector(ent, maxs)[0]);
+                       offset[1] = 0.5f * (PRVM_serveredictvector(ent, mins)[1] + PRVM_serveredictvector(ent, maxs)[1]);
+                       offset[2] = PRVM_serveredictvector(ent, mins)[2];
+                       VectorAdd(PRVM_serveredictvector(ent, origin), offset, org);
+                       VectorAdd(end, offset, end);
+
+                       trace = SV_TraceLine(org, end, MOVE_NORMAL, ent, SUPERCONTENTS_SOLID, 0, 0, collision_extendmovelength.value);
+                       if (droptofloor_bsp_failcond(&trace))
+                       {
+                               VM_Warning(prog, "droptofloor at \"%f %f %f\": sv_gameplayfix_droptofloorstartsolid COULD NOT FIX badly placed entity \"%s\"\n", PRVM_serveredictvector(ent, origin)[0], PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2], PRVM_GetString(prog, PRVM_gameedictstring(ent, classname)));
+                               return;
+                       }
+                       VM_Warning(prog, "droptofloor at \"%f %f %f\": sv_gameplayfix_droptofloorstartsolid FIXED badly placed entity \"%s\"\n", PRVM_serveredictvector(ent, origin)[0], PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2], PRVM_GetString(prog, PRVM_gameedictstring(ent, classname)));
+                       VectorSubtract(trace.endpos, offset, PRVM_serveredictvector(ent, origin));
+
+                       // only because we dropped it without considering its bbox
                        if (sv_gameplayfix_droptofloorstartsolid_nudgetocorrect.integer)
-                               SV_NudgeOutOfSolid(ent);
-                       SV_LinkEdict(ent);
-                       PRVM_serveredictfloat(ent, flags) = (int)PRVM_serveredictfloat(ent, flags) | FL_ONGROUND;
-                       PRVM_serveredictedict(ent, groundentity) = PRVM_EDICT_TO_PROG(trace.ent);
-                       PRVM_G_FLOAT(OFS_RETURN) = 1;
-                       // if support is destroyed, keep suspended (gross hack for floating items in various maps)
-                       ent->priv.server->suspendedinairflag = true;
+                               PHYS_NudgeOutOfSolid(prog, ent);
                }
-       }
-       else
-       {
-               if (!trace.allsolid && trace.fraction < 1)
+               else
                {
-                       VectorCopy (trace.endpos, PRVM_serveredictvector(ent, origin));
-                       SV_LinkEdict(ent);
-                       PRVM_serveredictfloat(ent, flags) = (int)PRVM_serveredictfloat(ent, flags) | FL_ONGROUND;
-                       PRVM_serveredictedict(ent, groundentity) = PRVM_EDICT_TO_PROG(trace.ent);
-                       PRVM_G_FLOAT(OFS_RETURN) = 1;
-                       // if support is destroyed, keep suspended (gross hack for floating items in various maps)
-                       ent->priv.server->suspendedinairflag = true;
+                       VM_Warning(prog, "droptofloor at \"%f %f %f\": badly placed entity \"%s\", startsolid: %d allsolid: %d\n", PRVM_serveredictvector(ent, origin)[0], PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2], PRVM_GetString(prog, PRVM_gameedictstring(ent, classname)), trace.startsolid, trace.allsolid);
+                       return;
                }
        }
+       else
+               VectorCopy(trace.endpos, PRVM_serveredictvector(ent, origin));
+
+       SV_LinkEdict(ent);
+       PRVM_serveredictfloat(ent, flags) = (int)PRVM_serveredictfloat(ent, flags) | FL_ONGROUND;
+       PRVM_serveredictedict(ent, groundentity) = PRVM_EDICT_TO_PROG(trace.ent);
+       PRVM_G_FLOAT(OFS_RETURN) = 1;
+       // if support is destroyed, keep suspended (gross hack for floating items in various maps)
+       ent->priv.server->suspendedinairflag = true;
 }
 
 /*
@@ -1235,7 +1300,7 @@ static void VM_SV_lightstyle(prvm_prog_t *prog)
        }
 
 // change the string in sv
-       strlcpy(sv.lightstyles[style], val, sizeof(sv.lightstyles[style]));
+       dp_strlcpy(sv.lightstyles[style], val, sizeof(sv.lightstyles[style]));
 
 // send message to all clients on this server
        if (sv.state != ss_active)
@@ -1404,11 +1469,21 @@ static sizebuf_t *WriteDest(prvm_prog_t *prog)
        case MSG_ONE:
                ent = PRVM_PROG_TO_EDICT(PRVM_serverglobaledict(msg_entity));
                entnum = PRVM_NUM_FOR_EDICT(ent);
-               if (entnum < 1 || entnum > svs.maxclients || !svs.clients[entnum-1].active || !svs.clients[entnum-1].netconnection)
+               if (entnum < 1 || entnum > svs.maxclients)
                {
                        VM_Warning(prog, "WriteDest: tried to write to non-client\n");
                        return &sv.reliable_datagram;
                }
+               else if (!svs.clients[entnum-1].active)
+               {
+                       VM_Warning(prog, "WriteDest: tried to write to a disconnected client\n");
+                       return &sv.reliable_datagram;
+               }
+               else if (!svs.clients[entnum-1].netconnection)
+               {
+                       VM_Warning(prog, "WriteDest: tried to write to a bot client\n");
+                       return &sv.reliable_datagram;
+               }
                else
                        return &svs.clients[entnum-1].netconnection->message;
 
@@ -1665,7 +1740,7 @@ void VM_SV_UpdateCustomStats (client_t *client, prvm_edict_t *ent, sizebuf_t *ms
                //string as 16 bytes
                case 1:
                        memset(s, 0, 17);
-                       strlcpy(s, PRVM_E_STRING(ent, vm_customstats[i].fieldoffset), 16);
+                       dp_strlcpy(s, PRVM_E_STRING(ent, vm_customstats[i].fieldoffset), 16);
                        stats[i] = s[ 0] + s[ 1] * 256 + s[ 2] * 65536 + s[ 3] * 16777216;
                        stats[i+1] = s[ 4] + s[ 5] * 256 + s[ 6] * 65536 + s[ 7] * 16777216;
                        stats[i+2] = s[ 8] + s[ 9] * 256 + s[10] * 65536 + s[11] * 16777216;
@@ -1687,7 +1762,7 @@ void VM_SV_UpdateCustomStats (client_t *client, prvm_edict_t *ent, sizebuf_t *ms
        }
 }
 
-extern cvar_t sv_gameplayfix_customstats;
+extern cvar_t sv_qcstats;
 
 // void(float index, float type, .void field) SV_AddStat = #232;
 // Set up an auto-sent player stat.
@@ -1738,9 +1813,9 @@ static void VM_SV_AddStat(prvm_prog_t *prog)
        // these are hazardous to override but sort of allowed if one wants to be adventurous...  and enjoys warnings.
        if (i < MIN_VM_STAT)
                VM_Warning(prog, "PF_SV_AddStat: index (%i) < MIN_VM_STAT (%i) may conflict with engine stats - allowed, but this may break things\n", i, MIN_VM_STAT);
-       else if (i >= MAX_VM_STAT && !sv_gameplayfix_customstats.integer)
+       else if (i >= MAX_VM_STAT && !sv_qcstats.integer)
                VM_Warning(prog, "PF_SV_AddStat: index (%i) >= MAX_VM_STAT (%i) conflicts with engine stats - allowed, but this may break slowmo and stuff\n", i, MAX_VM_STAT);
-       else if (i > (MAX_VM_STAT - 4) && type == 1 && !sv_gameplayfix_customstats.integer)
+       else if (i > (MAX_VM_STAT - 4) && type == 1 && !sv_qcstats.integer)
                VM_Warning(prog, "PF_SV_AddStat: index (%i) >= MAX_VM_STAT (%i) - 4 with string type won't fit within MAX_VM_STAT, thus conflicting with engine stats - allowed, but this may break slowmo and stuff\n", i, MAX_VM_STAT);
 
        vm_customstats[i].type          = type;
@@ -1785,8 +1860,7 @@ static void VM_SV_copyentity(prvm_prog_t *prog)
                return;
        }
        memcpy(out->fields.fp, in->fields.fp, prog->entityfields * sizeof(prvm_vec_t));
-       if (VectorCompare(PRVM_serveredictvector(out, absmin), PRVM_serveredictvector(out, absmax)))
-               return;
+
        SV_LinkEdict(out);
 }
 
@@ -2359,7 +2433,7 @@ static void VM_SV_clientcommand(prvm_prog_t *prog)
 
        temp_client = host_client;
        host_client = svs.clients + i;
-       Cmd_ExecuteString(cmd_serverfromclient, PRVM_G_STRING(OFS_PARM1), src_client, true);
+       Cmd_ExecuteString(cmd_serverfromclient, PRVM_G_STRING(OFS_PARM1), strlen(PRVM_G_STRING(OFS_PARM1)), src_client, true);
        host_client = temp_client;
 }
 
@@ -2612,7 +2686,7 @@ static void VM_SV_gettaginfo(prvm_prog_t *prog)
        Matrix4x4_ToVectors(&tag_localmatrix, forward, left, up, origin);
 
        PRVM_serverglobalfloat(gettaginfo_parent) = parentindex;
-       PRVM_serverglobalstring(gettaginfo_name) = tagname ? PRVM_SetTempString(prog, tagname) : 0;
+       PRVM_serverglobalstring(gettaginfo_name) = tagname ? PRVM_SetTempString(prog, tagname, strlen(tagname)) : 0;
        VectorCopy(forward, PRVM_serverglobalvector(gettaginfo_forward));
        VectorNegate(left, PRVM_serverglobalvector(gettaginfo_right));
        VectorCopy(up, PRVM_serverglobalvector(gettaginfo_up));
@@ -2692,13 +2766,13 @@ static void VM_SV_clienttype(prvm_prog_t *prog)
        VM_SAFEPARMCOUNT(1, VM_SV_clienttype);
        clientnum = PRVM_G_EDICTNUM(OFS_PARM0) - 1;
        if (clientnum < 0 || clientnum >= svs.maxclients)
-               PRVM_G_FLOAT(OFS_RETURN) = 3;
+               PRVM_G_FLOAT(OFS_RETURN) = 3; // CLIENTTYPE_NOTACLIENT
        else if (!svs.clients[clientnum].active)
-               PRVM_G_FLOAT(OFS_RETURN) = 0;
+               PRVM_G_FLOAT(OFS_RETURN) = 0; // CLIENTTYPE_DISCONNECTED
        else if (svs.clients[clientnum].netconnection)
-               PRVM_G_FLOAT(OFS_RETURN) = 1;
+               PRVM_G_FLOAT(OFS_RETURN) = 1; // CLIENTTYPE_REAL
        else
-               PRVM_G_FLOAT(OFS_RETURN) = 2;
+               PRVM_G_FLOAT(OFS_RETURN) = 2; // CLIENTTYPE_BOT
 }
 
 /*
@@ -2710,10 +2784,11 @@ string(string key) serverkey
 */
 static void VM_SV_serverkey(prvm_prog_t *prog)
 {
-       char string[VM_STRINGTEMP_LENGTH];
+       char string[VM_TEMPSTRING_MAXSIZE];
+
        VM_SAFEPARMCOUNT(1, VM_SV_serverkey);
        InfoString_GetValue(svs.serverinfo, PRVM_G_STRING(OFS_PARM0), string, sizeof(string));
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string, strlen(string));
 }
 
 //#333 void(entity e, float mdlindex) setmodelindex (EXT_CSQC)
@@ -2850,18 +2925,17 @@ static void VM_SV_pointparticles(prvm_prog_t *prog)
        SV_FlushBroadcastMessages();
 }
 
-qbool SV_VM_ConsoleCommand (const char *text)
+qbool SV_VM_ConsoleCommand(const char *text, size_t textlen)
 {
        prvm_prog_t *prog = SVVM_prog;
-       return PRVM_ConsoleCommand(prog, text, &prog->funcoffsets.ConsoleCmd, true, PRVM_EDICT_TO_PROG(sv.world.prog->edicts), sv.time,  !(!sv.active || !prog || !prog->loaded), "QC function ConsoleCmd is missing"); 
+       return PRVM_ConsoleCommand(prog, text, textlen, &prog->funcoffsets.ConsoleCmd, true, PRVM_EDICT_TO_PROG(sv.world.prog->edicts), sv.time, "QC function ConsoleCmd is missing");
 }
 
 // #352 void(string cmdname) registercommand (EXT_CSQC)
 static void VM_SV_registercommand (prvm_prog_t *prog)
 {
        VM_SAFEPARMCOUNT(1, VM_SV_registercmd);
-       if(!Cmd_Exists(cmd_local, PRVM_G_STRING(OFS_PARM0)))
-               Cmd_AddCommand(CF_SERVER, PRVM_G_STRING(OFS_PARM0), NULL, "console command created by QuakeC");
+       Cmd_AddCommand(CF_SERVER, PRVM_G_STRING(OFS_PARM0), NULL, "console command created by QuakeC");
 }
 
 //PF_setpause,    // void(float pause) setpause        = #531;
@@ -2970,7 +3044,7 @@ static void VM_SV_skel_get_bonename(prvm_prog_t *prog)
                return;
        if (bonenum < 0 || bonenum >= skeleton->model->num_bones)
                return;
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, skeleton->model->data_bones[bonenum].name);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, skeleton->model->data_bones[bonenum].name, strlen(skeleton->model->data_bones[bonenum].name));
 }
 
 // #267 float(float skel, float bonenum) skel_get_boneparent = #267; // (FTE_CSQC_SKELETONOBJECTS) returns parent num for supplied bonenum, 0 if bonenum has no parent or bone does not exist (returned value is always less than bonenum, you can loop on this)
@@ -3236,7 +3310,7 @@ NULL,                                                     // #42 (QUAKE)
 VM_fabs,                                               // #43 float(float f) fabs (QUAKE)
 VM_SV_aim,                                             // #44 vector(entity e, float speed) aim (QUAKE)
 VM_cvar,                                               // #45 float(string s) cvar (QUAKE)
-VM_localcmd_server,                            // #46 void(string s) localcmd (QUAKE)
+VM_localcmd,                                   // #46 void(string s) localcmd (QUAKE)
 VM_nextent,                                            // #47 entity(entity e) nextent (QUAKE)
 VM_SV_particle,                                        // #48 void(vector o, vector d, float color, float count) particle (QUAKE)
 VM_changeyaw,                                  // #49 void() ChangeYaw (QUAKE)
@@ -3306,7 +3380,7 @@ VM_fclose,                                                // #111 void(float fhandle) fclose (FRIK_FILE)
 VM_fgets,                                              // #112 string(float fhandle) fgets (FRIK_FILE)
 VM_fputs,                                              // #113 void(float fhandle, string s) fputs (FRIK_FILE)
 VM_strlen,                                             // #114 float(string s) strlen (FRIK_FILE)
-VM_strcat,                                             // #115 string(string s1, string s2, ...) strcat (FRIK_FILE)
+VM_strcat,                                             // #115 string(string s, string...) strcat (FRIK_FILE)
 VM_substring,                                  // #116 string(string s, float start, float length) substring (FRIK_FILE)
 VM_stov,                                               // #117 vector(string) stov (FRIK_FILE)
 VM_strzone,                                            // #118 string(string s) strzone (FRIK_FILE)
@@ -3760,8 +3834,8 @@ NULL,                                                     // #562
 NULL,                                                  // #563
 NULL,                                                  // #564
 NULL,                                                  // #565
-NULL,                                                  // #566
-NULL,                                                  // #567
+VM_SV_findbox,                                 // #566 entity(vector mins, vector maxs) findbox = #566; (DP_QC_FINDBOX)
+VM_nudgeoutofsolid,                            // #567 float(entity ent) nudgeoutofsolid = #567; (DP_QC_NUDGEOUTOFSOLID)
 NULL,                                                  // #568
 NULL,                                                  // #569
 NULL,                                                  // #570
@@ -3850,14 +3924,5 @@ void SVVM_init_cmd(prvm_prog_t *prog)
 void SVVM_reset_cmd(prvm_prog_t *prog)
 {
        World_End(&sv.world);
-
-       if(prog->loaded && PRVM_serverfunction(SV_Shutdown))
-       {
-               func_t s = PRVM_serverfunction(SV_Shutdown);
-               PRVM_serverglobalfloat(time) = sv.time;
-               PRVM_serverfunction(SV_Shutdown) = 0; // prevent it from getting called again
-               prog->ExecuteProgram(prog, s,"SV_Shutdown() required");
-       }
-
        VM_Cmd_Reset(prog);
 }
diff --git a/sys.h b/sys.h
index f6cd464770cce2819cef5eab89c548add25a4f6c..a5c6b275b2e08d9d2c5e2d45251d4c8a1e3d5e11 100644 (file)
--- a/sys.h
+++ b/sys.h
@@ -150,7 +150,6 @@ typedef struct sys_s
 
 extern sys_t sys;
 
-extern struct cvar_s sys_usenoclockbutbenchmark;
 
 //
 // DLL management
@@ -205,16 +204,19 @@ char *Sys_TimeString(const char *timeformat);
 // system IO interface (these are the sys functions that need to be implemented in a new driver atm)
 //
 
-/// an error will cause the entire program to exit
+/// Causes the entire program to exit ASAP.
+/// Trailing \n should be omitted.
 void Sys_Error (const char *error, ...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN;
 
 /// (may) output text to terminal which launched program
-void Sys_Print(const char *text);
+/// is POSIX async-signal-safe
+/// textlen excludes any (optional) \0 terminator
+void Sys_Print(const char *text, size_t textlen);
+/// used to report failures inside Con_Printf()
 void Sys_Printf(const char *fmt, ...);
 
 /// INFO: This is only called by Host_Shutdown so we dont need testing for recursion
-void Sys_Shutdown (void);
-void Sys_Quit (int returnvalue);
+void Sys_SDL_Shutdown(void);
 
 /*! on some build/platform combinations (such as Linux gcc with the -pg
  * profiling option) this can turn on/off profiling, used primarily to limit
@@ -237,15 +239,18 @@ double Sys_DirtyTime(void);
 
 void Sys_ProvideSelfFD (void);
 
+/// Reads a line from POSIX stdin or the Windows console
 char *Sys_ConsoleInput (void);
 
 /// called to yield for a little bit so as not to hog cpu when paused or debugging
-void Sys_Sleep(int microseconds);
+double Sys_Sleep(double time);
 
+void Sys_SDL_Dialog(const char *title, const char *string);
+void Sys_SDL_Init(void);
 /// Perform Key_Event () callbacks until the input que is empty
-void Sys_SendKeyEvents (void);
+void Sys_SDL_HandleEvents(void);
 
-char *Sys_GetClipboardData (void);
+char *Sys_SDL_GetClipboardData (void);
 
 extern qbool sys_supportsdlgetticks;
 unsigned int Sys_SDL_GetTicks (void); // wrapper to call SDL_GetTicks
@@ -256,5 +261,7 @@ void Sys_InitProcessNice (void);
 void Sys_MakeProcessNice (void);
 void Sys_MakeProcessMean (void);
 
+int Sys_Main(int argc, char *argv[]);
+
 #endif
 
diff --git a/sys_null.c b/sys_null.c
new file mode 100644 (file)
index 0000000..bb28858
--- /dev/null
@@ -0,0 +1,40 @@
+
+#include "darkplaces.h"
+
+
+// =======================================================================
+// General routines
+// =======================================================================
+
+void Sys_SDL_Shutdown(void)
+{
+}
+
+void Sys_SDL_Dialog(const char *title, const char *string)
+{
+}
+
+char *Sys_SDL_GetClipboardData (void)
+{
+       return NULL;
+}
+
+void Sys_SDL_Init(void)
+{
+}
+
+qbool sys_supportsdlgetticks = false;
+unsigned int Sys_SDL_GetTicks (void)
+{
+       Sys_Error("Called Sys_SDL_GetTicks on non-SDL target");
+       return 0;
+}
+void Sys_SDL_Delay (unsigned int milliseconds)
+{
+       Sys_Error("Called Sys_SDL_Delay on non-SDL target");
+}
+
+int main(int argc, char *argv[])
+{
+       return Sys_Main(argc, argv);
+}
index 1bf22cd08463c11279ddb3a70c93252a38994e9e..574f1355aacedb76cb10b57d497f29c910effe8b 100644 (file)
--- a/sys_sdl.c
+++ b/sys_sdl.c
@@ -1,18 +1,3 @@
-#ifdef WIN32
-#include <io.h> // Include this BEFORE darkplaces.h because it uses strncpy which trips DP_STATIC_ASSERT
-#include "conio.h"
-#else
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/time.h>
-#endif
-
-#ifdef __ANDROID__
-#include <android/log.h>
-#endif
-
-#include <signal.h>
-
 /*
  * Include this BEFORE darkplaces.h because it breaks wrapping
  * _Static_assert. Cloudwalk has no idea how or why so don't ask.
 #endif
 #endif
 
-sys_t sys;
 
 // =======================================================================
 // General routines
 // =======================================================================
 
-void Sys_Shutdown (void)
+void Sys_SDL_Shutdown(void)
 {
-#ifdef __ANDROID__
-       Sys_AllowProfiling(false);
-#endif
-#ifndef WIN32
-       fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NONBLOCK);
-#endif
-       fflush(stdout);
        SDL_Quit();
 }
 
-static qbool nocrashdialog;
-void Sys_Error (const char *error, ...)
+// Sys_Error early in startup might screw with automated
+// workflows or something if we show the dialog by default.
+static qbool nocrashdialog = true;
+void Sys_SDL_Dialog(const char *title, const char *string)
 {
-       va_list argptr;
-       char string[MAX_INPUTLINE];
-
-// change stdin to non blocking
-#ifndef WIN32
-       fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NONBLOCK);
-#endif
-
-       va_start (argptr,error);
-       dpvsnprintf (string, sizeof (string), error, argptr);
-       va_end (argptr);
-
-       Con_Printf(CON_ERROR "Engine Error: %s\n", string);
-       
        if(!nocrashdialog)
-               SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Engine Error", string, NULL);
-
-       //Host_Shutdown ();
-       exit (1);
-}
-
-void Sys_Print(const char *text)
-{
-#ifdef __ANDROID__
-       if (developer.integer > 0)
-       {
-               __android_log_write(ANDROID_LOG_DEBUG, sys.argv[0], text);
-       }
-#else
-       if(sys.outfd < 0)
-               return;
-#ifndef WIN32
-       // BUG: for some reason, NDELAY also affects stdout (1) when used on stdin (0).
-       // this is because both go to /dev/tty by default!
-       {
-               int origflags = fcntl (sys.outfd, F_GETFL, 0);
-               fcntl (sys.outfd, F_SETFL, origflags & ~O_NONBLOCK);
-#endif
-#ifdef WIN32
-#define write _write
-#endif
-               while(*text)
-               {
-                       fs_offset_t written = (fs_offset_t)write(sys.outfd, text, (int)strlen(text));
-                       if(written <= 0)
-                               break; // sorry, I cannot do anything about this error - without an output
-                       text += written;
-               }
-#ifndef WIN32
-               fcntl (sys.outfd, F_SETFL, origflags);
-       }
-#endif
-       //fprintf(stdout, "%s", text);
-#endif
+               SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, title, string, NULL);
 }
 
-char *Sys_ConsoleInput(void)
-{
-       static char text[MAX_INPUTLINE];
-       int len = 0;
-#ifdef WIN32
-       int c;
-
-       // read a line out
-       while (_kbhit ())
-       {
-               c = _getch ();
-               _putch (c);
-               if (c == '\r')
-               {
-                       text[len] = 0;
-                       _putch ('\n');
-                       len = 0;
-                       return text;
-               }
-               if (c == 8)
-               {
-                       if (len)
-                       {
-                               _putch (' ');
-                               _putch (c);
-                               len--;
-                               text[len] = 0;
-                       }
-                       continue;
-               }
-               text[len] = c;
-               len++;
-               text[len] = 0;
-               if (len == sizeof (text))
-                       len = 0;
-       }
-#else
-       fd_set fdset;
-       struct timeval timeout;
-       FD_ZERO(&fdset);
-       FD_SET(0, &fdset); // stdin
-       timeout.tv_sec = 0;
-       timeout.tv_usec = 0;
-       if (select (1, &fdset, NULL, NULL, &timeout) != -1 && FD_ISSET(0, &fdset))
-       {
-               len = read (0, text, sizeof(text));
-               if (len >= 1)
-               {
-                       // rip off the \n and terminate
-                       text[len-1] = 0;
-                       return text;
-               }
-       }
-#endif
-       return NULL;
-}
-
-char *Sys_GetClipboardData (void)
+char *Sys_SDL_GetClipboardData (void)
 {
        char *data = NULL;
        char *cliptext;
@@ -172,58 +42,22 @@ char *Sys_GetClipboardData (void)
                size_t allocsize;
                allocsize = min(MAX_INPUTLINE, strlen(cliptext) + 1);
                data = (char *)Z_Malloc (allocsize);
-               strlcpy (data, cliptext, allocsize);
+               dp_strlcpy (data, cliptext, allocsize);
                SDL_free(cliptext);
        }
 
        return data;
 }
 
-int main (int argc, char *argv[])
+void Sys_SDL_Init(void)
 {
-       signal(SIGFPE, SIG_IGN);
-
-#ifdef __ANDROID__
-       Sys_AllowProfiling(true);
-#endif
-
-       sys.selffd = -1;
-       sys.argc = argc;
-       sys.argv = (const char **)argv;
-
-       // Sys_Error this early in startup might screw with automated
-       // workflows or something if we show the dialog by default.
-       nocrashdialog = true;
-
-       Sys_ProvideSelfFD();
+       // we don't know which systems we'll want to init, yet...
+       if (SDL_Init(0) < 0)
+               Sys_Error("SDL_Init failed: %s\n", SDL_GetError());
 
-       // COMMANDLINEOPTION: -nocrashdialog disables "Engine Error" crash dialog boxes
+       // COMMANDLINEOPTION: sdl: -nocrashdialog disables "Engine Error" crash dialog boxes
        if(!Sys_CheckParm("-nocrashdialog"))
                nocrashdialog = false;
-       // COMMANDLINEOPTION: sdl: -noterminal disables console output on stdout
-       if(Sys_CheckParm("-noterminal"))
-               sys.outfd = -1;
-       // COMMANDLINEOPTION: sdl: -stderr moves console output to stderr
-       else if(Sys_CheckParm("-stderr"))
-               sys.outfd = 2;
-       else
-               sys.outfd = 1;
-
-#ifndef WIN32
-       fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NONBLOCK);
-#endif
-
-       // we don't know which systems we'll want to init, yet...
-       SDL_Init(0);
-
-       // used by everything
-       Memory_Init();
-
-       Host_Main();
-
-       Sys_Quit(0);
-       
-       return 0;
 }
 
 qbool sys_supportsdlgetticks = true;
@@ -235,3 +69,8 @@ void Sys_SDL_Delay (unsigned int milliseconds)
 {
        SDL_Delay(milliseconds);
 }
+
+int main(int argc, char *argv[])
+{
+       return Sys_Main(argc, argv);
+}
index 39c9bf8bf4e1507d37a0d59b831e078dae5c63a9..4222c42be414c88836cdfe48a87c73993482b554 100644 (file)
@@ -4,16 +4,14 @@
 # endif
 #endif
 
-#include "quakedef.h"
-#include "taskqueue.h"
-#include "thread.h"
-
 #define SUPPORTDLL
 
 #ifdef WIN32
 # include <windows.h>
 # include <mmsystem.h> // timeGetTime
 # include <time.h> // localtime
+# include <conio.h> // _kbhit, _getch, _putch
+# include <io.h> // write; Include this BEFORE darkplaces.h because it uses strncpy which trips DP_STATIC_ASSERT
 #ifdef _MSC_VER
 #pragma comment(lib, "winmm.lib")
 #endif
@@ -21,6 +19,9 @@
 # ifdef __FreeBSD__
 #  include <sys/sysctl.h>
 # endif
+# ifdef __ANDROID__
+#  include <android/log.h>
+# endif
 # include <unistd.h>
 # include <fcntl.h>
 # include <sys/time.h>
 # endif
 #endif
 
+#include <signal.h>
+
+#include "quakedef.h"
+#include "taskqueue.h"
+#include "thread.h"
+#include "libcurl.h"
+
+
+sys_t sys;
+
 static char sys_timestring[128];
 char *Sys_TimeString(const char *timeformat)
 {
@@ -45,21 +56,6 @@ char *Sys_TimeString(const char *timeformat)
 }
 
 
-void Sys_Quit (int returnvalue)
-{
-       // Unlock mutexes because the quit command may jump directly here, causing a deadlock
-       if ((cmd_local)->cbuf->lock)
-               Cbuf_Unlock((cmd_local)->cbuf);
-       SV_UnlockThreadMutex();
-       TaskQueue_Frame(true);
-
-       if (Sys_CheckParm("-profilegameonly"))
-               Sys_AllowProfiling(false);
-       host.state = host_shutdown;
-       Host_Shutdown();
-       exit(returnvalue);
-}
-
 #ifdef __cplusplus
 extern "C"
 #endif
@@ -186,13 +182,13 @@ notfound:
        if (!dllhandle && strrchr(sys.argv[0], '/'))
        {
                char path[MAX_OSPATH];
-               strlcpy(path, sys.argv[0], sizeof(path));
+               dp_strlcpy(path, sys.argv[0], sizeof(path));
                strrchr(path, '/')[1] = 0;
                for (i = 0; dllnames[i] != NULL; i++)
                {
                        char temp[MAX_OSPATH];
-                       strlcpy(temp, path, sizeof(temp));
-                       strlcat(temp, dllnames[i], sizeof(temp));
+                       dp_strlcpy(temp, path, sizeof(temp));
+                       dp_strlcat(temp, dllnames[i], sizeof(temp));
                        Con_DPrintf (" \"%s\"", temp);
 
                        if(Sys_LoadLibrary(temp, &dllhandle))
@@ -272,46 +268,41 @@ void* Sys_GetProcAddress (dllhandle_t handle, const char* name)
 #endif
 }
 
+
+
 #ifdef WIN32
 # define HAVE_TIMEGETTIME 1
 # define HAVE_QUERYPERFORMANCECOUNTER 1
+# define HAVE_WIN32_USLEEP 1
 # define HAVE_Sleep 1
-#endif
-
-#ifndef WIN32
-#if defined(CLOCK_MONOTONIC) || defined(CLOCK_HIRES)
-# define HAVE_CLOCKGETTIME 1
-#endif
-// FIXME improve this check, manpage hints to DST_NONE
-# define HAVE_GETTIMEOFDAY 1
-#endif
-
-#ifndef WIN32
-// on Win32, select() cannot be used with all three FD list args being NULL according to MSDN
-// (so much for POSIX...)
-# ifdef FD_SET
-#  define HAVE_SELECT 1
+#else
+# if defined(CLOCK_MONOTONIC) || defined(CLOCK_HIRES)
+#  define HAVE_CLOCKGETTIME 1
+# endif
+# if _POSIX_VERSION >= 200112L
+#  define HAVE_CLOCK_NANOSLEEP 1
 # endif
 #endif
 
-#ifndef WIN32
-// FIXME improve this check
-# define HAVE_USLEEP 1
+#ifdef FD_SET
+# define HAVE_SELECT 1
 #endif
 
 // these are referenced elsewhere
-cvar_t sys_usenoclockbutbenchmark = {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "sys_usenoclockbutbenchmark", "0", "don't use ANY real timing, and simulate a clock (for benchmarking); the game then runs as fast as possible. Run a QC mod with bots that does some stuff, then does a quit at the end, to benchmark a server. NEVER do this on a public server."};
-cvar_t sys_libdir = {CF_READONLY | CF_CLIENT | CF_SERVER, "sys_libdir", "", "Default engine library directory"};
+cvar_t sys_usenoclockbutbenchmark = {CF_SHARED, "sys_usenoclockbutbenchmark", "0", "don't use ANY real timing, and simulate a clock (for benchmarking); the game then runs as fast as possible. Run a QC mod with bots that does some stuff, then does a quit at the end, to benchmark a server. NEVER do this on a public server."};
+cvar_t sys_libdir = {CF_READONLY | CF_SHARED, "sys_libdir", "", "Default engine library directory"};
 
 // these are not
-static cvar_t sys_debugsleep = {CF_CLIENT | CF_SERVER, "sys_debugsleep", "0", "write requested and attained sleep times to standard output, to be used with gnuplot"};
-static cvar_t sys_usesdlgetticks = {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "sys_usesdlgetticks", "0", "use SDL_GetTicks() timer (less accurate, for debugging)"};
-static cvar_t sys_usesdldelay = {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "sys_usesdldelay", "0", "use SDL_Delay() (less accurate, for debugging)"};
+static cvar_t sys_debugsleep = {CF_SHARED, "sys_debugsleep", "0", "write requested and attained sleep times to standard output, to be used with gnuplot"};
+static cvar_t sys_usesdlgetticks = {CF_SHARED, "sys_usesdlgetticks", "0", "use SDL_GetTicks() timer (low precision, for debugging)"};
+static cvar_t sys_usesdldelay = {CF_SHARED, "sys_usesdldelay", "0", "use SDL_Delay() (low precision, for debugging)"};
 #if HAVE_QUERYPERFORMANCECOUNTER
-static cvar_t sys_usequeryperformancecounter = {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "sys_usequeryperformancecounter", "0", "use windows QueryPerformanceCounter timer (which has issues on multicore/multiprocessor machines and processors which are designed to conserve power) for timing rather than timeGetTime function (which has issues on some motherboards)"};
+static cvar_t sys_usequeryperformancecounter = {CF_SHARED | CF_ARCHIVE, "sys_usequeryperformancecounter", "1", "use windows QueryPerformanceCounter timer (which has issues on systems lacking constant-rate TSCs synchronised across all cores, such as ancient PCs or VMs) for timing rather than timeGetTime function (which is low precision and had issues on some old motherboards)"};
 #endif
-#if HAVE_CLOCKGETTIME
-static cvar_t sys_useclockgettime = {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "sys_useclockgettime", "1", "use POSIX clock_gettime function (not adjusted by NTP on some older Linux kernels) for timing rather than gettimeofday (which has issues if the system time is stepped by ntpdate, or apparently on some Xen installations)"};
+
+static cvar_t sys_stdout = {CF_SHARED, "sys_stdout", "1", "0: nothing is written to stdout (-nostdout cmdline option sets this), 1: normal messages are written to stdout, 2: normal messages are written to stderr (-stderr cmdline option sets this)"};
+#ifndef WIN32
+static cvar_t sys_stdout_blocks = {CF_SHARED, "sys_stdout_blocks", "0", "1: writes to stdout and stderr streams will block (causing a stutter or complete halt) if the buffer is full, ensuring no messages are lost at a price"};
 #endif
 
 static double benchmark_time; // actually always contains an integer amount of milliseconds, will eventually "overflow"
@@ -339,12 +330,23 @@ int Sys_CheckParm (const char *parm)
        return 0;
 }
 
+static void Sys_UpdateOutFD_c(cvar_t *var)
+{
+       switch (sys_stdout.integer)
+       {
+               case 0: sys.outfd = -1; break;
+               default:
+               case 1: sys.outfd = fileno(stdout); break;
+               case 2: sys.outfd = fileno(stderr); break;
+       }
+}
+
 void Sys_Init_Commands (void)
 {
        Cvar_RegisterVariable(&sys_debugsleep);
        Cvar_RegisterVariable(&sys_usenoclockbutbenchmark);
        Cvar_RegisterVariable(&sys_libdir);
-#if HAVE_TIMEGETTIME || HAVE_QUERYPERFORMANCECOUNTER || HAVE_CLOCKGETTIME || HAVE_GETTIMEOFDAY
+#if HAVE_TIMEGETTIME || HAVE_QUERYPERFORMANCECOUNTER || HAVE_CLOCKGETTIME
        if(sys_supportsdlgetticks)
        {
                Cvar_RegisterVariable(&sys_usesdlgetticks);
@@ -354,11 +356,55 @@ void Sys_Init_Commands (void)
 #if HAVE_QUERYPERFORMANCECOUNTER
        Cvar_RegisterVariable(&sys_usequeryperformancecounter);
 #endif
-#if HAVE_CLOCKGETTIME
-       Cvar_RegisterVariable(&sys_useclockgettime);
+
+       Cvar_RegisterVariable(&sys_stdout);
+       Cvar_RegisterCallback(&sys_stdout, Sys_UpdateOutFD_c);
+#ifndef WIN32
+       Cvar_RegisterVariable(&sys_stdout_blocks);
 #endif
 }
 
+#ifdef WIN32
+static LARGE_INTEGER PerformanceFreq;
+/// Windows default timer resolution is only 15.625ms,
+/// this affects (at least) timeGetTime() and all forms of sleeping.
+static void Sys_SetTimerResolution(void)
+{
+       NTSTATUS(NTAPI *qNtQueryTimerResolution)(OUT PULONG MinRes, OUT PULONG MaxRes, OUT PULONG CurrentRes);
+       NTSTATUS(NTAPI *qNtSetTimerResolution)(IN ULONG DesiredRes, IN BOOLEAN SetRes, OUT PULONG ActualRes);
+       const char* ntdll_names [] =
+       {
+               "ntdll.dll",
+               NULL
+       };
+       dllfunction_t ntdll_funcs[] =
+       {
+               {"NtQueryTimerResolution", (void **) &qNtQueryTimerResolution},
+               {"NtSetTimerResolution",   (void **) &qNtSetTimerResolution},
+               {NULL, NULL}
+       };
+       dllhandle_t ntdll;
+       unsigned long WorstRes, BestRes, CurrentRes;
+
+       timeBeginPeriod(1); // 1ms, documented
+
+       // the best Windows can manage (typically 0.5ms)
+       // http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FTime%2FNtSetTimerResolution.html
+       if (Sys_LoadDependency(ntdll_names, &ntdll, ntdll_funcs))
+       {
+               qNtQueryTimerResolution(&WorstRes, &BestRes, &CurrentRes); // no pointers may be NULL
+               if (CurrentRes > BestRes)
+                       qNtSetTimerResolution(BestRes, true, &CurrentRes);
+
+               Sys_FreeLibrary(&ntdll);
+       }
+
+       // Microsoft says the freq is fixed at boot and consistent across all processors
+       // and that it need only be queried once and cached.
+       QueryPerformanceFrequency (&PerformanceFreq);
+}
+#endif // WIN32
+
 double Sys_DirtyTime(void)
 {
        // first all the OPTIONAL timers
@@ -372,28 +418,29 @@ double Sys_DirtyTime(void)
                        Sys_Error("sys_usenoclockbutbenchmark cannot run any longer, sorry");
                return benchmark_time * 0.000001;
        }
+
+       if(sys_supportsdlgetticks && sys_usesdlgetticks.integer)
+               return (double) Sys_SDL_GetTicks() / 1000.0;
+
 #if HAVE_QUERYPERFORMANCECOUNTER
        if (sys_usequeryperformancecounter.integer)
        {
-               // LadyHavoc: note to people modifying this code, DWORD is specifically defined as an unsigned 32bit number, therefore the 65536.0 * 65536.0 is fine.
                // QueryPerformanceCounter
                // platform:
                // Windows 95/98/ME/NT/2000/XP
                // features:
-               // very accurate (CPU cycles)
+               // + very accurate (constant-rate TSCs on modern systems)
                // known issues:
-               // does not necessarily match realtime too well (tends to get faster and faster in win98)
-               // wraps around occasionally on some platforms (depends on CPU speed and probably other unknown factors)
-               double timescale;
-               LARGE_INTEGER PerformanceFreq;
+               // does not necessarily match realtime too well (tends to get faster and faster in win98)
+               // wraps around occasionally on some platforms (depends on CPU speed and probably other unknown factors)
+               // - higher access latency on Vista
+               // Microsoft says on Win 7 or later, latency and overhead are very low, synchronisation is excellent.
                LARGE_INTEGER PerformanceCount;
 
-               if (QueryPerformanceFrequency (&PerformanceFreq))
+               if (PerformanceFreq.QuadPart)
                {
                        QueryPerformanceCounter (&PerformanceCount);
-       
-                       timescale = 1.0 / ((double) PerformanceFreq.LowPart + (double) PerformanceFreq.HighPart * 65536.0 * 65536.0);
-                       return ((double) PerformanceCount.LowPart + (double) PerformanceCount.HighPart * 65536.0 * 65536.0) * timescale;
+                       return (double)PerformanceCount.QuadPart * (1.0 / (double)PerformanceFreq.QuadPart);
                }
                else
                {
@@ -405,11 +452,13 @@ double Sys_DirtyTime(void)
 #endif
 
 #if HAVE_CLOCKGETTIME
-       if (sys_useclockgettime.integer)
        {
                struct timespec ts;
-#  ifdef CLOCK_MONOTONIC
-               // linux
+#  ifdef CLOCK_MONOTONIC_RAW
+               // Linux-specific, SDL_GetPerformanceCounter() uses it
+               clock_gettime(CLOCK_MONOTONIC, &ts);
+#  elif defined(CLOCK_MONOTONIC)
+               // POSIX
                clock_gettime(CLOCK_MONOTONIC, &ts);
 #  else
                // sunos
@@ -420,17 +469,8 @@ double Sys_DirtyTime(void)
 #endif
 
        // now all the FALLBACK timers
-       if(sys_supportsdlgetticks && sys_usesdlgetticks.integer)
-               return (double) Sys_SDL_GetTicks() / 1000.0;
-#if HAVE_GETTIMEOFDAY
-       {
-               struct timeval tp;
-               gettimeofday(&tp, NULL);
-               return (double) tp.tv_sec + tp.tv_usec / 1000000.0;
-       }
-#elif HAVE_TIMEGETTIME
+#if HAVE_TIMEGETTIME
        {
-               static int firsttimegettime = true;
                // timeGetTime
                // platform:
                // Windows 95/98/ME/NT/2000/XP
@@ -438,14 +478,7 @@ double Sys_DirtyTime(void)
                // reasonable accuracy (millisecond)
                // issues:
                // wraps around every 47 days or so (but this is non-fatal to us, odd times are rejected, only causes a one frame stutter)
-
-               // make sure the timer is high precision, otherwise different versions of windows have varying accuracy
-               if (firsttimegettime)
-               {
-                       timeBeginPeriod(1);
-                       firsttimegettime = false;
-               }
-
+               // requires Sys_SetTimerResolution()
                return (double) timeGetTime() / 1000.0;
        }
 #else
@@ -455,69 +488,267 @@ double Sys_DirtyTime(void)
 #endif
 }
 
-void Sys_Sleep(int microseconds)
+double Sys_Sleep(double time)
 {
-       double t = 0;
+       double dt;
+       uint32_t msec, usec, nsec;
+
+       if (time < 1.0/1000000.0 || host.restless)
+               return 0; // not sleeping this frame
+       if (time >= 1)
+               time = 0.999999; // ensure passed values are in range
+       msec = time * 1000;
+       usec = time * 1000000;
+       nsec = time * 1000000000;
+
        if(sys_usenoclockbutbenchmark.integer)
        {
-               if(microseconds)
-               {
-                       double old_benchmark_time = benchmark_time;
-                       benchmark_time += microseconds;
-                       if(benchmark_time == old_benchmark_time)
-                               Sys_Error("sys_usenoclockbutbenchmark cannot run any longer, sorry");
-               }
-               return;
+               double old_benchmark_time = benchmark_time;
+               benchmark_time += usec;
+               if(benchmark_time == old_benchmark_time)
+                       Sys_Error("sys_usenoclockbutbenchmark cannot run any longer, sorry");
+               return 0;
        }
+
        if(sys_debugsleep.integer)
+               Con_Printf("sys_debugsleep: requesting %u ", usec);
+       dt = Sys_DirtyTime();
+
+       // less important on newer libcurl so no need to disturb dedicated servers
+       if (cls.state != ca_dedicated && Curl_Select(msec))
        {
-               t = Sys_DirtyTime();
-       }
-       if(sys_supportsdlgetticks && sys_usesdldelay.integer)
-       {
-               Sys_SDL_Delay(microseconds / 1000);
+               // a transfer is ready or we finished sleeping
        }
+       else if(sys_supportsdlgetticks && sys_usesdldelay.integer)
+               Sys_SDL_Delay(msec);
 #if HAVE_SELECT
-       else
+       else if (cls.state == ca_dedicated && sv_checkforpacketsduringsleep.integer)
        {
                struct timeval tv;
-               tv.tv_sec = microseconds / 1000000;
-               tv.tv_usec = microseconds % 1000000;
-               select(0, NULL, NULL, NULL, &tv);
+               lhnetsocket_t *s;
+               fd_set fdreadset;
+               int lastfd = -1;
+
+               FD_ZERO(&fdreadset);
+               List_For_Each_Entry(s, &lhnet_socketlist.list, lhnetsocket_t, list)
+               {
+                       if (s->address.addresstype == LHNETADDRESSTYPE_INET4 || s->address.addresstype == LHNETADDRESSTYPE_INET6)
+                       {
+                               if (lastfd < s->inetsocket)
+                                       lastfd = s->inetsocket;
+       #if defined(WIN32) && !defined(_MSC_VER)
+                               FD_SET((int)s->inetsocket, &fdreadset);
+       #else
+                               FD_SET((unsigned int)s->inetsocket, &fdreadset);
+       #endif
+                       }
+               }
+               tv.tv_sec = 0;
+               tv.tv_usec = usec;
+               // on Win32, select() cannot be used with all three FD list args being NULL according to MSDN
+               // (so much for POSIX...), not with an empty fd_set either.
+               select(lastfd + 1, &fdreadset, NULL, NULL, &tv);
        }
-#elif HAVE_USLEEP
+#endif
+#if HAVE_CLOCK_NANOSLEEP
        else
        {
-               usleep(microseconds);
+               struct timespec ts;
+               ts.tv_sec = 0;
+               ts.tv_nsec = nsec;
+               clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL);
        }
-#elif HAVE_Sleep
+#elif HAVE_WIN32_USLEEP // Windows XP/2003 minimum
        else
        {
-               Sleep(microseconds / 1000);
+               HANDLE timer;
+               LARGE_INTEGER sleeptime;
+
+               // takes 100ns units, negative indicates relative time
+               sleeptime.QuadPart = -((int64_t)nsec / 100);
+               timer = CreateWaitableTimer(NULL, true, NULL);
+               SetWaitableTimer(timer, &sleeptime, 0, NULL, NULL, 0);
+               WaitForSingleObject(timer, INFINITE);
+               CloseHandle(timer);
        }
+#elif HAVE_Sleep
+       else
+               Sleep(msec);
 #else
        else
-       {
-               Sys_SDL_Delay(microseconds / 1000);
-       }
+               Sys_SDL_Delay(msec);
 #endif
+
+       dt = Sys_DirtyTime() - dt;
        if(sys_debugsleep.integer)
+               Con_Printf(" got %u oversleep %d\n", (unsigned int)(dt * 1000000), (unsigned int)(dt * 1000000) - usec);
+       return (dt < 0 || dt >= 1800) ? 0 : dt;
+}
+
+
+/*
+===============================================================================
+
+STDIO
+
+===============================================================================
+*/
+
+// NOTE: use only POSIX async-signal-safe library functions here (see: man signal-safety)
+void Sys_Print(const char *text, size_t textlen)
+{
+#ifdef __ANDROID__
+       if (developer.integer > 0)
        {
-               t = Sys_DirtyTime() - t;
-               Sys_Printf("%d %d # debugsleep\n", microseconds, (unsigned int)(t * 1000000));
+               __android_log_write(ANDROID_LOG_DEBUG, sys.argv[0], text);
        }
+#else
+       if(sys.outfd < 0)
+               return;
+  #ifndef WIN32
+       // BUG: for some reason, NDELAY also affects stdout (1) when used on stdin (0).
+       // this is because both go to /dev/tty by default!
+       {
+               int origflags = fcntl(sys.outfd, F_GETFL, 0);
+               if (sys_stdout_blocks.integer)
+                       fcntl(sys.outfd, F_SETFL, origflags & ~O_NONBLOCK);
+  #else
+    #define write _write
+  #endif
+               while(*text)
+               {
+                       fs_offset_t written = (fs_offset_t)write(sys.outfd, text, textlen);
+                       if(written <= 0)
+                               break; // sorry, I cannot do anything about this error - without an output
+                       text += written;
+               }
+  #ifndef WIN32
+               if (sys_stdout_blocks.integer)
+                       fcntl(sys.outfd, F_SETFL, origflags);
+       }
+  #endif
+       //fprintf(stdout, "%s", text);
+#endif
 }
 
 void Sys_Printf(const char *fmt, ...)
 {
        va_list argptr;
        char msg[MAX_INPUTLINE];
+       int msglen;
 
        va_start(argptr,fmt);
-       dpvsnprintf(msg,sizeof(msg),fmt,argptr);
+       msglen = dpvsnprintf(msg, sizeof(msg), fmt, argptr);
        va_end(argptr);
 
-       Sys_Print(msg);
+       if (msglen >= 0)
+               Sys_Print(msg, msglen);
+}
+
+/// Reads a line from POSIX stdin or the Windows console
+char *Sys_ConsoleInput(void)
+{
+       static char text[MAX_INPUTLINE];
+#ifdef WIN32
+       static unsigned int len = 0;
+       int c;
+
+       // read a line out
+       while (_kbhit ())
+       {
+               c = _getch ();
+               if (c == '\r')
+               {
+                       text[len] = '\0';
+                       _putch ('\n');
+                       len = 0;
+                       return text;
+               }
+               if (c == '\b')
+               {
+                       if (len)
+                       {
+                               _putch (c);
+                               _putch (' ');
+                               _putch (c);
+                               len--;
+                       }
+                       continue;
+               }
+               if (len < sizeof (text) - 1)
+               {
+                       _putch (c);
+                       text[len] = c;
+                       len++;
+               }
+       }
+#else
+       fd_set fdset;
+       struct timeval timeout = { .tv_sec = 0, .tv_usec = 0 };
+
+       FD_ZERO(&fdset);
+       FD_SET(fileno(stdin), &fdset);
+       if (select(1, &fdset, NULL, NULL, &timeout) != -1 && FD_ISSET(fileno(stdin), &fdset))
+               return fgets(text, sizeof(text), stdin);
+#endif
+       return NULL;
+}
+
+
+/*
+===============================================================================
+
+Startup and Shutdown
+
+===============================================================================
+*/
+
+void Sys_Error (const char *error, ...)
+{
+       va_list argptr;
+       char string[MAX_INPUTLINE];
+       int i;
+
+       // Disable Sys_HandleSignal() but not Sys_HandleCrash()
+       host.state = host_shutdown;
+
+       // set output to blocking stderr
+       sys.outfd = fileno(stderr);
+#ifndef WIN32
+       fcntl(sys.outfd, F_SETFL, fcntl(sys.outfd, F_GETFL, 0) & ~O_NONBLOCK);
+#endif
+
+       va_start (argptr,error);
+       dpvsnprintf (string, sizeof (string), error, argptr);
+       va_end (argptr);
+
+       Con_Printf(CON_ERROR "Engine Aborted: %s\n^9%s\n", string, engineversion);
+
+       dp_strlcat(string, "\n\n", sizeof(string));
+       dp_strlcat(string, engineversion, sizeof(string));
+
+       // Most shutdown funcs can't be called here as they could error while we error.
+
+       // DP8 TODO: send a disconnect message indicating we aborted, see Host_Error() and Sys_HandleCrash()
+
+       if (cls.demorecording)
+               CL_Stop_f(cmd_local);
+       if (sv.active)
+       {
+               sv.active = false; // make SV_DropClient() skip the QC stuff to avoid recursive errors
+               for (i = 0, host_client = svs.clients;i < svs.maxclients;i++, host_client++)
+                       if (host_client->active)
+                               SV_DropClient(false, "Server aborted!"); // closes demo file
+       }
+       // don't want a dead window left blocking the OS UI or the abort dialog
+       VID_Shutdown();
+       S_StopAllSounds();
+
+       host.state = host_failed; // make Sys_HandleSignal() call _Exit()
+       Sys_SDL_Dialog("Engine Aborted", string);
+
+       fflush(stderr);
+       exit (1);
 }
 
 #ifndef WIN32
@@ -713,3 +944,200 @@ void Sys_MakeProcessMean (void)
 {
 }
 #endif
+
+
+static const char *Sys_SigDesc(int sig)
+{
+       switch (sig)
+       {
+               // Windows only supports the C99 signals
+               case SIGINT:  return "Interrupt";
+               case SIGILL:  return "Illegal instruction";
+               case SIGABRT: return "Aborted";
+               case SIGFPE:  return "Floating point exception";
+               case SIGSEGV: return "Segmentation fault";
+               case SIGTERM: return "Termination";
+#ifndef WIN32
+               // POSIX has several others worth catching
+               case SIGHUP:  return "Hangup";
+               case SIGQUIT: return "Quit";
+               case SIGBUS:  return "Bus error (bad memory access)";
+               case SIGPIPE: return "Broken pipe";
+#endif
+               default:      return "Yo dawg, we bugged out while bugging out";
+       }
+}
+
+/** Halt and try not to catch fire.
+ * Writing to any file could corrupt it,
+ * any uneccessary code could crash while we crash.
+ * Try to use only POSIX async-signal-safe library functions here (see: man signal-safety).
+ */
+static void Sys_HandleCrash(int sig)
+{
+#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
+       // Before doing anything else grab the stack frame addresses
+       #include <execinfo.h>
+       void *stackframes[32];
+       int framecount = backtrace(stackframes, 32);
+       char **btstrings;
+#endif
+       char dialogtext[3072];
+       const char *sigdesc;
+
+       // Break any loop and disable Sys_HandleSignal()
+       if (host.state == host_failing || host.state == host_failed)
+               return;
+       host.state = host_failing;
+
+       sigdesc = Sys_SigDesc(sig);
+
+       // set output to blocking stderr and print header, backtrace, version
+       sys.outfd = fileno(stderr); // not async-signal-safe :(
+#ifndef WIN32
+       fcntl(sys.outfd, F_SETFL, fcntl(sys.outfd, F_GETFL, 0) & ~O_NONBLOCK);
+       Sys_Print("\n\n\e[1;37;41m    Engine Crash: ", 30);
+       Sys_Print(sigdesc, strlen(sigdesc));
+       Sys_Print("    \e[m\n", 8);
+  #if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
+       // the first two addresses will be in this function and in signal() in libc
+       backtrace_symbols_fd(stackframes + 2, framecount - 2, sys.outfd);
+  #endif
+       Sys_Print("\e[1m", 4);
+       Sys_Print(engineversion, strlen(engineversion));
+       Sys_Print("\e[m\n", 4);
+#else // Windows console doesn't support colours
+       Sys_Print("\n\nEngine Crash: ", 16);
+       Sys_Print(sigdesc, strlen(sigdesc));
+       Sys_Print("\n", 1);
+       Sys_Print(engineversion, strlen(engineversion));
+       Sys_Print("\n", 1);
+#endif
+
+       // DP8 TODO: send a disconnect message indicating we crashed, see Sys_Error() and Host_Error()
+
+       // don't want a dead window left blocking the OS UI or the crash dialog
+       VID_Shutdown();
+       S_StopAllSounds();
+
+       // prepare the dialogtext: signal, backtrace, version
+       // the dp_st* funcs are POSIX async-signal-safe IF we don't trigger their warnings
+       dp_strlcpy(dialogtext, sigdesc, sizeof(dialogtext));
+       dp_strlcat(dialogtext, "\n\n", sizeof(dialogtext));
+#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
+       btstrings = backtrace_symbols(stackframes + 2, framecount - 2); // calls malloc :(
+       if (btstrings)
+               for (int i = 0; i < framecount - 2; ++i)
+               {
+                       dp_strlcat(dialogtext, btstrings[i], sizeof(dialogtext));
+                       dp_strlcat(dialogtext, "\n", sizeof(dialogtext));
+               }
+#endif
+       dp_strlcat(dialogtext, "\n", sizeof(dialogtext));
+       dp_strlcat(dialogtext, engineversion, sizeof(dialogtext));
+
+       host.state = host_failed; // make Sys_HandleSignal() call _Exit()
+       Sys_SDL_Dialog("Engine Crash", dialogtext);
+
+       fflush(stderr); // not async-signal-safe :(
+
+       // Continue execution with default signal handling.
+       // A real crash will be re-triggered so the platform can handle it,
+       // a fake crash (kill -SEGV) will cause a graceful shutdown.
+       signal(sig, SIG_DFL);
+}
+
+static void Sys_HandleSignal(int sig)
+{
+       const char *sigdesc;
+
+       // Break any loop, eg if each Sys_Print triggers a SIGPIPE
+       if (host.state == host_shutdown || host.state == host_failing)
+               return;
+
+       sigdesc = Sys_SigDesc(sig);
+       Sys_Print("\nReceived ", 10);
+       Sys_Print(sigdesc, strlen(sigdesc));
+       Sys_Print(" signal, exiting...\n", 20);
+       if (host.state == host_failed)
+       {
+               // user is trying to kill the process while the SDL dialog is open
+               fflush(stderr); // not async-signal-safe :(
+               _Exit(sig);
+       }
+       host.state = host_shutdown;
+}
+
+/// SDL2 only handles SIGINT and SIGTERM by default and doesn't log anything
+static void Sys_InitSignals(void)
+{
+       // Windows only supports the C99 signals
+       signal(SIGINT,  Sys_HandleSignal);
+       signal(SIGILL,  Sys_HandleCrash);
+       signal(SIGABRT, Sys_HandleCrash);
+       signal(SIGFPE,  Sys_HandleCrash);
+       signal(SIGSEGV, Sys_HandleCrash);
+       signal(SIGTERM, Sys_HandleSignal);
+#ifndef WIN32
+       // POSIX has several others worth catching
+       signal(SIGHUP,  Sys_HandleSignal);
+       signal(SIGQUIT, Sys_HandleSignal);
+       signal(SIGBUS,  Sys_HandleCrash);
+       signal(SIGPIPE, Sys_HandleSignal);
+#endif
+}
+
+/** main() but renamed so we can wrap it in sys_sdl.c and sys_null.c
+ * to avoid needing to include SDL.h in this file (would make the dedicated server require SDL).
+ * SDL builds need SDL.h in the file where main() is defined because SDL renames and wraps main().
+ */
+int Sys_Main(int argc, char *argv[])
+{
+       sys.argc = argc;
+       sys.argv = (const char **)argv;
+
+       // COMMANDLINEOPTION: Console: -nostdout disables text output to the terminal the game was launched from
+       // COMMANDLINEOPTION: -noterminal disables console output on stdout
+       if(Sys_CheckParm("-noterminal") || Sys_CheckParm("-nostdout"))
+               sys_stdout.string = "0";
+       // COMMANDLINEOPTION: -stderr moves console output to stderr
+       else if(Sys_CheckParm("-stderr"))
+               sys_stdout.string = "2";
+       // too early for Cvar_SetQuick
+       sys_stdout.value = sys_stdout.integer = atoi(sys_stdout.string);
+       Sys_UpdateOutFD_c(&sys_stdout);
+#ifndef WIN32
+       fcntl(fileno(stdin), F_SETFL, fcntl(fileno(stdin), F_GETFL, 0) | O_NONBLOCK);
+       // stdout/stderr will be set to blocking in Sys_Print() if so configured, or during a fatal error.
+       fcntl(fileno(stdout), F_SETFL, fcntl(fileno(stdout), F_GETFL, 0) | O_NONBLOCK);
+       fcntl(fileno(stderr), F_SETFL, fcntl(fileno(stderr), F_GETFL, 0) | O_NONBLOCK);
+#endif
+
+       sys.selffd = -1;
+       Sys_ProvideSelfFD(); // may call Con_Printf() so must be after sys.outfd is set
+
+#ifdef __ANDROID__
+       Sys_AllowProfiling(true);
+#endif
+
+       Sys_InitSignals();
+
+#ifdef WIN32
+       Sys_SetTimerResolution();
+#endif
+
+       Host_Main();
+
+#ifdef __ANDROID__
+       Sys_AllowProfiling(false);
+#endif
+
+#ifndef WIN32
+       fcntl(fileno(stdout), F_SETFL, fcntl(fileno(stdout), F_GETFL, 0) & ~O_NONBLOCK);
+       fcntl(fileno(stderr), F_SETFL, fcntl(fileno(stderr), F_GETFL, 0) & ~O_NONBLOCK);
+#endif
+       fflush(stdout);
+       fflush(stderr);
+
+       return 0;
+}
diff --git a/sys_unix.c b/sys_unix.c
deleted file mode 100644 (file)
index 2ff100d..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-
-#ifdef WIN32
-#include <windows.h>
-#include <mmsystem.h>
-#include <io.h>
-#include "conio.h"
-#else
-#include <sys/time.h>
-#include <unistd.h>
-#include <fcntl.h>
-#endif
-
-#include <signal.h>
-
-#include "darkplaces.h"
-
-sys_t sys;
-
-// =======================================================================
-// General routines
-// =======================================================================
-void Sys_Shutdown (void)
-{
-#ifndef WIN32
-       fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NONBLOCK);
-#endif
-       fflush(stdout);
-}
-
-void Sys_Error (const char *error, ...)
-{
-       va_list argptr;
-       char string[MAX_INPUTLINE];
-
-// change stdin to non blocking
-#ifndef WIN32
-       fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NONBLOCK);
-#endif
-       va_start (argptr,error);
-       dpvsnprintf (string, sizeof (string), error, argptr);
-       va_end (argptr);
-
-       Con_Printf(CON_ERROR "Engine Error: %s\n", string);
-
-       //Host_Shutdown ();
-       exit (1);
-}
-
-void Sys_Print(const char *text)
-{
-       if(sys.outfd < 0)
-               return;
-       // BUG: for some reason, NDELAY also affects stdout (1) when used on stdin (0).
-       // this is because both go to /dev/tty by default!
-       {
-#ifndef WIN32
-               int origflags = fcntl (sys.outfd, F_GETFL, 0);
-               fcntl (sys.outfd, F_SETFL, origflags & ~O_NONBLOCK);
-#else
-#define write _write
-#endif
-               while(*text)
-               {
-                       fs_offset_t written = (fs_offset_t)write(sys.outfd, text, (int)strlen(text));
-                       if(written <= 0)
-                               break; // sorry, I cannot do anything about this error - without an output
-                       text += written;
-               }
-#ifndef WIN32
-               fcntl (sys.outfd, F_SETFL, origflags);
-#endif
-       }
-       //fprintf(stdout, "%s", text);
-}
-
-char *Sys_ConsoleInput(void)
-{
-       static char text[MAX_INPUTLINE];
-       static unsigned int len = 0;
-#ifdef WIN32
-       int c;
-
-       // read a line out
-       while (_kbhit ())
-       {
-               c = _getch ();
-               if (c == '\r')
-               {
-                       text[len] = '\0';
-                       _putch ('\n');
-                       len = 0;
-                       return text;
-               }
-               if (c == '\b')
-               {
-                       if (len)
-                       {
-                               _putch (c);
-                               _putch (' ');
-                               _putch (c);
-                               len--;
-                       }
-                       continue;
-               }
-               if (len < sizeof (text) - 1)
-               {
-                       _putch (c);
-                       text[len] = c;
-                       len++;
-               }
-       }
-#else
-       fd_set fdset;
-       struct timeval timeout;
-       FD_ZERO(&fdset);
-       FD_SET(0, &fdset); // stdin
-       timeout.tv_sec = 0;
-       timeout.tv_usec = 0;
-       if (select (1, &fdset, NULL, NULL, &timeout) != -1 && FD_ISSET(0, &fdset))
-       {
-               len = read (0, text, sizeof(text) - 1);
-               if (len >= 1)
-               {
-                       // rip off the \n and terminate
-                       // div0: WHY? console code can deal with \n just fine
-                       // this caused problems with pasting stuff into a terminal window
-                       // so, not ripping off the \n, but STILL keeping a NUL terminator
-                       text[len] = 0;
-                       return text;
-               }
-       }
-#endif
-       return NULL;
-}
-
-char *Sys_GetClipboardData (void)
-{
-       return NULL;
-}
-
-int main (int argc, char **argv)
-{
-       signal(SIGFPE, SIG_IGN);
-       sys.selffd = -1;
-       sys.argc = argc;
-       sys.argv = (const char **)argv;
-       Sys_ProvideSelfFD();
-
-       // COMMANDLINEOPTION: sdl: -noterminal disables console output on stdout
-       if(Sys_CheckParm("-noterminal"))
-               sys.outfd = -1;
-       // COMMANDLINEOPTION: sdl: -stderr moves console output to stderr
-       else if(Sys_CheckParm("-stderr"))
-               sys.outfd = 2;
-       else
-               sys.outfd = 1;
-#ifndef WIN32
-       fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NONBLOCK);
-#endif
-
-       // used by everything
-       Memory_Init();
-
-       Host_Main();
-
-       Sys_Quit(0);
-
-       return 0;
-}
-
-qbool sys_supportsdlgetticks = false;
-unsigned int Sys_SDL_GetTicks (void)
-{
-       Sys_Error("Called Sys_SDL_GetTicks on non-SDL target");
-       return 0;
-}
-void Sys_SDL_Delay (unsigned int milliseconds)
-{
-       Sys_Error("Called Sys_SDL_Delay on non-SDL target");
-}
index e2445d43cb621dad52c831fd71576ad27656478e..175a28af7c21c74aea3562ea4423b99c4c701a24 100644 (file)
@@ -96,7 +96,7 @@ static int TaskQueue_ThreadFunc(void *d)
                        break;
                sleepcounter++;
                if (sleepcounter >= THREADSLEEPCOUNT)
-                       Sys_Sleep(1000);
+                       Sys_Sleep(0.001);
                sleepcounter = 0;
        }
        return 0;
diff --git a/todo b/todo
index 28e8cb6c475a41239aab785fcf76bae8db5a6a35..19c25c34b47e9d650b9b9ffda9b4c314e53dd80d 100644 (file)
--- a/todo
+++ b/todo
 0 optimize darkplaces renderer: get rid of attenuation texture on lights because math is faster, add fastpath for no normalmap (Lava_Croft)
 1 bug darkplaces WGL client: figure out why for some people GDI input has stuttering problems with gl_finish 0 mode (Kinn, Urre, romi, Spike, Black)
 1 bug darkplaces WGL/GLX/SDL client bug: if sound is unavailable (causing a freeze waiting for it to become available), the config is reset (SavageX)
-1 bug darkplaces bsd filesystem: read() is failing (not returning the requested amount) on freebsd when reading files, whether actual files or in a pk3 - somehow it is still able to read the pk3 zip directory though (suminigashi, Elric)
 1 bug darkplaces collisions: curve collisions sometimes catch on the lip of the edge, pushing into the curved back wall around certain jumppads in Nexuiz for example consistently gets stuck just below the ledge (HReaper)
 1 bug darkplaces command: "rate", "playermodel", "playerskin", "pmodel" commands can spam server console with usage statements (Spike)
 1 bug darkplaces console: when logging using log_file and log_sync 0, setting log_file back to "" does not close the file until another message is posted?
@@ -1356,6 +1355,7 @@ d revelation: fix lingering glow on lightning deaths (romi)
 d revelation: reduce damage from weapons (romi)
 d sv_user.qc: figure out why looking up/down slows movement and fix it (Vermeulen)
 d zmodel: fix scale and origin commands (Vermeulen)
+-d bug darkplaces bsd filesystem: read() is failing (not returning the requested amount) on freebsd when reading files, whether actual files or in a pk3 - somehow it is still able to read the pk3 zip directory though (suminigashi, Elric)
 f LordHavoc: examine .mb (Maya Binary) file from Electro and learn its format (Electro)
 f bug darkplaces capturevideo: cl_capturevideo 1 with sound off is not locking the framerate of a server (Vermeulen)
 f bug darkplaces client: decals are not sticking to submodels
index 155b4aea9a8f949ecf8e2a583487c4fa122896cc..1e34e707c978413cb8ef999db36a6e5dd24ecb8b 100644 (file)
--- a/utf8lib.c
+++ b/utf8lib.c
@@ -170,7 +170,7 @@ findchar:
             (bits >= 3 && ch < 0x800) ||
             (bits >= 4 && ch < 0x10000) ||
             ch >= 0x10FFFF // RFC 3629
-               )
+       )
        {
                i += bits;
                //fprintf(stderr, "overlong: %i bytes for %x\n", bits, ch);
@@ -907,6 +907,115 @@ size_t u8_strpad_colorcodes(char *out, size_t outsize, const char *in, qbool lef
        return dpsnprintf(out, outsize, "%*s%.*s%*s", lpad, "", prec, in, rpad, "");
 }
 
+#ifdef WIN32
+
+/**
+ * Convert Windows "wide" characters to WTF-8 for internal manipulation
+ */
+int towtf8(const wchar *wstr, int wlen, char *cstr, int maxclen)
+{
+       int p = 0;
+       int i;
+       for (i = 0; i < wlen; ++i)
+       {
+               wchar point = wstr[i];
+               if (point < 0x80)
+               {
+                       if (p + 1 >= maxclen) break;
+                       cstr[p++] = point;
+               }
+               else if (point < 0x800)
+               {
+                       if (p + 2 >= maxclen) break;
+                       cstr[p++] = (0xc0 | ((point >>  6) & 0x1f));
+                       cstr[p++] = (0x80 | ((point >>  0) & 0x3f));
+               }
+               else
+               #if WTF8U32
+               if (point < 0x10000)
+               #endif
+               {
+                       if (p + 3 >= maxclen) break;
+                       cstr[p++] = (0xe0 | ((point >> 12) & 0x0f));
+                       cstr[p++] = (0x80 | ((point >>  6) & 0x3f));
+                       cstr[p++] = (0x80 | ((point >>  0) & 0x3f));
+               }
+               #if WTF8U32
+               else
+               #if WTF8CHECKS
+               if (point < 0x110000)
+               #endif
+               {
+                       if (p + 4 >= maxclen) break;
+                       cstr[p++] = (0xf0 | ((point >> 18) & 0x07));
+                       cstr[p++] = (0x80 | ((point >> 12) & 0x3f));
+                       cstr[p++] = (0x80 | ((point >>  6) & 0x3f));
+                       cstr[p++] = (0x80 | ((point >>  0) & 0x3f));
+               }
+               #endif
+       }
+       cstr[p] = 0x00;
+       return p;
+}
+
+/**
+ * Convert WTF-8 string to "wide" characters used by Windows
+ */
+int fromwtf8(const char *cstr, int clen, wchar *wstr, int maxwlen)
+{
+       int p = 0;
+       int i;
+       for (i = 0; i < clen;)
+       {
+               char byte = cstr[i++];
+               wchar point = byte;
+               int length = 1;
+               if (p + 1 >= maxwlen) break;
+               #if WTF8CHECKS
+               if ((byte & 0xf8) == 0xf8)
+                       return -1;
+               #endif
+               #if WTF8U32
+               if ((byte & 0xf8) == 0xf0)
+               {
+                       length = 4;
+                       point = byte & 0x07;
+               }
+               else
+               #endif
+               if ((byte & 0xf0) == 0xe0)
+               {
+                       length = 3;
+                       point = byte & 0x0f;
+               }
+               else if ((byte & 0xe0) == 0xc0)
+               {
+                       length = 2;
+                       point = byte & 0x1f;
+               }
+               #if WTF8CHECKS
+               else if ((byte & 0xc0) == 0x80)
+               {
+                       return -1;
+               }
+               #endif
+               while (--length)
+               {
+                       byte = cstr[i++];
+                       #if WTF8CHECKS
+                       if (byte == -1) return -1;
+                       else if ((byte & 0xc0) != 0x80) return -1;
+                       #endif
+                       point = (point << 6) | (byte & 0x3f);
+               }
+               wstr[p++] = point;
+       }
+       wstr[p] = 0x00;
+       return p;
+}
+
+#endif // WIN32
+
 
 /*
 The two following functions (u8_toupper, u8_tolower) are derived from
index 4b8221f5f779da6d7ca6d9103c6a69173acb08fa..b50a20655c8ce3ce1790dd6a1f81b9dec85b0a3f 100644 (file)
--- a/utf8lib.h
+++ b/utf8lib.h
@@ -78,4 +78,17 @@ extern Uchar u8_quake2utf8map[256];
 Uchar u8_toupper(Uchar ch);
 Uchar u8_tolower(Uchar ch);
 
+#ifdef WIN32
+
+// WTF-8 encoding to circumvent Windows encodings, be it UTF-16 or random codepages
+// https://simonsapin.github.io/wtf-8/
+#define WTF8U32 0     // whether to regard wchar as utf-32
+#define WTF8CHECKS 1  // check for extra sanity in conversion steps
+typedef wchar_t wchar;
+
+int towtf8(const wchar* wstr, int wlen, char* cstr, int maxclen);
+int fromwtf8(const char* cstr, int clen, wchar* wstr, int maxwlen);
+
+#endif // WIN32
+
 #endif // UTF8LIB_H__
diff --git a/vid.h b/vid.h
index 8b8fa3f5da0e277ac010f4d053076d56ab08e232..3ede535d9238c7c179a87b12ea27024e4ab377b5 100644 (file)
--- a/vid.h
+++ b/vid.h
@@ -41,6 +41,7 @@ renderpath_t;
 
 typedef struct viddef_support_s
 {
+       int glversion; // this is at least 32
        int glshaderversion; // this is at least 150 (GL 3.2)
        qbool amd_texture_texture4;
        qbool arb_texture_gather;
@@ -95,6 +96,9 @@ typedef struct viddef_s
        viddef_support_t support;
 
        int forcetextype; // always use GL_BGRA for D3D, always use GL_RGBA for GLES, etc
+
+       int xPos, yPos; // current virtual position of the top left corner of the SDL window
+       unsigned char displayindex; // the monitor it's on currently
 } viddef_t;
 
 // global video state
@@ -115,10 +119,10 @@ vid_joystate_t;
 
 extern vid_joystate_t vid_joystate;
 
-extern struct cvar_s joy_index;
-extern struct cvar_s joy_enable;
-extern struct cvar_s joy_detected;
-extern struct cvar_s joy_active;
+extern cvar_t joy_index;
+extern cvar_t joy_enable;
+extern cvar_t joy_detected;
+extern cvar_t joy_active;
 
 float VID_JoyState_GetAxis(const vid_joystate_t *joystate, int axis, float sensitivity, float deadzone);
 void VID_ApplyJoyState(vid_joystate_t *joystate);
@@ -129,54 +133,66 @@ int VID_Shared_SetJoystick(int index);
 qbool VID_JoyBlockEmulatedKeys(int keycode);
 void VID_EnableJoystick(qbool enable);
 
+extern cvar_t cl_demo_mousegrab;
+extern qbool scr_loading;
+
 extern qbool vid_hidden;
 extern qbool vid_activewindow;
 extern qbool vid_supportrefreshrate;
 
-extern struct cvar_s vid_fullscreen;
-extern struct cvar_s vid_borderless;
-extern struct cvar_s vid_width;
-extern struct cvar_s vid_height;
-extern struct cvar_s vid_bitsperpixel;
-extern struct cvar_s vid_samples;
-extern struct cvar_s vid_refreshrate;
-extern struct cvar_s vid_userefreshrate;
-extern struct cvar_s vid_touchscreen_density;
-extern struct cvar_s vid_touchscreen_xdpi;
-extern struct cvar_s vid_touchscreen_ydpi;
-extern struct cvar_s vid_vsync;
-extern struct cvar_s vid_mouse;
-extern struct cvar_s vid_mouse_clickthrough;
-extern struct cvar_s vid_grabkeyboard;
-extern struct cvar_s vid_touchscreen;
-extern struct cvar_s vid_touchscreen_showkeyboard;
-extern struct cvar_s vid_touchscreen_supportshowkeyboard;
-extern struct cvar_s vid_stick_mouse;
-extern struct cvar_s vid_resizable;
-extern struct cvar_s vid_desktopfullscreen;
+extern cvar_t vid_fullscreen;
+extern cvar_t vid_borderless;
+extern cvar_t vid_width;
+extern cvar_t vid_height;
+extern cvar_t vid_bitsperpixel;
+extern cvar_t vid_samples;
+extern cvar_t vid_refreshrate;
+extern cvar_t vid_userefreshrate;
+extern cvar_t vid_touchscreen_density;
+extern cvar_t vid_touchscreen_xdpi;
+extern cvar_t vid_touchscreen_ydpi;
+extern cvar_t vid_vsync;
+extern cvar_t vid_mouse;
+extern cvar_t vid_mouse_clickthrough;
+extern cvar_t vid_minimize_on_focus_loss;
+extern cvar_t vid_grabkeyboard;
+extern cvar_t vid_touchscreen;
+extern cvar_t vid_touchscreen_showkeyboard;
+extern cvar_t vid_touchscreen_supportshowkeyboard;
+extern cvar_t vid_stick_mouse;
+extern cvar_t vid_resizable;
+extern cvar_t vid_desktopfullscreen;
+extern cvar_t vid_display;
+extern cvar_t vid_info_displaycount;
 #ifdef WIN32
-extern struct cvar_s vid_ignore_taskbar;
+extern cvar_t vid_ignore_taskbar;
 #endif
-extern struct cvar_s vid_minwidth;
-extern struct cvar_s vid_minheight;
-extern struct cvar_s vid_sRGB;
-extern struct cvar_s vid_sRGB_fallback;
-
-extern struct cvar_s gl_finish;
-
-extern struct cvar_s v_gamma;
-extern struct cvar_s v_contrast;
-extern struct cvar_s v_brightness;
-extern struct cvar_s v_color_enable;
-extern struct cvar_s v_color_black_r;
-extern struct cvar_s v_color_black_g;
-extern struct cvar_s v_color_black_b;
-extern struct cvar_s v_color_grey_r;
-extern struct cvar_s v_color_grey_g;
-extern struct cvar_s v_color_grey_b;
-extern struct cvar_s v_color_white_r;
-extern struct cvar_s v_color_white_g;
-extern struct cvar_s v_color_white_b;
+extern cvar_t vid_minwidth;
+extern cvar_t vid_minheight;
+extern cvar_t vid_sRGB;
+extern cvar_t vid_sRGB_fallback;
+
+extern cvar_t gl_finish;
+
+extern cvar_t v_gamma;
+extern cvar_t v_contrast;
+extern cvar_t v_brightness;
+extern cvar_t v_color_enable;
+extern cvar_t v_color_black_r;
+extern cvar_t v_color_black_g;
+extern cvar_t v_color_black_b;
+extern cvar_t v_color_grey_r;
+extern cvar_t v_color_grey_g;
+extern cvar_t v_color_grey_b;
+extern cvar_t v_color_white_r;
+extern cvar_t v_color_white_g;
+extern cvar_t v_color_white_b;
+
+extern cvar_t gl_info_vendor;
+extern cvar_t gl_info_renderer;
+extern cvar_t gl_info_version;
+extern cvar_t gl_info_extensions;
+extern cvar_t gl_info_driver;
 
 // brand of graphics chip
 extern const char *gl_vendor;
@@ -184,12 +200,7 @@ extern const char *gl_vendor;
 extern const char *gl_renderer;
 // begins with 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, or 1.4.0
 extern const char *gl_version;
-// extensions list, space separated
-extern const char *gl_extensions;
-// WGL, GLX, or AGL
-extern const char *gl_platform;
-// name of driver library (opengl32.dll, libGL.so.1, or whatever)
-extern char gl_driver[256];
+
 
 void *GL_GetProcAddress(const char *name);
 qbool GL_CheckExtension(const char *name, const char *disableparm, int silent);
@@ -197,6 +208,7 @@ qbool GL_ExtensionSupported(const char *name);
 
 void VID_Shared_Init(void);
 
+void GL_InitFunctions(void);
 void GL_Setup(void);
 
 void VID_ClearExtensions(void);
@@ -223,7 +235,6 @@ qbool VID_HasScreenKeyboardSupport(void);
 void VID_ShowKeyboard(qbool show);
 qbool VID_ShowingKeyboard(void);
 
-void VID_SetMouse (qbool fullscreengrab, qbool relative, qbool hidecursor);
 void VID_Finish (void);
 
 void VID_Restart_f(struct cmd_state_s *cmd);
@@ -242,7 +253,7 @@ typedef struct
        int pixelheight_num, pixelheight_denom;
 }
 vid_mode_t;
-vid_mode_t *VID_GetDesktopMode(void);
+vid_mode_t VID_GetDesktopMode(void);
 size_t VID_ListModes(vid_mode_t *modes, size_t maxcount);
 size_t VID_SortModes(vid_mode_t *modes, size_t count, qbool usebpp, qbool userefreshrate, qbool useaspect);
 void VID_Soft_SharedSetup(void);
index 5ebb7757cbb7c7602bdda239002434e9ae7f638d..b8621dc5e50aadf024ac3badfc334cf4e2eb5364 100644 (file)
@@ -29,41 +29,12 @@ void VID_Shutdown(void)
 {
 }
 
-#ifndef WIN32
-static void signal_handler(int sig)
-{
-       Con_Printf("Received signal %d, exiting...\n", sig);
-       Sys_Quit(1);
-}
-
-static void InitSig(void)
-{
-       signal(SIGHUP, signal_handler);
-       signal(SIGINT, signal_handler);
-       signal(SIGQUIT, signal_handler);
-       signal(SIGILL, signal_handler);
-       signal(SIGTRAP, signal_handler);
-       signal(SIGIOT, signal_handler);
-       signal(SIGBUS, signal_handler);
-       signal(SIGFPE, signal_handler);
-       signal(SIGSEGV, signal_handler);
-       signal(SIGTERM, signal_handler);
-}
-#endif
-
-void VID_SetMouse (qbool fullscreengrab, qbool relative, qbool hidecursor)
-{
-}
-
 void VID_Finish (void)
 {
 }
 
 void VID_Init(void)
 {
-#ifndef WIN32
-       InitSig(); // trap evil signals
-#endif
 }
 
 qbool VID_InitMode(viddef_mode_t *mode)
@@ -76,7 +47,7 @@ void *GL_GetProcAddress(const char *name)
        return NULL;
 }
 
-void Sys_SendKeyEvents(void)
+void Sys_SDL_HandleEvents(void)
 {
 }
 
@@ -88,11 +59,6 @@ void IN_Move(void)
 {
 }
 
-vid_mode_t *VID_GetDesktopMode(void)
-{
-       return NULL;
-}
-
 size_t VID_ListModes(vid_mode_t *modes, size_t maxcount)
 {
        return 0;
index 5845e07356c1a3342641b5ccef32be31d4cb86d2..9f921a30330b7ce266e4190ddf3547605de4e239 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -59,9 +59,6 @@ static io_connect_t IN_GetIOHandle(void)
 #endif
 #endif
 
-#ifdef WIN32
-#define SDL_R_RESTART
-#endif
 
 // Tell startup code that we have a client
 int cl_available = true;
@@ -72,8 +69,7 @@ static qbool vid_usingmouse = false;
 static qbool vid_usingmouse_relativeworks = false; // SDL2 workaround for unimplemented RelativeMouse mode
 static qbool vid_usinghidecursor = false;
 static qbool vid_hasfocus = false;
-static qbool vid_isfullscreen;
-static qbool vid_usingvsync = false;
+static qbool vid_wmborder_waiting, vid_wmborderless;
 static SDL_Joystick *vid_sdljoystick = NULL;
 static SDL_GameController *vid_sdlgamecontroller = NULL;
 static cvar_t joy_sdl2_trigger_deadzone = {CF_ARCHIVE | CF_CLIENT, "joy_sdl2_trigger_deadzone", "0.5", "deadzone for triggers to be registered as key presses"};
@@ -83,12 +79,9 @@ static cvar_t *steelstorm_showing_mousecursor = NULL; // detect but do not creat
 
 static int win_half_width = 50;
 static int win_half_height = 50;
-static int video_bpp;
 
 static SDL_GLContext context;
 static SDL_Window *window;
-static int window_flags;
-static vid_mode_t desktop_mode;
 
 // Input handling
 
@@ -100,7 +93,8 @@ static int MapKey( unsigned int sdlkey )
 {
        switch(sdlkey)
        {
-       default: return 0;
+       // sdlkey can be Unicode codepoint for non-ascii keys, which are valid
+       default:                      return sdlkey & SDLK_SCANCODE_MASK ? 0 : sdlkey;
 //     case SDLK_UNKNOWN:            return K_UNKNOWN;
        case SDLK_RETURN:             return K_ENTER;
        case SDLK_ESCAPE:             return K_ESCAPE;
@@ -371,20 +365,20 @@ qbool VID_ShowingKeyboard(void)
        return SDL_IsTextInputActive() != 0;
 }
 
-void VID_SetMouse(qbool fullscreengrab, qbool relative, qbool hidecursor)
+static void VID_SetMouse(qbool relative, qbool hidecursor)
 {
 #ifndef DP_MOBILETOUCH
 #ifdef MACOSX
        if(relative)
                if(vid_usingmouse && (vid_usingnoaccel != !!apple_mouse_noaccel.integer))
-                       VID_SetMouse(false, false, false); // ungrab first!
+                       VID_SetMouse(false, false); // ungrab first!
 #endif
        if (vid_usingmouse != relative)
        {
                vid_usingmouse = relative;
                cl_ignoremousemoves = 2;
                vid_usingmouse_relativeworks = SDL_SetRelativeMouseMode(relative ? SDL_TRUE : SDL_FALSE) == 0;
-//             Con_Printf("VID_SetMouse(%i, %i, %i) relativeworks = %i\n", (int)fullscreengrab, (int)relative, (int)hidecursor, (int)vid_usingmouse_relativeworks);
+//             Con_Printf("VID_SetMouse(%i, %i) relativeworks = %i\n", (int)relative, (int)hidecursor, (int)vid_usingmouse_relativeworks);
 #ifdef MACOSX
                if(relative)
                {
@@ -1016,6 +1010,8 @@ void IN_Move( void )
                in_windowmouse_y = y;
        }
 
+       //Con_Printf("Mouse position: in_mouse %f %f in_windowmouse %f %f\n", in_mouse_x, in_mouse_y, in_windowmouse_x, in_windowmouse_y);
+
        VID_BuildJoyState(&joystate);
        VID_ApplyJoyState(&joystate);
 }
@@ -1024,20 +1020,6 @@ void IN_Move( void )
 // Message Handling
 ////
 
-#ifdef SDL_R_RESTART
-static qbool sdl_needs_restart;
-static void sdl_start(void)
-{
-}
-static void sdl_shutdown(void)
-{
-       sdl_needs_restart = false;
-}
-static void sdl_newmap(void)
-{
-}
-#endif
-
 static keynum_t buttonremap[] =
 {
        K_MOUSE1,
@@ -1059,13 +1041,12 @@ static keynum_t buttonremap[] =
 };
 
 //#define DEBUGSDLEVENTS
-
-// SDL2
-void Sys_SendKeyEvents( void )
+void Sys_SDL_HandleEvents(void)
 {
        static qbool sound_active = true;
        int keycode;
        int i;
+       const char *chp;
        qbool isdown;
        Uchar unicode;
        SDL_Event event;
@@ -1171,23 +1152,49 @@ void Sys_SendKeyEvents( void )
 #endif
                                                break;
                                        case SDL_WINDOWEVENT_MOVED:
-                                               break;
-                                       case SDL_WINDOWEVENT_RESIZED:
-                                               if(vid_resizable.integer < 2)
+                                               vid.xPos = event.window.data1;
+                                               vid.yPos = event.window.data2;
+                                               // Update vid.displayindex (current monitor) as it may have changed
+                                               // SDL_GetWindowDisplayIndex() doesn't work if the window manager moves the fullscreen window, but this works:
+                                               for (i = 0; i < vid_info_displaycount.integer; ++i)
                                                {
-                                                       vid.width = event.window.data1;
-                                                       vid.height = event.window.data2;
-#ifdef SDL_R_RESTART
-                                                       // better not call R_Modules_Restart_f from here directly, as this may wreak havoc...
-                                                       // so, let's better queue it for next frame
-                                                       if(!sdl_needs_restart)
+                                                       SDL_Rect displaybounds;
+                                                       if (SDL_GetDisplayBounds(i, &displaybounds) < 0)
                                                        {
-                                                               Cbuf_AddText(cmd_local, "\nr_restart\n");
-                                                               sdl_needs_restart = true;
+                                                               Con_Printf(CON_ERROR "Error getting bounds of display %i: \"%s\"\n", i, SDL_GetError());
+                                                               return;
                                                        }
-#endif
+                                                       if (vid.xPos >= displaybounds.x && vid.xPos < displaybounds.x + displaybounds.w)
+                                                       if (vid.yPos >= displaybounds.y && vid.yPos < displaybounds.y + displaybounds.h)
+                                                       {
+                                                               vid.displayindex = i;
+                                                               break;
+                                                       }
+                                               }
+                                               // when the window manager adds/removes the border it's likely to move the SDL window
+                                               // we'll need to correct that to (re)align the xhair with the monitor
+                                               if (vid_wmborder_waiting)
+                                               {
+                                                       SDL_GetWindowBordersSize(window, &i, NULL, NULL, NULL);
+                                                       if (!i != vid_wmborderless) // border state changed
+                                                       {
+                                                               SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED_DISPLAY(vid.displayindex), SDL_WINDOWPOS_CENTERED_DISPLAY(vid.displayindex));
+                                                               SDL_GetWindowPosition(window, &vid.xPos, &vid.yPos);
+                                                               vid_wmborder_waiting = false;
+                                                       }
+                                               }
+                                               break;
+                                       case SDL_WINDOWEVENT_RESIZED: // external events only
+                                               if(vid_resizable.integer < 2)
+                                               {
+                                                       //vid.width = event.window.data1;
+                                                       //vid.height = event.window.data2;
+                                                       // get the real framebuffer size in case the platform's screen coordinates are DPI scaled
+                                                       SDL_GL_GetDrawableSize(window, &vid.width, &vid.height);
                                                }
                                                break;
+                                       case SDL_WINDOWEVENT_SIZE_CHANGED: // internal and external events
+                                               break;
                                        case SDL_WINDOWEVENT_MINIMIZED:
                                                break;
                                        case SDL_WINDOWEVENT_MAXIMIZED:
@@ -1207,9 +1214,42 @@ void Sys_SendKeyEvents( void )
                                        case SDL_WINDOWEVENT_CLOSE:
                                                host.state = host_shutdown;
                                                break;
+                                       case SDL_WINDOWEVENT_TAKE_FOCUS:
+                                               break;
+                                       case SDL_WINDOWEVENT_HIT_TEST:
+                                               break;
+                                       case SDL_WINDOWEVENT_ICCPROF_CHANGED:
+                                               break;
+                                       case SDL_WINDOWEVENT_DISPLAY_CHANGED:
+                                               // this event can't be relied on in fullscreen, see SDL_WINDOWEVENT_MOVED above
+                                               vid.displayindex = event.window.data1;
+                                               break;
                                        }
                                }
                                break;
+                       case SDL_DISPLAYEVENT: // Display hotplugging
+                               switch (event.display.event)
+                               {
+                                       case SDL_DISPLAYEVENT_CONNECTED:
+                                               Con_Printf(CON_WARN "Display %i connected: %s\n", event.display.display, SDL_GetDisplayName(event.display.display));
+#ifdef __linux__
+                                               Con_Print(CON_WARN "A vid_restart may be necessary!\n");
+#endif
+                                               Cvar_SetValueQuick(&vid_info_displaycount, SDL_GetNumVideoDisplays());
+                                               // Ideally we'd call VID_ApplyDisplaySettings_c() to try to switch to the preferred display here,
+                                               // but we may need a vid_restart first, see comments in VID_ApplyDisplaySettings_c().
+                                               break;
+                                       case SDL_DISPLAYEVENT_DISCONNECTED:
+                                               Con_Printf(CON_WARN "Display %i disconnected.\n", event.display.display);
+#ifdef __linux__
+                                               Con_Print(CON_WARN "A vid_restart may be necessary!\n");
+#endif
+                                               Cvar_SetValueQuick(&vid_info_displaycount, SDL_GetNumVideoDisplays());
+                                               break;
+                                       case SDL_DISPLAYEVENT_ORIENTATION:
+                                               break;
+                               }
+                               break;
                        case SDL_TEXTEDITING:
 #ifdef DEBUGSDLEVENTS
                                Con_DPrintf("SDL_Event: SDL_TEXTEDITING - composition = %s, cursor = %d, selection lenght = %d\n", event.edit.text, event.edit.start, event.edit.length);
@@ -1222,9 +1262,14 @@ void Sys_SendKeyEvents( void )
 #endif
                                // convert utf8 string to char
                                // NOTE: this code is supposed to run even if utf8enable is 0
-                               unicode = u8_getchar_utf8_enabled(event.text.text + (int)u8_bytelen(event.text.text, 0), NULL);
-                               Key_Event(K_TEXT, unicode, true);
-                               Key_Event(K_TEXT, unicode, false);
+                               chp = event.text.text;
+                               while (*chp != 0)
+                               {
+                                       // input the chars one by one (there can be multiple chars when e.g. using an "input method")
+                                       unicode = u8_getchar_utf8_enabled(chp, &chp);
+                                       Key_Event(K_TEXT, unicode, true);
+                                       Key_Event(K_TEXT, unicode, false);
+                               }
                                break;
                        case SDL_MOUSEMOTION:
                                break;
@@ -1284,8 +1329,10 @@ void Sys_SendKeyEvents( void )
                                break;
                }
 
+       vid_activewindow = !vid_hidden && vid_hasfocus;
+
        // enable/disable sound on focus gain/loss
-       if ((!vid_hidden && vid_activewindow) || !snd_mutewhenidle.integer)
+       if (vid_activewindow || !snd_mutewhenidle.integer)
        {
                if (!sound_active)
                {
@@ -1301,6 +1348,13 @@ void Sys_SendKeyEvents( void )
                        sound_active = false;
                }
        }
+
+       if (!vid_activewindow || key_consoleactive || scr_loading)
+               VID_SetMouse(false, false);
+       else if (key_dest == key_menu || key_dest == key_menu_grabbed)
+               VID_SetMouse(vid_mouse.integer && !in_client_mouse && !vid_touchscreen.integer, !vid_touchscreen.integer);
+       else
+               VID_SetMouse(vid_mouse.integer && !cl.csqc_wantsmousemove && cl_prydoncursor.integer <= 0 && (!cls.demoplayback || cl_demo_mousegrab.integer) && !vid_touchscreen.integer, !vid_touchscreen.integer);
 }
 
 /////////////////
@@ -1319,10 +1373,137 @@ qbool GL_ExtensionSupported(const char *name)
        return SDL_GL_ExtensionSupported(name);
 }
 
-static qbool vid_sdl_initjoysticksystem = false;
+/// Applies display settings immediately (no vid_restart required).
+static void VID_ApplyDisplaySettings_c(cvar_t *var)
+{
+       unsigned int fullscreenwanted, fullscreencurrent;
+       unsigned int displaywanted = bound(0, vid_display.integer, vid_info_displaycount.integer - 1);
+
+       if (!window)
+               return;
+       Con_DPrintf("%s: %s \"%s\"\n", __func__, var->name, var->string);
+
+       fullscreencurrent = SDL_GetWindowFlags(window) & (SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_FULLSCREEN);
+       if (vid_fullscreen.integer)
+               fullscreenwanted = vid_desktopfullscreen.integer ? SDL_WINDOW_FULLSCREEN_DESKTOP : SDL_WINDOW_FULLSCREEN;
+       else
+               fullscreenwanted = 0;
+
+       // moving to another display, changing the fullscreen mode or switching to windowed
+       if (vid.displayindex != displaywanted // SDL seems unable to move any fullscreen window to another display
+       || fullscreencurrent != fullscreenwanted) // even for desktop <-> exclusive: DESKTOP flag includes FULLSCREEN bit
+       {
+               if (SDL_SetWindowFullscreen(window, 0) < 0)
+               {
+                       Con_Printf(CON_ERROR "ERROR: can't deactivate fullscreen on display %i because %s\n", vid.displayindex, SDL_GetError());
+                       return;
+               }
+               vid.fullscreen = false;
+               Con_DPrintf("Fullscreen deactivated on display %i\n", vid.displayindex);
+       }
+
+       // switching to windowed
+       if (!fullscreenwanted)
+       {
+               int toppx;
+               SDL_SetWindowSize(window, vid.width = vid_width.integer, vid.height = vid_height.integer);
+               SDL_SetWindowResizable(window, vid_resizable.integer ? SDL_TRUE : SDL_FALSE);
+               SDL_SetWindowBordered(window, (SDL_bool)!vid_borderless.integer);
+               SDL_GetWindowBordersSize(window, &toppx, NULL, NULL, NULL);
+               vid_wmborderless = !toppx;
+               if (vid_borderless.integer != vid_wmborderless) // this is not the state we're looking for
+                       vid_wmborder_waiting = true;
+       }
+
+       // moving to another display or switching to windowed
+       if (vid.displayindex != displaywanted || !fullscreenwanted)
+       {
+//             SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED_DISPLAY(displaywanted), SDL_WINDOWPOS_CENTERED_DISPLAY(displaywanted));
+//             SDL_GetWindowPosition(window, &vid.xPos, &vid.yPos);
+
+               /* bones_was_here BUG: after SDL_DISPLAYEVENT hotplug events, on Xorg + NVIDIA,
+                * SDL_WINDOWPOS_CENTERED_DISPLAY(displaywanted) may place the window somewhere completely invisible.
+                * WORKAROUND: manual positioning seems safer: although SDL_GetDisplayBounds() may return outdated values,
+                * SDL_SetWindowPosition() always placed the window somewhere fully visible, even if it wasn't correct,
+                * when tested with SDL 2.26.5.
+                */
+               SDL_Rect displaybounds;
+               if (SDL_GetDisplayBounds(displaywanted, &displaybounds) < 0)
+               {
+                       Con_Printf(CON_ERROR "Error getting bounds of display %i: \"%s\"\n", displaywanted, SDL_GetError());
+                       return;
+               }
+               vid.xPos = displaybounds.x + 0.5 * (displaybounds.w - vid.width);
+               vid.yPos = displaybounds.y + 0.5 * (displaybounds.h - vid.height);
+               SDL_SetWindowPosition(window, vid.xPos, vid.yPos);
+
+               vid.displayindex = displaywanted;
+       }
+
+       // switching to a fullscreen mode
+       if (fullscreenwanted)
+       {
+               if (fullscreenwanted == SDL_WINDOW_FULLSCREEN)
+               {
+                       // When starting in desktop/window mode no hardware mode is set so do it now,
+                       // this also applies vid_width and vid_height changes immediately without bogus modesets.
+                       SDL_DisplayMode modewanted, modeclosest;
+                       modewanted.w = vid_width.integer;
+                       modewanted.h = vid_height.integer;
+                       modewanted.refresh_rate = vid_userefreshrate.integer ? vid_refreshrate.integer : 0;
+                       if (!SDL_GetClosestDisplayMode(vid.displayindex, &modewanted, &modeclosest))
+                       {
+                               Con_Printf(CON_ERROR "Error getting closest mode to %ix%i@%ihz for display %i: \"%s\"\n", modewanted.w, modewanted.h, modewanted.refresh_rate, vid.displayindex, SDL_GetError());
+                               return;
+                       }
+                       if (SDL_SetWindowDisplayMode(window, &modeclosest) < 0)
+                       {
+                               Con_Printf(CON_ERROR "Error setting mode %ix%i@%ihz for display %i: \"%s\"\n", modeclosest.w, modeclosest.h, modeclosest.refresh_rate, vid.displayindex, SDL_GetError());
+                               return;
+                       }
+               }
+
+               if (SDL_SetWindowFullscreen(window, fullscreenwanted) < 0)
+               {
+                       Con_Printf(CON_ERROR "ERROR: can't activate fullscreen on display %i because %s\n", vid.displayindex, SDL_GetError());
+                       return;
+               }
+               // get the real framebuffer size in case the platform's screen coordinates are DPI scaled
+               SDL_GL_GetDrawableSize(window, &vid.width, &vid.height);
+               vid.fullscreen = true;
+               Con_DPrintf("Fullscreen activated on display %i\n", vid.displayindex);
+       }
+}
+
+static void VID_SetVsync_c(cvar_t *var)
+{
+       signed char vsyncwanted = cls.timedemo ? 0 : bound(-1, vid_vsync.integer, 1);
+
+       if (!context)
+               return;
+/*
+Can't check first: on Wayland SDL_GL_GetSwapInterval() may initially return 0 when vsync is on.
+On Xorg it returns the correct value.
+       if (SDL_GL_GetSwapInterval() == vsyncwanted)
+               return;
+*/
+
+       if (SDL_GL_SetSwapInterval(vsyncwanted) >= 0)
+               Con_DPrintf("Vsync %s\n", vsyncwanted ? "activated" : "deactivated");
+       else
+               Con_Printf(CON_ERROR "ERROR: can't %s vsync because %s\n", vsyncwanted ? "activate" : "deactivate", SDL_GetError());
+}
+
+static void VID_SetHints_c(cvar_t *var)
+{
+       SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH,     vid_mouse_clickthrough.integer     ? "1" : "0");
+       SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, vid_minimize_on_focus_loss.integer ? "1" : "0");
+}
 
 void VID_Init (void)
 {
+       SDL_version version;
+
 #ifndef __IPHONEOS__
 #ifdef MACOSX
        Cvar_RegisterVariable(&apple_mouse_noaccel);
@@ -1333,16 +1514,43 @@ void VID_Init (void)
 #endif
        Cvar_RegisterVariable(&joy_sdl2_trigger_deadzone);
 
-#ifdef SDL_R_RESTART
-       R_RegisterModule("SDL", sdl_start, sdl_shutdown, sdl_newmap, NULL, NULL);
+#if defined(__linux__)
+       // exclusive fullscreen is no longer functional (and when it worked was obnoxious and not faster)
+       Cvar_SetValueQuick(&vid_desktopfullscreen, 1);
+       vid_desktopfullscreen.flags |= CF_READONLY;
+#endif
+
+       Cvar_RegisterCallback(&vid_fullscreen,             VID_ApplyDisplaySettings_c);
+       Cvar_RegisterCallback(&vid_desktopfullscreen,      VID_ApplyDisplaySettings_c);
+       Cvar_RegisterCallback(&vid_display,                VID_ApplyDisplaySettings_c);
+       Cvar_RegisterCallback(&vid_width,                  VID_ApplyDisplaySettings_c);
+       Cvar_RegisterCallback(&vid_height,                 VID_ApplyDisplaySettings_c);
+       Cvar_RegisterCallback(&vid_resizable,              VID_ApplyDisplaySettings_c);
+       Cvar_RegisterCallback(&vid_borderless,             VID_ApplyDisplaySettings_c);
+       Cvar_RegisterCallback(&vid_vsync,                  VID_SetVsync_c);
+       Cvar_RegisterCallback(&vid_mouse_clickthrough,     VID_SetHints_c);
+       Cvar_RegisterCallback(&vid_minimize_on_focus_loss, VID_SetHints_c);
+
+       // DPI scaling prevents use of the native resolution, causing blurry rendering
+       // and/or mouse cursor problems and/or incorrect render area, so we need to opt-out.
+       // Must be set before first SDL_INIT_VIDEO. Documented in SDL_hints.h.
+#ifdef WIN32
+       // make SDL coordinates == hardware pixels
+       SDL_SetHint(SDL_HINT_WINDOWS_DPI_SCALING, "0");
+       // use best available awareness mode
+       SDL_SetHint(SDL_HINT_WINDOWS_DPI_AWARENESS, "permonitorv2");
 #endif
 
        if (SDL_Init(SDL_INIT_VIDEO) < 0)
                Sys_Error ("Failed to init SDL video subsystem: %s", SDL_GetError());
-       vid_sdl_initjoysticksystem = SDL_InitSubSystem(SDL_INIT_JOYSTICK) >= 0;
-       if (!vid_sdl_initjoysticksystem)
+       if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0)
                Con_Printf(CON_ERROR "Failed to init SDL joystick subsystem: %s\n", SDL_GetError());
-       vid_isfullscreen = false;
+
+       SDL_GetVersion(&version);
+       Con_Printf("Linked against SDL version %d.%d.%d\n"
+                  "Using SDL library version %d.%d.%d\n",
+                  SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL,
+                  version.major, version.minor, version.patch);
 }
 
 static int vid_sdljoystickindex = -1;
@@ -1408,16 +1616,6 @@ void VID_EnableJoystick(qbool enable)
                Cvar_SetValueQuick(&joy_active, success ? 1 : 0);
 }
 
-static void VID_OutputVersion(void)
-{
-       SDL_version version;
-       SDL_GetVersion(&version);
-       Con_Printf(     "Linked against SDL version %d.%d.%d\n"
-                                       "Using SDL library version %d.%d.%d\n",
-                                       SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL,
-                                       version.major, version.minor, version.patch );
-}
-
 #ifdef WIN32
 static void AdjustWindowBounds(viddef_mode_t *mode, RECT *rect)
 {
@@ -1465,36 +1663,29 @@ static void AdjustWindowBounds(viddef_mode_t *mode, RECT *rect)
 }
 #endif
 
-extern cvar_t gl_info_vendor;
-extern cvar_t gl_info_renderer;
-extern cvar_t gl_info_version;
-extern cvar_t gl_info_platform;
-extern cvar_t gl_info_driver;
-
 static qbool VID_InitModeGL(viddef_mode_t *mode)
 {
        int windowflags = SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL;
-       // currently SDL_WINDOWPOS_UNDEFINED behaves exactly like SDL_WINDOWPOS_CENTERED, this might change some day
-       // https://trello.com/c/j56vUcwZ/81-centered-vs-undefined-window-position
-       int xPos = SDL_WINDOWPOS_UNDEFINED;
-       int yPos = SDL_WINDOWPOS_UNDEFINED;
        int i;
 #ifndef USE_GLES2
-       const char *drivername;
+       // SDL usually knows best
+       const char *drivername = NULL;
 #endif
 
+       // video display selection (multi-monitor)
+       Cvar_SetValueQuick(&vid_info_displaycount, SDL_GetNumVideoDisplays());
+       vid.displayindex = bound(0, vid_display.integer, vid_info_displaycount.integer - 1);
+       vid.xPos = SDL_WINDOWPOS_CENTERED_DISPLAY(vid.displayindex);
+       vid.yPos = SDL_WINDOWPOS_CENTERED_DISPLAY(vid.displayindex);
+       vid_wmborder_waiting = vid_wmborderless = false;
+
        win_half_width = mode->width>>1;
        win_half_height = mode->height>>1;
 
        if(vid_resizable.integer)
                windowflags |= SDL_WINDOW_RESIZABLE;
 
-       VID_OutputVersion();
-
 #ifndef USE_GLES2
-       // SDL usually knows best
-       drivername = NULL;
-
 // COMMANDLINEOPTION: SDL GL: -gl_driver <drivername> selects a GL driver library, default is whatever SDL recommends, useful only for 3dfxogl.dll/3dfxvgl.dll or fxmesa or similar, if you don't know what this is for, you don't need it
        i = Sys_CheckParm("-gl_driver");
        if (i && i < sys.argc - 1)
@@ -1513,41 +1704,38 @@ static qbool VID_InitModeGL(viddef_mode_t *mode)
        windowflags |= SDL_WINDOW_FULLSCREEN | SDL_WINDOW_BORDERLESS;
 #endif
 
-       vid_isfullscreen = false;
+
+       if (mode->fullscreen)
        {
-               if (mode->fullscreen) {
-                       if (vid_desktopfullscreen.integer)
-                       {
-                               vid_mode_t *m = VID_GetDesktopMode();
-                               mode->width = m->width;
-                               mode->height = m->height;
-                               windowflags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
-                       }
-                       else
-                               windowflags |= SDL_WINDOW_FULLSCREEN;
-                       vid_isfullscreen = true;
+               if (vid_desktopfullscreen.integer)
+               {
+                       vid_mode_t m = VID_GetDesktopMode();
+                       mode->width = m.width;
+                       mode->height = m.height;
+                       windowflags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
                }
-               else {
-                       if (vid_borderless.integer)
-                               windowflags |= SDL_WINDOW_BORDERLESS;
+               else
+                       windowflags |= SDL_WINDOW_FULLSCREEN;
+       }
+       else
+       {
+               if (vid_borderless.integer)
+                       windowflags |= SDL_WINDOW_BORDERLESS;
+               else
+                       vid_wmborder_waiting = true; // waiting for border to be added
 #ifdef WIN32
-                       if (vid_ignore_taskbar.integer) {
-                               xPos = SDL_WINDOWPOS_CENTERED;
-                               yPos = SDL_WINDOWPOS_CENTERED;
-                       }
-                       else {
-                               RECT rect;
-                               AdjustWindowBounds(mode, &rect);
-                               xPos = rect.left;
-                               yPos = rect.top;
-                       }
-#endif
+               if (!vid_ignore_taskbar.integer)
+               {
+                       RECT rect;
+                       AdjustWindowBounds(mode, &rect);
+                       vid.xPos = rect.left;
+                       vid.xPos = rect.top;
+                       vid_wmborder_waiting = false;
                }
+#endif
        }
-       //flags |= SDL_HWSURFACE;
 
-       if (vid_mouse_clickthrough.integer && !vid_isfullscreen)
-               SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
+       VID_SetHints_c(NULL);
 
        SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1);
        SDL_GL_SetAttribute (SDL_GL_RED_SIZE, 8);
@@ -1572,32 +1760,58 @@ static qbool VID_InitModeGL(viddef_mode_t *mode)
        SDL_GL_SetAttribute (SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
        SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
        SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
+       /* Requesting a Core profile and 3.2 minimum is mandatory on macOS and older Mesa drivers.
+        * It works fine on other drivers too except NVIDIA, see HACK below.
+        */
 #endif
 
        SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, (gl_debug.integer > 0 ? SDL_GL_CONTEXT_DEBUG_FLAG : 0));
 
-       video_bpp = mode->bitsperpixel;
-       window_flags = windowflags;
-       window = SDL_CreateWindow(gamename, xPos, yPos, mode->width, mode->height, windowflags);
+       window = SDL_CreateWindow(gamename, vid.xPos, vid.yPos, mode->width, mode->height, windowflags);
        if (window == NULL)
        {
                Con_Printf(CON_ERROR "Failed to set video mode to %ix%i: %s\n", mode->width, mode->height, SDL_GetError());
                VID_Shutdown();
                return false;
        }
-       SDL_GetWindowSize(window, &mode->width, &mode->height);
+       // get the real framebuffer size in case the platform's screen coordinates are DPI scaled
+       SDL_GL_GetDrawableSize(window, &mode->width, &mode->height);
+       // After using SDL_WINDOWPOS_CENTERED_DISPLAY we don't know the real position
+       SDL_GetWindowPosition(window, &vid.xPos, &vid.yPos);
+
        context = SDL_GL_CreateContext(window);
        if (context == NULL)
+               Sys_Error("Failed to initialize OpenGL context: %s\n", SDL_GetError());
+
+       GL_InitFunctions();
+
+#if !defined(USE_GLES2) && !defined(MACOSX)
+       // NVIDIA hates the Core profile and limits the version to the minimum we specified.
+       // HACK: to detect NVIDIA we first need a context, fortunately replacing it takes a few milliseconds
+       gl_vendor = (const char *)qglGetString(GL_VENDOR);
+       if (strncmp(gl_vendor, "NVIDIA", 6) == 0)
        {
-               Con_Printf(CON_ERROR "Failed to initialize OpenGL context: %s\n", SDL_GetError());
-               VID_Shutdown();
-               return false;
+               Con_DPrint("The Way It's Meant To Be Played: replacing OpenGL Core profile with Compatibility profile...\n");
+               SDL_GL_DeleteContext(context);
+               SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY);
+               context = SDL_GL_CreateContext(window);
+               if (context == NULL)
+                       Sys_Error("Failed to initialize OpenGL context: %s\n", SDL_GetError());
        }
+#endif
 
-       SDL_GL_SetSwapInterval(bound(-1, vid_vsync.integer, 1));
-       vid_usingvsync = (vid_vsync.integer != 0);
+       // apply vid_vsync
+       Cvar_Callback(&vid_vsync);
 
-       gl_platform = "SDL";
+       vid_hidden = false;
+       vid_activewindow = true;
+       vid_hasfocus = true;
+       vid_usingmouse = false;
+       vid_usinghidecursor = false;
+
+       // clear to black (loading plaque will be seen over this)
+       GL_Clear(GL_COLOR_BUFFER_BIT, NULL, 1.0f, 0);
+       VID_Finish(); // checks vid_hidden
 
        GL_Setup();
 
@@ -1605,40 +1819,14 @@ static qbool VID_InitModeGL(viddef_mode_t *mode)
        Cvar_SetQuick(&gl_info_vendor, gl_vendor);
        Cvar_SetQuick(&gl_info_renderer, gl_renderer);
        Cvar_SetQuick(&gl_info_version, gl_version);
-       Cvar_SetQuick(&gl_info_platform, gl_platform ? gl_platform : "");
-       Cvar_SetQuick(&gl_info_driver, gl_driver);
-
-       // LadyHavoc: report supported extensions
-       Con_DPrintf("\nQuakeC extensions for server and client:");
-       for (i = 0; vm_sv_extensions[i]; i++)
-               Con_DPrintf(" %s", vm_sv_extensions[i]);
-       Con_DPrintf("\n");
-#ifdef CONFIG_MENU
-       Con_DPrintf("\nQuakeC extensions for menu:");
-       for (i = 0; vm_m_extensions[i]; i++)
-               Con_DPrintf(" %s", vm_m_extensions[i]);
-       Con_DPrintf("\n");
-#endif
+       Cvar_SetQuick(&gl_info_driver, drivername ? drivername : "");
 
-       // clear to black (loading plaque will be seen over this)
-       GL_Clear(GL_COLOR_BUFFER_BIT, NULL, 1.0f, 0);
+       for (i = 0; i < vid_info_displaycount.integer; ++i)
+               Con_Printf("Display %i: %s\n", i, SDL_GetDisplayName(i));
 
-       vid_hidden = false;
-       vid_activewindow = false;
-       vid_hasfocus = true;
-       vid_usingmouse = false;
-       vid_usinghidecursor = false;
-               
        return true;
 }
 
-extern cvar_t gl_info_extensions;
-extern cvar_t gl_info_vendor;
-extern cvar_t gl_info_renderer;
-extern cvar_t gl_info_version;
-extern cvar_t gl_info_platform;
-extern cvar_t gl_info_driver;
-
 qbool VID_InitMode(viddef_mode_t *mode)
 {
        // GAME_STEELSTORM specific
@@ -1655,23 +1843,18 @@ qbool VID_InitMode(viddef_mode_t *mode)
 void VID_Shutdown (void)
 {
        VID_EnableJoystick(false);
-       VID_SetMouse(false, false, false);
+       VID_SetMouse(false, false);
 
+       SDL_GL_DeleteContext(context);
+       context = NULL;
        SDL_DestroyWindow(window);
        window = NULL;
 
        SDL_QuitSubSystem(SDL_INIT_VIDEO);
-
-       gl_driver[0] = 0;
-       gl_extensions = "";
-       gl_platform = "";
 }
 
 void VID_Finish (void)
 {
-       qbool vid_usevsync;
-       vid_activewindow = !vid_hidden && vid_hasfocus;
-
        VID_UpdateGamma();
 
        if (!vid_hidden)
@@ -1683,28 +1866,20 @@ void VID_Finish (void)
                        CHECKGLERROR
                        if (r_speeds.integer == 2 || gl_finish.integer)
                                GL_Finish();
-
-                       vid_usevsync = (vid_vsync.integer && !cls.timedemo);
-                       if (vid_usingvsync != vid_usevsync)
-                       {
-                               vid_usingvsync = vid_usevsync;
-                               if (SDL_GL_SetSwapInterval(vid_usevsync != 0) >= 0)
-                                       Con_DPrintf("Vsync %s\n", vid_usevsync ? "activated" : "deactivated");
-                               else
-                                       Con_DPrintf("ERROR: can't %s vsync\n", vid_usevsync ? "activate" : "deactivate");
-                       }
                        SDL_GL_SwapWindow(window);
                        break;
                }
        }
 }
 
-vid_mode_t *VID_GetDesktopMode(void)
+vid_mode_t VID_GetDesktopMode(void)
 {
        SDL_DisplayMode mode;
        int bpp;
        Uint32 rmask, gmask, bmask, amask;
-       SDL_GetDesktopDisplayMode(0, &mode);
+       vid_mode_t desktop_mode;
+
+       SDL_GetDesktopDisplayMode(vid.displayindex, &mode);
        SDL_PixelFormatEnumToMasks(mode.format, &bpp, &rmask, &gmask, &bmask, &amask);
        desktop_mode.width = mode.w;
        desktop_mode.height = mode.h;
@@ -1712,23 +1887,20 @@ vid_mode_t *VID_GetDesktopMode(void)
        desktop_mode.refreshrate = mode.refresh_rate;
        desktop_mode.pixelheight_num = 1;
        desktop_mode.pixelheight_denom = 1; // SDL does not provide this
-       // TODO check whether this actually works, or whether we do still need
-       // a read-window-size-after-entering-desktop-fullscreen hack for
-       // multiscreen setups.
-       return &desktop_mode;
+       return desktop_mode;
 }
 
 size_t VID_ListModes(vid_mode_t *modes, size_t maxcount)
 {
        size_t k = 0;
        int modenum;
-       int nummodes = SDL_GetNumDisplayModes(0);
+       int nummodes = SDL_GetNumDisplayModes(vid.displayindex);
        SDL_DisplayMode mode;
        for (modenum = 0;modenum < nummodes;modenum++)
        {
                if (k >= maxcount)
                        break;
-               if (SDL_GetDisplayMode(0, modenum, &mode))
+               if (SDL_GetDisplayMode(vid.displayindex, modenum, &mode))
                        continue;
                modes[k].width = mode.w;
                modes[k].height = mode.h;
index bc4c98552e0918f82454f61ddd25d1bf6dae3d36..381efb760b8304b477b362be2901f0adbacd836e 100644 (file)
@@ -129,7 +129,6 @@ cvar_t gl_info_vendor = {CF_CLIENT | CF_READONLY, "gl_info_vendor", "", "indicat
 cvar_t gl_info_renderer = {CF_CLIENT | CF_READONLY, "gl_info_renderer", "", "indicates graphics chip model and other information"};
 cvar_t gl_info_version = {CF_CLIENT | CF_READONLY, "gl_info_version", "", "indicates version of current renderer. begins with 1.0.0, 1.1.0, 1.2.0, 1.3.1 etc."};
 cvar_t gl_info_extensions = {CF_CLIENT | CF_READONLY, "gl_info_extensions", "", "indicates extension list found by engine, space separated."};
-cvar_t gl_info_platform = {CF_CLIENT | CF_READONLY, "gl_info_platform", "", "indicates GL platform: WGL, GLX, or AGL."};
 cvar_t gl_info_driver = {CF_CLIENT | CF_READONLY, "gl_info_driver", "", "name of driver library (opengl32.dll, libGL.so.1, or whatever)."};
 
 cvar_t vid_fullscreen = {CF_CLIENT | CF_ARCHIVE, "vid_fullscreen", "1", "use fullscreen (1) or windowed (0)"};
@@ -148,9 +147,10 @@ cvar_t vid_touchscreen_density = {CF_CLIENT, "vid_touchscreen_density", "2.0", "
 cvar_t vid_touchscreen_xdpi = {CF_CLIENT, "vid_touchscreen_xdpi", "300", "Horizontal DPI of the screen (only valid on Android currently)"};
 cvar_t vid_touchscreen_ydpi = {CF_CLIENT, "vid_touchscreen_ydpi", "300", "Vertical DPI of the screen (only valid on Android currently)"};
 
-cvar_t vid_vsync = {CF_CLIENT | CF_ARCHIVE, "vid_vsync", "0", "sync to vertical blank, prevents 'tearing' (seeing part of one frame and part of another on the screen at the same time), automatically disabled when doing timedemo benchmarks"};
+cvar_t vid_vsync = {CF_CLIENT | CF_ARCHIVE, "vid_vsync", "0", "sync to vertical blank, prevents 'tearing' (seeing part of one frame and part of another on the screen at the same time) at the cost of latency, 1 always syncs and -1 is adaptive (stops syncing if the framerate drops, unsupported by some platforms), automatically disabled when doing timedemo benchmarks"};
 cvar_t vid_mouse = {CF_CLIENT | CF_ARCHIVE, "vid_mouse", "1", "whether to use the mouse in windowed mode (fullscreen always does)"};
 cvar_t vid_mouse_clickthrough = {CF_CLIENT | CF_ARCHIVE, "vid_mouse_clickthrough", "0", "mouse behavior in windowed mode: 0 = click to focus, 1 = allow interaction even if the window is not focused (click-through behaviour, can be useful when using third-party game overlays)"};
+cvar_t vid_minimize_on_focus_loss = {CF_CLIENT | CF_ARCHIVE, "vid_minimize_on_focus_loss", "0", "whether to minimize the fullscreen window if it loses focus (such as by alt+tab)"};
 cvar_t vid_grabkeyboard = {CF_CLIENT | CF_ARCHIVE, "vid_grabkeyboard", "0", "whether to grab the keyboard when mouse is active (prevents use of volume control keys, music player keys, etc on some keyboards)"};
 cvar_t vid_minwidth = {CF_CLIENT, "vid_minwidth", "0", "minimum vid_width that is acceptable (to be set in default.cfg in mods)"};
 cvar_t vid_minheight = {CF_CLIENT, "vid_minheight", "0", "minimum vid_height that is acceptable (to be set in default.cfg in mods)"};
@@ -162,10 +162,12 @@ cvar_t vid_touchscreen = {CF_CLIENT, "vid_touchscreen", "0", "Use touchscreen-st
 cvar_t vid_touchscreen_showkeyboard = {CF_CLIENT, "vid_touchscreen_showkeyboard", "0", "shows the platform's screen keyboard for text entry, can be set by csqc or menu qc if it wants to receive text input, does nothing if the platform has no screen keyboard"};
 cvar_t vid_touchscreen_supportshowkeyboard = {CF_CLIENT | CF_READONLY, "vid_touchscreen_supportshowkeyboard", "0", "indicates if the platform supports a virtual keyboard"};
 cvar_t vid_stick_mouse = {CF_CLIENT | CF_ARCHIVE, "vid_stick_mouse", "0", "have the mouse stuck in the center of the screen" };
-cvar_t vid_resizable = {CF_CLIENT | CF_ARCHIVE, "vid_resizable", "0", "0: window not resizable, 1: resizable, 2: window can be resized but the framebuffer isn't adjusted" };
+cvar_t vid_resizable = {CF_CLIENT | CF_ARCHIVE, "vid_resizable", "1", "0: window not resizable, 1: resizable, 2: window can be resized but the framebuffer isn't adjusted" };
 cvar_t vid_desktopfullscreen = {CF_CLIENT | CF_ARCHIVE, "vid_desktopfullscreen", "1", "force desktop resolution for fullscreen; also use some OS dependent tricks for better fullscreen integration"};
+cvar_t vid_display = {CF_CLIENT | CF_ARCHIVE, "vid_display", "0", "which monitor to render on, numbered from 0 (system default)" };
+cvar_t vid_info_displaycount = {CF_CLIENT | CF_READONLY, "vid_info_displaycount", "1", "how many monitors are currently available, updated by hotplug events" };
 #ifdef WIN32
-cvar_t vid_ignore_taskbar = {CF_CLIENT | CF_ARCHIVE, "vid_ignore_taskbar", "0", "in windowed mode, prevent the Windows taskbar and window borders from affecting the size and placement of the window. it will be aligned centered and uses the unaltered vid_width/vid_height values"};
+cvar_t vid_ignore_taskbar = {CF_CLIENT | CF_ARCHIVE, "vid_ignore_taskbar", "1", "in windowed mode, prevent the Windows taskbar and window borders from affecting the size and placement of the window. it will be aligned centered and uses the unaltered vid_width/vid_height values"};
 #endif
 
 cvar_t v_gamma = {CF_CLIENT | CF_ARCHIVE, "v_gamma", "1", "inverse gamma correction value, a brightness effect that does not affect white or black, and tends to make the image grey and dull"};
@@ -191,12 +193,6 @@ const char *gl_vendor;
 const char *gl_renderer;
 // begins with 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, or 1.4.0
 const char *gl_version;
-// extensions list, space separated
-const char *gl_extensions;
-// WGL, GLX, or AGL
-const char *gl_platform;
-// name of driver library (opengl32.dll, libGL.so.1, or whatever)
-char gl_driver[256];
 
 #ifndef USE_GLES2
 GLboolean (GLAPIENTRY *qglIsBuffer) (GLuint buffer);
@@ -686,20 +682,40 @@ void VID_ClearExtensions(void)
        memset(&vid.support, 0, sizeof(vid.support));
 }
 
-void GL_Setup(void)
+void GL_InitFunctions(void)
 {
-       char *s;
-       int j;
-       GLint numextensions = 0;
+#ifndef USE_GLES2
        const glfunction_t *func;
        qbool missingrequiredfuncs = false;
        static char missingfuncs[16384];
 
-#ifndef USE_GLES2
        // first fetch the function pointers for everything - after this we can begin making GL calls.
        for (func = openglfuncs; func->name != NULL; func++)
                *func->funcvariable = (void *)GL_GetProcAddress(func->name);
+
+       missingfuncs[0] = 0;
+       for (func = openglfuncs; func && func->name != NULL; func++)
+       {
+               if (!*func->funcvariable && !strcmp(func->extension, "core"))
+               {
+                       Con_DPrintf("GL context is missing required function \"%s\"!\n", func->name);
+                       missingrequiredfuncs = true;
+                       dp_strlcat(missingfuncs, " ", sizeof(missingfuncs));
+                       dp_strlcat(missingfuncs, func->name, sizeof(missingfuncs));
+               }
+       }
+
+       if (missingrequiredfuncs)
+               Sys_Error("OpenGL driver/hardware lacks required features:\n%s", missingfuncs);
 #endif
+}
+
+void GL_Setup(void)
+{
+       char *s;
+       int j;
+       GLint numextensions = 0;
+       int majorv, minorv;
 
        gl_renderer = (const char *)qglGetString(GL_RENDERER);
        gl_vendor = (const char *)qglGetString(GL_VENDOR);
@@ -710,6 +726,13 @@ void GL_Setup(void)
        Con_Printf("GL_VERSION: %s\n", gl_version);
 
 #ifndef USE_GLES2
+       qglGetIntegerv(GL_MAJOR_VERSION, &majorv);
+       qglGetIntegerv(GL_MINOR_VERSION, &minorv);
+       vid.support.glversion = 10 * majorv + minorv;
+       if (vid.support.glversion < 32)
+               // fallback, should never get here: GL context creation should have failed
+               Sys_Error("OpenGL driver/hardware supports version %i.%i but 3.2 is the minimum\n", majorv, minorv);
+
        qglGetIntegerv(GL_NUM_EXTENSIONS, &numextensions);
        Con_DPrint("GL_EXTENSIONS:\n");
        for (j = 0; j < numextensions; j++)
@@ -722,23 +745,6 @@ void GL_Setup(void)
        Con_DPrint("\n");
 #endif //USE_GLES2
 
-#ifndef USE_GLES2
-       missingfuncs[0] = 0;
-       for (func = openglfuncs; func && func->name != NULL; func++)
-       {
-               if (!*func->funcvariable && !strcmp(func->extension, "core"))
-               {
-                       Con_DPrintf("GL context is missing required function \"%s\"!\n", func->name);
-                       missingrequiredfuncs = true;
-                       strlcat(missingfuncs, " ", sizeof(missingfuncs));
-                       strlcat(missingfuncs, func->name, sizeof(missingfuncs));
-               }
-       }
-
-       if (missingrequiredfuncs)
-               Sys_Error("OpenGL driver/hardware lacks required features:\n%s", missingfuncs);
-#endif
-
        Con_DPrint("Checking OpenGL extensions...\n");
 
        // detect what GLSL version is available, to enable features like higher quality reliefmapping
@@ -774,6 +780,17 @@ void GL_Setup(void)
 // COMMANDLINEOPTION: GL: -notexturegather disables GL_ARB_texture_gather (which provides fetch4 sampling)
 // COMMANDLINEOPTION: GL: -nogldebugoutput disables GL_ARB_debug_output (which provides the gl_debug feature, if enabled)
 
+#ifdef WIN32
+       // gl_texturecompression_color is somehow broken on AMD's Windows driver,
+       // see: https://gitlab.com/xonotic/darkplaces/-/issues/228
+       // HACK: force it off (less bad than adding hacky checks to the renderer)
+       if (strncmp(gl_renderer, "AMD Radeon(TM)", 14) == 0)
+       {
+               Cvar_SetQuick(&gl_texturecompression_color, "0");
+               gl_texturecompression_color.flags |= CF_READONLY;
+       }
+#endif
+
 #ifdef GL_MAX_DRAW_BUFFERS
        qglGetIntegerv(GL_MAX_DRAW_BUFFERS, (GLint*)&vid.maxdrawbuffers);
        CHECKGLERROR
@@ -1260,7 +1277,6 @@ void VID_Shared_Init(void)
        Cvar_RegisterVariable(&gl_info_renderer);
        Cvar_RegisterVariable(&gl_info_version);
        Cvar_RegisterVariable(&gl_info_extensions);
-       Cvar_RegisterVariable(&gl_info_platform);
        Cvar_RegisterVariable(&gl_info_driver);
        Cvar_RegisterVariable(&v_gamma);
        Cvar_RegisterVariable(&v_brightness);
@@ -1297,6 +1313,7 @@ void VID_Shared_Init(void)
        Cvar_RegisterVariable(&vid_vsync);
        Cvar_RegisterVariable(&vid_mouse);
        Cvar_RegisterVariable(&vid_mouse_clickthrough);
+       Cvar_RegisterVariable(&vid_minimize_on_focus_loss);
        Cvar_RegisterVariable(&vid_grabkeyboard);
        Cvar_RegisterVariable(&vid_touchscreen);
        Cvar_RegisterVariable(&vid_touchscreen_showkeyboard);
@@ -1304,6 +1321,8 @@ void VID_Shared_Init(void)
        Cvar_RegisterVariable(&vid_stick_mouse);
        Cvar_RegisterVariable(&vid_resizable);
        Cvar_RegisterVariable(&vid_desktopfullscreen);
+       Cvar_RegisterVariable(&vid_display);
+       Cvar_RegisterVariable(&vid_info_displaycount);
 #ifdef WIN32
        Cvar_RegisterVariable(&vid_ignore_taskbar);
 #endif
@@ -1422,11 +1441,15 @@ static int VID_Mode(int fullscreen, int width, int height, int bpp, float refres
                )
                        vid.sRGB2D = vid.sRGB3D = false;
 
-               Con_Printf("Video Mode: %s %dx%dx%dx%.2fhz%s\n", mode.fullscreen ? "fullscreen" : "window", mode.width, mode.height, mode.bitsperpixel, mode.refreshrate, mode.stereobuffer ? " stereo" : "");
+               Con_Printf("Video Mode: %s %dx%dx%dx%.2fhz%s on display %i\n", mode.fullscreen ? "fullscreen" : "window", mode.width, mode.height, mode.bitsperpixel, mode.refreshrate, mode.stereobuffer ? " stereo" : "", vid.displayindex);
 
-               Cvar_SetValueQuick(&vid_fullscreen, vid.mode.fullscreen);
-               Cvar_SetValueQuick(&vid_width, vid.mode.width);
-               Cvar_SetValueQuick(&vid_height, vid.mode.height);
+               // desktopfullscreen doesn't need fallback mode saved so let cvars store windowed mode dimensions
+               if (!vid_desktopfullscreen.integer) // maybe checking SDL_WINDOW_FULLSCREEN_DESKTOP is better?
+               {
+                       Cvar_SetValueQuick(&vid_fullscreen, vid.mode.fullscreen);
+                       Cvar_SetValueQuick(&vid_width, vid.mode.width);
+                       Cvar_SetValueQuick(&vid_height, vid.mode.height);
+               }
                Cvar_SetValueQuick(&vid_bitsperpixel, vid.mode.bitsperpixel);
                Cvar_SetValueQuick(&vid_samples, vid.mode.samples);
                if(vid_userefreshrate.integer)
@@ -1445,20 +1468,6 @@ static int VID_Mode(int fullscreen, int width, int height, int bpp, float refres
                return false;
 }
 
-static void VID_OpenSystems(void)
-{
-       Key_ReleaseAll();
-       R_Modules_Start();
-       S_Startup();
-}
-
-static void VID_CloseSystems(void)
-{
-       S_Shutdown();
-       R_Modules_Shutdown();
-       Key_ReleaseAll();
-}
-
 qbool vid_commandlinecheck = true;
 extern qbool vid_opened;
 
@@ -1470,16 +1479,11 @@ void VID_Restart_f(cmd_state_t *cmd)
        if (vid_commandlinecheck)
                return;
 
-       if (!vid_opened)
-       {
-               SCR_BeginLoadingPlaque(false);
-               return;
-       }
-
        Con_Printf("VID_Restart: changing from %s %dx%dx%dbpp%s, to %s %dx%dx%dbpp%s.\n",
                vid.mode.fullscreen ? "fullscreen" : "window", vid.mode.width, vid.mode.height, vid.mode.bitsperpixel, vid.mode.fullscreen && vid.mode.userefreshrate ? va(vabuf, sizeof(vabuf), "x%.2fhz", vid.mode.refreshrate) : "",
                vid_fullscreen.integer ? "fullscreen" : "window", vid_width.integer, vid_height.integer, vid_bitsperpixel.integer, vid_fullscreen.integer && vid_userefreshrate.integer ? va(vabuf, sizeof(vabuf), "x%.2fhz", vid_refreshrate.value) : "");
-       VID_CloseSystems();
+       SCR_DeferLoadingPlaque(false);
+       R_Modules_Shutdown();
        VID_Shutdown();
        if (!VID_Mode(vid_fullscreen.integer, vid_width.integer, vid_height.integer, vid_bitsperpixel.integer, vid_refreshrate.value, vid_stereobuffer.integer))
        {
@@ -1487,7 +1491,8 @@ void VID_Restart_f(cmd_state_t *cmd)
                if (!VID_Mode(vid.mode.fullscreen, vid.mode.width, vid.mode.height, vid.mode.bitsperpixel, vid.mode.refreshrate, vid.mode.stereobuffer))
                        Sys_Error("Unable to restore to last working video mode");
        }
-       VID_OpenSystems();
+       R_Modules_Start();
+       Key_ReleaseAll();
 }
 
 const char *vidfallbacks[][2] =
@@ -1561,13 +1566,9 @@ void VID_Start(void)
                if (!success)
                        Sys_Error("Video modes failed");
        }
-       VID_OpenSystems();
-}
 
-void VID_Stop(void)
-{
-       VID_CloseSystems();
-       VID_Shutdown();
+       R_Modules_Start();
+       Key_ReleaseAll();
 }
 
 static int VID_SortModes_Compare(const void *a_, const void *b_)
diff --git a/view.c b/view.c
index e9c0352ac7360b5e92a90c29d58694b7c2b34388..e8eaec7e26a7b5a81d3fa500124c1d693ee674a1 100644 (file)
--- a/view.c
+++ b/view.c
@@ -32,8 +32,8 @@ when crossing a water boudnary.
 
 */
 
-cvar_t cl_rollspeed = {CF_CLIENT, "cl_rollspeed", "200", "how much strafing is necessary to tilt the view"};
-cvar_t cl_rollangle = {CF_CLIENT, "cl_rollangle", "2.0", "how much to tilt the view when strafing"};
+cvar_t cl_rollspeed = {CF_CLIENT | CF_ARCHIVE, "cl_rollspeed", "200", "how much strafing is necessary to tilt the view"};
+cvar_t cl_rollangle = {CF_CLIENT | CF_ARCHIVE, "cl_rollangle", "2.0", "how much to tilt the view when strafing"};
 
 cvar_t cl_bob = {CF_CLIENT | CF_ARCHIVE, "cl_bob","0.02", "view bobbing amount"};
 cvar_t cl_bobcycle = {CF_CLIENT | CF_ARCHIVE, "cl_bobcycle","0.6", "view bobbing speed"};
@@ -1059,6 +1059,7 @@ void V_CalcViewBlend(void)
                supercontents = CL_PointSuperContents(vieworigin);
                if (supercontents & SUPERCONTENTS_LIQUIDSMASK)
                {
+                       cl.view_underwater = true;
                        r_refdef.frustumscale_x *= 1 - (((sin(cl.time * 4.7) + 1) * 0.015) * r_waterwarp.value);
                        r_refdef.frustumscale_y *= 1 - (((sin(cl.time * 3.0) + 1) * 0.015) * r_waterwarp.value);
                        if (supercontents & SUPERCONTENTS_LAVA)
@@ -1083,6 +1084,7 @@ void V_CalcViewBlend(void)
                }
                else
                {
+                       cl.view_underwater = false;
                        cl.cshifts[CSHIFT_CONTENTS].destcolor[0] = 0;
                        cl.cshifts[CSHIFT_CONTENTS].destcolor[1] = 0;
                        cl.cshifts[CSHIFT_CONTENTS].destcolor[2] = 0;
diff --git a/vs2012_sdl2_win32.props b/vs2012_sdl2_win32.props
deleted file mode 100644 (file)
index e5fa2c1..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <ImportGroup Label="PropertySheets" />\r
-  <PropertyGroup Label="UserMacros" />\r
-  <PropertyGroup>\r
-    <IncludePath>C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;C:\dev\SDL2-2.0\include;$(IncludePath)</IncludePath>\r
-  </PropertyGroup>\r
-  <PropertyGroup>\r
-    <LibraryPath>C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;C:\dev\SDL2-2.0\lib\x86;$(LibraryPath)</LibraryPath>\r
-    <_PropertySheetDisplayName>vs2012_win32</_PropertySheetDisplayName>\r
-  </PropertyGroup>\r
-  <ItemDefinitionGroup />\r
-  <ItemGroup />\r
-</Project>
\ No newline at end of file
diff --git a/vs2012_sdl2_win64.props b/vs2012_sdl2_win64.props
deleted file mode 100644 (file)
index cfe1b95..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <ImportGroup Label="PropertySheets" />\r
-  <PropertyGroup Label="UserMacros" />\r
-  <PropertyGroup>\r
-    <IncludePath>C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;C:\dev\SDL2-2.0\include;$(IncludePath)</IncludePath>\r
-  </PropertyGroup>\r
-  <PropertyGroup>\r
-    <LibraryPath>C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x64;C:\dev\SDL2-2.0\lib\x64;$(LibraryPath)</LibraryPath>\r
-    <_PropertySheetDisplayName>vs2012_win64</_PropertySheetDisplayName>\r
-  </PropertyGroup>\r
-  <ItemDefinitionGroup />\r
-  <ItemGroup />\r
-</Project>
\ No newline at end of file
diff --git a/world.c b/world.c
index 4f7cb48c5ed99f41cb83c4d226d2cfd251f465bd..a95330fae99a4ba0ed9dc3d138d7038a6dcb9b78 100644 (file)
--- a/world.c
+++ b/world.c
@@ -119,7 +119,7 @@ void World_SetSize(world_t *world, const char *filename, const vec3_t mins, cons
 {
        int i;
 
-       strlcpy(world->filename, filename, sizeof(world->filename));
+       dp_strlcpy(world->filename, filename, sizeof(world->filename));
        VectorCopy(mins, world->mins);
        VectorCopy(maxs, world->maxs);
        world->prog = prog;
@@ -317,13 +317,17 @@ World_LinkEdict
 
 ===============
 */
-void World_LinkEdict(world_t *world, prvm_edict_t *ent, const vec3_t mins, const vec3_t maxs)
+void World_LinkEdict(world_t *world, prvm_edict_t *ent, const vec3_t mins, const vec3_t maxs, qbool link_solid_not)
 {
        prvm_prog_t *prog = world->prog;
        // unlink from old position first
        if (ent->priv.server->areagrid[0].list.prev)
                World_UnlinkEdict(ent);
 
+       // some games don't want SOLID_NOT entities linked
+       if (!link_solid_not && PRVM_serveredictfloat(ent, solid) == SOLID_NOT)
+               return;
+
        // don't add the world
        if (ent == prog->edicts)
                return;
@@ -2729,17 +2733,17 @@ treatasbox:
        if (physics_ode_trick_fixnan.integer)
        {
                test = VectorLength2(origin) + VectorLength2(forward) + VectorLength2(left) + VectorLength2(up) + VectorLength2(velocity) + VectorLength2(spinvelocity);
-               if (VEC_IS_NAN(test))
+               if (isnan(test))
                {
                        modified = true;
                        //Con_Printf("Fixing NAN values on entity %i : .classname = \"%s\" .origin = '%f %f %f' .velocity = '%f %f %f' .axis_forward = '%f %f %f' .axis_left = '%f %f %f' .axis_up = %f %f %f' .spinvelocity = '%f %f %f'\n", PRVM_NUM_FOR_EDICT(ed), PRVM_GetString(PRVM_gameedictstring(ed, classname)), origin[0], origin[1], origin[2], velocity[0], velocity[1], velocity[2], forward[0], forward[1], forward[2], left[0], left[1], left[2], up[0], up[1], up[2], spinvelocity[0], spinvelocity[1], spinvelocity[2]);
                        if (physics_ode_trick_fixnan.integer >= 2)
                                Con_Printf("Fixing NAN values on entity %i : .classname = \"%s\" .origin = '%f %f %f' .velocity = '%f %f %f' .angles = '%f %f %f' .avelocity = '%f %f %f'\n", PRVM_NUM_FOR_EDICT(ed), PRVM_GetString(prog, PRVM_gameedictstring(ed, classname)), origin[0], origin[1], origin[2], velocity[0], velocity[1], velocity[2], angles[0], angles[1], angles[2], avelocity[0], avelocity[1], avelocity[2]);
                        test = VectorLength2(origin);
-                       if (VEC_IS_NAN(test))
+                       if (isnan(test))
                                VectorClear(origin);
                        test = VectorLength2(forward) * VectorLength2(left) * VectorLength2(up);
-                       if (VEC_IS_NAN(test))
+                       if (isnan(test))
                        {
                                VectorSet(angles, 0, 0, 0);
                                VectorSet(forward, 1, 0, 0);
@@ -2747,10 +2751,10 @@ treatasbox:
                                VectorSet(up, 0, 0, 1);
                        }
                        test = VectorLength2(velocity);
-                       if (VEC_IS_NAN(test))
+                       if (isnan(test))
                                VectorClear(velocity);
                        test = VectorLength2(spinvelocity);
-                       if (VEC_IS_NAN(test))
+                       if (isnan(test))
                        {
                                VectorClear(avelocity);
                                VectorClear(spinvelocity);
diff --git a/world.h b/world.h
index 1b60ac6c2b48cbd74db530237db1db418e98ec4d..9e0e01010aa18089ea5ac68a9e07258d0692109e 100644 (file)
--- a/world.h
+++ b/world.h
@@ -112,7 +112,7 @@ void World_PrintAreaStats(world_t *world, const char *worldname);
 void World_UnlinkEdict(struct prvm_edict_s *ent);
 
 /// Needs to be called any time an entity changes origin, mins, maxs
-void World_LinkEdict(world_t *world, struct prvm_edict_s *ent, const vec3_t mins, const vec3_t maxs);
+void World_LinkEdict(world_t *world, struct prvm_edict_s *ent, const vec3_t mins, const vec3_t maxs, qbool link_solid_not);
 
 /// \returns list of entities touching a box
 int World_EntitiesInBox(world_t *world, const vec3_t mins, const vec3_t maxs, int maxlist, struct prvm_edict_s **list);
diff --git a/zone.c b/zone.c
index 40708bd6913ed713811d61c4c8443446db09c806..5d69213c006c4dda6a624a363a7567c2bbf33560 100644 (file)
--- a/zone.c
+++ b/zone.c
@@ -497,7 +497,7 @@ void _Mem_Free(void *data, const char *filename, int fileline)
        _Mem_FreeBlock((memheader_t *)((unsigned char *) data - sizeof(memheader_t)), filename, fileline);
 }
 
-mempool_t *_Mem_AllocPool(const char *name, int flags, mempool_t *parent, const char *filename, int fileline)
+mempool_t *_Mem_AllocPool(const char *name, unsigned flags, mempool_t *parent, const char *filename, int fileline)
 {
        mempool_t *pool;
        if (developer_memorydebug.integer)
@@ -520,7 +520,7 @@ mempool_t *_Mem_AllocPool(const char *name, int flags, mempool_t *parent, const
        List_Create(&pool->chain);
        pool->totalsize = 0;
        pool->realsize = sizeof(mempool_t);
-       strlcpy (pool->name, name, sizeof (pool->name));
+       dp_strlcpy (pool->name, name, sizeof (pool->name));
        pool->parent = parent;
        pool->next = poolchain;
        poolchain = pool;
@@ -649,7 +649,7 @@ void _Mem_CheckSentinelsGlobal(const char *filename, int fileline)
 #endif
 }
 
-qbool Mem_IsAllocated(mempool_t *pool, void *data)
+qbool Mem_IsAllocated(mempool_t *pool, const void *data)
 {
        memheader_t *header;
        memheader_t *target;
@@ -813,7 +813,7 @@ void Mem_PrintStats(void)
        {
                if ((pool->flags & POOLFLAG_TEMP) && !List_Is_Empty(&pool->chain))
                {
-                       Con_Printf("Memory pool %p has sprung a leak totalling %lu bytes (%.3fMB)!  Listing contents...\n", (void *)pool, (unsigned long)pool->totalsize, pool->totalsize / 1048576.0);
+                       Con_Printf(CON_WARN "Memory pool %p has sprung a leak totalling %lu bytes (%.3fMB)!  Listing contents...\n", (void *)pool, (unsigned long)pool->totalsize, pool->totalsize / 1048576.0);
                        List_For_Each_Entry(mem, &pool->chain, memheader_t, list)
                                Con_Printf("%10lu bytes allocated at %s:%i\n", (unsigned long)mem->size, mem->filename, mem->fileline);
                }
@@ -862,15 +862,15 @@ static void MemStats_f(cmd_state_t *cmd)
 }
 
 
-char* _Mem_strdup (mempool_t *pool, const char* s, const char *filename, int fileline)
+char *_Mem_strdup(mempool_t *pool, const char *s, const char *filename, int fileline)
 {
        char* p;
        size_t sz;
        if (s == NULL)
                return NULL;
        sz = strlen (s) + 1;
-       p = (char*)_Mem_Alloc (pool, NULL, sz, 16, filename, fileline);
-       strlcpy (p, s, sz);
+       p = (char*)_Mem_Alloc (pool, NULL, sz, alignof(char), filename, fileline);
+       dp_strlcpy (p, s, sz);
        return p;
 }
 
diff --git a/zone.h b/zone.h
index 3dec0b62b961e3d4e4da026721d753588554ccfe..2225ec7c7f47ea9275a9ad72b2f85a2d14dbfeb8 100644 (file)
--- a/zone.h
+++ b/zone.h
@@ -22,10 +22,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #define ZONE_H
 
 #include <stddef.h>
+#include <stdalign.h>
 #include "qtypes.h"
 #include "qdefs.h"
 #include "com_list.h"
 
+// Work around incomplete C11 support in Microsoft's stddef.h
+// This matches the Clang 14 header. Microsoft's double and long double are the same.
+#if defined(_MSC_VER)
+       typedef double max_align_t;
+#endif
+
 extern qbool mem_bigendian;
 
 // div0: heap overflow detection paranoia
@@ -61,7 +68,7 @@ typedef struct mempool_s
        // chain of individual memory allocations
        struct llist_s chain;
        // POOLFLAG_*
-       int flags;
+       unsigned flags;
        // total memory allocated in this pool (inside memheaders)
        size_t totalsize;
        // total memory allocated in this pool (actual malloc total)
@@ -82,9 +89,10 @@ typedef struct mempool_s
 }
 mempool_t;
 
-#define Mem_Alloc(pool,size) _Mem_Alloc(pool, NULL, size, 16, __FILE__, __LINE__)
-#define Mem_Memalign(pool,alignment,size) _Mem_Alloc(pool, NULL, size, alignment, __FILE__, __LINE__)
-#define Mem_Realloc(pool,data,size) _Mem_Alloc(pool, data, size, 16, __FILE__, __LINE__)
+#define Mem_Alloc(pool,size) _Mem_Alloc(pool, NULL, size, alignof(max_align_t), __FILE__, __LINE__)
+#define Mem_AllocType(pool,type,size) (type *)_Mem_Alloc(pool, NULL, size, alignof(type), __FILE__, __LINE__)
+#define Mem_Realloc(pool,data,size) _Mem_Alloc(pool, data, size, alignof(max_align_t), __FILE__, __LINE__)
+#define Mem_ReallocType(pool,data,type,size) (type *)_Mem_Alloc(pool, data, size, alignof(type), __FILE__, __LINE__)
 #define Mem_Free(mem) _Mem_Free(mem, __FILE__, __LINE__)
 #define Mem_strdup(pool, s) _Mem_strdup(pool, s, __FILE__, __LINE__)
 #define Mem_CheckSentinels(data) _Mem_CheckSentinels(data, __FILE__, __LINE__)
@@ -99,15 +107,15 @@ mempool_t;
 
 void *_Mem_Alloc(mempool_t *pool, void *data, size_t size, size_t alignment, const char *filename, int fileline);
 void _Mem_Free(void *data, const char *filename, int fileline);
-mempool_t *_Mem_AllocPool(const char *name, int flags, mempool_t *parent, const char *filename, int fileline);
+mempool_t *_Mem_AllocPool(const char *name, unsigned flags, mempool_t *parent, const char *filename, int fileline);
 void _Mem_FreePool(mempool_t **pool, const char *filename, int fileline);
 void _Mem_EmptyPool(mempool_t *pool, const char *filename, int fileline);
 void _Mem_CheckSentinels(void *data, const char *filename, int fileline);
 void _Mem_CheckSentinelsGlobal(const char *filename, int fileline);
 // if pool is NULL this searches ALL pools for the allocation
-qbool Mem_IsAllocated(mempool_t *pool, void *data);
+qbool Mem_IsAllocated(mempool_t *pool, const void *data);
 
-char* _Mem_strdup (mempool_t *pool, const char* s, const char *filename, int fileline);
+char *_Mem_strdup(mempool_t *pool, const char *s, const char *filename, int fileline);
 
 typedef struct memexpandablearray_array_s
 {