├── .clang-format ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── build-linux.yml │ ├── build-mac.yml │ ├── build-mingw.yml │ ├── build-windows.yml │ └── clang-format-check.yml ├── .gitignore ├── .vscode ├── c_cpp_properties.json ├── launch.json └── tasks.json ├── LICENSE.txt ├── Misc ├── fitzquake080.txt ├── fitzquake080sdl.txt ├── fitzquake085.txt ├── fs_search_order.patch ├── mk_header.c ├── quake_retexturing_project.patch ├── systest.c ├── vkQuake_256.png ├── vkQuake_512.png └── vq_pak │ ├── Makefile │ ├── default.cfg │ ├── gfx │ ├── conback.lmp │ ├── mainmenu2.lmp │ └── p_mods.lmp │ ├── maps │ ├── e1m1.ent.orig │ ├── e1m1@c49d.ent │ ├── e1m2.ent.orig │ ├── e1m2@0caa.ent │ ├── e1m4.ent.orig │ ├── e1m4@958e.ent │ ├── e2m2.ent.orig │ ├── e2m2@fbfe.ent │ ├── e2m3.ent.orig │ ├── e2m3@237a.ent │ ├── e2m7.ent.orig │ ├── e2m7@10a8.ent │ ├── r2m3@63f4.ent │ └── r2m3@76ec.ent │ └── mkpak.c ├── Packaging ├── AppImage │ ├── build-appimage.sh │ ├── docker │ │ └── Dockerfile │ ├── get-version.sh │ ├── linuxdeploy-plugin-appimage-x86_64.AppImage │ ├── linuxdeploy-x86_64.AppImage │ ├── ninja │ └── run-in-docker.sh └── Windows │ ├── createinstallers.ps1 │ └── vkQuake.nsi ├── Quake ├── Makefile ├── Makefile.w32 ├── Makefile.w64 ├── anorms.h ├── arch_def.h ├── atomics.h ├── bgmusic.c ├── bgmusic.h ├── bspfile.h ├── build_cross_win32.sh ├── build_cross_win64.sh ├── cd_null.c ├── cd_sdl.c ├── cdaudio.h ├── cfgfile.c ├── cfgfile.h ├── chase.c ├── cl_demo.c ├── cl_input.c ├── cl_main.c ├── cl_parse.c ├── cl_tent.c ├── client.h ├── cmd.c ├── cmd.h ├── common.c ├── common.h ├── common.make ├── console.c ├── console.h ├── crc.c ├── crc.h ├── cvar.c ├── cvar.h ├── detect.sh ├── draw.h ├── embedded_pak.c ├── filenames.h ├── gl_draw.c ├── gl_fog.c ├── gl_heap.c ├── gl_heap.h ├── gl_mesh.c ├── gl_model.c ├── gl_model.h ├── gl_refrag.c ├── gl_rlight.c ├── gl_rmain.c ├── gl_rmisc.c ├── gl_screen.c ├── gl_sky.c ├── gl_texmgr.c ├── gl_texmgr.h ├── gl_vidsdl.c ├── gl_warp.c ├── gl_warp_sin.h ├── glquake.h ├── hash_map.c ├── hash_map.h ├── host.c ├── host_cmd.c ├── image.c ├── image.h ├── in_sdl.c ├── input.h ├── keys.c ├── keys.h ├── lodepng.c ├── lodepng.h ├── main_sdl.c ├── mathlib.c ├── mathlib.h ├── mdfour.c ├── mem.c ├── mem.h ├── menu.c ├── menu.h ├── mimalloc │ ├── .clang-format │ ├── LICENSE │ ├── alloc-aligned.c │ ├── alloc-override.c │ ├── alloc-posix.c │ ├── alloc.c │ ├── arena.c │ ├── bitmap.c │ ├── bitmap.h │ ├── free.c │ ├── heap.c │ ├── init.c │ ├── libc.c │ ├── mimalloc-new-delete.h │ ├── mimalloc-override.h │ ├── mimalloc.h │ ├── mimalloc │ │ ├── atomic.h │ │ ├── internal.h │ │ ├── prim.h │ │ ├── track.h │ │ └── types.h │ ├── options.c │ ├── os.c │ ├── page-queue.c │ ├── page.c │ ├── prim │ │ ├── emscripten │ │ │ └── prim.c │ │ ├── osx │ │ │ ├── alloc-override-zone.c │ │ │ └── prim.c │ │ ├── prim.c │ │ ├── readme.md │ │ ├── unix │ │ │ └── prim.c │ │ ├── wasi │ │ │ └── prim.c │ │ └── windows │ │ │ ├── etw-mimalloc.wprp │ │ │ ├── etw.h │ │ │ ├── etw.man │ │ │ ├── prim.c │ │ │ └── readme.md │ ├── random.c │ ├── segment-map.c │ ├── segment.c │ ├── static.c │ └── stats.c ├── miniz.c ├── miniz.h ├── modelgen.h ├── net.h ├── net_bsd.c ├── net_defs.h ├── net_dgrm.c ├── net_dgrm.h ├── net_loop.c ├── net_loop.h ├── net_main.c ├── net_sys.h ├── net_udp.c ├── net_udp.h ├── net_win.c ├── net_wins.c ├── net_wins.h ├── net_wipx.c ├── net_wipx.h ├── palette.c ├── palette.h ├── pl_linux.c ├── pl_osx.m ├── pl_win.c ├── platform.h ├── pr_cmds.c ├── pr_comp.h ├── pr_edict.c ├── pr_exec.c ├── pr_ext.c ├── progdefs.h ├── progdefs.q1 ├── progs.h ├── protocol.h ├── q_ctype.h ├── q_sound.h ├── q_stdinc.h ├── qs_bmp.h ├── quakedef.c ├── quakedef.h ├── quakever.h ├── r_alias.c ├── r_brush.c ├── r_part.c ├── r_part_fte.c ├── r_sprite.c ├── r_world.c ├── render.h ├── resource.h ├── sbar.c ├── sbar.h ├── screen.h ├── server.h ├── snd_codec.c ├── snd_codec.h ├── snd_codeci.h ├── snd_dma.c ├── snd_flac.c ├── snd_flac.h ├── snd_mem.c ├── snd_mikmod.c ├── snd_mikmod.h ├── snd_mix.c ├── snd_modplug.c ├── snd_modplug.h ├── snd_mp3.c ├── snd_mp3.h ├── snd_mp3tag.c ├── snd_mpg123.c ├── snd_opus.c ├── snd_opus.h ├── snd_sdl.c ├── snd_umx.c ├── snd_umx.h ├── snd_vorbis.c ├── snd_vorbis.h ├── snd_wave.c ├── snd_wave.h ├── snd_xmp.c ├── snd_xmp.h ├── spritegn.h ├── stb_image.h ├── stb_image_resize.h ├── stb_image_write.h ├── strl_fn.h ├── strlcat.c ├── strlcpy.c ├── sv_main.c ├── sv_move.c ├── sv_phys.c ├── sv_user.c ├── sys.h ├── sys_sdl.c ├── sys_sdl_unix.c ├── sys_sdl_win.c ├── tasks.c ├── tasks.h ├── vid.h ├── view.c ├── view.h ├── vkquake.pak ├── vkquake.pak.deflate ├── wad.c ├── wad.h ├── world.c ├── world.h └── wsaerror.h ├── Shaders ├── Compiled │ ├── .clang-format │ ├── Debug │ │ └── .gitkeep │ └── Release │ │ └── .gitkeep ├── alias.frag ├── alias.vert ├── alias_alphatest.frag ├── basic.frag ├── basic.vert ├── basic_alphatest.frag ├── basic_notex.frag ├── bintoc.c ├── compile.bat ├── compile.sh ├── cs_tex_warp.comp ├── globals.inc ├── indirect.comp ├── indirect_clear.comp ├── md5.vert ├── postprocess.frag ├── postprocess.vert ├── ray_debug.comp ├── screen_effects.inc ├── screen_effects_10bit.comp ├── screen_effects_10bit_scale.comp ├── screen_effects_10bit_scale_sops.comp ├── screen_effects_8bit.comp ├── screen_effects_8bit_scale.comp ├── screen_effects_8bit_scale_sops.comp ├── shaders.h ├── showtris.frag ├── showtris.vert ├── sky_box.frag ├── sky_cube.frag ├── sky_cube.vert ├── sky_layer.frag ├── sky_layer.vert ├── update_lightmap.inc ├── update_lightmap_10bit.comp ├── update_lightmap_10bit_rt.comp ├── update_lightmap_8bit.comp ├── update_lightmap_8bit_rt.comp ├── world.frag └── world.vert ├── Windows ├── .clang-format ├── QuakeSpasm-old.ico ├── SDL2 │ ├── BUGS.txt │ ├── LICENSE.txt │ ├── README-SDL.txt │ ├── README.md │ ├── WhatsNew.txt │ ├── bin │ │ └── sdl2-config │ ├── include │ │ ├── SDL.h │ │ ├── SDL_assert.h │ │ ├── SDL_atomic.h │ │ ├── SDL_audio.h │ │ ├── SDL_bits.h │ │ ├── SDL_blendmode.h │ │ ├── SDL_clipboard.h │ │ ├── SDL_config.h │ │ ├── SDL_config_windows.h │ │ ├── SDL_cpuinfo.h │ │ ├── SDL_egl.h │ │ ├── SDL_endian.h │ │ ├── SDL_error.h │ │ ├── SDL_events.h │ │ ├── SDL_filesystem.h │ │ ├── SDL_gamecontroller.h │ │ ├── SDL_gesture.h │ │ ├── SDL_guid.h │ │ ├── SDL_haptic.h │ │ ├── SDL_hidapi.h │ │ ├── SDL_hints.h │ │ ├── SDL_joystick.h │ │ ├── SDL_keyboard.h │ │ ├── SDL_keycode.h │ │ ├── SDL_loadso.h │ │ ├── SDL_locale.h │ │ ├── SDL_log.h │ │ ├── SDL_main.h │ │ ├── SDL_messagebox.h │ │ ├── SDL_metal.h │ │ ├── SDL_misc.h │ │ ├── SDL_mouse.h │ │ ├── SDL_mutex.h │ │ ├── SDL_name.h │ │ ├── SDL_opengl.h │ │ ├── SDL_opengl_glext.h │ │ ├── SDL_opengles.h │ │ ├── SDL_opengles2.h │ │ ├── SDL_opengles2_gl2.h │ │ ├── SDL_opengles2_gl2ext.h │ │ ├── SDL_opengles2_gl2platform.h │ │ ├── SDL_opengles2_khrplatform.h │ │ ├── SDL_pixels.h │ │ ├── SDL_platform.h │ │ ├── SDL_power.h │ │ ├── SDL_quit.h │ │ ├── SDL_rect.h │ │ ├── SDL_render.h │ │ ├── SDL_revision.h │ │ ├── SDL_rwops.h │ │ ├── SDL_scancode.h │ │ ├── SDL_sensor.h │ │ ├── SDL_shape.h │ │ ├── SDL_stdinc.h │ │ ├── SDL_surface.h │ │ ├── SDL_system.h │ │ ├── SDL_syswm.h │ │ ├── SDL_thread.h │ │ ├── SDL_timer.h │ │ ├── SDL_touch.h │ │ ├── SDL_types.h │ │ ├── SDL_version.h │ │ ├── SDL_video.h │ │ ├── SDL_vulkan.h │ │ ├── begin_code.h │ │ └── close_code.h │ ├── lib │ │ ├── SDL2.dll │ │ ├── SDL2.lib │ │ ├── SDL2main.lib │ │ ├── libSDL2.dll.a │ │ └── libSDL2main.a │ ├── lib64 │ │ ├── SDL2.dll │ │ ├── SDL2.lib │ │ ├── SDL2main.lib │ │ ├── libSDL2.dll.a │ │ └── libSDL2main.a │ └── main │ │ ├── SDL_windows.h │ │ └── SDL_windows_main.c ├── VisualStudio │ ├── bintoc.vcxproj │ ├── bintoc.vcxproj.filters │ ├── bintoc.vcxproj.user │ ├── embedded.filters │ ├── embedded.user │ ├── embedded.vcxproj │ ├── embedded.vcxproj.filters │ ├── embedded.vcxproj.user │ ├── vkquake.sln │ ├── vkquake.vcxproj │ └── vkquake.vcxproj.filters ├── codecs │ ├── include │ │ ├── FLAC │ │ │ ├── callback.h │ │ │ ├── export.h │ │ │ ├── format.h │ │ │ ├── ordinals.h │ │ │ └── stream_decoder.h │ │ ├── flac_config.txt │ │ ├── mad.h │ │ ├── mikmod.h │ │ ├── mikmod_config.txt │ │ ├── mpg123.h │ │ ├── mpg123_config.txt │ │ ├── ogg │ │ │ ├── config_types.h │ │ │ ├── ogg.h │ │ │ └── os_types.h │ │ ├── opus │ │ │ ├── opus.h │ │ │ ├── opus_defines.h │ │ │ ├── opus_multistream.h │ │ │ ├── opus_types.h │ │ │ └── opusfile.h │ │ ├── opusfile.h │ │ ├── vorbis │ │ │ ├── codec.h │ │ │ └── vorbisfile.h │ │ └── xmp.h │ ├── x64 │ │ ├── libFLAC-8.dll │ │ ├── libFLAC.dll.a │ │ ├── libFLAC.lib │ │ ├── libmad-0.dll │ │ ├── libmad.dll.a │ │ ├── libmad.lib │ │ ├── libmikmod-3.dll │ │ ├── libmikmod.dll.a │ │ ├── libmikmod.lib │ │ ├── libmpg123-0.dll │ │ ├── libmpg123.dll.a │ │ ├── libmpg123.lib │ │ ├── libogg-0.dll │ │ ├── libogg.dll.a │ │ ├── libogg.lib │ │ ├── libopus-0.dll │ │ ├── libopus.dll.a │ │ ├── libopus.lib │ │ ├── libopusfile-0.dll │ │ ├── libopusfile.dll.a │ │ ├── libopusfile.lib │ │ ├── libvorbis-0.dll │ │ ├── libvorbis.dll.a │ │ ├── libvorbis.lib │ │ ├── libvorbisfile-3.dll │ │ ├── libvorbisfile.dll.a │ │ ├── libvorbisfile.lib │ │ ├── libxmp.dll │ │ ├── libxmp.dll.a │ │ └── libxmp.lib │ └── x86 │ │ ├── libFLAC-8.dll │ │ ├── libFLAC.dll.a │ │ ├── libFLAC.lib │ │ ├── libmad-0.dll │ │ ├── libmad.dll.a │ │ ├── libmad.lib │ │ ├── libmikmod-3.dll │ │ ├── libmikmod.dll.a │ │ ├── libmikmod.lib │ │ ├── libmpg123-0.dll │ │ ├── libmpg123.dll.a │ │ ├── libmpg123.lib │ │ ├── libogg-0.dll │ │ ├── libogg.dll.a │ │ ├── libogg.lib │ │ ├── libopus-0.dll │ │ ├── libopus.dll.a │ │ ├── libopus.lib │ │ ├── libopusfile-0.dll │ │ ├── libopusfile.dll.a │ │ ├── libopusfile.lib │ │ ├── libvorbis-0.dll │ │ ├── libvorbis.dll.a │ │ ├── libvorbis.lib │ │ ├── libvorbisfile-3.dll │ │ ├── libvorbisfile.dll.a │ │ ├── libvorbisfile.lib │ │ ├── libxmp.dll │ │ ├── libxmp.dll.a │ │ └── libxmp.lib ├── misc │ ├── include │ │ ├── msinttypes │ │ │ ├── README.txt │ │ │ ├── changelog.txt │ │ │ ├── inttypes.h │ │ │ └── stdint.h │ │ └── vulkan │ │ │ ├── vk_enum_string_helper.h │ │ │ ├── vk_icd.h │ │ │ ├── vk_layer.h │ │ │ ├── vk_platform.h │ │ │ ├── vk_sdk_platform.h │ │ │ ├── vulkan.h │ │ │ ├── vulkan_android.h │ │ │ ├── vulkan_beta.h │ │ │ ├── vulkan_core.h │ │ │ ├── vulkan_directfb.h │ │ │ ├── vulkan_fuchsia.h │ │ │ ├── vulkan_ggp.h │ │ │ ├── vulkan_ios.h │ │ │ ├── vulkan_macos.h │ │ │ ├── vulkan_metal.h │ │ │ ├── vulkan_screen.h │ │ │ ├── vulkan_vi.h │ │ │ ├── vulkan_wayland.h │ │ │ ├── vulkan_win32.h │ │ │ ├── vulkan_xcb.h │ │ │ ├── vulkan_xlib.h │ │ │ └── vulkan_xlib_xrandr.h │ ├── x64 │ │ ├── libvulkan-1.dll.a │ │ ├── vulkan-1.def │ │ └── vulkan-1.lib │ └── x86 │ │ ├── libvulkan-1.dll.a │ │ ├── vulkan-1.def │ │ └── vulkan-1.lib ├── vkQuake.ico └── vkQuake.rc ├── format.sh ├── helgrind.supp ├── meson.build ├── meson_options.txt ├── readme.md └── vs-chromium-project.txt /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | TabWidth: 4 3 | IndentWidth: 4 4 | ContinuationIndentWidth: 4 5 | UseTab: Always 6 | Language: Cpp 7 | AllowShortFunctionsOnASingleLine: Empty 8 | BreakBeforeBraces: Allman 9 | DerivePointerAlignment: false 10 | ColumnLimit: 160 11 | AlignConsecutiveBitFields: AcrossComments 12 | AlignConsecutiveMacros: AcrossComments 13 | AlignConsecutiveDeclarations: AcrossComments 14 | AlignEscapedNewlines: Left 15 | AlignTrailingComments: true 16 | AlignAfterOpenBracket: AlwaysBreak 17 | PointerAlignment: Right 18 | AlignOperands: Align 19 | AllowShortIfStatementsOnASingleLine: Never 20 | SpaceBeforeParens: Always 21 | SortIncludes: Never 22 | InsertNewlineAtEOF: true 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: vsonnier 7 | 8 | --- 9 | 10 | **LOW EFFORT BUG REPORTS WILL BE CLOSED** 11 | 12 | **Describe the bug** 13 | A clear and concise description of what the bug is. 14 | 15 | **To Reproduce** 16 | Steps to reproduce the behavior. 17 | 18 | **Expected behavior** 19 | A clear and concise description of what you expected to happen. 20 | 21 | **Screenshots** 22 | If applicable, add screenshots to help explain your problem. 23 | 24 | **Desktop (please complete the following information):** 25 | - OS: [Windows, Linux, macOS] 26 | - GPU vendor and model 27 | - Driver version 28 | 29 | **Mod** 30 | Describe what mod you are using, what version of it and what map causes the issue. 31 | 32 | **Additional context** 33 | Add any other context about the problem here. 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: vsonnier 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/build-linux.yml: -------------------------------------------------------------------------------- 1 | name: Linux CI 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build-linux: 7 | name: Build Linux 8 | runs-on: ubuntu-22.04 9 | steps: 10 | - uses: actions/checkout@v4 11 | - name: Set up Docker Buildx 12 | uses: docker/setup-buildx-action@v3 13 | - name: Build Docker image 14 | uses: docker/build-push-action@v5 15 | with: 16 | context: Packaging/AppImage/docker 17 | platforms: linux/amd64 18 | tags: build-vkquake 19 | load: true 20 | push: false 21 | cache-from: type=gha 22 | cache-to: type=gha 23 | - name: Build vkQuake 24 | run: docker run --rm --privileged -e VERSION=${GITHUB_SHA::8} -v "$PWD:/usr/src/vkQuake" build-vkquake /usr/src/vkQuake/Packaging/AppImage/run-in-docker.sh 25 | - name: Upload vkQuake 26 | uses: actions/upload-artifact@v4 27 | with: 28 | name: vkQuake archive 29 | path: Packaging/AppImage/*.tar.gz 30 | -------------------------------------------------------------------------------- /.github/workflows/build-mac.yml: -------------------------------------------------------------------------------- 1 | name: macOS CI 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build-mac-os: 7 | name: Build macOS 8 | runs-on: macos-13 9 | strategy: 10 | fail-fast: false 11 | matrix: 12 | configuration: [release, debug] 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Install Dependencies 16 | run: brew install molten-vk vulkan-headers glslang spirv-tools sdl2 libvorbis flac opus opusfile flac mpg123 meson 17 | - name: Build vkQuake 18 | run: meson build --buildtype=${{ matrix.configuration }} && ninja -C build 19 | - name: Upload vkQuake 20 | uses: actions/upload-artifact@v4 21 | with: 22 | name: vkQuake archive (${{ matrix.configuration }}) 23 | path: build/vkquake 24 | -------------------------------------------------------------------------------- /.github/workflows/build-mingw.yml: -------------------------------------------------------------------------------- 1 | name: Windows CI (mingw) 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build-mingw: 7 | name: ${{ matrix.platform.name }} 8 | runs-on: ${{ matrix.platform.os }} 9 | 10 | defaults: 11 | run: 12 | shell: ${{ matrix.platform.shell }} 13 | 14 | strategy: 15 | fail-fast: false 16 | matrix: 17 | platform: 18 | - { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64, makefile: Makefile.w64 } 19 | - { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, makefile: Makefile.w32 } 20 | 21 | steps: 22 | - name: Set up MSYS2 23 | uses: msys2/setup-msys2@v2 24 | with: 25 | msystem: ${{ matrix.platform.msystem }} 26 | install: base-devel 27 | ${{ matrix.platform.msys-env }}-gcc 28 | ${{ matrix.platform.msys-env }}-glslang 29 | 30 | - uses: actions/checkout@v4 31 | 32 | - name: Build MinGW 33 | run: | 34 | set -eu 35 | parallel="$(getconf _NPROCESSORS_ONLN)" 36 | make -j"${parallel}" -C Quake -f ${{ matrix.platform.makefile }} all 37 | - name: Upload vkQuake 38 | uses: actions/upload-artifact@v4 39 | with: 40 | name: vkQuake archive (${{ matrix.platform.msystem }}) 41 | path: | 42 | Quake/*.exe 43 | Quake/*.dll 44 | -------------------------------------------------------------------------------- /.github/workflows/build-windows.yml: -------------------------------------------------------------------------------- 1 | name: Windows CI (msvc) 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build-windows: 7 | name: Build Windows 8 | runs-on: windows-2022 9 | strategy: 10 | fail-fast: false 11 | matrix: 12 | configuration: [Release, Debug] 13 | platform: [x64, Win32] 14 | steps: 15 | - uses: actions/checkout@v4 16 | - name: Install Vulkan SDK 17 | uses: humbletim/install-vulkan-sdk@v1.2 18 | with: 19 | version: 1.3.275.0 20 | cache: true 21 | - name: Build vkQuake 22 | run: | 23 | $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" 24 | $msbuild = & "$vswhere" -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe | select-object -first 1 25 | $options = @( ` 26 | '-property:Configuration=${{ matrix.configuration }}', ` 27 | '-property:Platform=${{ matrix.platform }}', ` 28 | '-maxcpucount', ` 29 | '-verbosity:minimal' ` 30 | ) 31 | & $msbuild Windows\VisualStudio\vkquake.sln $options 32 | if (-not $?) { throw "Build failed" } 33 | - name: Upload vkQuake 34 | uses: actions/upload-artifact@v4 35 | with: 36 | name: vkQuake archive (${{ matrix.configuration }}, ${{ matrix.platform }}) 37 | path: | 38 | Windows\VisualStudio\Build-vkQuake\**\*.exe 39 | Windows\VisualStudio\Build-vkQuake\**\*.dll 40 | -------------------------------------------------------------------------------- /.github/workflows/clang-format-check.yml: -------------------------------------------------------------------------------- 1 | name: Formatting check 2 | on: [push, pull_request] 3 | jobs: 4 | formatting-check: 5 | name: Formatting Check 6 | runs-on: ubuntu-latest 7 | strategy: 8 | matrix: 9 | path: 10 | - check: 'Quake' 11 | - check: 'Shaders' 12 | steps: 13 | - uses: actions/checkout@v4 14 | - uses: DoozyX/clang-format-lint-action@v0.17 15 | with: 16 | source: ${{ matrix.path['check'] }} 17 | extensions: 'h,c,cpp' 18 | clangFormatVersion: 17 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | vkquake.VC* 3 | Quake/*.dll 4 | Quake/*.o 5 | Quake/*.d 6 | Quake/id1/ 7 | Quake/vkquake 8 | Quake/*.exe 9 | Quake/*.res 10 | Windows/VisualStudio/Id1 11 | Shaders/Compiled/Debug/*.spv 12 | Shaders/Compiled/Debug/*.c 13 | Shaders/Compiled/Debug/*.d 14 | Shaders/Compiled/Release/*.spv 15 | Shaders/Compiled/Release/*.c 16 | Shaders/Compiled/Release/*.d 17 | Shaders/*.exe 18 | Shaders/*.obj 19 | Shaders/bintoc 20 | Windows/VisualStudio/.vs 21 | Windows/VisualStudio/Build-* 22 | Windows/VisualStudio/enc_temp_folder 23 | Packaging/AppImage/AppDir 24 | Packaging/AppImage/vkquake* 25 | Packaging/Windows/vkQuake-Installer-*.exe 26 | Packaging/Windows/vkQuake*.zip 27 | Misc/vq_pak/mkpak 28 | Misc/vq_pak/bintoc 29 | Misc/vq_pak/*.dSYM 30 | build/ 31 | .settings 32 | .project 33 | .cproject 34 | .DS_Store 35 | history.txt 36 | .vscode/settings.json 37 | helgrind.log 38 | -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Mac", 5 | "includePath": [ 6 | "/usr/include", 7 | "/usr/local/include", 8 | "/opt/homebrew/include", 9 | "${workspaceRoot}" 10 | ], 11 | "defines": [], 12 | "intelliSenseMode": "clang-x64", 13 | "browse": { 14 | "path": [ 15 | "/usr/include", 16 | "/usr/local/include", 17 | "/opt/homebrew/include", 18 | "${workspaceRoot}" 19 | ], 20 | "limitSymbolsToIncludedHeaders": true, 21 | "databaseFilename": "" 22 | }, 23 | "macFrameworkPath": [ 24 | "/System/Library/Frameworks", 25 | "/Library/Frameworks" 26 | ], 27 | "compilerPath": "/usr/bin/clang", 28 | "cStandard": "gnu99", 29 | "cppStandard": "c++98" 30 | }, 31 | { 32 | "name": "Linux", 33 | "includePath": [ 34 | "/usr/local/include", 35 | "/usr/include/x86_64-linux-gnu", 36 | "/usr/include", 37 | "${workspaceRoot}", 38 | "${workspaceRoot}/Windows/SDL2/include" 39 | ], 40 | "defines": [], 41 | "intelliSenseMode": "clang-x64", 42 | "browse": { 43 | "path": [ 44 | "/usr/local/include", 45 | "/usr/include/x86_64-linux-gnu", 46 | "/usr/include", 47 | "${workspaceRoot}", 48 | "${workspaceRoot}/Windows/SDL2/include" 49 | ], 50 | "limitSymbolsToIncludedHeaders": true, 51 | "databaseFilename": "" 52 | }, 53 | "cStandard": "gnu99", 54 | "cppStandard": "c++98", 55 | "compileCommands": "${workspaceFolder}/build/release/compile_commands.json" 56 | }, 57 | { 58 | "name": "Win32", 59 | "includePath": [ 60 | "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include", 61 | "${workspaceRoot}" 62 | ], 63 | "defines": [ 64 | "_DEBUG", 65 | "UNICODE" 66 | ], 67 | "intelliSenseMode": "msvc-x64", 68 | "browse": { 69 | "path": [ 70 | "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*", 71 | "${workspaceRoot}" 72 | ], 73 | "limitSymbolsToIncludedHeaders": true, 74 | "databaseFilename": "" 75 | }, 76 | "cStandard": "gnu99", 77 | "cppStandard": "c++98" 78 | } 79 | ], 80 | "version": 4 81 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "release", 9 | "type": "cppdbg", 10 | "request": "launch", 11 | "program": "${workspaceFolder}/build/release/vkquake", 12 | "args": [ "-basedir", "${env:QUAKE_DIR}", "-multiuser" ], 13 | "cwd": "${workspaceFolder}", 14 | "preLaunchTask": "release" 15 | }, 16 | { 17 | "name": "debugopt", 18 | "type": "cppdbg", 19 | "request": "launch", 20 | "program": "${workspaceFolder}/build/debugopt/vkquake", 21 | "args": [ "-basedir", "${env:QUAKE_DIR}", "-multiuser" ], 22 | "cwd": "${workspaceFolder}", 23 | "preLaunchTask": "debugopt" 24 | }, 25 | { 26 | "name": "debug", 27 | "type": "cppdbg", 28 | "request": "launch", 29 | "program": "${workspaceFolder}/build/debug/vkquake", 30 | "args": [ "-basedir", "${env:QUAKE_DIR}", "-multiuser", "-validation" ], 31 | "cwd": "${workspaceFolder}", 32 | "preLaunchTask": "debug" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /Misc/fs_search_order.patch: -------------------------------------------------------------------------------- 1 | allow plain files to override files inside a PAK file -- Sander van Dijk. 2 | 3 | Index: Quake/common.c 4 | =================================================================== 5 | --- Quake/common.c (revision 1476) 6 | +++ Quake/common.c (working copy) 7 | @@ -2036,13 +2036,6 @@ static void COM_AddGameDirectory (const 8 | else path_id = 1U; 9 | 10 | _add_path: 11 | - // add the directory to the search path 12 | - search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t)); 13 | - search->path_id = path_id; 14 | - q_strlcpy (search->filename, com_gamedir, sizeof(search->filename)); 15 | - search->next = com_searchpaths; 16 | - com_searchpaths = search; 17 | - 18 | // add any pak files in the format pak0.pak pak1.pak, ... 19 | for (i = 0; ; i++) 20 | { 21 | @@ -2074,6 +2067,13 @@ _add_path: 22 | if (!pak) break; 23 | } 24 | 25 | + // add the directory to the search path -- moved here from before the pakX.pak loop -- svdijk. 26 | + search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t)); 27 | + search->path_id = path_id; 28 | + q_strlcpy (search->filename, com_gamedir, sizeof(search->filename)); 29 | + search->next = com_searchpaths; 30 | + com_searchpaths = search; 31 | + 32 | if (!been_here && host_parms->userdir != host_parms->basedir) 33 | { 34 | been_here = true; 35 | 36 | -------------------------------------------------------------------------------- /Misc/mk_header.c: -------------------------------------------------------------------------------- 1 | /* 2 | gcc -Wall mk_header.c -o mk_header 3 | 4 | dumps the bytes of given input to a C header as 5 | comma separated hexadecimal values. the output 6 | header can be used in a C source like: 7 | 8 | const char bin[] = 9 | { 10 | # include "output.h" 11 | }; 12 | 13 | */ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | int main (int argc, char **argv) 20 | { 21 | FILE *f; 22 | struct stat s; 23 | unsigned char *buf, *ptr; 24 | const char *output; 25 | long i, j; 26 | 27 | if (argc != 2 && argc != 3) 28 | { 29 | printf ("Usage: mk_header [output]\n" 30 | "Default output file is \"output.h\"\n"); 31 | return 1; 32 | } 33 | 34 | if (stat(argv[1], &s) == -1 || 35 | ! S_ISREG(s.st_mode) ) 36 | { 37 | printf ("Couldn't stat %s\n", argv[1]); 38 | return 1; 39 | } 40 | 41 | if (s.st_size == 0) 42 | { 43 | printf ("%s is an empty file\n", argv[1]); 44 | return 1; 45 | } 46 | 47 | buf = (unsigned char *) malloc (s.st_size); 48 | if (buf == NULL) 49 | { 50 | printf ("Couldn't malloc %ld bytes\n", 51 | (long)s.st_size); 52 | return 1; 53 | } 54 | 55 | f = fopen (argv[1], "rb"); 56 | if (f == NULL) 57 | { 58 | free(buf); 59 | printf ("Couldn't open %s\n", argv[1]); 60 | return 1; 61 | } 62 | 63 | if (fread (buf, 1, s.st_size, f) != (size_t) s.st_size) 64 | { 65 | fclose (f); 66 | free (buf); 67 | printf ("Error reading %s\n", argv[1]); 68 | return 1; 69 | } 70 | fclose (f); 71 | 72 | output = (argc == 3) ? argv[2] : "output.h"; 73 | f = fopen (output, "wb"); 74 | if (!f) 75 | { 76 | free (buf); 77 | printf ("Couldn't open %s\n", output); 78 | return 1; 79 | } 80 | 81 | for (i = 0, j = 0, ptr = buf; i < s.st_size; ++i) 82 | { 83 | fprintf (f, "0x%02x", *ptr++); 84 | if (i == s.st_size - 1) 85 | break; 86 | fprintf (f, ","); 87 | if (++j < 16) 88 | fprintf (f, " "); 89 | else 90 | { 91 | j = 0; 92 | fprintf (f, "\n"); 93 | } 94 | } 95 | fprintf (f, "\n"); 96 | 97 | fclose (f); 98 | free (buf); 99 | 100 | return 0; 101 | } 102 | 103 | -------------------------------------------------------------------------------- /Misc/vkQuake_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Misc/vkQuake_256.png -------------------------------------------------------------------------------- /Misc/vkQuake_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Misc/vkQuake_512.png -------------------------------------------------------------------------------- /Misc/vq_pak/Makefile: -------------------------------------------------------------------------------- 1 | INPUT := gfx/conback.lmp \ 2 | gfx/mainmenu2.lmp \ 3 | gfx/p_mods.lmp \ 4 | maps/e1m1@c49d.ent \ 5 | maps/e1m2@0caa.ent \ 6 | maps/e1m4@958e.ent \ 7 | maps/e2m2@fbfe.ent \ 8 | maps/e2m3@237a.ent \ 9 | maps/e2m7@10a8.ent \ 10 | maps/r2m3@63f4.ent \ 11 | maps/r2m3@76ec.ent \ 12 | default.cfg 13 | 14 | OUTPUT_NAME := vkquake.pak 15 | OUTPUT := ../../Quake/$(OUTPUT_NAME) 16 | OUTPUT_EMBEDDED := ../../Quake/embedded_pak.c 17 | 18 | $(OUTPUT_EMBEDDED): bintoc $(OUTPUT) $(OUTPUT).deflate 19 | ./bintoc $(OUTPUT) $(OUTPUT_NAME) $(OUTPUT_EMBEDDED) 20 | 21 | $(OUTPUT).deflate: $(OUTPUT) 22 | zopfli --deflate $(OUTPUT) 23 | 24 | $(OUTPUT): mkpak $(INPUT) 25 | ./mkpak $(OUTPUT) $(INPUT) 26 | 27 | mkpak: mkpak.c 28 | cc mkpak.c -o mkpak --std=gnu11 -g 29 | 30 | bintoc: ../../Shaders/bintoc.c 31 | cc ../../Shaders/bintoc.c -o bintoc --std=gnu11 -g 32 | 33 | .PHONY: clean 34 | clean: 35 | rm -f mkpak 36 | rm -f bintoc 37 | -------------------------------------------------------------------------------- /Misc/vq_pak/default.cfg: -------------------------------------------------------------------------------- 1 | // 2 | // load keybindings 3 | // 4 | // commands with a leading + will also be called for key up events with 5 | // the + changed to a - 6 | unbindall 7 | 8 | // 9 | // character controls 10 | // 11 | 12 | bind ALT +strafe 13 | 14 | bind , +moveleft 15 | bind a +moveleft 16 | bind . +moveright 17 | bind d +moveright 18 | bind DEL +lookdown 19 | bind PGDN +lookup 20 | bind END centerview 21 | 22 | bind e +moveup 23 | bind c +movedown 24 | bind SHIFT +speed 25 | bind CTRL +attack 26 | bind UPARROW +forward 27 | bind w +forward 28 | bind DOWNARROW +back 29 | bind s +back 30 | bind LEFTARROW +left 31 | bind RIGHTARROW +right 32 | 33 | bind SPACE +jump 34 | //bind ENTER +jump 35 | 36 | bind TAB +showscores 37 | 38 | bind 1 "impulse 1" 39 | bind 2 "impulse 2" 40 | bind 3 "impulse 3" 41 | bind 4 "impulse 4" 42 | bind 5 "impulse 5" 43 | bind 6 "impulse 6" 44 | bind 7 "impulse 7" 45 | bind 8 "impulse 8" 46 | 47 | bind 0 "impulse 0" 48 | 49 | bind / "impulse 10" // change weapon 50 | bind MWHEELDOWN "impulse 10" 51 | bind MWHEELUP "impulse 12" 52 | 53 | // zoom 54 | alias zoom_in "togglezoom" 55 | alias zoom_out "togglezoom" 56 | bind F11 zoom_in 57 | 58 | // Function keys 59 | bind F1 "help" 60 | bind F2 "menu_save" 61 | bind F3 "menu_load" 62 | bind F4 "menu_options" 63 | bind F5 "menu_multiplayer" 64 | bind F6 "echo Quicksaving...; wait; save quick" 65 | bind F9 "echo Quickloading...; wait; load quick" 66 | bind F10 "quit" 67 | bind F12 "screenshot" 68 | 69 | // mouse options 70 | bind \ +mlook 71 | 72 | // 73 | // client environment commands 74 | // 75 | bind PAUSE "pause" 76 | bind ESCAPE "togglemenu" 77 | bind ~ "toggleconsole" 78 | bind ` "toggleconsole" 79 | 80 | bind t "messagemode" 81 | 82 | bind + "sizeup" 83 | bind = "sizeup" 84 | bind - "sizedown" 85 | 86 | bind INS +klook 87 | 88 | // 89 | // mouse buttons 90 | // 91 | bind MOUSE1 +attack 92 | bind MOUSE2 +jump 93 | 94 | // 95 | // game controller 96 | // 97 | bind LSHOULDER "impulse 12" 98 | bind RSHOULDER "impulse 10" 99 | bind LTRIGGER +jump 100 | bind RTRIGGER +attack 101 | 102 | // 103 | // default cvars 104 | // 105 | volume 0.7 106 | sensitivity 3 107 | 108 | viewsize 110 109 | 110 | // default to mouse-look enabled 111 | +mlook 112 | 113 | crosshair 1 114 | -------------------------------------------------------------------------------- /Misc/vq_pak/gfx/conback.lmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Misc/vq_pak/gfx/conback.lmp -------------------------------------------------------------------------------- /Misc/vq_pak/gfx/mainmenu2.lmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Misc/vq_pak/gfx/mainmenu2.lmp -------------------------------------------------------------------------------- /Misc/vq_pak/gfx/p_mods.lmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Misc/vq_pak/gfx/p_mods.lmp -------------------------------------------------------------------------------- /Packaging/AppImage/build-appimage.sh: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | docker build --tag=build-vkquake docker && \ 3 | docker run --rm --privileged -e VERSION=`./get-version.sh` -v ${PWD}/../..:/usr/src/vkQuake build-vkquake /usr/src/vkQuake/Packaging/AppImage/run-in-docker.sh 4 | -------------------------------------------------------------------------------- /Packaging/AppImage/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | ARG DEBIAN_FRONTEND=noninteractive 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y apt-transport-https ca-certificates wget gnupg apt-utils \ 6 | && wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - \ 7 | && wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.275-focal.list https://packages.lunarg.com/vulkan/1.3.275/lunarg-vulkan-1.3.275-focal.list \ 8 | && apt-get update \ 9 | && apt-get install -y \ 10 | build-essential \ 11 | file \ 12 | fuse \ 13 | unzip \ 14 | ninja-build \ 15 | libasound2-dev \ 16 | libaudiofile-dev \ 17 | libdbus-1-dev \ 18 | libibus-1.0-dev \ 19 | libmad0-dev \ 20 | libopenal-dev \ 21 | libpulse-dev \ 22 | libsndio-dev \ 23 | libudev-dev \ 24 | libusb-dev \ 25 | libvorbis-dev \ 26 | libvulkan-dev \ 27 | libx11-xcb-dev \ 28 | libxcursor-dev \ 29 | libxrandr-dev \ 30 | libxt-dev \ 31 | libxv-dev \ 32 | libxxf86vm-dev \ 33 | libflac-dev \ 34 | libopus-dev \ 35 | libopusfile-dev \ 36 | vulkan-sdk \ 37 | zlib1g-dev \ 38 | && rm -rf /var/lib/apt/lists/* 39 | 40 | RUN cd /tmp \ 41 | && wget https://www.libsdl.org/release/SDL2-2.32.4.tar.gz \ 42 | && tar -xzf SDL2-2.32.4.tar.gz \ 43 | && rm SDL2-2.32.4.tar.gz \ 44 | && cd /tmp/SDL2-2.32.4 \ 45 | && ./configure \ 46 | && make -j \ 47 | && make install 48 | 49 | RUN cd /tmp \ 50 | && wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip \ 51 | && unzip ninja-linux.zip \ 52 | && rm ninja-linux.zip \ 53 | && cp ninja /usr/bin/ninja 54 | 55 | RUN cd /opt \ 56 | && wget https://github.com/mesonbuild/meson/releases/download/1.3.1/meson-1.3.1.tar.gz \ 57 | && tar -xzf meson-1.3.1.tar.gz \ 58 | && rm meson-1.3.1.tar.gz \ 59 | && mv meson-1.3.1 meson 60 | 61 | -------------------------------------------------------------------------------- /Packaging/AppImage/get-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | BASE_VERSION=`grep -oP "^#define\s*VKQUAKE_VERSION\s*\K[0-9.]*" ../../Quake/quakever.h` 3 | PATCH_VERSION=`grep -oP "^#define\s*VKQUAKE_VER_PATCH\s*\K[0-9.]*" ../../Quake/quakever.h` 4 | SUFFIX=`grep -oP "^#define\s*VKQUAKE_VER_SUFFIX\s*\"\K([^\"]*)" ../../Quake/quakever.h` 5 | echo ${BASE_VERSION}.${PATCH_VERSION}${SUFFIX} 6 | -------------------------------------------------------------------------------- /Packaging/AppImage/linuxdeploy-plugin-appimage-x86_64.AppImage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Packaging/AppImage/linuxdeploy-plugin-appimage-x86_64.AppImage -------------------------------------------------------------------------------- /Packaging/AppImage/linuxdeploy-x86_64.AppImage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Packaging/AppImage/linuxdeploy-x86_64.AppImage -------------------------------------------------------------------------------- /Packaging/AppImage/ninja: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Packaging/AppImage/ninja -------------------------------------------------------------------------------- /Packaging/AppImage/run-in-docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | FOLDER=vkquake-${VERSION}_linux64 5 | ARCHIVE=$FOLDER.tar.gz 6 | 7 | cd /usr/src/vkQuake 8 | 9 | rm -rf build/appimage 10 | 11 | python3 /opt/meson/meson.py build/appimage -Dbuildtype=release -Db_lto=true -Dmp3_lib=mad 12 | ninja -C build/appimage 13 | 14 | cd Packaging/AppImage 15 | rm -rf AppDir 16 | rm -rf vkquake* 17 | mkdir "$FOLDER" 18 | ./linuxdeploy-x86_64.AppImage \ 19 | -e ../../build/appimage/vkquake --appdir=AppDir --create-desktop-file \ 20 | -i ../../Misc/vkQuake_256.png --icon-filename=vkquake --output appimage 21 | 22 | cp "vkquake-$VERSION-x86_64.AppImage" "$FOLDER/vkquake.AppImage" 23 | cp ../../LICENSE.txt "$FOLDER" 24 | tar -zcvf "$ARCHIVE" "$FOLDER" 25 | -------------------------------------------------------------------------------- /Packaging/Windows/createinstallers.ps1: -------------------------------------------------------------------------------- 1 | $VersionMajorMatch=Select-String "^#define\s*VKQUAKE_VERSION_MAJOR\s*([0-9.]*)" "../../Quake/quakever.h" 2 | $VersionMajor=$VersionMajorMatch.Matches.groups[1].value 3 | $VersionMinorMatch=Select-String "^#define\s*VKQUAKE_VERSION_MINOR\s*([0-9.]*)" "../../Quake/quakever.h" 4 | $VersionMinor=$VersionMinorMatch.Matches.groups[1].value 5 | $PatchVersionMatch=Select-String "^#define\s*VKQUAKE_VER_PATCH\s*([0-9.]*)" "../../Quake/quakever.h" 6 | $PatchVersion=$PatchVersionMatch.Matches.groups[1].value 7 | $SuffixMatch=Select-String "^#define\s*VKQUAKE_VER_SUFFIX\s*`"([^`"]*)" "../../Quake/quakever.h" 8 | $Suffix=$SuffixMatch.Matches.groups[1].value 9 | $Version=$VersionMajor + '.' + $VersionMinor + '.' + $PatchVersion + $Suffix 10 | $SrcDirX64="..\..\Windows\VisualStudio\Build-vkQuake\x64\Release" 11 | $SrcDirX86="..\..\Windows\VisualStudio\Build-vkQuake\x86\Release" 12 | 13 | # Cleanup 14 | Del "vkQuake-*.exe" 15 | Del "vkQuake-*.zip" 16 | 17 | # Clean & build binaries 18 | msbuild ..\..\Windows\VisualStudio\vkquake.sln /target:Clean /target:Build /property:Configuration=Release /property:Platform=x64 19 | msbuild ..\..\Windows\VisualStudio\vkquake.sln /target:Clean /target:Build /property:Configuration=Release /property:Platform=Win32 20 | 21 | # Create NSIS exe installers 22 | $Nsis="C:\Program Files (x86)\NSIS\Bin\makensis.exe" 23 | $NsisArguments = '-V4 -DSRCDIR="' + $SrcDirX64 + '" -DPLATFORM=x64 -DVERSION=' + $Version + ' vkQuake.nsi' 24 | Start-Process -Wait -NoNewWindow -PassThru -FilePath $Nsis -ArgumentList $NsisArguments 25 | $NsisArguments = '-V4 -DSRCDIR="' + $SrcDirX86 + '" -DPLATFORM=x86 -DVERSION=' + $Version + ' vkQuake.nsi' 26 | Start-Process -Wait -NoNewWindow -PassThru -FilePath $Nsis -ArgumentList $NsisArguments 27 | 28 | # Create zip files 29 | $compress = @{ 30 | Path = "$SrcDirX64\*.exe", "$SrcDirX64\*.dll", "..\..\LICENSE.txt" 31 | CompressionLevel = "Optimal" 32 | DestinationPath = "vkQuake-" + $Version + "_win64.zip" 33 | } 34 | Compress-Archive @compress 35 | $compress = @{ 36 | Path = "$SrcDirX86\*.exe", "$SrcDirX86\*.dll", "..\..\LICENSE.txt" 37 | CompressionLevel = "Optimal" 38 | DestinationPath = "vkQuake-" + $Version + "_win32.zip" 39 | } 40 | Compress-Archive @compress -------------------------------------------------------------------------------- /Quake/bgmusic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Background music handling for Quakespasm (adapted from uHexen2) 3 | * Handles streaming music as raw sound samples and runs the midi driver 4 | * 5 | * Copyright (C) 1999-2005 Id Software, Inc. 6 | * Copyright (C) 2010-2012 O.Sezer 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 | * 17 | * See the GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License along 20 | * with this program; if not, write to the Free Software Foundation, Inc., 21 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * 23 | */ 24 | 25 | #ifndef _BGMUSIC_H_ 26 | #define _BGMUSIC_H_ 27 | 28 | extern cvar_t bgm_extmusic; 29 | 30 | qboolean BGM_Init (void); 31 | void BGM_Shutdown (void); 32 | 33 | void BGM_Play (const char *filename); 34 | void BGM_Stop (void); 35 | void BGM_Update (void); 36 | void BGM_Pause (void); 37 | void BGM_Resume (void); 38 | 39 | void BGM_PlayCDtrack (byte track, qboolean looping); 40 | 41 | #endif /* _BGMUSIC_H_ */ 42 | -------------------------------------------------------------------------------- /Quake/build_cross_win32.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Change this script to meet your needs and/or environment. 4 | 5 | TARGET=i686-w64-mingw32 6 | PREFIX=/opt/cross_win32 7 | 8 | PATH="$PREFIX/bin:$PATH" 9 | export PATH 10 | 11 | MAKE_CMD=make 12 | 13 | CC="$TARGET-gcc" 14 | AS="$TARGET-as" 15 | RANLIB="$TARGET-ranlib" 16 | AR="$TARGET-ar" 17 | WINDRES="$TARGET-windres" 18 | STRIP="$TARGET-strip" 19 | export PATH CC AS AR RANLIB WINDRES STRIP 20 | 21 | exec $MAKE_CMD CC=$CC AS=$AS RANLIB=$RANLIB AR=$AR WINDRES=$WINDRES STRIP=$STRIP -f Makefile.w32 $* 22 | -------------------------------------------------------------------------------- /Quake/build_cross_win64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Change this script to meet your needs and/or environment. 4 | 5 | TARGET=x86_64-w64-mingw32 6 | PREFIX=/opt/cross_win64 7 | 8 | PATH="$PREFIX/bin:$PATH" 9 | export PATH 10 | 11 | MAKE_CMD=make 12 | 13 | CC="$TARGET-gcc" 14 | AS="$TARGET-as" 15 | RANLIB="$TARGET-ranlib" 16 | AR="$TARGET-ar" 17 | WINDRES="$TARGET-windres" 18 | STRIP="$TARGET-strip" 19 | export PATH CC AS AR RANLIB WINDRES STRIP 20 | 21 | exec $MAKE_CMD CC=$CC AS=$AS RANLIB=$RANLIB AR=$AR WINDRES=$WINDRES STRIP=$STRIP -f Makefile.w64 $* 22 | -------------------------------------------------------------------------------- /Quake/cd_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cd_null.c 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or (at 7 | * your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | * 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include "quakedef.h" 21 | 22 | int CDAudio_Play (byte track, qboolean looping) 23 | { 24 | return -1; 25 | } 26 | 27 | void CDAudio_Stop (void) {} 28 | 29 | void CDAudio_Pause (void) {} 30 | 31 | void CDAudio_Resume (void) {} 32 | 33 | void CDAudio_Update (void) {} 34 | 35 | int CDAudio_Init (void) 36 | { 37 | return -1; 38 | } 39 | 40 | void CDAudio_Shutdown (void) {} 41 | -------------------------------------------------------------------------------- /Quake/cdaudio.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2010-2014 QuakeSpasm developers 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | 14 | See the GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | 20 | */ 21 | 22 | #ifndef __CDAUDIO_H 23 | #define __CDAUDIO_H 24 | 25 | int CDAudio_Init (void); 26 | int CDAudio_Play (byte track, qboolean looping); 27 | /* returns 0 for success, -1 for failure. */ 28 | void CDAudio_Stop (void); 29 | void CDAudio_Pause (void); 30 | void CDAudio_Resume (void); 31 | void CDAudio_Shutdown (void); 32 | void CDAudio_Update (void); 33 | 34 | #endif /* __CDAUDIO_H */ 35 | -------------------------------------------------------------------------------- /Quake/cfgfile.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cfgfile.h -- misc reads from the config file 3 | * 4 | * Copyright (C) 2008-2012 O.Sezer 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or (at 9 | * your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | * 15 | * See the GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License along 18 | * with this program; if not, write to the Free Software Foundation, Inc., 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef __CFGFILE_H 23 | #define __CFGFILE_H 24 | 25 | int CFG_OpenConfig (const char *cfg_name); 26 | // opens the given config file. only one open config file is 27 | // kept: previosly opened one, if any, will be closed. 28 | 29 | void CFG_CloseConfig (void); 30 | // closes the currently open config file. 31 | 32 | void CFG_ReadCvars (const char **vars, int num_vars); 33 | // reads the values of cvars in the given list from the opened 34 | // config file. 35 | 36 | void CFG_ReadCvarOverrides (const char **vars, int num_vars); 37 | // convenience function, reading the "+" command line override 38 | // values of cvars in the given list. doesn't do anything with 39 | // the config file. call this after CFG_ReadCvars() and before 40 | // locking your cvars. 41 | 42 | #endif /* __CFGFILE_H */ 43 | -------------------------------------------------------------------------------- /Quake/console.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2009 John Fitzgibbons and others 4 | Copyright (C) 2010-2014 QuakeSpasm developers 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | 15 | See the GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software 19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 | 21 | */ 22 | 23 | #ifndef __CONSOLE_H 24 | #define __CONSOLE_H 25 | 26 | // 27 | // console 28 | // 29 | extern int con_totallines; 30 | extern int con_backscroll; 31 | extern qboolean con_forcedup; // because no entities to refresh 32 | extern qboolean con_initialized; 33 | extern byte *con_chars; 34 | typedef struct cb_context_s cb_context_t; 35 | 36 | extern char con_lastcenterstring[]; // johnfitz 37 | 38 | void Con_CheckResize (void); 39 | void Con_Init (void); 40 | void Con_DrawConsole (cb_context_t *cbx, int lines, qboolean drawinput); 41 | void Con_Printf (const char *fmt, ...) FUNC_PRINTF (1, 2); 42 | void Con_DWarning (const char *fmt, ...) FUNC_PRINTF (1, 2); // ericw 43 | void Con_Warning (const char *fmt, ...) FUNC_PRINTF (1, 2); // johnfitz 44 | void Con_DPrintf (const char *fmt, ...) FUNC_PRINTF (1, 2); 45 | void Con_DPrintf2 (const char *fmt, ...) FUNC_PRINTF (1, 2); // johnfitz 46 | void Con_SafePrintf (const char *fmt, ...) FUNC_PRINTF (1, 2); 47 | void Con_DrawNotify (cb_context_t *cbx); 48 | void Con_ClearNotify (void); 49 | void Con_ToggleConsole_f (void); 50 | qboolean Con_IsRedirected (void); // returns true if its redirected. this generally means that things are a little more verbose. 51 | void Con_Redirect (void (*flush) (const char *text)); 52 | 53 | void Con_NotifyBox (const char *text); // during startup for sound / cd warnings 54 | 55 | const char *Con_Quakebar (int len); 56 | void Con_TabComplete (void); 57 | void Con_LogCenterPrint (const char *str); 58 | 59 | // 60 | // debuglog 61 | // 62 | void LOG_Init (quakeparms_t *parms); 63 | void LOG_Close (void); 64 | void Con_DebugLog (const char *msg); 65 | 66 | #endif /* __CONSOLE_H */ 67 | -------------------------------------------------------------------------------- /Quake/crc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2009 John Fitzgibbons and others 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | 14 | See the GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | 20 | */ 21 | 22 | #ifndef _QUAKE_CRC_H 23 | #define _QUAKE_CRC_H 24 | 25 | /* crc.h */ 26 | 27 | void CRC_Init (unsigned short *crcvalue); 28 | void CRC_ProcessByte (unsigned short *crcvalue, byte data); 29 | unsigned short CRC_Value (unsigned short crcvalue); 30 | unsigned short CRC_Block (const byte *start, int count); // johnfitz -- texture crc 31 | 32 | // additional hash functions... 33 | unsigned Com_BlockChecksum (void *buffer, int length); 34 | void Com_BlockFullChecksum (void *buffer, int len, unsigned char *outbuf); 35 | 36 | #endif /* _QUAKE_CRC_H */ 37 | -------------------------------------------------------------------------------- /Quake/detect.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # script from loki_setup tools 4 | 5 | DetectARCH() 6 | { 7 | status=1 8 | case `uname -m` in 9 | amd64 | x86_64) 10 | echo "x86_64" 11 | status=0;; 12 | i?86 | i86*) 13 | echo "x86" 14 | status=0;; 15 | 90*/*) 16 | echo "hppa" 17 | status=0;; 18 | *) 19 | case `uname -s` in 20 | IRIX*) 21 | echo "mips" 22 | status=0;; 23 | AIX*) 24 | echo "ppc" 25 | status=0;; 26 | *) 27 | arch=`uname -p 2> /dev/null || uname -m` 28 | if test "$arch" = powerpc; then 29 | echo "ppc" 30 | else 31 | echo $arch 32 | fi 33 | status=0;; 34 | esac 35 | esac 36 | return $status 37 | } 38 | 39 | DetectOS() 40 | { 41 | os=`uname -s` 42 | if test "$os" = "OpenUNIX"; then 43 | echo SCO_SV 44 | else 45 | echo $os 46 | fi 47 | return 0 48 | } 49 | 50 | if test "$1" = "os"; then 51 | result=`DetectOS` 52 | elif test "$1" = "arch"; then 53 | result=`DetectARCH` 54 | else 55 | result="OS: `DetectOS`, Arch: `DetectARCH`" 56 | fi 57 | 58 | status="$?" 59 | echo $result 60 | 61 | exit $status 62 | 63 | -------------------------------------------------------------------------------- /Quake/draw.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2009 John Fitzgibbons and others 4 | Copyright (C) 2010-2014 QuakeSpasm developers 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | 15 | See the GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software 19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 | 21 | */ 22 | 23 | #ifndef _QUAKE_DRAW_H 24 | #define _QUAKE_DRAW_H 25 | 26 | #define CHARACTER_SIZE 8 27 | 28 | // draw.h -- these are the only functions outside the refresh allowed 29 | // to touch the vid buffer 30 | 31 | extern qpic_t *draw_disc; // also used on sbar 32 | 33 | // Use float coords and sizes in Draw_XXX to allow sub-pixel precision 34 | void Draw_Init (void); 35 | void Draw_Character (cb_context_t *cbx, float x, float y, int num); 36 | void Draw_Pic (cb_context_t *cbx, float x, float y, qpic_t *pic, float alpha, qboolean alpha_blend); 37 | void Draw_SubPic (cb_context_t *cbx, float x, float y, float w, float h, qpic_t *pic, float s1, float t1, float s2, float t2, float *rgb, float alpha); 38 | void Draw_TransPicTranslate (cb_context_t *cbx, float x, float y, qpic_t *pic, int top, int bottom); // johnfitz -- more parameters 39 | void Draw_ConsoleBackground (cb_context_t *cbx); // johnfitz -- removed parameter int lines 40 | void Draw_TileClear (cb_context_t *cbx, float x, float y, float w, float h); 41 | void Draw_Fill (cb_context_t *cbx, float x, float y, float w, float h, int c, float alpha); // johnfitz -- added alpha 42 | void Draw_FadeScreen (cb_context_t *cbx); 43 | void Draw_String (cb_context_t *cbx, float x, float y, const char *str); 44 | void Draw_String_3D (cb_context_t *cbx, vec3_t coords, float size, const char *str); 45 | qpic_t *Draw_PicFromWad2 (const char *name, unsigned int texflags); 46 | qpic_t *Draw_PicFromWad (const char *name); 47 | qpic_t *Draw_CachePic (const char *path); 48 | qpic_t *Draw_TryCachePic (const char *path, unsigned int texflags); 49 | void Draw_NewGame (void); 50 | 51 | void GL_Viewport (cb_context_t *cbx, float x, float y, float width, float height, float min_depth, float max_depth); 52 | void GL_SetCanvas (cb_context_t *cbx, canvastype newcanvas); // johnfitz 53 | 54 | #endif /* _QUAKE_DRAW_H */ 55 | -------------------------------------------------------------------------------- /Quake/gl_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2016 Axel Gneiting 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | #ifndef __HEAP__ 22 | #define __HEAP__ 23 | 24 | typedef struct glheap_s glheap_t; 25 | typedef struct glheapallocation_s glheapallocation_t; 26 | 27 | typedef struct glheapstats_s 28 | { 29 | uint32_t num_segments; 30 | uint32_t num_allocations; 31 | uint32_t num_small_allocations; 32 | uint32_t num_block_allocations; 33 | uint32_t num_dedicated_allocations; 34 | uint32_t num_blocks_used; 35 | uint32_t num_blocks_free; 36 | uint32_t num_pages_allocated; 37 | uint32_t num_pages_free; 38 | uint64_t num_bytes_allocated; 39 | uint64_t num_bytes_free; 40 | uint64_t num_bytes_wasted; 41 | } glheapstats_t; 42 | 43 | glheap_t *GL_HeapCreate (VkDeviceSize segment_size, uint32_t page_size, uint32_t memory_type_index, vulkan_memory_type_t memory_type, const char *heap_name); 44 | void GL_HeapDestroy (glheap_t *heap, atomic_uint32_t *num_allocations); 45 | glheapallocation_t *GL_HeapAllocate (glheap_t *heap, VkDeviceSize size, VkDeviceSize alignment, atomic_uint32_t *num_allocations); 46 | void GL_HeapFree (glheap_t *heap, glheapallocation_t *allocation, atomic_uint32_t *num_allocations); 47 | VkDeviceMemory GL_HeapGetAllocationMemory (glheapallocation_t *allocation); 48 | VkDeviceSize GL_HeapGetAllocationOffset (glheapallocation_t *allocation); 49 | glheapstats_t *GL_HeapGetStats (glheap_t *heap); 50 | 51 | #ifdef _DEBUG 52 | void GL_HeapTest_f (void); 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /Quake/image.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2009 John Fitzgibbons and others 4 | Copyright (C) 2010-2014 QuakeSpasm developers 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | 15 | See the GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software 19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 | 21 | */ 22 | 23 | #ifndef GL_IMAGE_H 24 | #define GL_IMAGE_H 25 | 26 | // image.h -- image reading / writing 27 | enum srcformat; 28 | 29 | byte *Image_LoadImage (const char *name, int *width, int *height, enum srcformat *fmt, unsigned int min_path_id); 30 | 31 | qboolean Image_WriteTGA (const char *name, byte *data, int width, int height, int bpp, qboolean upsidedown); 32 | qboolean Image_WritePNG (const char *name, byte *data, int width, int height, int bpp, qboolean upsidedown); 33 | qboolean Image_WriteJPG (const char *name, byte *data, int width, int height, int bpp, int quality, qboolean upsidedown); 34 | 35 | #endif /* GL_IMAGE_H */ 36 | -------------------------------------------------------------------------------- /Quake/input.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2010-2014 QuakeSpasm developers 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | 14 | See the GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | 20 | */ 21 | 22 | #ifndef _QUAKE_INPUT_H 23 | #define _QUAKE_INPUT_H 24 | 25 | // input.h -- external (non-keyboard) input devices 26 | 27 | void IN_Init (void); 28 | 29 | void IN_Shutdown (void); 30 | 31 | void IN_Commands (void); 32 | // oportunity for devices to stick commands on the script buffer 33 | 34 | // mouse moved by dx and dy pixels 35 | void IN_MouseMotion (int dx, int dy); 36 | 37 | void IN_SendKeyEvents (void); 38 | // used as a callback for Sys_SendKeyEvents() by some drivers 39 | 40 | void IN_UpdateInputMode (void); 41 | // do stuff if input mode (text/non-text) changes matter to the keyboard driver 42 | 43 | void IN_Move (usercmd_t *cmd); 44 | // add additional movement on top of the keyboard move cmd 45 | 46 | void IN_ClearStates (void); 47 | // restores all button and position states to defaults 48 | 49 | // called when the app becomes active 50 | void IN_Activate (); 51 | 52 | // called when the app becomes inactive 53 | void IN_Deactivate (qboolean free_cursor); 54 | 55 | // called when switching to fullscreen while in menu or console 56 | void IN_HideCursor (); 57 | 58 | #endif /* _QUAKE_INPUT_H */ 59 | -------------------------------------------------------------------------------- /Quake/mimalloc/.clang-format: -------------------------------------------------------------------------------- 1 | DisableFormat: true 2 | SortIncludes: Never 3 | -------------------------------------------------------------------------------- /Quake/mimalloc/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018-2021 Microsoft Corporation, Daan Leijen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Quake/mimalloc/prim/osx/prim.c: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | Copyright (c) 2018-2023, Microsoft Research, Daan Leijen 3 | This is free software; you can redistribute it and/or modify it under the 4 | terms of the MIT license. A copy of the license can be found in the file 5 | "LICENSE" at the root of this distribution. 6 | -----------------------------------------------------------------------------*/ 7 | 8 | // We use the unix/prim.c with the mmap API on macOSX 9 | #include "../unix/prim.c" 10 | -------------------------------------------------------------------------------- /Quake/mimalloc/prim/prim.c: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | Copyright (c) 2018-2023, Microsoft Research, Daan Leijen 3 | This is free software; you can redistribute it and/or modify it under the 4 | terms of the MIT license. A copy of the license can be found in the file 5 | "LICENSE" at the root of this distribution. 6 | -----------------------------------------------------------------------------*/ 7 | 8 | // Select the implementation of the primitives 9 | // depending on the OS. 10 | 11 | #if defined(_WIN32) 12 | #include "windows/prim.c" // VirtualAlloc (Windows) 13 | 14 | #elif defined(__APPLE__) 15 | #include "osx/prim.c" // macOSX (actually defers to mmap in unix/prim.c) 16 | 17 | #elif defined(__wasi__) 18 | #define MI_USE_SBRK 19 | #include "wasi/prim.c" // memory-grow or sbrk (Wasm) 20 | 21 | #elif defined(__EMSCRIPTEN__) 22 | #include "emscripten/prim.c" // emmalloc_*, + pthread support 23 | 24 | #else 25 | #include "unix/prim.c" // mmap() (Linux, macOSX, BSD, Illumnos, Haiku, DragonFly, etc.) 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /Quake/mimalloc/prim/readme.md: -------------------------------------------------------------------------------- 1 | ## Portability Primitives 2 | 3 | This is the portability layer where all primitives needed from the OS are defined. 4 | 5 | - `include/mimalloc/prim.h`: primitive portability API definition. 6 | - `prim.c`: Selects one of `unix/prim.c`, `wasi/prim.c`, or `windows/prim.c` depending on the host platform 7 | (and on macOS, `osx/prim.c` defers to `unix/prim.c`). 8 | 9 | Note: still work in progress, there may still be places in the sources that still depend on OS ifdef's. -------------------------------------------------------------------------------- /Quake/mimalloc/prim/windows/etw-mimalloc.wprp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /Quake/mimalloc/prim/windows/etw.man: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Quake/mimalloc/prim/windows/etw.man -------------------------------------------------------------------------------- /Quake/mimalloc/prim/windows/readme.md: -------------------------------------------------------------------------------- 1 | ## Primitives: 2 | 3 | - `prim.c` contains Windows primitives for OS allocation. 4 | 5 | ## Event Tracing for Windows (ETW) 6 | 7 | - `etw.h` is generated from `etw.man` which contains the manifest for mimalloc events. 8 | (100 is an allocation, 101 is for a free) 9 | 10 | - `etw-mimalloc.wprp` is a profile for the Windows Performance Recorder (WPR). 11 | In an admin prompt, you can use: 12 | ``` 13 | > wpr -start src\prim\windows\etw-mimalloc.wprp -filemode 14 | > 15 | > wpr -stop test.etl 16 | ``` 17 | and then open `test.etl` in the Windows Performance Analyzer (WPA). -------------------------------------------------------------------------------- /Quake/mimalloc/static.c: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | Copyright (c) 2018-2020, Microsoft Research, Daan Leijen 3 | This is free software; you can redistribute it and/or modify it under the 4 | terms of the MIT license. A copy of the license can be found in the file 5 | "LICENSE" at the root of this distribution. 6 | -----------------------------------------------------------------------------*/ 7 | #ifndef _DEFAULT_SOURCE 8 | #define _DEFAULT_SOURCE 9 | #endif 10 | #if defined(__sun) 11 | // same remarks as os.c for the static's context. 12 | #undef _XOPEN_SOURCE 13 | #undef _POSIX_C_SOURCE 14 | #endif 15 | 16 | #include "mimalloc.h" 17 | #include "mimalloc/internal.h" 18 | 19 | // For a static override we create a single object file 20 | // containing the whole library. If it is linked first 21 | // it will override all the standard library allocation 22 | // functions (on Unix's). 23 | #include "alloc.c" // includes alloc-override.c 24 | #include "alloc-aligned.c" 25 | #include "alloc-posix.c" 26 | #include "arena.c" 27 | #include "bitmap.c" 28 | #include "heap.c" 29 | #include "init.c" 30 | #include "libc.c" 31 | #include "options.c" 32 | #include "os.c" 33 | #include "page.c" // includes page-queue.c 34 | #include "random.c" 35 | #include "segment.c" 36 | #include "segment-map.c" 37 | #include "stats.c" 38 | #include "prim/prim.c" 39 | #if MI_OSX_ZONE 40 | #include "prim/osx/alloc-override-zone.c" 41 | #endif 42 | -------------------------------------------------------------------------------- /Quake/net_bsd.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | Copyright (C) 2010-2014 QuakeSpasm developers 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | 14 | See the GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | 20 | */ 21 | 22 | #include "q_stdinc.h" 23 | #include "arch_def.h" 24 | #include "net_sys.h" 25 | #include "quakedef.h" 26 | #include "net_defs.h" 27 | 28 | #include "net_dgrm.h" 29 | #include "net_loop.h" 30 | 31 | net_driver_t net_drivers[] = { 32 | {"Loopback", false, Loop_Init, Loop_Listen, Loop_QueryAddresses, Loop_SearchForHosts, Loop_Connect, Loop_CheckNewConnections, Loop_GetAnyMessage, 33 | Loop_GetMessage, Loop_SendMessage, Loop_SendUnreliableMessage, Loop_CanSendMessage, Loop_CanSendUnreliableMessage, Loop_Close, Loop_Shutdown}, 34 | 35 | {"Datagram", false, Datagram_Init, Datagram_Listen, Datagram_QueryAddresses, Datagram_SearchForHosts, Datagram_Connect, Datagram_CheckNewConnections, 36 | Datagram_GetAnyMessage, Datagram_GetMessage, Datagram_SendMessage, Datagram_SendUnreliableMessage, Datagram_CanSendMessage, 37 | Datagram_CanSendUnreliableMessage, Datagram_Close, Datagram_Shutdown}}; 38 | 39 | const int net_numdrivers = countof (net_drivers); 40 | 41 | #include "net_udp.h" 42 | 43 | net_landriver_t net_landrivers[] = { 44 | {"UDP", 45 | false, 46 | 0, 47 | UDP4_Init, 48 | UDP4_Shutdown, 49 | UDP4_Listen, 50 | UDP4_GetAddresses, 51 | UDP4_OpenSocket, 52 | UDP_CloseSocket, 53 | UDP_Connect, 54 | UDP4_CheckNewConnections, 55 | UDP_Read, 56 | UDP_Write, 57 | UDP4_Broadcast, 58 | UDP_AddrToString, 59 | UDP4_StringToAddr, 60 | UDP_GetSocketAddr, 61 | UDP_GetNameFromAddr, 62 | UDP4_GetAddrFromName, 63 | UDP_AddrCompare, 64 | UDP_GetSocketPort, 65 | UDP_SetSocketPort}, 66 | {"UDP6", 67 | false, 68 | 0, 69 | UDP6_Init, 70 | UDP6_Shutdown, 71 | UDP6_Listen, 72 | UDP6_GetAddresses, 73 | UDP6_OpenSocket, 74 | UDP_CloseSocket, 75 | UDP_Connect, 76 | UDP6_CheckNewConnections, 77 | UDP_Read, 78 | UDP_Write, 79 | UDP6_Broadcast, 80 | UDP_AddrToString, 81 | UDP6_StringToAddr, 82 | UDP_GetSocketAddr, 83 | UDP_GetNameFromAddr, 84 | UDP6_GetAddrFromName, 85 | UDP_AddrCompare, 86 | UDP_GetSocketPort, 87 | UDP_SetSocketPort}}; 88 | 89 | const int net_numlandrivers = (sizeof (net_landrivers) / sizeof (net_landrivers[0])); 90 | -------------------------------------------------------------------------------- /Quake/net_dgrm.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2010-2014 QuakeSpasm developers 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | 14 | See the GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | 20 | */ 21 | 22 | #ifndef __NET_DATAGRAM_H 23 | #define __NET_DATAGRAM_H 24 | 25 | int Datagram_Init (void); 26 | void Datagram_Listen (qboolean state); 27 | int Datagram_QueryAddresses (qhostaddr_t *addresses, int maxaddresses); 28 | qboolean Datagram_SearchForHosts (qboolean xmit); 29 | qsocket_t *Datagram_Connect (const char *host); 30 | qsocket_t *Datagram_CheckNewConnections (void); 31 | qsocket_t *Datagram_GetAnyMessage (void); 32 | int Datagram_GetMessage (qsocket_t *sock); 33 | int Datagram_SendMessage (qsocket_t *sock, sizebuf_t *data); 34 | int Datagram_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data); 35 | qboolean Datagram_CanSendMessage (qsocket_t *sock); 36 | qboolean Datagram_CanSendUnreliableMessage (qsocket_t *sock); 37 | void Datagram_Close (qsocket_t *sock); 38 | void Datagram_Shutdown (void); 39 | 40 | #endif /* __NET_DATAGRAM_H */ 41 | -------------------------------------------------------------------------------- /Quake/net_loop.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2010-2014 QuakeSpasm developers 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | 14 | See the GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | 20 | */ 21 | 22 | #ifndef __NET_LOOP_H 23 | #define __NET_LOOP_H 24 | 25 | // net_loop.h 26 | int Loop_Init (void); 27 | void Loop_Listen (qboolean state); 28 | #define Loop_QueryAddresses NULL 29 | qboolean Loop_SearchForHosts (qboolean xmit); 30 | qsocket_t *Loop_Connect (const char *host); 31 | qsocket_t *Loop_CheckNewConnections (void); 32 | qsocket_t *Loop_GetAnyMessage (void); 33 | int Loop_GetMessage (qsocket_t *sock); 34 | int Loop_SendMessage (qsocket_t *sock, sizebuf_t *data); 35 | int Loop_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data); 36 | qboolean Loop_CanSendMessage (qsocket_t *sock); 37 | qboolean Loop_CanSendUnreliableMessage (qsocket_t *sock); 38 | void Loop_Close (qsocket_t *sock); 39 | void Loop_Shutdown (void); 40 | 41 | #endif /* __NET_LOOP_H */ 42 | -------------------------------------------------------------------------------- /Quake/net_wins.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2010-2014 QuakeSpasm developers 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | 14 | See the GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | 20 | */ 21 | 22 | #ifndef __NET_WINSOCK_H 23 | #define __NET_WINSOCK_H 24 | 25 | int WINS_CloseSocket (sys_socket_t socketid); 26 | int WINS_Connect (sys_socket_t socketid, struct qsockaddr *addr); 27 | int WINS_Read (sys_socket_t socketid, byte *buf, int len, struct qsockaddr *addr); 28 | int WINS_Write (sys_socket_t socketid, byte *buf, int len, struct qsockaddr *addr); 29 | const char *WINS_AddrToString (struct qsockaddr *addr, qboolean masked); 30 | int WINS_GetSocketAddr (sys_socket_t socketid, struct qsockaddr *addr); 31 | int WINS_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2); 32 | int WINS_GetSocketPort (struct qsockaddr *addr); 33 | int WINS_SetSocketPort (struct qsockaddr *addr, int port); 34 | 35 | sys_socket_t WINIPv4_Init (void); 36 | void WINIPv4_Shutdown (void); 37 | sys_socket_t WINIPv4_Listen (qboolean state); 38 | int WINIPv4_GetAddresses (qhostaddr_t *addresses, int maxaddresses); 39 | sys_socket_t WINIPv4_OpenSocket (int port); 40 | sys_socket_t WINIPv4_CheckNewConnections (void); 41 | int WINIPv4_Broadcast (sys_socket_t socketid, byte *buf, int len); 42 | int WINIPv4_StringToAddr (const char *string, struct qsockaddr *addr); 43 | int WINIPv4_GetNameFromAddr (struct qsockaddr *addr, char *name); 44 | int WINIPv4_GetAddrFromName (const char *name, struct qsockaddr *addr); 45 | 46 | #ifdef IPPROTO_IPV6 47 | sys_socket_t WINIPv6_Init (void); 48 | void WINIPv6_Shutdown (void); 49 | sys_socket_t WINIPv6_Listen (qboolean state); 50 | int WINIPv6_GetAddresses (qhostaddr_t *addresses, int maxaddresses); 51 | sys_socket_t WINIPv6_OpenSocket (int port); 52 | sys_socket_t WINIPv6_CheckNewConnections (void); 53 | int WINIPv6_Broadcast (sys_socket_t socketid, byte *buf, int len); 54 | int WINIPv6_StringToAddr (const char *string, struct qsockaddr *addr); 55 | int WINIPv6_GetNameFromAddr (struct qsockaddr *addr, char *name); 56 | int WINIPv6_GetAddrFromName (const char *name, struct qsockaddr *addr); 57 | #endif 58 | 59 | #endif /* __NET_WINSOCK_H */ 60 | -------------------------------------------------------------------------------- /Quake/net_wipx.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2010-2014 QuakeSpasm developers 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | 14 | See the GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | 20 | */ 21 | 22 | #ifndef __NET_WINIPX_H 23 | #define __NET_WINIPX_H 24 | 25 | sys_socket_t WIPX_Init (void); 26 | void WIPX_Shutdown (void); 27 | sys_socket_t WIPX_Listen (qboolean state); 28 | int WIPX_GetAddresses (qhostaddr_t *addresses, int maxaddresses); 29 | sys_socket_t WIPX_OpenSocket (int port); 30 | int WIPX_CloseSocket (sys_socket_t socketid); 31 | int WIPX_Connect (sys_socket_t socketid, struct qsockaddr *addr); 32 | sys_socket_t WIPX_CheckNewConnections (void); 33 | int WIPX_Read (sys_socket_t socketid, byte *buf, int len, struct qsockaddr *addr); 34 | int WIPX_Write (sys_socket_t socketid, byte *buf, int len, struct qsockaddr *addr); 35 | int WIPX_Broadcast (sys_socket_t socketid, byte *buf, int len); 36 | const char *WIPX_AddrToString (struct qsockaddr *addr, qboolean masked); 37 | int WIPX_StringToAddr (const char *string, struct qsockaddr *addr); 38 | int WIPX_GetSocketAddr (sys_socket_t socketid, struct qsockaddr *addr); 39 | int WIPX_GetNameFromAddr (struct qsockaddr *addr, char *name); 40 | int WIPX_GetAddrFromName (const char *name, struct qsockaddr *addr); 41 | int WIPX_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2); 42 | int WIPX_GetSocketPort (struct qsockaddr *addr); 43 | int WIPX_SetSocketPort (struct qsockaddr *addr, int port); 44 | 45 | #endif /* __NET_WINIPX_H */ 46 | -------------------------------------------------------------------------------- /Quake/palette.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2009 John Fitzgibbons and others 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | 14 | See the GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | 20 | */ 21 | 22 | #ifndef _PALETTE_H 23 | #define _PALETTE_H 24 | 25 | #define NUM_PALETTE_OCTREE_NODES 184 26 | #define NUM_PALETTE_OCTREE_COLORS 5844 27 | 28 | typedef struct palette_octree_node_s 29 | { 30 | uint32_t child_offsets[8]; 31 | } palette_octree_node_t; 32 | 33 | COMPILE_TIME_ASSERT ("palette_octree_node_t", sizeof (palette_octree_node_t) == 32); 34 | 35 | extern palette_octree_node_t palette_octree_nodes[NUM_PALETTE_OCTREE_NODES]; 36 | extern uint32_t palette_octree_colors[NUM_PALETTE_OCTREE_COLORS]; 37 | 38 | #ifdef _DEBUG 39 | void CreatePaletteOctree_f (void); 40 | #endif 41 | 42 | #endif /* _PALETTE_H */ 43 | -------------------------------------------------------------------------------- /Quake/pl_linux.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2005 John Fitzgibbons and others 4 | Copyright (C) 2007-2008 Kristian Duske 5 | Copyright (C) 2010-2014 QuakeSpasm developers 6 | 7 | This program is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | */ 23 | 24 | #include "quakedef.h" 25 | #if defined(SDL_FRAMEWORK) || defined(NO_SDL_CONFIG) 26 | #include 27 | #else 28 | #include "SDL.h" 29 | #endif 30 | 31 | static const Uint8 bmp_bytes[] = { 32 | #include "qs_bmp.h" 33 | }; 34 | 35 | void PL_SetWindowIcon (void) 36 | { 37 | SDL_RWops *rwop; 38 | SDL_Surface *icon; 39 | Uint32 colorkey; 40 | 41 | /* SDL_RWFromConstMem() requires SDL >= 1.2.7 */ 42 | rwop = SDL_RWFromConstMem (bmp_bytes, sizeof (bmp_bytes)); 43 | if (rwop == NULL) 44 | return; 45 | icon = SDL_LoadBMP_RW (rwop, 1); 46 | if (icon == NULL) 47 | return; 48 | /* make pure magenta (#ff00ff) tranparent */ 49 | colorkey = SDL_MapRGB (icon->format, 255, 0, 255); 50 | SDL_SetColorKey (icon, SDL_TRUE, colorkey); 51 | SDL_SetWindowIcon ((SDL_Window *)VID_GetWindow (), icon); 52 | SDL_FreeSurface (icon); 53 | } 54 | 55 | void PL_VID_Shutdown (void) {} 56 | 57 | #define MAX_CLIPBOARDTXT MAXCMDLINE /* 256 */ 58 | char *PL_GetClipboardData (void) 59 | { 60 | char *data = NULL; 61 | char *cliptext = SDL_GetClipboardText (); 62 | 63 | if (cliptext != NULL) 64 | { 65 | size_t size = strlen (cliptext) + 1; 66 | /* this is intended for simple small text copies 67 | * such as an ip address, etc: do chop the size 68 | * here, otherwise we may experience Mem_Alloc() 69 | * failures and all other not-oh-so-fun stuff. */ 70 | size = q_min (MAX_CLIPBOARDTXT, size); 71 | data = (char *)Mem_Alloc (size); 72 | q_strlcpy (data, cliptext, size); 73 | } 74 | 75 | return data; 76 | } 77 | 78 | void PL_ErrorDialog (const char *errorMsg) 79 | { 80 | SDL_ShowSimpleMessageBox (SDL_MESSAGEBOX_ERROR, "Quake Error", errorMsg, NULL); 81 | } 82 | -------------------------------------------------------------------------------- /Quake/pl_osx.m: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2005 John Fitzgibbons and others 4 | Copyright (C) 2007-2008 Kristian Duske 5 | Copyright (C) 2010-2014 QuakeSpasm developers 6 | 7 | This program is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | */ 23 | 24 | #include "quakedef.h" 25 | #if defined(SDL_FRAMEWORK) || defined(NO_SDL_CONFIG) 26 | #include 27 | #else 28 | #include "SDL.h" 29 | #endif 30 | #import 31 | 32 | void PL_SetWindowIcon (void) 33 | { 34 | /* nothing to do on OS X */ 35 | } 36 | 37 | void PL_VID_Shutdown (void) 38 | { 39 | } 40 | 41 | #define MAX_CLIPBOARDTXT MAXCMDLINE /* 256 */ 42 | char *PL_GetClipboardData (void) 43 | { 44 | char *data = NULL; 45 | NSPasteboard* pasteboard = [NSPasteboard generalPasteboard]; 46 | NSArray* types = [pasteboard types]; 47 | 48 | if ([types containsObject: NSPasteboardTypeString]) { 49 | NSString* clipboardString = [pasteboard stringForType: NSPasteboardTypeString]; 50 | if (clipboardString != NULL && [clipboardString length] > 0) { 51 | size_t sz = [clipboardString length] + 1; 52 | sz = q_min(MAX_CLIPBOARDTXT, sz); 53 | data = (char *) Mem_Alloc(sz); 54 | q_strlcpy (data, [clipboardString cStringUsingEncoding: NSASCIIStringEncoding], sz); 55 | } 56 | } 57 | return data; 58 | } 59 | 60 | #ifndef MAC_OS_X_VERSION_10_12 61 | #define NSAlertStyleCritical NSCriticalAlertStyle 62 | #endif 63 | void PL_ErrorDialog(const char *errorMsg) 64 | { 65 | NSString* msg = [NSString stringWithCString:errorMsg encoding:NSASCIIStringEncoding]; 66 | NSAlert *alert = [[[NSAlert alloc] init] autorelease]; 67 | alert.alertStyle = NSAlertStyleCritical; 68 | alert.messageText = @"Quake Error"; 69 | alert.informativeText = msg; 70 | [alert runModal]; 71 | } 72 | 73 | -------------------------------------------------------------------------------- /Quake/platform.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2005 John Fitzgibbons and others 4 | Copyright (C) 2007-2008 Kristian Duske 5 | Copyright (C) 2010-2014 QuakeSpasm developers 6 | 7 | This program is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | */ 23 | 24 | #ifndef _QUAKE_PLATFORM_H 25 | #define _QUAKE_PLATFORM_H 26 | 27 | /* platform dependent way to set the window icon */ 28 | void PL_SetWindowIcon (void); 29 | 30 | /* platform dependent cleanup */ 31 | void PL_VID_Shutdown (void); 32 | 33 | /* retrieve text from the clipboard (returns Mem_Alloc()'ed data) */ 34 | char *PL_GetClipboardData (void); 35 | 36 | /* show an error dialog */ 37 | void PL_ErrorDialog (const char *text); 38 | 39 | #endif /* _QUAKE_PLATFORM_H */ 40 | -------------------------------------------------------------------------------- /Quake/progdefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2009 John Fitzgibbons and others 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | 14 | See the GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | 20 | */ 21 | 22 | #ifndef __PROGDEFS_H 23 | #define __PROGDEFS_H 24 | 25 | #include "progdefs.q1" 26 | 27 | #endif /* __PROGDEFS_H */ 28 | -------------------------------------------------------------------------------- /Quake/q_ctype.h: -------------------------------------------------------------------------------- 1 | /* Locale insensitive ctype.h functions taken from the RPM library - 2 | * RPM is Copyright (c) 1998 by Red Hat Software, Inc. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or (at 7 | * your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | * 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef Q_CTYPE_H 21 | #define Q_CTYPE_H 22 | 23 | static inline int q_isascii (int c) 24 | { 25 | return ((c & ~0x7f) == 0); 26 | } 27 | 28 | static inline int q_islower (int c) 29 | { 30 | return (c >= 'a' && c <= 'z'); 31 | } 32 | 33 | static inline int q_isupper (int c) 34 | { 35 | return (c >= 'A' && c <= 'Z'); 36 | } 37 | 38 | static inline int q_isalpha (int c) 39 | { 40 | return (q_islower (c) || q_isupper (c)); 41 | } 42 | 43 | static inline int q_isdigit (int c) 44 | { 45 | return (c >= '0' && c <= '9'); 46 | } 47 | 48 | static inline int q_isxdigit (int c) 49 | { 50 | return (q_isdigit (c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')); 51 | } 52 | 53 | static inline int q_isalnum (int c) 54 | { 55 | return (q_isalpha (c) || q_isdigit (c)); 56 | } 57 | 58 | static inline int q_isblank (int c) 59 | { 60 | return (c == ' ' || c == '\t'); 61 | } 62 | 63 | static inline int q_isspace (int c) 64 | { 65 | switch (c) 66 | { 67 | case ' ': 68 | case '\t': 69 | case '\n': 70 | case '\r': 71 | case '\f': 72 | case '\v': 73 | return 1; 74 | } 75 | return 0; 76 | } 77 | 78 | static inline int q_isgraph (int c) 79 | { 80 | return (c > 0x20 && c <= 0x7e); 81 | } 82 | 83 | static inline int q_isprint (int c) 84 | { 85 | return (c >= 0x20 && c <= 0x7e); 86 | } 87 | 88 | static inline int q_toascii (int c) 89 | { 90 | return (c & 0x7f); 91 | } 92 | 93 | static inline int q_tolower (int c) 94 | { 95 | return ((q_isupper (c)) ? (c | ('a' - 'A')) : c); 96 | } 97 | 98 | static inline int q_toupper (int c) 99 | { 100 | return ((q_islower (c)) ? (c & ~('a' - 'A')) : c); 101 | } 102 | 103 | #endif /* Q_CTYPE_H */ 104 | -------------------------------------------------------------------------------- /Quake/quakedef.c: -------------------------------------------------------------------------------- 1 | #include "quakedef.h" 2 | -------------------------------------------------------------------------------- /Quake/quakever.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2016-2024 vkQuake developers 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | #ifndef QUAKEVER_H 22 | #define QUAKEVER_H 23 | 24 | #define VERSION 1.09 25 | #define GLQUAKE_VERSION 1.00 26 | #define D3DQUAKE_VERSION 0.01 27 | #define WINQUAKE_VERSION 0.996 28 | #define X11_VERSION 1.10 29 | 30 | #define FITZQUAKE_VERSION 0.85 // johnfitz 31 | #define QUAKESPASM_VERSION 0.96 32 | #define QUAKESPASM_VER_PATCH 3 // helper to print a string like 0.96.3 33 | #ifndef QUAKESPASM_VER_SUFFIX 34 | #define QUAKESPASM_VER_SUFFIX // optional version suffix string literal like "-beta1" 35 | #endif 36 | 37 | #define VKQUAKE_VERSION_MAJOR 1 38 | #define VKQUAKE_VERSION_MINOR 32 39 | #define VKQUAKE_VER_PATCH 3 40 | 41 | #define VKQUAKE_VERSION 1.32 42 | 43 | #define LINUX_VERSION VKQUAKE_VERSION 44 | 45 | #ifndef VKQUAKE_VER_SUFFIX 46 | #define VKQUAKE_VER_SUFFIX "" // optional version suffix like -beta1 47 | #endif 48 | 49 | #define QS_STRINGIFY_(x) #x 50 | #define QS_STRINGIFY(x) QS_STRINGIFY_ (x) 51 | 52 | // combined version string like "0.92.1-beta1" 53 | #define QUAKESPASM_VER_STRING QS_STRINGIFY (QUAKESPASM_VERSION) "." QS_STRINGIFY (QUAKESPASM_VER_PATCH) QUAKESPASM_VER_SUFFIX 54 | #define VKQUAKE_VER_STRING QS_STRINGIFY (VKQUAKE_VERSION) "." QS_STRINGIFY (VKQUAKE_VER_PATCH) VKQUAKE_VER_SUFFIX 55 | 56 | #ifdef QSS_DATE 57 | // combined version string like "2020-10-20-beta1" 58 | #define ENGINE_NAME_AND_VER "vkQuake " QS_STRINGIFY (QSS_DATE) VKQUAKE_VER_SUFFIX 59 | #else 60 | #define ENGINE_NAME_AND_VER \ 61 | "vkQuake" \ 62 | " " VKQUAKE_VER_STRING 63 | #endif 64 | #endif /* QUAKEVER_H */ 65 | -------------------------------------------------------------------------------- /Quake/resource.h: -------------------------------------------------------------------------------- 1 | #ifndef _QUAKE_RESOURCE_H 2 | #define _QUAKE_RESOURCE_H 3 | 4 | //{{NO_DEPENDENCIES}} 5 | // Microsoft Developer Studio generated include file. 6 | // Used by winquake.rc 7 | // 8 | #define IDS_STRING1 1 9 | #define IDI_ICON2 1 10 | #define IDD_DIALOG1 108 11 | #define IDD_PROGRESS 109 12 | #define IDC_PROGRESS 1000 13 | 14 | // Next default values for new objects 15 | // 16 | #ifdef APSTUDIO_INVOKED 17 | #ifndef APSTUDIO_READONLY_SYMBOLS 18 | #define _APS_NEXT_RESOURCE_VALUE 113 19 | #define _APS_NEXT_COMMAND_VALUE 40001 20 | #define _APS_NEXT_CONTROL_VALUE 1004 21 | #define _APS_NEXT_SYMED_VALUE 101 22 | #endif 23 | #endif 24 | 25 | #endif /* _QUAKE_RESOURCE_H */ 26 | -------------------------------------------------------------------------------- /Quake/sbar.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2009 John Fitzgibbons and others 4 | Copyright (C) 2010-2014 QuakeSpasm developers 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | 15 | See the GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software 19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 | 21 | */ 22 | 23 | #ifndef _QUAKE_SBAR_H 24 | #define _QUAKE_SBAR_H 25 | 26 | // the status bar is only redrawn if something has changed, but if anything 27 | // does, the entire thing will be redrawn for the next vid.numpages frames. 28 | 29 | extern int sb_lines; // scan lines to draw 30 | 31 | void Sbar_Init (void); 32 | void Sbar_LoadPics (void); 33 | 34 | void Sbar_Draw (cb_context_t *cbx); 35 | // called every frame by screen 36 | 37 | void Sbar_IntermissionOverlay (cb_context_t *cbx); 38 | // called each frame after the level has been completed 39 | 40 | void Sbar_FinaleOverlay (cb_context_t *cbx); 41 | 42 | #endif /* _QUAKE_SBAR_H */ 43 | -------------------------------------------------------------------------------- /Quake/screen.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2009 John Fitzgibbons and others 4 | Copyright (C) 2010-2014 QuakeSpasm developers 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | 15 | See the GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software 19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 | 21 | */ 22 | 23 | #ifndef _QUAKE_SCREEN_H 24 | #define _QUAKE_SCREEN_H 25 | 26 | // screen.h 27 | 28 | void SCR_Init (void); 29 | void SCR_LoadPics (void); 30 | 31 | void SCR_UpdateScreen (qboolean use_tasks); 32 | void SCR_UpdateZoom (void); 33 | 34 | void SCR_CenterPrintClear (void); 35 | void SCR_CenterPrint (const char *str); 36 | 37 | void SCR_BeginLoadingPlaque (void); 38 | void SCR_EndLoadingPlaque (void); 39 | 40 | int SCR_ModalMessage (const char *text, float timeout); // johnfitz -- added timeout 41 | 42 | void SCR_UpdateRelativeScale (); 43 | 44 | extern float scr_con_current; 45 | extern float scr_conlines; // lines of console to display 46 | 47 | extern int sb_lines; 48 | 49 | extern qboolean scr_disabled_for_loading; 50 | 51 | extern cvar_t scr_viewsize; 52 | 53 | extern cvar_t scr_sbaralpha; // johnfitz 54 | 55 | extern cvar_t scr_menuscale; 56 | extern cvar_t scr_sbarscale; 57 | extern cvar_t scr_conwidth; 58 | extern cvar_t scr_conscale; 59 | extern cvar_t scr_relativescale; 60 | extern cvar_t scr_scale; 61 | extern cvar_t scr_crosshairscale; 62 | // johnfitz 63 | 64 | #endif /* _QUAKE_SCREEN_H */ 65 | -------------------------------------------------------------------------------- /Quake/snd_codeci.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Audio Codecs: Adapted from ioquake3 with changes. 3 | * For now, only handles streaming music, not sound effects. 4 | * 5 | * Copyright (C) 1999-2005 Id Software, Inc. 6 | * Copyright (C) 2005 Stuart Dalton 7 | * Copyright (C) 2010-2012 O.Sezer 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or (at 12 | * your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * 18 | * See the GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License along 21 | * with this program; if not, write to the Free Software Foundation, Inc., 22 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 23 | * 24 | */ 25 | 26 | #ifndef _SND_CODECI_H_ 27 | #define _SND_CODECI_H_ 28 | 29 | /* Codec internals */ 30 | typedef qboolean (*CODEC_INIT) (void); 31 | typedef void (*CODEC_SHUTDOWN) (void); 32 | typedef qboolean (*CODEC_OPEN) (snd_stream_t *stream); 33 | typedef int (*CODEC_READ) (snd_stream_t *stream, int bytes, void *buffer); 34 | typedef int (*CODEC_REWIND) (snd_stream_t *stream); 35 | typedef int (*CODEC_JUMP) (snd_stream_t *stream, int order); 36 | typedef void (*CODEC_CLOSE) (snd_stream_t *stream); 37 | 38 | struct snd_codec_s 39 | { 40 | unsigned int type; /* handled data type. (1U << n) */ 41 | qboolean initialized; /* init succeedded */ 42 | const char *ext; /* expected extension */ 43 | CODEC_INIT initialize; 44 | CODEC_SHUTDOWN shutdown; 45 | CODEC_OPEN codec_open; 46 | CODEC_READ codec_read; 47 | CODEC_REWIND codec_rewind; 48 | CODEC_JUMP codec_jump; 49 | CODEC_CLOSE codec_close; 50 | snd_codec_t *next; 51 | }; 52 | 53 | qboolean S_CodecForwardStream (snd_stream_t *stream, unsigned int type); 54 | /* Forward a stream to another codec of 'type' type. */ 55 | 56 | #endif /* _SND_CODECI_H_ */ 57 | -------------------------------------------------------------------------------- /Quake/snd_flac.h: -------------------------------------------------------------------------------- 1 | /* fLaC streaming music support. */ 2 | 3 | #if !defined(_SND_FLAC_H_) 4 | #define _SND_FLAC_H_ 1 5 | 6 | #if defined(USE_CODEC_FLAC) 7 | 8 | extern snd_codec_t flac_codec; 9 | 10 | #endif /* USE_CODEC_FLAC */ 11 | 12 | #endif /* ! _SND_FLAC_H_ */ 13 | -------------------------------------------------------------------------------- /Quake/snd_mikmod.h: -------------------------------------------------------------------------------- 1 | /* module tracker decoding support using libmikmod */ 2 | 3 | #if !defined(_SND_MIKMOD_H_) 4 | #define _SND_MIKMOD_H_ 5 | 6 | #if defined(USE_CODEC_MIKMOD) 7 | 8 | extern snd_codec_t mikmod_codec; 9 | 10 | #endif /* USE_CODEC_MIKMOD */ 11 | 12 | #endif /* ! _SND_MIKMOD_H_ */ 13 | -------------------------------------------------------------------------------- /Quake/snd_modplug.h: -------------------------------------------------------------------------------- 1 | /* module tracker decoding support using libmodplug */ 2 | #if !defined(_SND_MODPLUG_H_) 3 | #define _SND_MODPLUG_H_ 4 | 5 | #if defined(USE_CODEC_MODPLUG) 6 | 7 | extern snd_codec_t modplug_codec; 8 | 9 | #endif /* USE_CODEC_MODPLUG */ 10 | 11 | #endif /* ! _SND_MODPLUG_H_ */ 12 | -------------------------------------------------------------------------------- /Quake/snd_mp3.h: -------------------------------------------------------------------------------- 1 | /* MP3 decoding support using libmad or libmpg123. */ 2 | 3 | #if !defined(_SND_MP3_H_) 4 | #define _SND_MP3_H_ 5 | 6 | #if defined(USE_CODEC_MP3) 7 | 8 | extern snd_codec_t mp3_codec; 9 | int mp3_skiptags (snd_stream_t *); 10 | 11 | #endif /* USE_CODEC_MP3 */ 12 | 13 | #endif /* ! _SND_MP3_H_ */ 14 | -------------------------------------------------------------------------------- /Quake/snd_opus.h: -------------------------------------------------------------------------------- 1 | /* Ogg/Opus streaming music support. */ 2 | 3 | #if !defined(_SND_OPUS_H_) 4 | #define _SND_OPUS_H_ 1 5 | 6 | #if defined(USE_CODEC_OPUS) 7 | 8 | extern snd_codec_t opus_codec; 9 | 10 | #endif /* USE_CODEC_OPUS */ 11 | 12 | #endif /* ! _SND_OPUS_H_ */ 13 | -------------------------------------------------------------------------------- /Quake/snd_umx.h: -------------------------------------------------------------------------------- 1 | /* Unreal UMX format support */ 2 | #if !defined(_SND_UMX_H_) 3 | #define _SND_UMX_H_ 4 | 5 | #if defined(USE_CODEC_UMX) 6 | 7 | extern snd_codec_t umx_codec; 8 | 9 | #endif /* USE_CODEC_UMX */ 10 | 11 | #endif /* ! _SND_UMX_H_ */ 12 | -------------------------------------------------------------------------------- /Quake/snd_vorbis.h: -------------------------------------------------------------------------------- 1 | /* Ogg/Vorbis streaming music support. */ 2 | 3 | #if !defined(_SND_VORBIS_H_) 4 | #define _SND_VORBIS_H_ 1 5 | 6 | #if defined(USE_CODEC_VORBIS) 7 | 8 | extern snd_codec_t vorbis_codec; 9 | 10 | #endif /* USE_CODEC_VORBIS */ 11 | 12 | #endif /* ! _SND_VORBIS_H_ */ 13 | -------------------------------------------------------------------------------- /Quake/snd_wave.h: -------------------------------------------------------------------------------- 1 | /* WAV streaming music support. */ 2 | 3 | #if !defined(_SND_WAVE_H_) 4 | #define _SND_WAVE_H_ 5 | 6 | #if defined(USE_CODEC_WAVE) 7 | 8 | extern snd_codec_t wav_codec; 9 | 10 | #endif /* USE_CODEC_WAVE */ 11 | 12 | #endif /* ! _SND_WAVE_H_ */ 13 | -------------------------------------------------------------------------------- /Quake/snd_xmp.h: -------------------------------------------------------------------------------- 1 | /* module tracker decoding support using libxmp */ 2 | #if !defined(_SND_XMP_H_) 3 | #define _SND_XMP_H_ 4 | 5 | #if defined(USE_CODEC_XMP) 6 | 7 | extern snd_codec_t xmp_codec; 8 | 9 | #endif /* USE_CODEC_XMP */ 10 | 11 | #endif /* ! _SND_XMP_H_ */ 12 | -------------------------------------------------------------------------------- /Quake/strl_fn.h: -------------------------------------------------------------------------------- 1 | /* header file for BSD strlcat and strlcpy */ 2 | 3 | #ifndef __STRLFUNCS_H 4 | #define __STRLFUNCS_H 5 | 6 | /* use our own copies of strlcpy and strlcat taken from OpenBSD */ 7 | extern size_t q_strlcpy (char *dst, const char *src, size_t size); 8 | extern size_t q_strlcat (char *dst, const char *src, size_t size); 9 | 10 | #endif /* __STRLFUNCS_H */ 11 | -------------------------------------------------------------------------------- /Quake/strlcat.c: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 1998 Todd C. Miller 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | #include "strl_fn.h" 23 | 24 | /* 25 | * Appends src to string dst of size siz (unlike strncat, siz is the 26 | * full size of dst, not space left). At most siz-1 characters 27 | * will be copied. Always NUL terminates (unless siz <= strlen(dst)). 28 | * Returns strlen(src) + MIN(siz, strlen(initial dst)). 29 | * If retval >= siz, truncation occurred. 30 | */ 31 | 32 | size_t q_strlcat (char *dst, const char *src, size_t siz) 33 | { 34 | char *d = dst; 35 | const char *s = src; 36 | size_t n = siz; 37 | size_t dlen; 38 | 39 | /* Find the end of dst and adjust bytes left but don't go past end */ 40 | while (n-- != 0 && *d != '\0') 41 | d++; 42 | dlen = d - dst; 43 | n = siz - dlen; 44 | 45 | if (n == 0) 46 | return (dlen + strlen (s)); 47 | while (*s != '\0') 48 | { 49 | if (n != 1) 50 | { 51 | *d++ = *s; 52 | n--; 53 | } 54 | s++; 55 | } 56 | *d = '\0'; 57 | 58 | return (dlen + (s - src)); /* count does not include NUL */ 59 | } 60 | -------------------------------------------------------------------------------- /Quake/strlcpy.c: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 1998 Todd C. Miller 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | #include "strl_fn.h" 23 | 24 | /* 25 | * Copy src to string dst of size siz. At most siz-1 characters 26 | * will be copied. Always NUL terminates (unless siz == 0). 27 | * Returns strlen(src); if retval >= siz, truncation occurred. 28 | */ 29 | 30 | size_t q_strlcpy (char *dst, const char *src, size_t siz) 31 | { 32 | char *d = dst; 33 | const char *s = src; 34 | size_t n = siz; 35 | 36 | /* Copy as many bytes as will fit */ 37 | if (n != 0) 38 | { 39 | while (--n != 0) 40 | { 41 | if ((*d++ = *s++) == '\0') 42 | break; 43 | } 44 | } 45 | 46 | /* Not enough room in dst, add NUL and traverse rest of src */ 47 | if (n == 0) 48 | { 49 | if (siz != 0) 50 | *d = '\0'; /* NUL-terminate dst */ 51 | while (*s++) 52 | ; 53 | } 54 | 55 | return (s - src - 1); /* count does not include NUL */ 56 | } 57 | -------------------------------------------------------------------------------- /Quake/sys.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2010-2014 QuakeSpasm developers 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | 14 | See the GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | 20 | */ 21 | 22 | #ifndef _QUAKE_SYS_H 23 | #define _QUAKE_SYS_H 24 | 25 | // sys.h -- non-portable functions 26 | 27 | void Sys_Init (void); 28 | 29 | // 30 | // file IO 31 | // 32 | 33 | typedef int64_t qfileofs_t; 34 | 35 | int Sys_fseek (FILE *file, qfileofs_t ofs, int origin); 36 | qfileofs_t Sys_ftell (FILE *file); 37 | qfileofs_t Sys_filelength (FILE *f); 38 | 39 | // returns the file size or -1 if file is not present. 40 | // the file should be in BINARY mode for stupid OSs that care 41 | qfileofs_t Sys_FileOpenRead (const char *path, int *hndl); 42 | 43 | void Sys_MemFileOpenRead (const byte *memory, int size, int *hndl); 44 | 45 | // Returns a file handle 46 | int Sys_FileOpenWrite (const char *path); 47 | 48 | void Sys_FileClose (int handle); 49 | void Sys_FileSeek (int handle, int position); 50 | int Sys_FileRead (int handle, void *dest, int count); 51 | int Sys_FileWrite (int handle, const void *data, int count); 52 | void Sys_mkdir (const char *path); 53 | 54 | int Sys_FileType (const char *path); 55 | /* returns an FS entity type, i.e. FS_ENT_FILE or FS_ENT_DIRECTORY. 56 | * returns FS_ENT_NONE (0) if no such file or directory is present. */ 57 | 58 | // 59 | // system IO 60 | // 61 | FUNC_NORETURN void Sys_Quit (void); 62 | FUNC_NORETURN void Sys_Error (const char *error, ...) FUNC_PRINTF (1, 2); 63 | // an error will cause the entire program to exit 64 | 65 | void Sys_Printf (const char *fmt, ...) FUNC_PRINTF (1, 2); 66 | // send text to the console 67 | 68 | double Sys_DoubleTime (void); 69 | 70 | const char *Sys_ConsoleInput (void); 71 | 72 | void Sys_Sleep (unsigned long msecs); 73 | // yield for about 'msecs' milliseconds. 74 | 75 | void Sys_SendKeyEvents (void); 76 | // Perform Key_Event () callbacks until the input que is empty 77 | 78 | #endif /* _QUAKE_SYS_H */ 79 | -------------------------------------------------------------------------------- /Quake/vid.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2009 John Fitzgibbons and others 4 | Copyright (C) 2007-2008 Kristian Duske 5 | Copyright (C) 2010-2014 QuakeSpasm developers 6 | 7 | This program is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | */ 23 | 24 | #ifndef __VID_DEFS_H 25 | #define __VID_DEFS_H 26 | 27 | // vid.h -- video driver defs 28 | 29 | #define VID_CBITS 6 30 | #define VID_GRADES (1 << VID_CBITS) 31 | 32 | #define GAMMA_MAX 3.0 33 | 34 | // moved here for global use -- kristian 35 | typedef enum 36 | { 37 | MS_UNINIT, 38 | MS_WINDOWED, 39 | MS_FULLSCREEN 40 | } modestate_t; 41 | 42 | extern modestate_t modestate; 43 | 44 | // a pixel can be one, two, or four bytes 45 | typedef byte pixel_t; 46 | 47 | typedef struct vrect_s 48 | { 49 | int x, y, width, height; 50 | struct vrect_s *pnext; 51 | } vrect_t; 52 | 53 | typedef struct 54 | { 55 | pixel_t *buffer; // invisible buffer 56 | pixel_t *colormap; // 256 * VID_GRADES size 57 | unsigned short *colormap16; // 256 * VID_GRADES size 58 | int fullbright; // index of first fullbright color 59 | int rowbytes; // may be > width if displayed in a window 60 | int width; 61 | int height; 62 | float aspect; // width / height -- < 0 is taller than wide 63 | int recalc_refdef; // if true, recalc vid-based stuff 64 | pixel_t *conbuffer; 65 | int conrowbytes; 66 | int conwidth; 67 | int conheight; 68 | qboolean restart_next_frame; 69 | } viddef_t; 70 | 71 | extern viddef_t vid; // global video state 72 | 73 | extern void (*vid_menukeyfn) (int key); 74 | extern void (*vid_menucmdfn) (void); // johnfitz 75 | 76 | void VID_Init (void); // johnfitz -- removed palette from argument list 77 | 78 | void VID_Shutdown (void); 79 | // Called at shutdown 80 | 81 | void VID_Update (vrect_t *rects); 82 | // flushes the given rectangles from the view buffer to the screen 83 | 84 | void VID_SyncCvars (void); 85 | 86 | void VID_Toggle (void); 87 | 88 | void *VID_GetWindow (void); 89 | qboolean VID_HasMouseOrInputFocus (void); 90 | qboolean VID_IsMinimized (void); 91 | void VID_Lock (void); 92 | 93 | void VID_FocusGained (void); 94 | void VID_FocusLost (void); 95 | 96 | #endif /* __VID_DEFS_H */ 97 | -------------------------------------------------------------------------------- /Quake/view.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2009 John Fitzgibbons and others 4 | Copyright (C) 2010-2014 QuakeSpasm developers 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | 15 | See the GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software 19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 | 21 | */ 22 | 23 | #ifndef _QUAKE_VIEW_H 24 | #define _QUAKE_VIEW_H 25 | 26 | extern cvar_t vid_gamma; 27 | extern cvar_t vid_contrast; 28 | 29 | extern uint8_t v_blend[4]; 30 | 31 | void V_Init (void); 32 | void V_ResetBlend (void); 33 | void V_RenderView (qboolean use_tasks, task_handle_t begin_rendering_task, task_handle_t setup_frame_task, task_handle_t draw_done_task); 34 | void V_CalcBlend (void); 35 | void V_SetupFrame (void); 36 | float V_CalcRoll (vec3_t angles, vec3_t velocity); 37 | void V_RestoreAngles (void); 38 | // void V_UpdatePalette (void); //johnfitz 39 | 40 | #endif /* _QUAKE_VIEW_H */ 41 | -------------------------------------------------------------------------------- /Quake/vkquake.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Quake/vkquake.pak -------------------------------------------------------------------------------- /Quake/vkquake.pak.deflate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Quake/vkquake.pak.deflate -------------------------------------------------------------------------------- /Quake/wad.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-2001 Id Software, Inc. 3 | Copyright (C) 2002-2009 John Fitzgibbons and others 4 | Copyright (C) 2010-2014 QuakeSpasm developers 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | 15 | See the GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software 19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 | 21 | */ 22 | 23 | #ifndef _QUAKE_WAD_H 24 | #define _QUAKE_WAD_H 25 | 26 | //=============== 27 | // TYPES 28 | //=============== 29 | 30 | #define CMP_NONE 0 31 | #define CMP_LZSS 1 32 | 33 | #define TYP_NONE 0 34 | #define TYP_LABEL 1 35 | 36 | #define TYP_LUMPY 64 // 64 + grab command number 37 | #define TYP_PALETTE 64 38 | #define TYP_QTEX 65 39 | #define TYP_QPIC 66 40 | #define TYP_SOUND 67 41 | #define TYP_MIPTEX_PALETTE 67 42 | #define TYP_MIPTEX 68 43 | 44 | #define WADID ('W' | ('A' << 8) | ('D' << 16) | ('2' << 24)) 45 | #define WADID_VALVE ('W' | ('A' << 8) | ('D' << 16) | ('3' << 24)) 46 | 47 | #define WADFILENAME "gfx.wad" // johnfitz -- filename is now hard-coded for honesty 48 | 49 | typedef struct 50 | { 51 | int width, height; 52 | byte data[4]; // variably sized 53 | } qpic_t; 54 | 55 | typedef struct 56 | { 57 | char identification[4]; // should be WAD2 or 2DAW 58 | int numlumps; 59 | int infotableofs; 60 | } wadinfo_t; 61 | 62 | typedef struct 63 | { 64 | int filepos; 65 | int disksize; 66 | int size; // uncompressed 67 | char type; 68 | char compression; 69 | char pad1, pad2; 70 | char name[16]; // must be null terminated 71 | } lumpinfo_t; 72 | 73 | typedef struct wad_s 74 | { 75 | char name[MAX_QPATH]; 76 | int id; 77 | fshandle_t fh; 78 | int numlumps; 79 | lumpinfo_t *lumps; 80 | struct wad_s *next; 81 | } wad_t; 82 | 83 | extern int wad_numlumps; 84 | extern lumpinfo_t *wad_lumps; 85 | extern byte *wad_base; 86 | 87 | void W_LoadWadFile (void); // johnfitz -- filename is now hard-coded for honesty 88 | void W_CleanupName (const char *in, char *out); 89 | void *W_GetLumpName (const char *name, lumpinfo_t **out_info); 90 | 91 | wad_t *W_LoadWadList (const char *names); 92 | void W_FreeWadList (wad_t *wads); 93 | lumpinfo_t *W_GetLumpinfoList (wad_t *wads, const char *name, wad_t **out_wad); 94 | 95 | void SwapPic (qpic_t *pic); 96 | 97 | #endif /* _QUAKE_WAD_H */ 98 | -------------------------------------------------------------------------------- /Shaders/Compiled/.clang-format: -------------------------------------------------------------------------------- 1 | DisableFormat: true 2 | SortIncludes: Never 3 | -------------------------------------------------------------------------------- /Shaders/Compiled/Debug/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Shaders/Compiled/Debug/.gitkeep -------------------------------------------------------------------------------- /Shaders/Compiled/Release/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Shaders/Compiled/Release/.gitkeep -------------------------------------------------------------------------------- /Shaders/alias.frag: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_GOOGLE_include_directive : enable 5 | 6 | layout (push_constant) uniform PushConsts 7 | { 8 | mat4 mvp; 9 | vec3 fog_color; 10 | float fog_density; 11 | } 12 | push_constants; 13 | 14 | layout (set = 0, binding = 0) uniform sampler2D diffuse_tex; 15 | layout (set = 1, binding = 0) uniform sampler2D fullbright_tex; 16 | 17 | layout (set = 2, binding = 0) uniform UBO 18 | { 19 | mat4 model_matrix; 20 | vec3 shade_vector; 21 | float blend_factor; 22 | vec3 light_color; 23 | float entalpha; 24 | uint flags; 25 | } 26 | ubo; 27 | 28 | layout (location = 0) in vec2 in_texcoord; 29 | layout (location = 1) in vec4 in_color; 30 | layout (location = 2) in float in_fog_frag_coord; 31 | 32 | layout (location = 0) out vec4 out_frag_color; 33 | 34 | void main () 35 | { 36 | vec4 result = texture (diffuse_tex, in_texcoord.xy); 37 | result *= in_color * 2.0f; 38 | 39 | if ((ubo.flags & 0x1) != 0) 40 | result += texture (fullbright_tex, in_texcoord.xy); 41 | 42 | result.a = ubo.entalpha; 43 | 44 | float fog = exp (-push_constants.fog_density * push_constants.fog_density * in_fog_frag_coord * in_fog_frag_coord); 45 | fog = clamp (fog, 0.0, 1.0); 46 | result.rgb = mix (push_constants.fog_color, result.rgb, fog); 47 | 48 | out_frag_color = result; 49 | } 50 | -------------------------------------------------------------------------------- /Shaders/alias.vert: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_GOOGLE_include_directive : enable 5 | 6 | layout (push_constant) uniform PushConsts 7 | { 8 | mat4 view_projection_matrix; 9 | vec3 fog_color; 10 | float fog_density; 11 | } 12 | push_constants; 13 | 14 | layout (set = 2, binding = 0) uniform UBO 15 | { 16 | mat4 model_matrix; 17 | vec3 shade_vector; 18 | float blend_factor; 19 | vec3 light_color; 20 | float entalpha; 21 | uint flags; 22 | } 23 | ubo; 24 | 25 | layout (location = 0) in vec2 in_texcoord; 26 | layout (location = 1) in vec4 in_pose1_position; 27 | layout (location = 2) in vec3 in_pose1_normal; 28 | layout (location = 3) in vec4 in_pose2_position; 29 | layout (location = 4) in vec3 in_pose2_normal; 30 | 31 | layout (location = 0) out vec2 out_texcoord; 32 | layout (location = 1) out vec4 out_color; 33 | layout (location = 2) out float out_fog_frag_coord; 34 | 35 | out gl_PerVertex 36 | { 37 | vec4 gl_Position; 38 | }; 39 | 40 | float r_avertexnormal_dot (vec3 vertexnormal) // from MH 41 | { 42 | float dot = dot (vertexnormal, ubo.shade_vector); 43 | // wtf - this reproduces anorm_dots within as reasonable a degree of tolerance as the >= 0 case 44 | if (dot < 0.0) 45 | return 1.0 + dot * (13.0 / 44.0); 46 | else 47 | return 1.0 + dot; 48 | } 49 | 50 | void main () 51 | { 52 | out_texcoord = in_texcoord; 53 | 54 | const vec4 lerped_position = vec4 (mix (in_pose1_position.xyz, in_pose2_position.xyz, ubo.blend_factor) * 255.0f, 1.0f); 55 | const vec4 model_space_position = ubo.model_matrix * lerped_position; 56 | gl_Position = push_constants.view_projection_matrix * model_space_position; 57 | 58 | if ((ubo.flags & 0x2) == 0) 59 | { 60 | float dot1 = r_avertexnormal_dot (in_pose1_normal); 61 | float dot2 = r_avertexnormal_dot (in_pose2_normal); 62 | out_color = vec4 (ubo.light_color * mix (dot1, dot2, ubo.blend_factor), 1.0); 63 | } 64 | else 65 | out_color = vec4 (ubo.light_color, 1.0f); 66 | 67 | out_fog_frag_coord = gl_Position.w; 68 | } -------------------------------------------------------------------------------- /Shaders/alias_alphatest.frag: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_GOOGLE_include_directive : enable 5 | 6 | layout (push_constant) uniform PushConsts 7 | { 8 | mat4 mvp; 9 | vec3 fog_color; 10 | float fog_density; 11 | } 12 | push_constants; 13 | 14 | layout (set = 0, binding = 0) uniform sampler2D diffuse_tex; 15 | layout (set = 1, binding = 0) uniform sampler2D fullbright_tex; 16 | 17 | layout (set = 2, binding = 0) uniform UBO 18 | { 19 | mat4 model_matrix; 20 | vec3 shade_vector; 21 | float blend_factor; 22 | vec3 light_color; 23 | float entalpha; 24 | uint flags; 25 | } 26 | ubo; 27 | 28 | layout (location = 0) in vec2 in_texcoord; 29 | layout (location = 1) in vec4 in_color; 30 | layout (location = 2) in float in_fog_frag_coord; 31 | 32 | layout (location = 0) out vec4 out_frag_color; 33 | 34 | void main () 35 | { 36 | vec4 result = texture (diffuse_tex, in_texcoord.xy); 37 | if (result.a < 0.666f) 38 | discard; 39 | result *= in_color * 2.0f; 40 | 41 | if ((ubo.flags & 0x1) != 0) 42 | result += texture (fullbright_tex, in_texcoord.xy); 43 | 44 | result.a = ubo.entalpha; 45 | 46 | float fog = exp (-push_constants.fog_density * push_constants.fog_density * in_fog_frag_coord * in_fog_frag_coord); 47 | fog = clamp (fog, 0.0, 1.0); 48 | result.rgb = mix (push_constants.fog_color, result.rgb, fog); 49 | 50 | out_frag_color = result; 51 | } 52 | -------------------------------------------------------------------------------- /Shaders/basic.frag: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | mat4 mvp; 8 | vec3 fog_color; 9 | float fog_density; 10 | } 11 | push_constants; 12 | 13 | layout (set = 0, binding = 0) uniform sampler2D tex; 14 | 15 | layout (location = 0) in vec4 in_texcoord; 16 | layout (location = 1) in vec4 in_color; 17 | layout (location = 2) in float in_fog_frag_coord; 18 | 19 | layout (location = 0) out vec4 out_frag_color; 20 | 21 | void main () 22 | { 23 | out_frag_color = in_color * texture (tex, in_texcoord.xy); 24 | 25 | float fog = exp (-push_constants.fog_density * push_constants.fog_density * in_fog_frag_coord * in_fog_frag_coord); 26 | fog = clamp (fog, 0.0, 1.0); 27 | out_frag_color.rgb = mix (push_constants.fog_color, out_frag_color.rgb, fog); 28 | } 29 | -------------------------------------------------------------------------------- /Shaders/basic.vert: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | mat4 mvp; 8 | vec3 fog_color; 9 | float fog_density; 10 | } 11 | push_constants; 12 | 13 | layout (location = 0) in vec3 in_position; 14 | layout (location = 1) in vec2 in_texcoord; 15 | layout (location = 2) in vec4 in_color; 16 | 17 | layout (location = 0) out vec4 out_texcoord; 18 | layout (location = 1) out vec4 out_color; 19 | layout (location = 2) out float out_fog_frag_coord; 20 | 21 | out gl_PerVertex 22 | { 23 | vec4 gl_Position; 24 | }; 25 | 26 | void main () 27 | { 28 | gl_Position = push_constants.mvp * vec4 (in_position, 1.0f); 29 | out_texcoord = vec4 (in_texcoord.xy, 0.0f, 0.0f); 30 | out_color = in_color; 31 | out_fog_frag_coord = gl_Position.w; 32 | } 33 | -------------------------------------------------------------------------------- /Shaders/basic_alphatest.frag: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | mat4 mvp; 8 | vec3 fog_color; 9 | float fog_density; 10 | } 11 | push_constants; 12 | 13 | layout (set = 0, binding = 0) uniform sampler2D tex; 14 | 15 | layout (location = 0) in vec4 in_texcoord; 16 | layout (location = 1) in vec4 in_color; 17 | layout (location = 2) in float in_fog_frag_coord; 18 | 19 | layout (location = 0) out vec4 out_frag_color; 20 | 21 | void main () 22 | { 23 | out_frag_color = in_color * texture (tex, in_texcoord.xy); 24 | if (out_frag_color.a < 0.666f) 25 | discard; 26 | 27 | float fog = exp (-push_constants.fog_density * push_constants.fog_density * in_fog_frag_coord * in_fog_frag_coord); 28 | fog = clamp (fog, 0.0, 1.0); 29 | out_frag_color.rgb = mix (push_constants.fog_color, out_frag_color.rgb, fog); 30 | } 31 | -------------------------------------------------------------------------------- /Shaders/basic_notex.frag: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | mat4 mvp; 8 | vec3 fog_color; 9 | float fog_density; 10 | } 11 | push_constants; 12 | 13 | layout (location = 0) in vec4 in_texcoord; 14 | layout (location = 1) in vec4 in_color; 15 | layout (location = 2) in float in_fog_frag_coord; 16 | 17 | layout (location = 0) out vec4 out_frag_color; 18 | 19 | void main () 20 | { 21 | out_frag_color = in_color; 22 | 23 | float fog = exp (-push_constants.fog_density * push_constants.fog_density * in_fog_frag_coord * in_fog_frag_coord); 24 | fog = clamp (fog, 0.0, 1.0); 25 | out_frag_color.rgb = mix (push_constants.fog_color, out_frag_color.rgb, fog); 26 | } 27 | -------------------------------------------------------------------------------- /Shaders/bintoc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main (int argc, char **argv) 5 | { 6 | FILE *fin, *fout, *fin_compressed; 7 | char fin_deflate[1024]; 8 | unsigned long decompressed_length, n; 9 | char *c; 10 | 11 | if (argc != 4) 12 | return 0; 13 | 14 | fin = fopen (argv[1], "rb"); 15 | fout = fopen (argv[3], "w+"); 16 | 17 | if ((fin == NULL) || (fout == NULL)) 18 | { 19 | if (fin != NULL) 20 | fclose (fin); 21 | if (fout != NULL) 22 | fclose (fout); 23 | return 1; 24 | } 25 | 26 | snprintf (fin_deflate, sizeof (fin_deflate), "%s.deflate", argv[1]); 27 | decompressed_length = 0; 28 | fin_compressed = fopen (fin_deflate, "rb"); 29 | if (fin_compressed != NULL) 30 | { 31 | fseek (fin, 0, SEEK_END); 32 | decompressed_length = (unsigned long)ftell (fin); 33 | fclose (fin); 34 | fin = fin_compressed; 35 | } 36 | 37 | for (c = argv[2]; *c != 0; ++c) 38 | if (*c == '.') 39 | *c = '_'; 40 | 41 | fprintf (fout, "// clang-format off\n"); 42 | fprintf (fout, "const unsigned char %s[] = {\n", argv[2]); 43 | 44 | n = 0; 45 | while (!feof (fin)) 46 | { 47 | unsigned char ch; 48 | if (fread (&ch, 1, 1, fin) == 0) 49 | break; 50 | fprintf (fout, "0x%.2X, ", (int)ch); 51 | ++n; 52 | if (n % 10 == 0) 53 | fprintf (fout, "\n"); 54 | } 55 | 56 | fclose (fin); 57 | fprintf (fout, "};\n"); 58 | 59 | fprintf (fout, "const int %s_size = %ld;\n", argv[2], n); 60 | if (decompressed_length) 61 | fprintf (fout, "const int %s_decompressed_size = %ld;\n", argv[2], decompressed_length); 62 | fclose (fout); 63 | return 0; 64 | } 65 | -------------------------------------------------------------------------------- /Shaders/compile.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal EnableDelayedExpansion 3 | 4 | if exist "%VS170COMNTOOLS%\VsDevCmd.bat" ( 5 | call "%VS170COMNTOOLS%\VsDevCmd.bat" 6 | ) else if exist "%VS160COMNTOOLS%\VsDevCmd.bat" ( 7 | call "%VS160COMNTOOLS%\VsDevCmd.bat" 8 | ) else if exist "%VS150COMNTOOLS%\VsDevCmd.bat" ( 9 | call "%VS150COMNTOOLS%\VsDevCmd.bat" 10 | ) else if exist "%VS140COMNTOOLS%\VsDevCmd.bat" ( 11 | call "%VS140COMNTOOLS%\VsDevCmd.bat" 12 | ) else if exist "%VS120COMNTOOLS%\VsDevCmd.bat" ( 13 | call "%VS120COMNTOOLS%\VsDevCmd.bat" 14 | ) else if exist "%VS110COMNTOOLS%\VsDevCmd.bat" ( 15 | call "%VS110COMNTOOLS%\VsDevCmd.bat" 16 | ) 17 | 18 | if not exist bintoc.exe ( 19 | cl.exe /nologo bintoc.c 20 | ) 21 | 22 | for %%f in (*.vert) do ( 23 | %VULKAN_SDK%\bin\glslangValidator.exe -V %%f -o Compiled/%%~nf.vspv 24 | bintoc.exe Compiled/%%~nf.vspv %%~nf_vert_spv Compiled/%%~nf.vert.c 25 | ) 26 | 27 | for %%f in (*.frag) do ( 28 | %VULKAN_SDK%\bin\glslangValidator.exe -V %%f -o Compiled/%%~nf.fspv 29 | bintoc.exe Compiled/%%~nf.fspv %%~nf_frag_spv Compiled/%%~nf.frag.c 30 | ) 31 | 32 | for %%f in (*.comp) do ( 33 | set "file=%%f" 34 | If not "!file!"=="!file:sops=!" ( 35 | %VULKAN_SDK%\bin\glslangValidator.exe --target-env vulkan1.1 -V %%f -o Compiled/%%~nf.cspv 36 | ) else ( 37 | %VULKAN_SDK%\bin\glslangValidator.exe -V %%f -o Compiled/%%~nf.cspv 38 | ) 39 | bintoc.exe Compiled/%%~nf.cspv %%~nf_comp_spv Compiled/%%~nf.comp.c 40 | ) -------------------------------------------------------------------------------- /Shaders/compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #set your VULKAN_SDK location before running 4 | VULKAN_SDK=~/VulkanSDK/1.0.26.0/x86_64/ 5 | if [[ ! -x "./bintoc" ]] 6 | then 7 | gcc bintoc.c -o bintoc 8 | fi 9 | 10 | find -type f -name "*.vert" | \ 11 | while read f; do $VULKAN_SDK/bin/glslangValidator -V ${f} -o "Compiled/${f%.*}.vspv"; done 12 | 13 | find -type f -name "*.frag" | \ 14 | while read f; do $VULKAN_SDK/bin/glslangValidator -V ${f} -o "Compiled/${f%.*}.fspv"; done 15 | 16 | find -type f -name "*.comp" | \ 17 | while read f; do 18 | filename=${f} 19 | substring="sops" 20 | if test "${filename#*$substring}" != "$filename"; then 21 | $VULKAN_SDK/bin/glslangValidator -V ${f} --target-env vulkan1.1 -o "Compiled/${f%.*}.cspv"; 22 | else 23 | $VULKAN_SDK/bin/glslangValidator -V ${f} -o "Compiled/${f%.*}.cspv"; 24 | fi 25 | done 26 | 27 | find -type f -name "*.vspv" | \ 28 | while read f; do ./bintoc ${f} `basename ${f%.*}`_vert_spv > ${f%.*}_vert.c; done 29 | 30 | find -type f -name "*.fspv" | \ 31 | while read f; do ./bintoc ${f} `basename ${f%.*}`_frag_spv > ${f%.*}_frag.c; done 32 | 33 | find -type f -name "*.cspv" | \ 34 | while read f; do ./bintoc ${f} `basename ${f%.*}`_comp_spv > ${f%.*}_comp.c; done -------------------------------------------------------------------------------- /Shaders/cs_tex_warp.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | float time; 8 | } 9 | push_constants; 10 | 11 | layout (set = 0, binding = 0) uniform sampler2D input_tex; 12 | layout (set = 1, binding = 0, rgba8) uniform writeonly image2D output_image; 13 | 14 | // This matches the turbsin lookup table (gl_warp_sin.h) 15 | float turbsin (float t) 16 | { 17 | return 8.0f * sin (t * (3.14159f / 128.0f)); 18 | } 19 | 20 | // Copied from gl_warp.c WARPCALC 21 | float warp_calc (float s, float t) 22 | { 23 | float a = mod (((t * 2.0f) + (push_constants.time * (128.0 / 3.14159f))), 256.0f); 24 | return ((s + turbsin (a)) * (1.0f / 64.0f)); 25 | } 26 | 27 | layout (local_size_x = 8, local_size_y = 8) in; 28 | void main () 29 | { 30 | const float WARPIMAGESIZE_RCP = 1.0f / 512.0f; 31 | 32 | const float posX = float (gl_GlobalInvocationID.x) * WARPIMAGESIZE_RCP; 33 | const float posY = 1.0f - (float (gl_GlobalInvocationID.y) * WARPIMAGESIZE_RCP); 34 | 35 | const float texX = warp_calc (posX * 128.0f, posY * 128.0f); 36 | const float texY = 1.0f - warp_calc (posY * 128.0f, posX * 128.0f); 37 | 38 | vec4 value = texture (input_tex, vec2 (texX, texY)); 39 | imageStore (output_image, ivec2 (gl_GlobalInvocationID.xy), value); 40 | } 41 | -------------------------------------------------------------------------------- /Shaders/globals.inc: -------------------------------------------------------------------------------- 1 | struct world_vert_t 2 | { 3 | float x; 4 | float y; 5 | float z; 6 | float u; 7 | float v; 8 | float s; 9 | float t; 10 | }; 11 | 12 | struct surface_t 13 | { 14 | uint packed_lightstyles; 15 | float normal_x; 16 | float normal_y; 17 | float normal_z; 18 | float dist; 19 | uint packed_light_st; 20 | uint packed_tex_edgecount; 21 | uint vbo_offset; 22 | vec4 vecs[2]; 23 | }; 24 | 25 | struct draw_indirect_command_t 26 | { 27 | uint indexCount; 28 | uint instanceCount; 29 | uint firstIndex; 30 | int vertexOffset; 31 | uint firstInstance; 32 | }; 33 | -------------------------------------------------------------------------------- /Shaders/indirect.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_GOOGLE_include_directive : enable 5 | 6 | #include "globals.inc" 7 | 8 | layout (push_constant) uniform PushConsts 9 | { 10 | uint num_draws; 11 | uint first_draw; 12 | uint visibility_offset; 13 | float vieworg_x; 14 | float vieworg_y; 15 | float vieworg_z; 16 | } 17 | push_constants; 18 | 19 | layout (std430, set = 0, binding = 0) restrict buffer indirect_draw_buffer 20 | { 21 | draw_indirect_command_t indirect_draw_data[]; 22 | }; 23 | layout (std430, set = 0, binding = 1) restrict readonly buffer surfaces_buffer 24 | { 25 | surface_t surfaces[]; 26 | }; 27 | layout (std430, set = 0, binding = 2) restrict readonly buffer visibility_buffer 28 | { 29 | uint visibility[]; 30 | }; 31 | layout (std430, set = 0, binding = 3) restrict buffer ib 32 | { 33 | uint indices[]; 34 | }; 35 | 36 | uint R_NumTriangleIndicesForSurf (uint edges) 37 | { 38 | return 3 * (edges - 2); 39 | } 40 | 41 | void R_TriangleIndicesForSurf (uint firstvert, uint numedges, uint dest) 42 | { 43 | int i; 44 | for (i = 2; i < numedges; i++) 45 | { 46 | indices[dest++] = firstvert; 47 | indices[dest++] = firstvert + i - 1; 48 | indices[dest++] = firstvert + i; 49 | } 50 | } 51 | 52 | layout (local_size_x = 64, local_size_y = 1) in; 53 | void main () 54 | { 55 | const uint surf = gl_GlobalInvocationID.x + push_constants.first_draw; 56 | if (surf >= push_constants.num_draws) 57 | return; 58 | 59 | const uint vis_word = visibility[push_constants.visibility_offset + surf / 32]; 60 | const uint vis_mask = 1 << (surf % 32); 61 | if ((vis_word & vis_mask) == 0) 62 | return; 63 | 64 | const vec3 surf_normal = vec3 (surfaces[surf].normal_x, surfaces[surf].normal_y, surfaces[surf].normal_z); 65 | const vec3 vieworg = vec3 (push_constants.vieworg_x, push_constants.vieworg_y, push_constants.vieworg_z); 66 | const float dist = surfaces[surf].dist; 67 | const float dp = dot (surf_normal, vieworg); 68 | const bool backface = (surfaces[surf].packed_tex_edgecount & 0x8000) != 0; 69 | if (backface && dp > dist || !backface && dp < dist) 70 | return; 71 | 72 | const uint tex_idx = surfaces[surf].packed_tex_edgecount & 0x7FFF; 73 | const uint numedges = surfaces[surf].packed_tex_edgecount >> 16; 74 | const uint firstvert = surfaces[surf].vbo_offset; 75 | const uint indexcount = R_NumTriangleIndicesForSurf (numedges); 76 | const uint dest = indirect_draw_data[tex_idx].firstIndex + atomicAdd (indirect_draw_data[tex_idx].indexCount, indexcount); 77 | R_TriangleIndicesForSurf (firstvert, numedges, dest); 78 | } 79 | -------------------------------------------------------------------------------- /Shaders/indirect_clear.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | int num_draws; 8 | } 9 | push_constants; 10 | 11 | struct VkDrawIndexedIndirectCommand_t 12 | { 13 | uint indexCount; 14 | uint instanceCount; 15 | uint firstIndex; 16 | int vertexOffset; 17 | uint firstInstance; 18 | }; 19 | 20 | layout (std430, set = 0, binding = 0) restrict buffer indirect_draw_buffer 21 | { 22 | VkDrawIndexedIndirectCommand_t indirect_draw_data[]; 23 | }; 24 | 25 | layout (local_size_x = 64, local_size_y = 1) in; 26 | void main () 27 | { 28 | if (gl_GlobalInvocationID.x < push_constants.num_draws) 29 | indirect_draw_data[gl_GlobalInvocationID.x].indexCount = 0; 30 | } 31 | -------------------------------------------------------------------------------- /Shaders/postprocess.frag: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | float gamma; 8 | float contrast; 9 | } 10 | push_constants; 11 | 12 | layout (input_attachment_index = 0, set = 0, binding = 0) uniform subpassInput color_input; 13 | 14 | layout (location = 0) out vec4 out_frag_color; 15 | 16 | void main () 17 | { 18 | vec3 frag = subpassLoad (color_input).rgb; 19 | frag.rgb = frag.rgb * push_constants.contrast; 20 | out_frag_color = vec4 (pow (frag, vec3 (push_constants.gamma)), 1.0); 21 | } 22 | -------------------------------------------------------------------------------- /Shaders/postprocess.vert: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | out gl_PerVertex 6 | { 7 | vec4 gl_Position; 8 | }; 9 | 10 | void main () 11 | { 12 | vec4 positions[3] = {vec4 (-1.0f, -1.0f, 0.0f, 1.0f), vec4 (3.0f, -1.0f, 0.0f, 1.0f), vec4 (-1.0f, 3.0f, 0.0f, 1.0f)}; 13 | 14 | gl_Position = positions[gl_VertexIndex % 3]; 15 | } 16 | -------------------------------------------------------------------------------- /Shaders/ray_debug.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_EXT_ray_query : enable 5 | 6 | layout (set = 0, binding = 0, rgb10_a2) uniform writeonly image2D output_image; 7 | layout (set = 0, binding = 1) uniform accelerationStructureEXT tlas; 8 | 9 | layout (push_constant) uniform PushConsts 10 | { 11 | vec2 screen_size_rcp; 12 | float aspect_ratio; 13 | float origin_x; 14 | float origin_y; 15 | float origin_z; 16 | float forward_x; 17 | float forward_y; 18 | float forward_z; 19 | float right_x; 20 | float right_y; 21 | float right_z; 22 | float down_x; 23 | float down_y; 24 | float down_z; 25 | } 26 | push_constants; 27 | 28 | layout (local_size_x = 8, local_size_y = 8) in; 29 | void main () 30 | { 31 | vec4 color = vec4 (0.0f, 0.0f, 0.0f, 0.0f); 32 | 33 | const uint pos_x = gl_GlobalInvocationID.x; 34 | const uint pos_y = gl_GlobalInvocationID.y; 35 | const float pos_x_unit = ((float (pos_x) * push_constants.screen_size_rcp.x) * 2.0f) - 1.0f; 36 | const float pos_y_unit = ((float (pos_y) * push_constants.screen_size_rcp.y) * 2.0f) - 1.0f; 37 | const vec3 origin = vec3 (push_constants.origin_x, push_constants.origin_y, push_constants.origin_z); 38 | const vec3 forward = vec3 (push_constants.forward_x, push_constants.forward_y, push_constants.forward_z); 39 | const vec3 right = vec3 (push_constants.right_x, push_constants.right_y, push_constants.right_z) * push_constants.aspect_ratio; 40 | const vec3 down = vec3 (push_constants.down_x, push_constants.down_y, push_constants.down_z); 41 | const vec3 direction = normalize (forward + (right * pos_x_unit) + (down * pos_y_unit)); 42 | 43 | float depth = 1e30f; 44 | rayQueryEXT ray_query; 45 | rayQueryInitializeEXT (ray_query, tlas, gl_RayFlagsOpaqueEXT, 0xFF, origin, 1e-3f, direction, 1e30f); 46 | 47 | while (rayQueryProceedEXT (ray_query)) 48 | { 49 | } 50 | if (rayQueryGetIntersectionTypeEXT (ray_query, true) == gl_RayQueryCommittedIntersectionTriangleEXT) 51 | { 52 | depth = rayQueryGetIntersectionTEXT (ray_query, true); 53 | color.rgb = vec3 (pow (depth, 0.3f) / 50.0f); 54 | } 55 | else 56 | color.rgb = vec3 (0.0f, 0.0f, 1.0f); 57 | 58 | imageStore (output_image, ivec2 (pos_x, pos_y), color); 59 | } 60 | -------------------------------------------------------------------------------- /Shaders/screen_effects_10bit.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_GOOGLE_include_directive : enable 5 | 6 | layout (set = 0, binding = 2, rgb10_a2) uniform writeonly image2D output_image; 7 | 8 | #include "screen_effects.inc" 9 | -------------------------------------------------------------------------------- /Shaders/screen_effects_10bit_scale.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_GOOGLE_include_directive : enable 5 | 6 | layout (set = 0, binding = 2, rgb10_a2) uniform writeonly image2D output_image; 7 | 8 | #define SCALING 9 | #include "screen_effects.inc" 10 | -------------------------------------------------------------------------------- /Shaders/screen_effects_10bit_scale_sops.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_GOOGLE_include_directive : enable 5 | #extension GL_KHR_shader_subgroup_shuffle : enable 6 | 7 | layout (set = 0, binding = 2, rgb10_a2) uniform writeonly image2D output_image; 8 | 9 | #define SCALING 10 | #define USE_SUBGROUP_OPS 11 | #include "screen_effects.inc" 12 | -------------------------------------------------------------------------------- /Shaders/screen_effects_8bit.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_GOOGLE_include_directive : enable 5 | 6 | layout (set = 0, binding = 2, rgba8) uniform writeonly image2D output_image; 7 | 8 | #include "screen_effects.inc" 9 | -------------------------------------------------------------------------------- /Shaders/screen_effects_8bit_scale.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_GOOGLE_include_directive : enable 5 | 6 | layout (set = 0, binding = 2, rgba8) uniform writeonly image2D output_image; 7 | 8 | #define SCALING 9 | #include "screen_effects.inc" 10 | -------------------------------------------------------------------------------- /Shaders/screen_effects_8bit_scale_sops.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_GOOGLE_include_directive : enable 5 | #extension GL_KHR_shader_subgroup_shuffle : enable 6 | 7 | layout (set = 0, binding = 2, rgba8) uniform writeonly image2D output_image; 8 | 9 | #define SCALING 10 | #define USE_SUBGROUP_OPS 11 | #include "screen_effects.inc" 12 | -------------------------------------------------------------------------------- /Shaders/shaders.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2016 Axel Gneiting 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | #ifndef __SHADERS_H 22 | #define __SHADERS_H 23 | 24 | #define DECLARE_SHADER_SPV(name) \ 25 | extern const unsigned char name##_spv[]; \ 26 | extern const int name##_spv_size; 27 | 28 | DECLARE_SHADER_SPV (basic_vert); 29 | DECLARE_SHADER_SPV (basic_frag); 30 | DECLARE_SHADER_SPV (basic_alphatest_frag); 31 | DECLARE_SHADER_SPV (basic_notex_frag); 32 | DECLARE_SHADER_SPV (world_vert); 33 | DECLARE_SHADER_SPV (world_frag); 34 | DECLARE_SHADER_SPV (alias_vert); 35 | DECLARE_SHADER_SPV (alias_frag); 36 | DECLARE_SHADER_SPV (alias_alphatest_frag); 37 | DECLARE_SHADER_SPV (md5_vert); 38 | DECLARE_SHADER_SPV (sky_layer_vert); 39 | DECLARE_SHADER_SPV (sky_layer_frag); 40 | DECLARE_SHADER_SPV (sky_box_frag); 41 | DECLARE_SHADER_SPV (sky_cube_vert); 42 | DECLARE_SHADER_SPV (sky_cube_frag); 43 | DECLARE_SHADER_SPV (postprocess_vert); 44 | DECLARE_SHADER_SPV (postprocess_frag); 45 | DECLARE_SHADER_SPV (screen_effects_8bit_comp); 46 | DECLARE_SHADER_SPV (screen_effects_8bit_scale_comp); 47 | DECLARE_SHADER_SPV (screen_effects_8bit_scale_sops_comp); 48 | DECLARE_SHADER_SPV (screen_effects_10bit_comp); 49 | DECLARE_SHADER_SPV (screen_effects_10bit_scale_comp); 50 | DECLARE_SHADER_SPV (screen_effects_10bit_scale_sops_comp); 51 | DECLARE_SHADER_SPV (cs_tex_warp_comp); 52 | DECLARE_SHADER_SPV (indirect_comp); 53 | DECLARE_SHADER_SPV (indirect_clear_comp); 54 | DECLARE_SHADER_SPV (showtris_vert); 55 | DECLARE_SHADER_SPV (showtris_frag); 56 | DECLARE_SHADER_SPV (update_lightmap_8bit_comp); 57 | DECLARE_SHADER_SPV (update_lightmap_8bit_rt_comp); 58 | DECLARE_SHADER_SPV (update_lightmap_10bit_comp); 59 | DECLARE_SHADER_SPV (update_lightmap_10bit_rt_comp); 60 | DECLARE_SHADER_SPV (ray_debug_comp); 61 | 62 | #undef DECLARE_SHADER_SPV 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /Shaders/showtris.frag: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (location = 0) out vec4 out_frag_color; 6 | 7 | void main () 8 | { 9 | out_frag_color = vec4 (1.0f, 1.0f, 1.0f, 0.0f); 10 | } 11 | -------------------------------------------------------------------------------- /Shaders/showtris.vert: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | mat4 mvp; 8 | } 9 | push_constants; 10 | 11 | layout (location = 0) in vec3 in_position; 12 | 13 | out gl_PerVertex 14 | { 15 | vec4 gl_Position; 16 | }; 17 | 18 | void main () 19 | { 20 | gl_Position = push_constants.mvp * vec4 (in_position, 1.0f); 21 | } 22 | -------------------------------------------------------------------------------- /Shaders/sky_box.frag: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | mat4 mvp; 8 | vec3 fog_color; 9 | float fog_density; 10 | } 11 | push_constants; 12 | 13 | layout (set = 0, binding = 0) uniform sampler2D tex; 14 | 15 | layout (location = 0) in vec4 in_texcoord; 16 | layout (location = 1) in vec4 in_color; 17 | layout (location = 2) in float in_fog_frag_coord; 18 | 19 | layout (location = 0) out vec4 out_frag_color; 20 | 21 | void main () 22 | { 23 | out_frag_color = in_color * texture (tex, in_texcoord.xy); 24 | if (push_constants.fog_density > 0.0f) 25 | out_frag_color.rgb = (out_frag_color.rgb * (1.0f - push_constants.fog_density)) + (push_constants.fog_color * push_constants.fog_density); 26 | } 27 | -------------------------------------------------------------------------------- /Shaders/sky_cube.frag: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | mat4 mvp; 8 | vec3 fog_color; 9 | float fog_density; 10 | } 11 | push_constants; 12 | 13 | layout (set = 0, binding = 0) uniform samplerCube tex; 14 | 15 | layout (location = 0) in vec4 in_texcoord; 16 | 17 | layout (location = 0) out vec4 out_frag_color; 18 | 19 | void main () 20 | { 21 | out_frag_color = texture (tex, in_texcoord.xyz); 22 | if (push_constants.fog_density > 0.0f) 23 | out_frag_color.rgb = (out_frag_color.rgb * (1.0f - push_constants.fog_density)) + (push_constants.fog_color * push_constants.fog_density); 24 | } 25 | -------------------------------------------------------------------------------- /Shaders/sky_cube.vert: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | mat4 mvp; 8 | vec3 fog_color; 9 | float fog_density; 10 | vec3 eye_pos; 11 | } 12 | push_constants; 13 | 14 | layout (location = 0) in vec3 in_position; 15 | 16 | layout (location = 0) out vec4 out_texcoord; 17 | 18 | out gl_PerVertex 19 | { 20 | vec4 gl_Position; 21 | }; 22 | 23 | void main () 24 | { 25 | gl_Position = push_constants.mvp * vec4 (in_position, 1.0f); 26 | vec3 texcoord = in_position - push_constants.eye_pos; 27 | out_texcoord = vec4 (-texcoord.y, texcoord.z, texcoord.x, 0.0f); 28 | } 29 | -------------------------------------------------------------------------------- /Shaders/sky_layer.frag: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | mat4 mvp; 8 | vec3 fog_color; 9 | float fog_density; 10 | vec3 eye_pos; 11 | float time; 12 | float alpha; 13 | } 14 | push_constants; 15 | 16 | layout (set = 0, binding = 0) uniform sampler2D solid_tex; 17 | layout (set = 1, binding = 0) uniform sampler2D alpha_tex; 18 | 19 | layout (location = 0) in vec4 in_texcoord; 20 | 21 | layout (location = 0) out vec4 out_frag_color; 22 | 23 | void main () 24 | { 25 | vec2 uv = normalize (in_texcoord).xy * (189.0 / 64.0); 26 | 27 | vec4 solid_layer = texture (solid_tex, uv + push_constants.time / 16.0f); 28 | vec4 alpha_layer = texture (alpha_tex, uv + push_constants.time / 8.0f); 29 | 30 | alpha_layer.a *= push_constants.alpha; 31 | out_frag_color = vec4 ((solid_layer.rgb * (1.0f - alpha_layer.a) + alpha_layer.rgb * alpha_layer.a), 1.0f); 32 | 33 | if (push_constants.fog_density > 0.0f) 34 | out_frag_color.rgb = (out_frag_color.rgb * (1.0f - push_constants.fog_density)) + (push_constants.fog_color * push_constants.fog_density); 35 | } 36 | -------------------------------------------------------------------------------- /Shaders/sky_layer.vert: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | mat4 mvp; 8 | vec3 fog_color; 9 | float fog_density; 10 | vec3 eye_pos; 11 | } 12 | push_constants; 13 | 14 | layout (location = 0) in vec3 in_position; 15 | 16 | layout (location = 0) out vec4 out_texcoord; 17 | 18 | out gl_PerVertex 19 | { 20 | vec4 gl_Position; 21 | }; 22 | 23 | void main () 24 | { 25 | gl_Position = push_constants.mvp * vec4 (in_position, 1.0f); 26 | out_texcoord = vec4 (in_position - push_constants.eye_pos, 0.0f); 27 | out_texcoord.z *= 3.0; // flatten the sphere 28 | } 29 | -------------------------------------------------------------------------------- /Shaders/update_lightmap_10bit.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_EXT_samplerless_texture_functions : enable 5 | #extension GL_GOOGLE_include_directive : enable 6 | #extension GL_EXT_debug_printf : enable 7 | 8 | layout (set = 0, binding = 0, rgb10_a2) uniform writeonly image2D output_image; 9 | 10 | #include "update_lightmap.inc" 11 | -------------------------------------------------------------------------------- /Shaders/update_lightmap_10bit_rt.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_EXT_samplerless_texture_functions : enable 5 | #extension GL_GOOGLE_include_directive : enable 6 | #extension GL_EXT_ray_query : enable 7 | // #define DEBUG 8 | #ifdef DEBUG 9 | #extension GL_EXT_debug_printf : enable 10 | #endif 11 | 12 | #define RAY_QUERIES 13 | 14 | layout (set = 0, binding = 0, rgb10_a2) uniform writeonly image2D output_image; 15 | 16 | #include "update_lightmap.inc" 17 | -------------------------------------------------------------------------------- /Shaders/update_lightmap_8bit.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_EXT_samplerless_texture_functions : enable 5 | #extension GL_GOOGLE_include_directive : enable 6 | #extension GL_EXT_debug_printf : enable 7 | 8 | layout (set = 0, binding = 0, rgba8) uniform writeonly image2D output_image; 9 | 10 | #include "update_lightmap.inc" 11 | -------------------------------------------------------------------------------- /Shaders/update_lightmap_8bit_rt.comp: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | #extension GL_EXT_samplerless_texture_functions : enable 5 | #extension GL_GOOGLE_include_directive : enable 6 | #extension GL_EXT_ray_query : enable 7 | // #define DEBUG 8 | #ifdef DEBUG 9 | #extension GL_EXT_debug_printf : enable 10 | #endif 11 | 12 | #define RAY_QUERIES 13 | 14 | layout (set = 0, binding = 0, rgba8) uniform writeonly image2D output_image; 15 | 16 | #include "update_lightmap.inc" 17 | -------------------------------------------------------------------------------- /Shaders/world.frag: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | // keep in sync with glquake.h 6 | #define LMBLOCK_WIDTH 1024 7 | #define LMBLOCK_HEIGHT 1024 8 | 9 | layout (push_constant) uniform PushConsts 10 | { 11 | mat4 mvp; 12 | vec3 fog_color; 13 | float fog_density; 14 | float alpha; 15 | } 16 | push_constants; 17 | 18 | layout (set = 0, binding = 0) uniform sampler2D diffuse_tex; 19 | layout (set = 1, binding = 0) uniform sampler2D lightmap_tex; 20 | layout (set = 2, binding = 0) uniform sampler2D fullbright_tex; 21 | 22 | layout (location = 0) in vec4 in_texcoords; 23 | layout (location = 1) in float in_fog_frag_coord; 24 | 25 | layout (location = 0) out vec4 out_frag_color; 26 | 27 | layout (constant_id = 0) const bool use_fullbright = false; 28 | layout (constant_id = 1) const bool use_alpha_test = false; 29 | layout (constant_id = 2) const bool use_alpha_blend = false; 30 | layout (constant_id = 3) const bool quantize_lm = false; 31 | layout (constant_id = 4) const bool scaled_lm = false; 32 | 33 | void main () 34 | { 35 | vec4 diffuse = texture (diffuse_tex, in_texcoords.xy); 36 | if (use_alpha_test && diffuse.a < 0.666f) 37 | discard; 38 | 39 | float lm_multiplier = scaled_lm ? 8.0f : 2.0f; 40 | vec3 light; 41 | 42 | if (quantize_lm) 43 | { 44 | ivec2 lm_size = ivec2 (LMBLOCK_WIDTH, LMBLOCK_HEIGHT); 45 | vec2 uv_exp = (floor ((lm_size * 16) * in_texcoords.zw) + 0.5) / (lm_size * 16); 46 | light = texture (lightmap_tex, uv_exp).rgb * lm_multiplier; 47 | } 48 | else 49 | light = texture (lightmap_tex, in_texcoords.zw).rgb * lm_multiplier; 50 | 51 | out_frag_color.rgb = diffuse.rgb * light.rgb; 52 | 53 | if (use_fullbright) 54 | { 55 | vec3 fullbright = texture (fullbright_tex, in_texcoords.xy).rgb; 56 | out_frag_color.rgb += fullbright; 57 | } 58 | 59 | float fog = exp (-push_constants.fog_density * push_constants.fog_density * in_fog_frag_coord * in_fog_frag_coord); 60 | fog = clamp (fog, 0.0, 1.0); 61 | out_frag_color.rgb = mix (push_constants.fog_color, out_frag_color.rgb, fog); 62 | 63 | if (use_alpha_blend) 64 | out_frag_color.a = push_constants.alpha; 65 | } 66 | -------------------------------------------------------------------------------- /Shaders/world.vert: -------------------------------------------------------------------------------- 1 | #version 460 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | 5 | layout (push_constant) uniform PushConsts 6 | { 7 | mat4 mvp; 8 | vec3 fog_color; 9 | float fog_density; 10 | } 11 | push_constants; 12 | 13 | layout (location = 0) in vec3 in_position; 14 | layout (location = 1) in vec2 in_texcoord1; 15 | layout (location = 2) in vec2 in_texcoord2; 16 | 17 | layout (location = 0) out vec4 out_texcoords; 18 | layout (location = 1) out float out_fog_frag_coord; 19 | 20 | out gl_PerVertex 21 | { 22 | vec4 gl_Position; 23 | }; 24 | 25 | void main () 26 | { 27 | out_texcoords.xy = in_texcoord1.xy; 28 | out_texcoords.zw = in_texcoord2.xy; 29 | gl_Position = push_constants.mvp * vec4 (in_position, 1.0f); 30 | 31 | out_fog_frag_coord = gl_Position.w; 32 | } 33 | -------------------------------------------------------------------------------- /Windows/.clang-format: -------------------------------------------------------------------------------- 1 | DisableFormat: true 2 | SortIncludes: Never 3 | -------------------------------------------------------------------------------- /Windows/QuakeSpasm-old.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/QuakeSpasm-old.ico -------------------------------------------------------------------------------- /Windows/SDL2/BUGS.txt: -------------------------------------------------------------------------------- 1 | 2 | Bugs are now managed in the SDL issue tracker, here: 3 | 4 | https://github.com/libsdl-org/SDL/issues 5 | 6 | You may report bugs there, and search to see if a given issue has already 7 | been reported, discussed, and maybe even fixed. 8 | 9 | 10 | You may also find help at the SDL forums/mailing list: 11 | 12 | https://discourse.libsdl.org/ 13 | 14 | Bug reports are welcome here, but we really appreciate if you use the issue 15 | tracker, as bugs discussed on the mailing list may be forgotten or missed. 16 | 17 | -------------------------------------------------------------------------------- /Windows/SDL2/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 1997-2024 Sam Lantinga 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | 19 | -------------------------------------------------------------------------------- /Windows/SDL2/README-SDL.txt: -------------------------------------------------------------------------------- 1 | 2 | Please distribute this file with the SDL runtime environment: 3 | 4 | The Simple DirectMedia Layer (SDL for short) is a cross-platform library 5 | designed to make it easy to write multi-media software, such as games 6 | and emulators. 7 | 8 | The Simple DirectMedia Layer library source code is available from: 9 | https://www.libsdl.org/ 10 | 11 | This library is distributed under the terms of the zlib license: 12 | http://www.zlib.net/zlib_license.html 13 | 14 | -------------------------------------------------------------------------------- /Windows/SDL2/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Simple DirectMedia Layer (SDL) Version 2.0 3 | 4 | https://www.libsdl.org/ 5 | 6 | Simple DirectMedia Layer is a cross-platform development library designed 7 | to provide low level access to audio, keyboard, mouse, joystick, and graphics 8 | hardware via OpenGL and Direct3D. It is used by video playback software, 9 | emulators, and popular games including Valve's award winning catalog 10 | and many Humble Bundle games. 11 | 12 | More extensive documentation is available in the docs directory, starting 13 | with README.md 14 | 15 | Enjoy! 16 | 17 | Sam Lantinga (slouken@libsdl.org) 18 | -------------------------------------------------------------------------------- /Windows/SDL2/bin/sdl2-config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | prefix=/opt/cross_sdl2 4 | exec_prefix=${prefix} 5 | exec_prefix_set=no 6 | lib_suffix= 7 | usage="\ 8 | Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--lib-suffix=SUFFIX] [--libs]" 9 | 10 | if test $# -eq 0; then 11 | echo "${usage}" 1>&2 12 | exit 1 13 | fi 14 | 15 | while test $# -gt 0; do 16 | case "$1" in 17 | -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 18 | *) optarg= ;; 19 | esac 20 | 21 | case $1 in 22 | --prefix=*) 23 | prefix=$optarg 24 | if test $exec_prefix_set = no ; then 25 | exec_prefix=$optarg 26 | fi 27 | ;; 28 | --prefix) 29 | echo $prefix 30 | ;; 31 | --exec-prefix=*) 32 | exec_prefix=$optarg 33 | exec_prefix_set=yes 34 | ;; 35 | --exec-prefix) 36 | echo $exec_prefix 37 | ;; 38 | --lib-suffix=*) 39 | lib_suffix=$optarg 40 | ;; 41 | --version) 42 | echo 2.32.4 43 | ;; 44 | --cflags) 45 | echo -I${prefix}/include -Dmain=SDL_main 46 | ;; 47 | --libs) 48 | echo -L${exec_prefix}/lib${lib_suffix} -lmingw32 -lSDL2main -lSDL2 -mwindows 49 | ;; 50 | *) 51 | echo "${usage}" 1>&2 52 | exit 1 53 | ;; 54 | esac 55 | shift 56 | done 57 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_config_h_ 23 | #define SDL_config_h_ 24 | 25 | #include "SDL_platform.h" 26 | 27 | /* WIKI CATEGORY: - */ 28 | 29 | /* Add any platform that doesn't build using the configure system. */ 30 | #if defined(__WIN32__) 31 | #include "SDL_config_windows.h" 32 | #elif defined(__WINRT__) 33 | #include "SDL_config_winrt.h" 34 | #elif defined(__WINGDK__) 35 | #include "SDL_config_wingdk.h" 36 | #elif defined(__XBOXONE__) || defined(__XBOXSERIES__) 37 | #include "SDL_config_xbox.h" 38 | #elif defined(__MACOSX__) 39 | #include "SDL_config_macosx.h" 40 | #elif defined(__IPHONEOS__) 41 | #include "SDL_config_iphoneos.h" 42 | #elif defined(__ANDROID__) 43 | #include "SDL_config_android.h" 44 | #elif defined(__OS2__) 45 | #include "SDL_config_os2.h" 46 | #elif defined(__EMSCRIPTEN__) 47 | #include "SDL_config_emscripten.h" 48 | #elif defined(__NGAGE__) 49 | #include "SDL_config_ngage.h" 50 | #else 51 | /* This is a minimal configuration just to get SDL running on new platforms. */ 52 | #include "SDL_config_minimal.h" 53 | #endif /* platform config */ 54 | 55 | #ifdef USING_GENERATED_CONFIG_H 56 | #error Wrong SDL_config.h, check your include path? 57 | #endif 58 | 59 | #endif /* SDL_config_h_ */ 60 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_name.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDLname_h_ 23 | #define SDLname_h_ 24 | 25 | #if defined(__STDC__) || defined(__cplusplus) 26 | #define NeedFunctionPrototypes 1 27 | #endif 28 | 29 | #define SDL_NAME(X) SDL_##X 30 | 31 | #endif /* SDLname_h_ */ 32 | 33 | /* vi: set ts=4 sw=4 expandtab: */ 34 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_opengles.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* 23 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers. 24 | */ 25 | 26 | #include "SDL_config.h" 27 | 28 | #ifdef __IPHONEOS__ 29 | #include 30 | #include 31 | #else 32 | #include 33 | #include 34 | #endif 35 | 36 | #ifndef APIENTRY 37 | #define APIENTRY 38 | #endif 39 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_opengles2.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* 23 | * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. 24 | */ 25 | 26 | #include "SDL_config.h" 27 | 28 | #if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS) 29 | 30 | #ifdef __IPHONEOS__ 31 | #include 32 | #include 33 | #else 34 | #include 35 | #include 36 | #include 37 | #endif 38 | 39 | #else /* _MSC_VER */ 40 | 41 | /* OpenGL ES2 headers for Visual Studio */ 42 | #include "SDL_opengles2_khrplatform.h" 43 | #include "SDL_opengles2_gl2platform.h" 44 | #include "SDL_opengles2_gl2.h" 45 | #include "SDL_opengles2_gl2ext.h" 46 | 47 | #endif /* _MSC_VER */ 48 | 49 | #ifndef APIENTRY 50 | #define APIENTRY GL_APIENTRY 51 | #endif 52 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_opengles2_gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* 5 | ** Copyright 2017-2020 The Khronos Group Inc. 6 | ** SPDX-License-Identifier: Apache-2.0 7 | */ 8 | 9 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 10 | * 11 | * Adopters may modify khrplatform.h and this file to suit their platform. 12 | * Please contribute modifications back to Khronos as pull requests on the 13 | * public github repository: 14 | * https://github.com/KhronosGroup/OpenGL-Registry 15 | */ 16 | 17 | /*#include */ 18 | 19 | #ifndef GL_APICALL 20 | #define GL_APICALL KHRONOS_APICALL 21 | #endif 22 | 23 | #ifndef GL_APIENTRY 24 | #define GL_APIENTRY KHRONOS_APIENTRY 25 | #endif 26 | 27 | #endif /* __gl2platform_h_ */ 28 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_quit.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * # CategoryQuit 24 | * 25 | * An SDL_QUIT event is generated when the user tries to close the application 26 | * window. If it is ignored or filtered out, the window will remain open. If 27 | * it is not ignored or filtered, it is queued normally and the window is 28 | * allowed to close. When the window is closed, screen updates will complete, 29 | * but have no effect. 30 | * 31 | * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) and 32 | * SIGTERM (system termination request), if handlers do not already exist, 33 | * that generate SDL_QUIT events as well. There is no way to determine the 34 | * cause of an SDL_QUIT event, but setting a signal handler in your 35 | * application will override the default generation of quit events for that 36 | * signal. 37 | */ 38 | 39 | #ifndef SDL_quit_h_ 40 | #define SDL_quit_h_ 41 | 42 | #include "SDL_stdinc.h" 43 | #include "SDL_error.h" 44 | 45 | /* There are no functions directly affecting the quit event */ 46 | 47 | #define SDL_QuitRequested() \ 48 | (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0)) 49 | 50 | #endif /* SDL_quit_h_ */ 51 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_revision.h: -------------------------------------------------------------------------------- 1 | /* Generated by updaterev.sh, do not edit */ 2 | #ifdef SDL_VENDOR_INFO 3 | #define SDL_REVISION "SDL-release-2.32.4-0-g2359383fc (" SDL_VENDOR_INFO ")" 4 | #else 5 | #define SDL_REVISION "SDL-release-2.32.4-0-g2359383fc" 6 | #endif 7 | #define SDL_REVISION_NUMBER 0 8 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* DEPRECATED */ 23 | 24 | #include "SDL_stdinc.h" 25 | -------------------------------------------------------------------------------- /Windows/SDL2/include/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file close_code.h 24 | * 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #ifndef SDL_begin_code_h 30 | #error close_code.h included without matching begin_code.h 31 | #endif 32 | #undef SDL_begin_code_h 33 | 34 | /* Reset structure packing at previous byte alignment */ 35 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) 36 | #ifdef __BORLANDC__ 37 | #pragma nopackwarning 38 | #endif 39 | #pragma pack(pop) 40 | #endif /* Compiler needs structure packing set */ 41 | -------------------------------------------------------------------------------- /Windows/SDL2/lib/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/SDL2/lib/SDL2.dll -------------------------------------------------------------------------------- /Windows/SDL2/lib/SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/SDL2/lib/SDL2.lib -------------------------------------------------------------------------------- /Windows/SDL2/lib/SDL2main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/SDL2/lib/SDL2main.lib -------------------------------------------------------------------------------- /Windows/SDL2/lib/libSDL2.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/SDL2/lib/libSDL2.dll.a -------------------------------------------------------------------------------- /Windows/SDL2/lib/libSDL2main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/SDL2/lib/libSDL2main.a -------------------------------------------------------------------------------- /Windows/SDL2/lib64/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/SDL2/lib64/SDL2.dll -------------------------------------------------------------------------------- /Windows/SDL2/lib64/SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/SDL2/lib64/SDL2.lib -------------------------------------------------------------------------------- /Windows/SDL2/lib64/SDL2main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/SDL2/lib64/SDL2main.lib -------------------------------------------------------------------------------- /Windows/SDL2/lib64/libSDL2.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/SDL2/lib64/libSDL2.dll.a -------------------------------------------------------------------------------- /Windows/SDL2/lib64/libSDL2main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/SDL2/lib64/libSDL2main.a -------------------------------------------------------------------------------- /Windows/VisualStudio/bintoc.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Windows/VisualStudio/bintoc.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WindowsLocalDebugger 5 | 6 | 7 | WindowsLocalDebugger 8 | 9 | 10 | WindowsLocalDebugger 11 | 12 | 13 | WindowsLocalDebugger 14 | 15 | -------------------------------------------------------------------------------- /Windows/VisualStudio/embedded.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /Windows/VisualStudio/embedded.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Windows/VisualStudio/embedded.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Windows/codecs/include/flac_config.txt: -------------------------------------------------------------------------------- 1 | FLAC v1.3.0 release + several fixes from the flac git repo at xiph.org. 2 | Decoder-only functionality, which is what we need: the encoder stuff is 3 | left out of the build. 4 | -------------------------------------------------------------------------------- /Windows/codecs/include/mikmod_config.txt: -------------------------------------------------------------------------------- 1 | libmikmod-3.3.12. only the "nosound" driver (drv_nos) is included: 2 | we only need/register/use drv_nos here and nothing else. 3 | -------------------------------------------------------------------------------- /Windows/codecs/include/mpg123_config.txt: -------------------------------------------------------------------------------- 1 | mpg123-1.22.4, configured using: 2 | --disable-modules --disable-debug --disable-fifo --disable-ipv6 --disable-network --disable-messages --disable-lfs-alias --with-audio=dummy 3 | edited src/libmpg123/mpg123lib_intern.h and changed macros 4 | NOQUIET, VERBOSE* and PVERB() to be 0, in order to disable 5 | some debug messages from the library. 6 | 7 | This build of libmpg123 has no _FILE_OFFSET_BITS=64 support! 8 | -------------------------------------------------------------------------------- /Windows/codecs/include/ogg/config_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_TYPES_H__ 2 | #define __CONFIG_TYPES_H__ 3 | 4 | /* these are filled in by configure */ 5 | #define INCLUDE_INTTYPES_H 0 6 | #define INCLUDE_STDINT_H 0 7 | #define INCLUDE_SYS_TYPES_H 1 8 | 9 | #if INCLUDE_INTTYPES_H 10 | # include 11 | #endif 12 | #if INCLUDE_STDINT_H 13 | # include 14 | #endif 15 | #if INCLUDE_SYS_TYPES_H 16 | # include 17 | #endif 18 | 19 | typedef short ogg_int16_t; 20 | typedef unsigned short ogg_uint16_t; 21 | typedef int ogg_int32_t; 22 | typedef unsigned int ogg_uint32_t; 23 | typedef long long ogg_int64_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Windows/codecs/include/opusfile.h: -------------------------------------------------------------------------------- 1 | /* just a wrapper to bypass the pkg-config thingy: the 2 | * headers under opus/ are edited accordingly for this */ 3 | #include 4 | -------------------------------------------------------------------------------- /Windows/codecs/x64/libFLAC-8.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libFLAC-8.dll -------------------------------------------------------------------------------- /Windows/codecs/x64/libFLAC.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libFLAC.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x64/libFLAC.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libFLAC.lib -------------------------------------------------------------------------------- /Windows/codecs/x64/libmad-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libmad-0.dll -------------------------------------------------------------------------------- /Windows/codecs/x64/libmad.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libmad.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x64/libmad.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libmad.lib -------------------------------------------------------------------------------- /Windows/codecs/x64/libmikmod-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libmikmod-3.dll -------------------------------------------------------------------------------- /Windows/codecs/x64/libmikmod.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libmikmod.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x64/libmikmod.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libmikmod.lib -------------------------------------------------------------------------------- /Windows/codecs/x64/libmpg123-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libmpg123-0.dll -------------------------------------------------------------------------------- /Windows/codecs/x64/libmpg123.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libmpg123.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x64/libmpg123.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libmpg123.lib -------------------------------------------------------------------------------- /Windows/codecs/x64/libogg-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libogg-0.dll -------------------------------------------------------------------------------- /Windows/codecs/x64/libogg.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libogg.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x64/libogg.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libogg.lib -------------------------------------------------------------------------------- /Windows/codecs/x64/libopus-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libopus-0.dll -------------------------------------------------------------------------------- /Windows/codecs/x64/libopus.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libopus.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x64/libopus.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libopus.lib -------------------------------------------------------------------------------- /Windows/codecs/x64/libopusfile-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libopusfile-0.dll -------------------------------------------------------------------------------- /Windows/codecs/x64/libopusfile.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libopusfile.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x64/libopusfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libopusfile.lib -------------------------------------------------------------------------------- /Windows/codecs/x64/libvorbis-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libvorbis-0.dll -------------------------------------------------------------------------------- /Windows/codecs/x64/libvorbis.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libvorbis.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x64/libvorbis.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libvorbis.lib -------------------------------------------------------------------------------- /Windows/codecs/x64/libvorbisfile-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libvorbisfile-3.dll -------------------------------------------------------------------------------- /Windows/codecs/x64/libvorbisfile.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libvorbisfile.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x64/libvorbisfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libvorbisfile.lib -------------------------------------------------------------------------------- /Windows/codecs/x64/libxmp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libxmp.dll -------------------------------------------------------------------------------- /Windows/codecs/x64/libxmp.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libxmp.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x64/libxmp.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x64/libxmp.lib -------------------------------------------------------------------------------- /Windows/codecs/x86/libFLAC-8.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libFLAC-8.dll -------------------------------------------------------------------------------- /Windows/codecs/x86/libFLAC.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libFLAC.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x86/libFLAC.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libFLAC.lib -------------------------------------------------------------------------------- /Windows/codecs/x86/libmad-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libmad-0.dll -------------------------------------------------------------------------------- /Windows/codecs/x86/libmad.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libmad.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x86/libmad.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libmad.lib -------------------------------------------------------------------------------- /Windows/codecs/x86/libmikmod-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libmikmod-3.dll -------------------------------------------------------------------------------- /Windows/codecs/x86/libmikmod.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libmikmod.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x86/libmikmod.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libmikmod.lib -------------------------------------------------------------------------------- /Windows/codecs/x86/libmpg123-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libmpg123-0.dll -------------------------------------------------------------------------------- /Windows/codecs/x86/libmpg123.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libmpg123.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x86/libmpg123.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libmpg123.lib -------------------------------------------------------------------------------- /Windows/codecs/x86/libogg-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libogg-0.dll -------------------------------------------------------------------------------- /Windows/codecs/x86/libogg.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libogg.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x86/libogg.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libogg.lib -------------------------------------------------------------------------------- /Windows/codecs/x86/libopus-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libopus-0.dll -------------------------------------------------------------------------------- /Windows/codecs/x86/libopus.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libopus.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x86/libopus.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libopus.lib -------------------------------------------------------------------------------- /Windows/codecs/x86/libopusfile-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libopusfile-0.dll -------------------------------------------------------------------------------- /Windows/codecs/x86/libopusfile.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libopusfile.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x86/libopusfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libopusfile.lib -------------------------------------------------------------------------------- /Windows/codecs/x86/libvorbis-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libvorbis-0.dll -------------------------------------------------------------------------------- /Windows/codecs/x86/libvorbis.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libvorbis.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x86/libvorbis.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libvorbis.lib -------------------------------------------------------------------------------- /Windows/codecs/x86/libvorbisfile-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libvorbisfile-3.dll -------------------------------------------------------------------------------- /Windows/codecs/x86/libvorbisfile.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libvorbisfile.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x86/libvorbisfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libvorbisfile.lib -------------------------------------------------------------------------------- /Windows/codecs/x86/libxmp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libxmp.dll -------------------------------------------------------------------------------- /Windows/codecs/x86/libxmp.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libxmp.dll.a -------------------------------------------------------------------------------- /Windows/codecs/x86/libxmp.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/codecs/x86/libxmp.lib -------------------------------------------------------------------------------- /Windows/misc/include/msinttypes/README.txt: -------------------------------------------------------------------------------- 1 | 2 | msinttypes-r29 from: 3 | 4 | http://msinttypes.googlecode.com/ 5 | http://code.google.com/p/msinttypes/ 6 | 7 | -------------------------------------------------------------------------------- /Windows/misc/include/vulkan/vk_sdk_platform.h: -------------------------------------------------------------------------------- 1 | // 2 | // File: vk_sdk_platform.h 3 | // 4 | /* 5 | * Copyright (c) 2015-2016 The Khronos Group Inc. 6 | * Copyright (c) 2015-2016 Valve Corporation 7 | * Copyright (c) 2015-2016 LunarG, Inc. 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #ifndef VK_SDK_PLATFORM_H 23 | #define VK_SDK_PLATFORM_H 24 | 25 | #if defined(_WIN32) 26 | #define NOMINMAX 27 | #ifndef __cplusplus 28 | #undef inline 29 | #define inline __inline 30 | #endif // __cplusplus 31 | 32 | #if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) 33 | // C99: 34 | // Microsoft didn't implement C99 in Visual Studio; but started adding it with 35 | // VS2013. However, VS2013 still didn't have snprintf(). The following is a 36 | // work-around (Note: The _CRT_SECURE_NO_WARNINGS macro must be set in the 37 | // "CMakeLists.txt" file). 38 | // NOTE: This is fixed in Visual Studio 2015. 39 | #define snprintf _snprintf 40 | #endif 41 | 42 | #define strdup _strdup 43 | 44 | #endif // _WIN32 45 | 46 | // Check for noexcept support using clang, with fallback to Windows or GCC version numbers 47 | #ifndef NOEXCEPT 48 | #if defined(__clang__) 49 | #if __has_feature(cxx_noexcept) 50 | #define HAS_NOEXCEPT 51 | #endif 52 | #else 53 | #if defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC__ * 10 + __GNUC_MINOR__ >= 46 54 | #define HAS_NOEXCEPT 55 | #else 56 | #if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026 && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS 57 | #define HAS_NOEXCEPT 58 | #endif 59 | #endif 60 | #endif 61 | 62 | #ifdef HAS_NOEXCEPT 63 | #define NOEXCEPT noexcept 64 | #else 65 | #define NOEXCEPT 66 | #endif 67 | #endif 68 | 69 | #endif // VK_SDK_PLATFORM_H 70 | -------------------------------------------------------------------------------- /Windows/misc/include/vulkan/vulkan.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_H_ 2 | #define VULKAN_H_ 1 3 | 4 | /* 5 | ** Copyright 2015-2021 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | #include "vk_platform.h" 11 | #include "vulkan_core.h" 12 | 13 | #ifdef VK_USE_PLATFORM_ANDROID_KHR 14 | #include "vulkan_android.h" 15 | #endif 16 | 17 | #ifdef VK_USE_PLATFORM_FUCHSIA 18 | #include 19 | #include "vulkan_fuchsia.h" 20 | #endif 21 | 22 | #ifdef VK_USE_PLATFORM_IOS_MVK 23 | #include "vulkan_ios.h" 24 | #endif 25 | 26 | 27 | #ifdef VK_USE_PLATFORM_MACOS_MVK 28 | #include "vulkan_macos.h" 29 | #endif 30 | 31 | #ifdef VK_USE_PLATFORM_METAL_EXT 32 | #include "vulkan_metal.h" 33 | #endif 34 | 35 | #ifdef VK_USE_PLATFORM_VI_NN 36 | #include "vulkan_vi.h" 37 | #endif 38 | 39 | 40 | #ifdef VK_USE_PLATFORM_WAYLAND_KHR 41 | #include 42 | #include "vulkan_wayland.h" 43 | #endif 44 | 45 | 46 | #ifdef VK_USE_PLATFORM_WIN32_KHR 47 | #include 48 | #include "vulkan_win32.h" 49 | #endif 50 | 51 | 52 | #ifdef VK_USE_PLATFORM_XCB_KHR 53 | #include 54 | #include "vulkan_xcb.h" 55 | #endif 56 | 57 | 58 | #ifdef VK_USE_PLATFORM_XLIB_KHR 59 | #include 60 | #include "vulkan_xlib.h" 61 | #endif 62 | 63 | 64 | #ifdef VK_USE_PLATFORM_DIRECTFB_EXT 65 | #include 66 | #include "vulkan_directfb.h" 67 | #endif 68 | 69 | 70 | #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT 71 | #include 72 | #include 73 | #include "vulkan_xlib_xrandr.h" 74 | #endif 75 | 76 | 77 | #ifdef VK_USE_PLATFORM_GGP 78 | #include 79 | #include "vulkan_ggp.h" 80 | #endif 81 | 82 | 83 | #ifdef VK_USE_PLATFORM_SCREEN_QNX 84 | #include 85 | #include "vulkan_screen.h" 86 | #endif 87 | 88 | #ifdef VK_ENABLE_BETA_EXTENSIONS 89 | #include "vulkan_beta.h" 90 | #endif 91 | 92 | #endif // VULKAN_H_ 93 | -------------------------------------------------------------------------------- /Windows/misc/include/vulkan/vulkan_directfb.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_DIRECTFB_H_ 2 | #define VULKAN_DIRECTFB_H_ 1 3 | 4 | /* 5 | ** Copyright 2015-2021 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_EXT_directfb_surface 1 23 | #define VK_EXT_DIRECTFB_SURFACE_SPEC_VERSION 1 24 | #define VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME "VK_EXT_directfb_surface" 25 | typedef VkFlags VkDirectFBSurfaceCreateFlagsEXT; 26 | typedef struct VkDirectFBSurfaceCreateInfoEXT { 27 | VkStructureType sType; 28 | const void* pNext; 29 | VkDirectFBSurfaceCreateFlagsEXT flags; 30 | IDirectFB* dfb; 31 | IDirectFBSurface* surface; 32 | } VkDirectFBSurfaceCreateInfoEXT; 33 | 34 | typedef VkResult (VKAPI_PTR *PFN_vkCreateDirectFBSurfaceEXT)(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 35 | typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb); 36 | 37 | #ifndef VK_NO_PROTOTYPES 38 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateDirectFBSurfaceEXT( 39 | VkInstance instance, 40 | const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, 41 | const VkAllocationCallbacks* pAllocator, 42 | VkSurfaceKHR* pSurface); 43 | 44 | VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceDirectFBPresentationSupportEXT( 45 | VkPhysicalDevice physicalDevice, 46 | uint32_t queueFamilyIndex, 47 | IDirectFB* dfb); 48 | #endif 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /Windows/misc/include/vulkan/vulkan_ggp.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_GGP_H_ 2 | #define VULKAN_GGP_H_ 1 3 | 4 | /* 5 | ** Copyright 2015-2021 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_GGP_stream_descriptor_surface 1 23 | #define VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION 1 24 | #define VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME "VK_GGP_stream_descriptor_surface" 25 | typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP; 26 | typedef struct VkStreamDescriptorSurfaceCreateInfoGGP { 27 | VkStructureType sType; 28 | const void* pNext; 29 | VkStreamDescriptorSurfaceCreateFlagsGGP flags; 30 | GgpStreamDescriptor streamDescriptor; 31 | } VkStreamDescriptorSurfaceCreateInfoGGP; 32 | 33 | typedef VkResult (VKAPI_PTR *PFN_vkCreateStreamDescriptorSurfaceGGP)(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 34 | 35 | #ifndef VK_NO_PROTOTYPES 36 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP( 37 | VkInstance instance, 38 | const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, 39 | const VkAllocationCallbacks* pAllocator, 40 | VkSurfaceKHR* pSurface); 41 | #endif 42 | 43 | 44 | #define VK_GGP_frame_token 1 45 | #define VK_GGP_FRAME_TOKEN_SPEC_VERSION 1 46 | #define VK_GGP_FRAME_TOKEN_EXTENSION_NAME "VK_GGP_frame_token" 47 | typedef struct VkPresentFrameTokenGGP { 48 | VkStructureType sType; 49 | const void* pNext; 50 | GgpFrameToken frameToken; 51 | } VkPresentFrameTokenGGP; 52 | 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /Windows/misc/include/vulkan/vulkan_ios.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_IOS_H_ 2 | #define VULKAN_IOS_H_ 1 3 | 4 | /* 5 | ** Copyright 2015-2021 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_MVK_ios_surface 1 23 | #define VK_MVK_IOS_SURFACE_SPEC_VERSION 3 24 | #define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface" 25 | typedef VkFlags VkIOSSurfaceCreateFlagsMVK; 26 | typedef struct VkIOSSurfaceCreateInfoMVK { 27 | VkStructureType sType; 28 | const void* pNext; 29 | VkIOSSurfaceCreateFlagsMVK flags; 30 | const void* pView; 31 | } VkIOSSurfaceCreateInfoMVK; 32 | 33 | typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 34 | 35 | #ifndef VK_NO_PROTOTYPES 36 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK( 37 | VkInstance instance, 38 | const VkIOSSurfaceCreateInfoMVK* pCreateInfo, 39 | const VkAllocationCallbacks* pAllocator, 40 | VkSurfaceKHR* pSurface); 41 | #endif 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Windows/misc/include/vulkan/vulkan_macos.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_MACOS_H_ 2 | #define VULKAN_MACOS_H_ 1 3 | 4 | /* 5 | ** Copyright 2015-2021 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_MVK_macos_surface 1 23 | #define VK_MVK_MACOS_SURFACE_SPEC_VERSION 3 24 | #define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface" 25 | typedef VkFlags VkMacOSSurfaceCreateFlagsMVK; 26 | typedef struct VkMacOSSurfaceCreateInfoMVK { 27 | VkStructureType sType; 28 | const void* pNext; 29 | VkMacOSSurfaceCreateFlagsMVK flags; 30 | const void* pView; 31 | } VkMacOSSurfaceCreateInfoMVK; 32 | 33 | typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 34 | 35 | #ifndef VK_NO_PROTOTYPES 36 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK( 37 | VkInstance instance, 38 | const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, 39 | const VkAllocationCallbacks* pAllocator, 40 | VkSurfaceKHR* pSurface); 41 | #endif 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Windows/misc/include/vulkan/vulkan_metal.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_METAL_H_ 2 | #define VULKAN_METAL_H_ 1 3 | 4 | /* 5 | ** Copyright 2015-2021 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_EXT_metal_surface 1 23 | 24 | #ifdef __OBJC__ 25 | @class CAMetalLayer; 26 | #else 27 | typedef void CAMetalLayer; 28 | #endif 29 | 30 | #define VK_EXT_METAL_SURFACE_SPEC_VERSION 1 31 | #define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface" 32 | typedef VkFlags VkMetalSurfaceCreateFlagsEXT; 33 | typedef struct VkMetalSurfaceCreateInfoEXT { 34 | VkStructureType sType; 35 | const void* pNext; 36 | VkMetalSurfaceCreateFlagsEXT flags; 37 | const CAMetalLayer* pLayer; 38 | } VkMetalSurfaceCreateInfoEXT; 39 | 40 | typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 41 | 42 | #ifndef VK_NO_PROTOTYPES 43 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT( 44 | VkInstance instance, 45 | const VkMetalSurfaceCreateInfoEXT* pCreateInfo, 46 | const VkAllocationCallbacks* pAllocator, 47 | VkSurfaceKHR* pSurface); 48 | #endif 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /Windows/misc/include/vulkan/vulkan_screen.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_SCREEN_H_ 2 | #define VULKAN_SCREEN_H_ 1 3 | 4 | /* 5 | ** Copyright 2015-2021 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_QNX_screen_surface 1 23 | #define VK_QNX_SCREEN_SURFACE_SPEC_VERSION 1 24 | #define VK_QNX_SCREEN_SURFACE_EXTENSION_NAME "VK_QNX_screen_surface" 25 | typedef VkFlags VkScreenSurfaceCreateFlagsQNX; 26 | typedef struct VkScreenSurfaceCreateInfoQNX { 27 | VkStructureType sType; 28 | const void* pNext; 29 | VkScreenSurfaceCreateFlagsQNX flags; 30 | struct _screen_context* context; 31 | struct _screen_window* window; 32 | } VkScreenSurfaceCreateInfoQNX; 33 | 34 | typedef VkResult (VKAPI_PTR *PFN_vkCreateScreenSurfaceQNX)(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 35 | typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window* window); 36 | 37 | #ifndef VK_NO_PROTOTYPES 38 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateScreenSurfaceQNX( 39 | VkInstance instance, 40 | const VkScreenSurfaceCreateInfoQNX* pCreateInfo, 41 | const VkAllocationCallbacks* pAllocator, 42 | VkSurfaceKHR* pSurface); 43 | 44 | VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceScreenPresentationSupportQNX( 45 | VkPhysicalDevice physicalDevice, 46 | uint32_t queueFamilyIndex, 47 | struct _screen_window* window); 48 | #endif 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /Windows/misc/include/vulkan/vulkan_vi.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_VI_H_ 2 | #define VULKAN_VI_H_ 1 3 | 4 | /* 5 | ** Copyright 2015-2021 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_NN_vi_surface 1 23 | #define VK_NN_VI_SURFACE_SPEC_VERSION 1 24 | #define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface" 25 | typedef VkFlags VkViSurfaceCreateFlagsNN; 26 | typedef struct VkViSurfaceCreateInfoNN { 27 | VkStructureType sType; 28 | const void* pNext; 29 | VkViSurfaceCreateFlagsNN flags; 30 | void* window; 31 | } VkViSurfaceCreateInfoNN; 32 | 33 | typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 34 | 35 | #ifndef VK_NO_PROTOTYPES 36 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN( 37 | VkInstance instance, 38 | const VkViSurfaceCreateInfoNN* pCreateInfo, 39 | const VkAllocationCallbacks* pAllocator, 40 | VkSurfaceKHR* pSurface); 41 | #endif 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Windows/misc/include/vulkan/vulkan_wayland.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_WAYLAND_H_ 2 | #define VULKAN_WAYLAND_H_ 1 3 | 4 | /* 5 | ** Copyright 2015-2021 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_KHR_wayland_surface 1 23 | #define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6 24 | #define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface" 25 | typedef VkFlags VkWaylandSurfaceCreateFlagsKHR; 26 | typedef struct VkWaylandSurfaceCreateInfoKHR { 27 | VkStructureType sType; 28 | const void* pNext; 29 | VkWaylandSurfaceCreateFlagsKHR flags; 30 | struct wl_display* display; 31 | struct wl_surface* surface; 32 | } VkWaylandSurfaceCreateInfoKHR; 33 | 34 | typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 35 | typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display); 36 | 37 | #ifndef VK_NO_PROTOTYPES 38 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR( 39 | VkInstance instance, 40 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, 41 | const VkAllocationCallbacks* pAllocator, 42 | VkSurfaceKHR* pSurface); 43 | 44 | VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR( 45 | VkPhysicalDevice physicalDevice, 46 | uint32_t queueFamilyIndex, 47 | struct wl_display* display); 48 | #endif 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /Windows/misc/include/vulkan/vulkan_xcb.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_XCB_H_ 2 | #define VULKAN_XCB_H_ 1 3 | 4 | /* 5 | ** Copyright 2015-2021 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_KHR_xcb_surface 1 23 | #define VK_KHR_XCB_SURFACE_SPEC_VERSION 6 24 | #define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface" 25 | typedef VkFlags VkXcbSurfaceCreateFlagsKHR; 26 | typedef struct VkXcbSurfaceCreateInfoKHR { 27 | VkStructureType sType; 28 | const void* pNext; 29 | VkXcbSurfaceCreateFlagsKHR flags; 30 | xcb_connection_t* connection; 31 | xcb_window_t window; 32 | } VkXcbSurfaceCreateInfoKHR; 33 | 34 | typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 35 | typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id); 36 | 37 | #ifndef VK_NO_PROTOTYPES 38 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR( 39 | VkInstance instance, 40 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, 41 | const VkAllocationCallbacks* pAllocator, 42 | VkSurfaceKHR* pSurface); 43 | 44 | VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR( 45 | VkPhysicalDevice physicalDevice, 46 | uint32_t queueFamilyIndex, 47 | xcb_connection_t* connection, 48 | xcb_visualid_t visual_id); 49 | #endif 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /Windows/misc/include/vulkan/vulkan_xlib.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_XLIB_H_ 2 | #define VULKAN_XLIB_H_ 1 3 | 4 | /* 5 | ** Copyright 2015-2021 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_KHR_xlib_surface 1 23 | #define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6 24 | #define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface" 25 | typedef VkFlags VkXlibSurfaceCreateFlagsKHR; 26 | typedef struct VkXlibSurfaceCreateInfoKHR { 27 | VkStructureType sType; 28 | const void* pNext; 29 | VkXlibSurfaceCreateFlagsKHR flags; 30 | Display* dpy; 31 | Window window; 32 | } VkXlibSurfaceCreateInfoKHR; 33 | 34 | typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 35 | typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID); 36 | 37 | #ifndef VK_NO_PROTOTYPES 38 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR( 39 | VkInstance instance, 40 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, 41 | const VkAllocationCallbacks* pAllocator, 42 | VkSurfaceKHR* pSurface); 43 | 44 | VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR( 45 | VkPhysicalDevice physicalDevice, 46 | uint32_t queueFamilyIndex, 47 | Display* dpy, 48 | VisualID visualID); 49 | #endif 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /Windows/misc/include/vulkan/vulkan_xlib_xrandr.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_XLIB_XRANDR_H_ 2 | #define VULKAN_XLIB_XRANDR_H_ 1 3 | 4 | /* 5 | ** Copyright 2015-2021 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_EXT_acquire_xlib_display 1 23 | #define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1 24 | #define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display" 25 | typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display); 26 | typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay); 27 | 28 | #ifndef VK_NO_PROTOTYPES 29 | VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT( 30 | VkPhysicalDevice physicalDevice, 31 | Display* dpy, 32 | VkDisplayKHR display); 33 | 34 | VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT( 35 | VkPhysicalDevice physicalDevice, 36 | Display* dpy, 37 | RROutput rrOutput, 38 | VkDisplayKHR* pDisplay); 39 | #endif 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /Windows/misc/x64/libvulkan-1.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/misc/x64/libvulkan-1.dll.a -------------------------------------------------------------------------------- /Windows/misc/x64/vulkan-1.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/misc/x64/vulkan-1.lib -------------------------------------------------------------------------------- /Windows/misc/x86/libvulkan-1.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/misc/x86/libvulkan-1.dll.a -------------------------------------------------------------------------------- /Windows/misc/x86/vulkan-1.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/misc/x86/vulkan-1.lib -------------------------------------------------------------------------------- /Windows/vkQuake.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Novum/vkQuake/98c67a2758cc7866f6c463d80cdfbb209c5f01c7/Windows/vkQuake.ico -------------------------------------------------------------------------------- /Windows/vkQuake.rc: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../Quake/quakever.h" 3 | 4 | icon ICON "vkQuake.ico" 5 | 6 | //////////////////////////////////////////////////////////////// 7 | 8 | #define VER_FILEVERSION VKQUAKE_VERSION_MAJOR,VKQUAKE_VERSION_MINOR,VKQUAKE_VER_PATCH,0 9 | #define VER_FILEVERSION_STR QS_STRINGIFY(VKQUAKE_VERSION) "." QS_STRINGIFY(VKQUAKE_VER_PATCH) VKQUAKE_VER_SUFFIX 10 | 11 | #define VER_PRODUCTVERSION VER_FILEVERSION 12 | #define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR 13 | 14 | #ifdef DEBUG 15 | #define VER_DEBUG VS_FF_DEBUG 16 | #else 17 | #define VER_DEBUG 0 18 | #endif 19 | 20 | //////////////////////////////////////////////////////////////// 21 | 22 | VS_VERSION_INFO VERSIONINFO 23 | FILEVERSION VER_FILEVERSION 24 | PRODUCTVERSION VER_PRODUCTVERSION 25 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 26 | FILEFLAGS VER_DEBUG 27 | FILEOS VOS__WINDOWS32 28 | FILETYPE VFT_APP 29 | FILESUBTYPE 0 30 | BEGIN 31 | BLOCK "StringFileInfo" 32 | BEGIN 33 | BLOCK "040904E4" 34 | BEGIN 35 | VALUE "FileDescription", "vkQuake Quake engine" 36 | VALUE "FileVersion", VER_FILEVERSION_STR 37 | VALUE "LegalCopyright", "\xA9 2024" 38 | VALUE "OriginalFilename", "vkQuake.exe" 39 | VALUE "ProductName", "vkQuake" 40 | VALUE "ProductVersion", VER_PRODUCTVERSION_STR 41 | END 42 | END 43 | 44 | BLOCK "VarFileInfo" 45 | BEGIN 46 | VALUE "Translation", 0x409, 1252 47 | END 48 | END 49 | -------------------------------------------------------------------------------- /format.sh: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | docker run --user $(id -u):$(id -g) -v `pwd`:`pwd` -w `pwd` -i --rm ghcr.io/jidicula/clang-format:17 -i Quake/*.c Quake/*.h Shaders/*.frag Shaders/*.vert Shaders/*.comp Shaders/*.inc Shaders/*.c Shaders/*.h 3 | -------------------------------------------------------------------------------- /helgrind.supp: -------------------------------------------------------------------------------- 1 | { 2 | False positives in the Nvidia driver 3 | Helgrind:Race 4 | ... 5 | obj:*libnvidia* 6 | ... 7 | } 8 | { 9 | False positives in the Nvidia driver 10 | Helgrind:Misc 11 | ... 12 | obj:*libnvidia* 13 | ... 14 | } 15 | { 16 | False positives in the Nvidia driver 17 | Helgrind:Race 18 | ... 19 | obj:*libcuda* 20 | ... 21 | } 22 | { 23 | False positives in PulseAudio 24 | Helgrind:Race 25 | ... 26 | obj:*libpulse* 27 | ... 28 | } 29 | { 30 | False positives in SDL2 31 | Helgrind:Race 32 | ... 33 | obj:*libSDL2* 34 | ... 35 | } 36 | { 37 | False positives in SDL2 38 | Helgrind:LockOrder 39 | ... 40 | obj:*libSDL2* 41 | ... 42 | } -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | option('use_codec_wave', type : 'feature', value : 'enabled') 2 | option('use_codec_mp3', type : 'feature', value : 'auto') 3 | option('use_codec_flac', type : 'feature', value : 'auto') 4 | option('use_codec_vorbis', type : 'feature', value : 'auto') 5 | option('use_codec_opus', type : 'feature', value : 'auto') 6 | option('mp3_lib', type : 'combo', value : 'mpg123', choices: ['mad', 'mpg123']) 7 | option('vorbis_lib', type : 'combo', value : 'vorbis', choices: ['vorbis', 'tremor']) 8 | option('do_userdirs', type: 'feature', value : 'disabled') 9 | -------------------------------------------------------------------------------- /vs-chromium-project.txt: -------------------------------------------------------------------------------- 1 | [SearchableFiles.include] 2 | Quake/ 3 | Shaders/ 4 | --------------------------------------------------------------------------------