Commit graph

52 commits

Author SHA1 Message Date
Andrei Alexeyev
9b3779ebb4
Some renderer refactoring (mostly API and GLES preparations) (#144)
* Refacor uniforms API:

    - More complete and consistent
    - Type-safety
    - Usage correctess assertions missing for now, planned

* Redesign texturing API: texunits gone, assign textures to sampler uniforms directly

r_texture_create now allocates memory and returns an opaque Texture
pointer; similar changes to the other renderer APIs will follow.

* Framebuffers: make _create return an opaque pointer, add debug label APIs (unused for now)

* opaque pointers and debug label APIs for vertex arrays and buffers

* fix null renderer

* Refactor glsl preprocessing into an independent module

* Separate shader resource management from renderer backend

This makes it possible to add more shading languages and/or include a
transpiler, which will be useful for the GLES backend.

* refactor r_clear into a stateless API

* add r_texture_clear API; fix gl33_framebuffer_clear

* Replace deprecated glsl_objects with objects in all *.prog files

* fix missing texture_clear implementation in null renderer

* remove some dead code in null renderer

* fix GLES segfault

* GLES 3.0 actually has glVertexAttribDivisor

* Query GL for supported GLSL versions (preparing to add shader transcompilation)
2018-09-14 10:37:20 +03:00
Andrei Alexeyev
8490576810
Premultiplied alpha (#133)
* WIP premultiplied alpha

* WIP color API rework (doesn't build yet; lots of things left to convert)

* convert everything remaining to new Color api except stage*_event.c files

* convert the stages to new Color api. builds & runs now; still many rendering errors

* fix the bullet shader for premultiplied alpha

* fix masterspark, graphs and stage 1 fog clouds

* fix marisa_b and most of spellcards

* Add deprecation warnings for BLEND_ADD and PFLAG_DRAWADD

* fix a segfault in stage 6

undo accidental earlier change

* fix text_hud.frag.glsl

* fix scuttle bg and remaining stage3 BLEND_ADDs

* fix marisa laser opacity

* hacky fix for myon

The old implementation relied on alpha being stored inside p->color. In
premul alpha this doesn’t work and functions like color_set_opacity
can’t solve this i think.

So I tried messing around with it until it looked somewhat similar.

* fix marisa_b stars

* remove color_set_opacity i overlooked

* more plrmode blending changes

* fixup additive blending in stage 1

* various premultiplied alpha fixups for bosses and enemies

* stage 2 premul alpha fixups

* stage 4 premul alpha fixups

* stage 5 premul alpha fixups

* stage 6 premul alpha fixups

* make lasers also use the PMA blend mode

* remove PFLAG_DRAWADD and PFLAG_DRAWSUB

* fix remaining PMA issues in menus

* lame extraspell bg workaround

* fix item alpha

* make marisaA lasers look somewhat like in master

* fix marisaA bomb background fadeout

* fixup various r_color4 calls

* fix myon

* remove dead code

* fix use of BLEND_ADD in player death effect

* fix myon shot trails (broken on master as well)

* fix myon shot fade-in

* extend the sprite shaders custom parameter to a vec4

* fix youmuB stuff and make it look somewhat better.

the code looks even worse though.
2018-07-23 20:07:59 +03:00
Andrei Alexeyev
322edd0dce
Text rendering rewrite and optimizations; some refactoring (#129)
* wip font rendering stuff; hashtable monstrosity is temporary

* various text rendering fixes/improvements

* HashTables™ 3.0

* Add some comments to aid navigating the hashtable macro maze

* overhaul text rendering API; add default and example shaders

* text: implement text_render for spellcard effect; misc fixes

* README: update dependencies

Bye SDL_ttf, hello freetype2.

* text_draw: fix resolution/scale-dependent bugs

* make text_draw fallback to the current shader, fix hud and stagetext

* repair the bgm loading

* fix spell practice mode

* fix walloftext

forgot one site of text_draw earlier

* fix wrapped text rendering

* fix and simplify the hud text shader

* dynamic glyph cache

* implement font size change on window resize/quality setting change/etc.

* rename text shaders for consistency

* preloads for fonts and text shaders

* make the stagetext shader look somewhat better

* text_render: attempt to normalize height

* small improvement for stagetext
2018-06-30 00:36:51 +03:00
Andrei Alexeyev
fd06ad3026
fix some of the set_ortho/draw_fbo madness 2018-04-26 02:50:48 +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
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
4eabee70a7
change vnutriya to InsideI by request 2018-01-21 19:35:26 +02:00
Andrei Alexeyev
ea4e651e76
fix font_line_spacing to account for quality and have the expected semantics 2018-01-14 13:50:57 +02:00
laochailan
cb310dce26
fix tower intersection in stage 6 and text intersection in credits 2018-01-14 12:33:35 +01:00
Andrei Alexeyev
513d613387
Consistent indentation: indent with tabs, align with spaces (#104)
I would've preferred to just go with 4-spaces for indent and no tabs,
but lao is a bit conservative about it. :^)

Still, this is a ton better than mixing different styles all over the
place, especially within the same file.
2018-01-12 20:26:07 +02:00
Andrei Alexeyev
5790dfb685
fix credits layout; support non-looping BGMs 2018-01-09 01:32:52 +02:00
Andrei Alexeyev
4308c963e7
credits: fix crash, remove obsolete code 2018-01-08 23:40:41 +02:00
Andrei Alexeyev
485c9a8ed6
Happy New Year! 2018-01-04 19:14:31 +02:00
Andrei Alexeyev
013a205a92
credits: bgm, updates, other improvements 2017-12-28 05:49:37 +02:00
Andrei Alexeyev
48b13cd83a
frameskip option for slow GPUs 2017-12-26 13:07:40 +02:00
Andrei Alexeyev
d66793a117
add option to swap buffers after waiting for next frame
also restructured loop_at_fps a bit. it now handles FPS counter updates
and buffer swaps.
2017-12-26 10:56:21 +02:00
Andrei Alexeyev
29acd5f58a meson: intel intrinsics, various improvements 2017-12-21 03:58:54 +01:00
Andrei Alexeyev
4b53d65c23
enable GL_TEXTURE_2D by default to reduce API calls 2017-11-22 02:05:42 +02:00
Andrei Alexeyev
36f4182829
update stage bg state separately from drawing 2017-11-15 05:45:41 +02:00
Andrei Alexeyev
6eac178c39
use a shared 3D context for all stages (and credits) 2017-11-14 03:41:08 +02:00
Andrei Alexeyev
6e78958d94
typo 2017-10-23 23:13:09 +03:00
Andrei Alexeyev
bd910c3444
update credits, fix stuff 2017-10-23 13:48:30 +03:00
Andrei Alexeyev
05478cd543
another desperate attempt at an accurate fps limiter 2017-10-04 08:07:04 +03:00
laochailan
a2b16380c7
update credits 2017-10-03 18:10:11 +02:00
Andrei Alexeyev
0d9f88b2a1
drop the bgm_ prefix 2017-10-02 05:34:51 +03:00
Andrei Alexeyev
ef67a16867
WIP event system rewrite. text input missing 2017-10-01 00:43:18 +03:00
laochailan
df203fb86a repair credits perspective 2017-09-24 12:21:46 +02:00
laochailan
4eec55223a fps counter cleanup 2017-09-20 16:42:36 +02:00
Andrei "Akari" Alexeyev
7c9e54a71d
update copyright and credits 2017-09-12 04:28:15 +03:00
Andrei "Akari" Alexeyev
c82928a8da WIP transition from resource scanning to manual preloading 2017-03-11 21:36:25 +02:00
Andrei "Akari" Alexeyev
ca16c30966 large refactoring WIP
windows & osx untested
bgm untested
too many changes to comment on
2017-03-05 00:39:17 +02:00
Andrei "Akari" Alexeyev
f2d385d147 Some stage-related refactoring 2017-02-26 14:17:48 +02:00
Andrei "Akari" Alexeyev
a36d18d156 Transition tweaks 2017-02-25 15:23:22 +02:00
Martin Herkt
b02907628f
Use UTF-8 and hepburn romanization
We may be weeaboos, but at least we’re *educated* weeaboos.
2017-02-18 19:40:12 +01:00
Andrei "Akari" Alexeyev
ba64c5cfb8 Fixed some warnings that mingw spits out 2017-02-17 21:27:22 +02:00
Andrei "Akari" Alexeyev
32f7edd24e Refactored config into a macro hell 2017-02-17 18:03:49 +02:00
Martin Herkt
582b2f9dd9
Fix minor pointer/memory management issues 2017-02-15 14:35:07 +01:00
Andrei "Akari" Alexeyev
9a7a874783 Use the standard bool type instead of that stupid enum
Also removed all of the annoying trailing tabs/whitespaces
2017-02-11 05:56:47 +02:00
Andrei "Akari" Alexeyev
167e9e12f1 Initial migration to SDL2 (WIP) 2017-02-04 04:56:40 +02:00
Martin Herkt
0212de9786 Credits: Add aiju. Thanks for all the advice-giving and debugging! 2012-12-21 00:59:35 +01:00
Andrew "Akari" Alexeyew
1ec7a1107d fixed creidts -> mainmenu transition 2012-08-16 17:41:04 +03:00
Andrew "Akari" Alexeyew
4a8ef08639 Merge branch 'newmenu' into events
Conflicts:
	src/credits.c
2012-08-14 19:05:28 +03:00
laochailan
a7685eb6e1 integrated transitions 2012-08-14 17:56:53 +02:00
Andrew "Akari" Alexeyew
cf72d8dee3 event abstraction layer 2012-08-13 18:50:28 +03:00
laochailan
d3bea2f52b revisited menus 2012-08-12 16:54:48 +02:00
Andrew "Akari" Alexeyew
7776443935 multistage replays 2012-08-07 06:28:41 +03:00
laochailan
db24e18273 changed lachs0r's e-mail address 2012-08-06 14:23:25 +02:00
Andrew "Akari" Alexeyew
31690ef3dc fade from/to white; yukkuri image; added missing glColor calls 2012-08-06 07:17:51 +03:00
Andrew "Akari" Alexeyew
8d09a57a2e got rid of the jitter; commended the burj khalifa credit 2012-08-06 00:39:14 +03:00
Andrew "Akari" Alexeyew
8c8e6737d2 filled credits 2012-08-06 00:27:34 +03:00