1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-26 02:03:48 +00:00
Commit graph

519 commits

Author SHA1 Message Date
fgenesis
4bebd71198 make editor outline not so dull, closer to what it was 2024-05-06 04:27:28 +02:00
fgenesis
0326800940 fix broken scrolling in mod selector in vertical mode 2024-04-28 13:15:41 +02:00
fgenesis
8d1a0a1a8a don't update render water surface framebuffer when off screen
more accurate check than previously; because the normal isOnScreen()
uses a bounding circle check... which gets pretty large for something
that spans the entire screen width.
2024-04-28 04:04:30 +02:00
fgenesis
56922a0b6e Vertical mode is a go!
- mouse problems fixed
- make sure subtitles stay near the bottom of the screen
2024-04-28 03:08:44 +02:00
fgenesis
2cf5932eb3 Preliminary support for vertial orientation:
- remove top & bottom black bars
- fix minimap position to take virtual y offset into account
- same for editor bar, and version label
- fix grid render errorneously assuming that core->cameraPos.y was always 0
- fix typo in gradient height adjustment
- don't slide minimap when there's enough virtual space so that it's not in the way
2024-04-28 02:08:38 +02:00
fgenesis
d47aeea2ce Cleanup to world<->window coord conversion; add toWorldFromWindow() Lua func 2024-04-28 00:03:51 +02:00
fgenesis
f7090f33d5 fix issues with glDrawBuffersARB() code path in prev commit 2024-04-26 03:28:07 +02:00
fgenesis
09edbf49fd Changes to rendering logic, incl water surface flicker fix, plus other fixes.
This commit changes a bunch of internal rendering logic to
use FBOs in a way that doesn't violate the GL spec.
The water surface FBO's output texture was bound for reading
while at the same time rendering the water surface back into the
same FBO! Depending on the card/driver/load/zoom factor/moon phase,
this could lead to water surface flickering, chessboard effects,
and other visual glitches.
In order to fix this an extra FBO is needed.
In theory this is a simple fix but in practice this is the Aquaria
codebase and everything is more complicated than it has any right to be.

Couple other things:

- FBOs no longer have a depth renderbuffer. Aquaria never uses the depth
buffer for anything, so this can go to save some memory.
Also remove renderbuffer GL function pointers.

- Make FBOs multi-"paged". This is supposedly more efficient on desktop GL,
if glDrawBuffer() supports GL_COLOR_ATTACHMENTn. This is currently checked
via the presence of glDrawBuffersARB().

- Main core FBO now has 2 pages becaus it's needed for the water surface.
The same 2 pages are later used by the after effect manager to ping-pong
postprocessing shaders. Remove private after effect FBO.

TODO:
- There's still a bug in the one-fbo-multiple-binding-points code path.
-> for now glDrawBuffersARB must be NULL to work properly.
2024-04-25 03:33:02 +02:00
fgenesis
dd7ab0448f warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat
many many more to do but it's a little step closer to get rid of warnings
2024-04-16 01:43:36 +02:00
fgenesis
ebf49310b3 compile fixes for clang when c++98 is enforced 2024-02-07 03:26:18 +01:00
fgenesis
8c467517fd fix waving for tiles with EFX_WAVY set; minor optimizations 2024-02-06 04:01:13 +01:00
fgenesis
063c270e6a fix bone with spline deform not deforming (forgot tp update VBO)
also fix SplineGrid to actually deform own texture
(note to self: GRID_WAVY resets deform in update(). oops)
2024-02-06 01:36:38 +01:00
fgenesis
5a24f2868b fix handling of EF_HURT -- shouldn't be trimmed 2024-01-31 01:11:25 +01:00
fgenesis
511f064bbe Make GridRender use a single draw call instead of expensive grid scanning 2024-01-13 04:25:27 +01:00
fgenesis
70b8e69402 remove last traces of GL_BLEND/glBlendFunc() manipulation
everything goes through RenderState now
some calls are left in FTGL but properly invalidated afterwards
2024-01-11 23:05:47 +01:00
fgenesis
d3cbc181bd some more TileRender optimization
- no longer uses GL matrix stack manipulation, all matrix math is done locally
- use fixed rotation matrixes for fh/fv
- don't touch GL buffers (fixes crash with prev. commit)
2024-01-11 23:02:34 +01:00
fgenesis
ee7129982f fix some oversights in vertex buffer binding cache
now buffers are only bound if needed
2024-01-11 22:59:26 +01:00
fgenesis
b63d27b7b5 Merge branch 'experimental' into tile-optimization 2024-01-11 00:25:23 +01:00
fgenesis
49ffcf227b FrameBuffer: change glTexImage2D to use more a compatible format
reported by pbarzena -- apparently causes problems with newer nvidia gpus on win11
but i'm not sure if this is really the problem
2024-01-11 00:06:42 +01:00
fgenesis
56169b7001 fix Li's head missing. broke in cf2dc71a34
rq=0 used to hide the base head gfx to only show frames.
but rq=0 is not what we want after consolidating those extra quads into the base quad.
so in order to keep backwards compat, unhide a bone if it has frame tiles.
2023-12-29 22:44:23 +01:00
fgenesis
add9c81033 tiny fix for tile deletion 2023-12-29 22:43:43 +01:00
fgenesis
9faee6cf79 fix Li's head missing. broke in cf2dc71a34
rq=0 used to hide the base head gfx to only show frames.
but rq=0 is not what we want after consolidating those extra quads into the base quad.
so in order to keep backwards compat, unhide a bone if it has frame tiles.
2023-12-29 22:43:05 +01:00
fgenesis
f641764765 Merge branch 'experimental' into tile-optimization 2023-12-21 14:20:22 +01:00
fgenesis
cf2dc71a34 add AC_SET_FH bone command; rework bone frames; some skel cleanups
- bone frames are no longer separate quads. this is probably a leftover
  from when crossfading was planned, but this was never implemented.
  now it's a simple texture swap.
- remove anim resetPassOnEnd attrib
- instead, add resetOnEnd that applies to everything that was changed via bone command
- resetOnEnd=true is the new default
2023-12-21 06:04:09 +01:00
fgenesis
6d70204847 fixes for osx 2023-11-19 19:59:06 +01:00
fgenesis
4dc374c367 forgot to make a method const 2023-11-17 01:39:46 +01:00
fgenesis
ec5f50e41e fix jittering when moving the camera around in map editor mode.
This is related to a494a3f411 and should hopefully
fix the last issues with this for good.
Seems fine with SDL versions from 2022 and 2023 on windows;
untested on linux.

(The second window->handleInput() that got removed broke the sing circle
if it was there. It was previously added as a mitigation and is no longer
needed.)
2023-10-28 06:08:19 +02:00
fgenesis
c91f5ea4c1 don't show standard, non-animated grid points in debug vis 2023-10-26 22:18:54 +02:00
fgenesis
9f169c8419 fix Hair, now using VBO and working 2023-10-26 22:18:19 +02:00
fgenesis
d68e4002ad Hair uses VBOs now but it's fucked. will fix when sober. 2023-10-26 03:22:27 +02:00
fgenesis
d33e8f9116 Merge branch 'experimental' into tile-optimization
# Conflicts:
#	Aquaria/ScriptInterface.cpp
#	BBGE/AfterEffect.cpp
#	BBGE/RenderGrid.cpp
#	BBGE/SkeletalSprite.cpp
2023-10-26 01:41:51 +02:00
fgenesis
03eeb7f4e9 only update VBO if texcoords actually change 2023-10-25 01:52:03 +02:00
fgenesis
011b9f2a82 more editor fixes:
- correctly sort ElementTemplate by idx, not by pointer. oops.
- selecting tiles works again (new: including wraparound)
- don't display layer tile borders when switching to other edit modes
- make sure that tile selection wraparound doesn't pick up font letter tiles
2023-10-25 00:46:12 +02:00
fgenesis
0a2965e26b editor: fix multi-select, scaling, sideways-scaling, texcoords 2023-10-21 00:33:49 +02:00
fgenesis
eaa1746f4e tentative fix for particle flip not working properly in some cases 2023-10-20 03:53:29 +02:00
fgenesis
a1b2762b59 fixes to prev. commits.
+ Lua func *_getRepeatScale()
2023-10-20 03:31:28 +02:00
fgenesis
4852eb533b update texcoords of quads which have AUTO_VIRTUAL* set properly
move auto size vars & handling to PauseQuad, since not every quad needs this.
2023-10-20 03:21:05 +02:00
fgenesis
4c941419b4 ensure that texcoords are always updated when changing things that affect them 2023-10-20 02:42:52 +02:00
fgenesis
f1796475f1 undo parts of prev commits; move old fudge from font atlas code to tile rendering.
this should now be correct and much simpler to maintain from now on.
downside is that it breaks the appearance of quads with tex repeat on,
but i don't think anyone ever used this ever since i've added the Lua functions;
so i'm just calling it broken in older versions and move on.
2023-10-20 02:06:45 +02:00
fgenesis
b33080b0ea remove immediate mode from quad rendering. breaks a couple rendering details too. WIP. 2023-10-20 00:37:00 +02:00
fgenesis
a4ea66761b fixes to SceneEditor, some more things are working again 2023-10-20 00:35:25 +02:00
fgenesis
4013a9c09b working on quad repeat, this probably breaks it but will continue later 2023-09-13 23:39:22 +02:00
fgenesis
db8912cb16 Merge branch 'tile-optimization' of github.com:AquariaOSE/Aquaria into tile-optimization 2023-09-10 20:34:09 +02:00
fgenesis
8d49e62428 SceneEditor: hovering tiles works again 2023-09-08 19:23:03 +02:00
fgenesis
f1656d2fbc small clarification in framebuffer, no functional change 2023-08-26 02:09:44 +02:00
fgenesis
048a787cb1 get rid of beforeScaleOffset 2023-08-26 00:58:47 +02:00
fgenesis
c959b9f6d6 don't need to set line width again and again 2023-08-26 00:31:46 +02:00
fgenesis
a111bfc17f use VBO to render tile borders
Also fix oversight in DynamicGPUBuffer::drawElements(); first wasn't used
2023-08-26 00:14:05 +02:00
fgenesis
cc78b300cc Cleanups and fixes to AfterEffect
- fully uses RenderGrid now, no more immediate mode
- remove RippleEffect because it was unused
- Don't render the grid if no effects are active. Sames some GPU time.
- Fix ShockEffect math, broken 2 commits ago
2023-08-25 21:49:16 +02:00
fgenesis
c1084a022d forgot a virtual dtor 2023-08-25 20:14:30 +02:00