Commit graph

27 commits

Author SHA1 Message Date
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
b16f402040
Refactor framebuffer-related stuff (#130)
* Renderer: rename render targets to framebuffers

* Refactor framebuffer pair helper and some of the video API

* Remove hardcoded dimensions from draw_framebuffer_tex

* Make viewport a per-framebuffer property rather than a global one

* Handle config updates via the events system. React to viewport fg/bg quality change requests.
2018-07-04 11:36:16 +03:00
Andrei Alexeyev
52fd5a0429
Revert "meson: do not use build_always, it's deprecated and seems to misbehave on latest meson from git"
This reverts commit e0b722694b.
2018-07-01 11:48:54 +03:00
Andrei Alexeyev
e0b722694b
meson: do not use build_always, it's deprecated and seems to misbehave on latest meson from git 2018-07-01 04:23:50 +03:00
Andrei Alexeyev
cc33fdd4fd
Use GLAD to set up GL function pointers 2018-06-30 23:11:54 +03:00
Andrei Alexeyev
09946ebff9
Threading improvements (#125)
* Add a general purpose multi-threaded task manager (worker pool) for background tasks

Reimplemented screenshots off-loading using the new task manager.

* Largerly rewrite resource loading internals

They use the new task manager API now and should be generally more
robust.

* Made the game playable without threads again

* wait for resource async load task instead of intermediate state change

* remove dead code

* taskmgr: if creating a worker thread fails, try to make sure the others terminate
2018-05-25 09:01:07 +03:00
Andrei Alexeyev
2932247249
attempt to refactor the util disaster into several smaller disasters 2018-05-15 03:27:25 +03:00
Andrei Alexeyev
f67396423e
Projectile prototypes system (#118)
* wip projectile prototypes

* Partial fix for replay desyncs

* some YoumuA fixes

* fix various ToE problems

* fix MarisaB

* fix master spark

* fix iku slave particle position

* this timeout was somehow halved during the changes

* remove some v1.2 compat hacks
2018-05-02 07:46:48 +03:00
laochailan
7a957846fa
move the dialog into centralized files 2018-04-29 10:28:21 +02:00
Andrei Alexeyev
af7c4bbb4f
add portable wrappers around getenv/setenv and friends 2018-04-18 01:34:41 +03:00
Andrei Alexeyev
c460b45b28
Explicitly require Meson >= 0.45.0 to build
Closes #117
2018-04-17 19:33:11 +03:00
Andrei Alexeyev
8ef5ffd32c
Flexible draw order; entity "base class" for all game objects 2018-04-15 09:43:11 +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
c6789f5908
move assert stuff into its own module 2018-02-07 10:19:21 +02:00
Andrei Alexeyev
a9561d7baf
Sprites and texture atlases; upgrade most graphics to a higher resolution (optimized for 1600x1200) (#113) 2018-02-06 08:19:25 +02:00
Andrei Alexeyev
a2399b76f3
move framerate stuff to its own file 2018-01-20 16:17:32 +02:00
Andrei Alexeyev
878223a16b
build: get rid of the windows .rc hack (needs a patched/new Meson)
https://github.com/mesonbuild/meson/pull/2815
2018-01-13 00:05:46 +02:00
Andrei Alexeyev
f186cfa5f6
make ancient meson happy. maybe. 2017-12-31 01:34:02 +02:00
Andrei Alexeyev
59ea213b35
make version_auto.c actually regenerate on every build again 2017-12-31 01:09:04 +02:00
Andrei Alexeyev
c8c835eace
fix typo 2017-12-24 17:55:03 +02:00
Andrei Alexeyev
7f725dffbb
windows: use mingw runtime to provide the stdio functions
fixes lots of warnings and compatibility issues
2017-12-22 00:38:32 +02:00
Andrei Alexeyev
56dc699e62 meson: add blackjack and hookers 2017-12-21 03:58:54 +01:00
Andrei Alexeyev
ff59b646e1 fix missing sources 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