1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-24 17:26:41 +00:00
Aquaria/BBGE
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
..
ActionInput.cpp warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
ActionInput.h temp commit 2018-01-21 12:47:32 +01:00
ActionMapper.cpp Get rid of a lot of gcc warnings 2021-01-11 12:28:27 +01:00
ActionMapper.h Fix ACTION_MENU* input to be sent as intended, broke in a7c2d054a2 iirc 2021-01-12 14:24:30 +01:00
ActionSet.cpp warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
ActionSet.h warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
ActionStatus.cpp warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
ActionStatus.h Fix ACTION_MENU* input to be sent as intended, broke in a7c2d054a2 iirc 2021-01-12 14:24:30 +01:00
AfterEffect.cpp Changes to rendering logic, incl water surface flicker fix, plus other fixes. 2024-04-25 03:33:02 +02:00
AfterEffect.h Changes to rendering logic, incl water surface flicker fix, plus other fixes. 2024-04-25 03:33:02 +02:00
Base.cpp remove pointless self-refs (dsq->... and core->...) in DSQ 2023-05-31 17:37:20 +02:00
Base.h warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
BaseText.h Build fixes for Linux, some warnings and compatibility fixes for C++17 and up 2023-05-25 16:58:08 +02:00
bithacks.h remove zlib, libpng, glpng and related code; add some stb libs; rework texture loading 2022-03-31 21:03:40 +02:00
BitmapFont.cpp warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
BitmapFont.h BmpFont usage is now a ref instead of a ptr, const-ify glfont 2023-05-31 17:08:52 +02:00
CMakeLists.txt warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
Cocoa.mm
Core.cpp Changes to rendering logic, incl water surface flicker fix, plus other fixes. 2024-04-25 03:33:02 +02:00
Core.h Changes to rendering logic, incl water surface flicker fix, plus other fixes. 2024-04-25 03:33:02 +02:00
DarkLayer.cpp Changes to rendering logic, incl water surface flicker fix, plus other fixes. 2024-04-25 03:33:02 +02:00
DarkLayer.h Changes to rendering logic, incl water surface flicker fix, plus other fixes. 2024-04-25 03:33:02 +02:00
DataStructures.cpp Rewrite SceneEditor level generation and skinning, use light pink to designate areas that should not be skinned 2022-07-06 08:59:55 +02:00
DataStructures.h More work on tile rendering: 2023-08-09 02:41:04 +02:00
DebugFont.cpp warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
DebugFont.h Build fixes for Linux, some warnings and compatibility fixes for C++17 and up 2023-05-25 16:58:08 +02:00
Emitter.cpp tentative fix for particle flip not working properly in some cases 2023-10-20 03:53:29 +02:00
EngineEnums.h remove RenderObject::blendEnabled and cleanup the blend code a bit 2022-05-19 01:34:31 +02:00
Event.cpp warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
Event.h warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
FmodOpenALBridge.cpp warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
FmodOpenALBridge.h
FrameBuffer.cpp Changes to rendering logic, incl water surface flicker fix, plus other fixes. 2024-04-25 03:33:02 +02:00
FrameBuffer.h Changes to rendering logic, incl water surface flicker fix, plus other fixes. 2024-04-25 03:33:02 +02:00
GameKeyNames.cpp Fix crash in static initializer (how did this ever work?) 2017-02-27 02:03:46 +01:00
GameKeyNames.h Turns out using IDs was a bad idea, reverting to KEY_* strings 2017-02-18 22:09:43 +01:00
GameKeys.h warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
GLLoad.cpp Changes to rendering logic, incl water surface flicker fix, plus other fixes. 2024-04-25 03:33:02 +02:00
GLLoad.h remove zlib, libpng, glpng and related code; add some stb libs; rework texture loading 2022-03-31 21:03:40 +02:00
Gradient.cpp Add RenderState to be passed through the scene graph 2022-05-20 01:04:19 +02:00
Gradient.h Build fixes for Linux, some warnings and compatibility fixes for C++17 and up 2023-05-25 16:58:08 +02:00
Image.cpp warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
Image.h support loading *.qoi images 2023-05-31 18:07:55 +02:00
Interpolators.cpp Initial implementation of bspline support in the animation editor 2022-09-23 18:10:44 +02:00
Interpolators.h Initial implementation of bspline support in the animation editor 2022-09-23 18:10:44 +02:00
Joystick.cpp warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
Joystick.h warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
Localization.cpp
Localization.h
MathFunctions.h Get rid of a lot of gcc warnings 2021-01-11 12:28:27 +01:00
MT.cpp warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
MT.h
OpenGLStubs.h Changes to rendering logic, incl water surface flicker fix, plus other fixes. 2024-04-25 03:33:02 +02:00
OSFunctions.cpp warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
OSFunctions.h show better errors when we fail to start up 2022-06-20 04:25:18 +02:00
ParticleEffect.cpp first step towards making the render process const 2022-05-19 05:17:00 +02:00
ParticleManager.cpp remove iprof and BBGE_PROF (#74) 2022-03-17 20:50:42 +01:00
Particles.h tentative fix for particle flip not working properly in some cases 2023-10-20 03:53:29 +02:00
Precacher.cpp warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
Precacher.h Rework texture loading, part 1 2023-05-31 00:55:16 +02:00
Quad.cpp remove last traces of GL_BLEND/glBlendFunc() manipulation 2024-01-11 23:05:47 +01:00
Quad.h editor: fix multi-select, scaling, sideways-scaling, texcoords 2023-10-21 00:33:49 +02:00
QuadGrid.cpp Add RenderState to be passed through the scene graph 2022-05-20 01:04:19 +02:00
QuadGrid.h Build fixes for Linux, some warnings and compatibility fixes for C++17 and up 2023-05-25 16:58:08 +02:00
ReadXML.cpp remove zlib, libpng, glpng and related code; add some stb libs; rework texture loading 2022-03-31 21:03:40 +02:00
ReadXML.h Put tinyxml2 in subdir so that system header is respected 2017-02-10 10:01:24 +00:00
Rect.h Cleanup underwater checks, fix rectangular water bubbles 2023-06-23 15:05:05 +02:00
Refcounted.h Drop textures when no longer needed 2023-05-31 01:36:50 +02:00
RenderBase.cpp
RenderBase.h Changes to rendering logic, incl water surface flicker fix, plus other fixes. 2024-04-25 03:33:02 +02:00
RenderGrid.cpp only update VBO if texcoords actually change 2023-10-25 01:52:03 +02:00
RenderGrid.h warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
RenderObject.cpp remove last traces of GL_BLEND/glBlendFunc() manipulation 2024-01-11 23:05:47 +01:00
RenderObject.h get rid of beforeScaleOffset 2023-08-26 00:58:47 +02:00
RenderObject_inline.h Rework + optimize map tile storage & rendering, initial working draft. 2023-07-14 00:19:33 +02:00
RenderObjectLayer.cpp Changes to rendering logic, incl water surface flicker fix, plus other fixes. 2024-04-25 03:33:02 +02:00
RenderRect.cpp Remove RenderObject::setColorMult() hack and related members 2022-05-21 16:31:10 +02:00
RenderState.cpp remove last traces of GL_BLEND/glBlendFunc() manipulation 2024-01-11 23:05:47 +01:00
RenderState.h remove last traces of GL_BLEND/glBlendFunc() manipulation 2024-01-11 23:05:47 +01:00
RoundedRect.cpp Add RenderState to be passed through the scene graph 2022-05-20 01:04:19 +02:00
RoundedRect.h Build fixes for Linux, some warnings and compatibility fixes for C++17 and up 2023-05-25 16:58:08 +02:00
ScreenTransition.cpp Changes to rendering logic, incl water surface flicker fix, plus other fixes. 2024-04-25 03:33:02 +02:00
ScreenTransition.h Build fixes for Linux, some warnings and compatibility fixes for C++17 and up 2023-05-25 16:58:08 +02:00
ScriptObject.cpp
ScriptObject.h More RenderObject slimming; reorder members, split out motion blur data + collideRadius, add new CollideQuad type 2022-05-18 19:44:42 +02:00
Shader.cpp Rework & cleanup CMake project files 2022-04-07 02:38:39 +02:00
Shader.h Change some stuff for butt-endian architectures 2021-01-11 12:28:27 +01:00
SimpleIStringStream.h fix derp in 4c52a147b0 2022-09-23 18:21:36 +02:00
SkeletalSprite.cpp fix bone with spline deform not deforming (forgot tp update VBO) 2024-02-06 01:36:38 +01:00
SkeletalSprite.h add AC_SET_FH bone command; rework bone frames; some skel cleanups 2023-12-21 06:04:09 +01:00
Slider.cpp
Slider.h
SoundManager.cpp Rework & cleanup CMake project files 2022-04-07 02:38:39 +02:00
SoundManager.h Fix some warnings 2017-01-20 19:10:40 +01:00
SpawnParticleData.cpp remove RenderObject::blendEnabled and cleanup the blend code a bit 2022-05-19 01:34:31 +02:00
SplineGrid.cpp fix bone with spline deform not deforming (forgot tp update VBO) 2024-02-06 01:36:38 +01:00
SplineGrid.h Merge branch 'experimental' into tile-optimization 2023-10-26 01:41:51 +02:00
StateMachine.cpp
StateMachine.h
StateManager.cpp Build fixes for Linux, some warnings and compatibility fixes for C++17 and up 2023-05-25 16:58:08 +02:00
StateManager.h warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
StringBank.cpp very slightly more verbose loading 2023-06-01 12:59:07 +02:00
StringBank.h warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
Texture.cpp undo parts of prev commits; move old fudge from font atlas code to tile rendering. 2023-10-20 02:06:45 +02:00
Texture.h only update VBO if texcoords actually change 2023-10-25 01:52:03 +02:00
TextureMgr.cpp compile fixes for clang when c++98 is enforced 2024-02-07 03:26:18 +01:00
TextureMgr.h warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
Tile.cpp fix waving for tiles with EFX_WAVY set; minor optimizations 2024-02-06 04:01:13 +01:00
Tile.h fix waving for tiles with EFX_WAVY set; minor optimizations 2024-02-06 04:01:13 +01:00
TileRender.cpp some more TileRender optimization 2024-01-11 23:02:34 +01:00
TileRender.h fixes to SceneEditor, some more things are working again 2023-10-20 00:35:25 +02:00
Tileset.cpp more editor fixes: 2023-10-25 00:46:12 +02:00
Tileset.h more editor fixes: 2023-10-25 00:46:12 +02:00
TTFFont.cpp remove last traces of GL_BLEND/glBlendFunc() manipulation 2024-01-11 23:05:47 +01:00
TTFFont.h Build fixes for Linux, some warnings and compatibility fixes for C++17 and up 2023-05-25 16:58:08 +02:00
Vector.cpp Get rid of a lot of gcc warnings 2021-01-11 12:28:27 +01:00
Vector.h fix Hair, now using VBO and working 2023-10-26 22:18:19 +02:00
VertexBuffer.cpp fix some oversights in vertex buffer binding cache 2024-01-11 22:59:26 +01:00
VertexBuffer.h warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat 2024-04-16 01:43:36 +02:00
Window.cpp fixes to window size management, fullscreen transition, etc 2021-01-12 11:06:09 +01:00
Window.h fixes to window size management, fullscreen transition, etc 2021-01-12 11:06:09 +01:00
Window_SDL1.cpp fixes to window size management, fullscreen transition, etc 2021-01-12 11:06:09 +01:00
Window_SDL2.cpp Experimenting with GL debug context and GL_ARB_debug_output 2023-08-09 02:34:12 +02:00