Commit graph

19 commits

Author SHA1 Message Date
Andrei Alexeyev
8480d41b7b
Audio rewrite (#236)
This replaces SDL_mixer with an internal streaming and mixing system,
relying only on basic SDL audio support. It's also a partial refactor of
the audio API, most notably BGM-related. The BGM metadata resource type
is gone, as well as the `.bgm` files. The metadata is now stored inside
the `.opus` files directly, using standard Opus tags.
2020-06-22 17:41:03 +03:00
Andrei Alexeyev
40a604a6a5
Add 'use_gnu_ext' option
Controls the USE_GNU_EXTENSIONS define in compat.h
2020-03-31 22:51:31 +03:00
Andrei Alexeyev
0fdea86be1
Implement Robin Hood hashing (#200)
* Implement Robin Hood hashing

This replaces the previous separate chaining implementation. This
approach is more memory-efficient, cache-friendly, and puts much less
stress on the memory allocator.

* Replace crc32 with fnva1

Also attempt to make the compiler pre-hash as much stuff as possible at
build time.
2020-03-17 10:09:49 +02:00
Alice
0b29dd473b
OpenGL ES 3.0/ANGLE support on macOS (#190)
* fixing OpenGL ES 3.0 support in macOS

* make GLES libraries loaded via buildconf vars

* fix relative install paths for macOS

* fix indenting, add comments

* fix indentation for REAL this time (thanks editorconfig)
2020-02-20 04:16:28 +02:00
Andrei Alexeyev
8ccc472e27
build: support building shaderc and spirv-cross CLI from subprojects 2019-11-27 17:18:50 +02:00
Andrei Alexeyev
69dc964c22
Add deprecation_warnings option
Controls treatment of warnings caused by attr_deprecated.

Can be one of the following values:

    * default: No special treatment.
    * error: Always treat as errors, regardless of the werror option.
    * no-error: Never treat as errors, regardless of the werror option.
    * ignore: Suppress the warnings.
2019-10-03 03:22:54 +03:00
Andrei Alexeyev
abe4ddf260
refactor audio (module system like that of renderer) 2019-03-05 21:43:01 +02:00
Andrei Alexeyev
1d9a307b94
Add a basic shader cache; move some files around
The cache is currently only used to speed up SPIR-V transpilation.
2019-02-08 21:08:24 +02:00
Andrei Alexeyev
9af300d4df
add 'developer' option to decouple cheats etc. from build type
developer=true  --> DEBUG macro is set, regardless of build type
    developer=false --> DEBUG macro is not set, regardless of build type
    developer=auto  --> DEBUG macro is set only on debug* build types;
    this matches old behavior and is the default.
2019-01-25 02:02:56 +02:00
Andrei Alexeyev
fa802dbd94
Some refactoring
* Added (and fixed) a few useful warnings
    * Removed some dead code
    * Cleaned up the build system files a bit
    * Once again separated ZIP support from data packaging
    * Converted macOS cross-compilation options into cross-file properties
2019-01-24 22:24:43 +02:00
Andrei Alexeyev
2414474c89
OpenGL ES 3.0 rendering backend (#148)
* First steps towards shader transpilation

Needs to be manually enabled via -Dshader_transpiler=true.

Requires shaderc. https://github.com/google/shaderc

Not yet functional due to missing SPIRV-Cross integration. SPIRV-Cross
currently does not have an official C API, and crossc is too minimal to
be useful. The current plan is to extend crossc and vendor it, while
also sending PRs upstream.

* Integrate crossc; shader transpilation for GLES now works

* fix leak

* gles30 backend now playable on Mesa with 3.2 context

Some rendering issues are present. Identified so far:
    - Marisa's lasers are invisible
    - Death effect looks wrong

Also, a small pixmap manipulation library has been written, and the
texture uploading API redesigned around it.

* fix marisa lasers in GLES (uniform name clashed with builtin)

* fix player death effect in GLES (another name clash)

* Dump ANGLE's translated shader code in debug log

* fix screenshots

* Drop support for triangle fans, switch to strips

Fans offer no advantage over strips, and they've been removed in D3D10+,
so ANGLE has to emulate them.

* crude workaround for an ANGLE bug

* Re-enable GL debug labels, fix an issue with them that affected ANGLE (but was always technically a bug)

* fix race condition in shaderc initialization

* New SDL_RWops interface for vertex buffers

* Optimize VBO streaming via buffering updates

Measurable performance improvement even with the main gl33 renderer,
drastic improvement with ANGLE.

* Fix the depth texture binding problem under ANGLE

Apparently it hates GL_DEPTH_COMPONENT16 for some reason. Sized internal
formats are not supported in GLES 2.0 anyway, so not using them is
probably a good idea.

* fix GLES2.0 segfault (the backend still doesn't work, though)

* dump GL extensions at info log level, not debug

* get around a Mesa bug; more correct texture format table for GLES2

* Correct GLES3 texture format table according to the spec

Not a Mesa bug after all

* require crossc>=1.5.0, fallback to subproject

* Request at least 8bit per color channel in GL backends

* Forbid lto for static windows builds with shader_transpiler=true

* fix edge case segfault

* Add basic ANGLE bundling support to the build system

Windows only, and no NSIS support yet

* Fix various windows-related build system and installer brokenness

* Disable gles backends by default

* update documentation
2018-10-02 01:36:10 +03:00
Andrei Alexeyev
01795250bb
Add build option to disable object pools (for debugging) 2018-08-31 05:59:47 +03:00
Andrei Alexeyev
59cf8f6300
Rendering system rewrite, tons of refactoring, optimizations, and other cool stuff (#116) 2018-04-12 17:08:48 +03:00
Andrei Alexeyev
4c98dea1da
Render Markdown docs to HTML for installations 2018-01-19 08:50:42 +02:00
Andrei Alexeyev
32996fe69a
add build option to disable opengl debugging 2018-01-18 19:27:03 +02:00
Andrei Alexeyev
22505e5ff7 meson: fixed some install_relative issues 2017-12-21 03:58:54 +01:00
Andrei Alexeyev
0dcbc6bcf4 meson: untested macOS bundle generation, bunch of other crap (WIP) 2017-12-21 03:58:54 +01:00
Andrei Alexeyev
29acd5f58a meson: intel intrinsics, various improvements 2017-12-21 03:58:54 +01:00
Martin Herkt
685b1b947d Replace CMake build system with Meson
No I will not try and keep both systems working. CMake should GTFO.
2017-12-21 03:58:54 +01:00