1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 17:53:47 +00:00
Commit graph

26 commits

Author SHA1 Message Date
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
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
f1656d2fbc small clarification in framebuffer, no functional change 2023-08-26 02:09:44 +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
71f9120c30 rework AfterEffect to use RenderGrid instead of its own thing 2023-08-25 14:07:11 +02:00
fgenesis
16235a4ad1 Get rid of GL functions with double precision that were accidentally used 2023-07-18 18:59:09 +02:00
fgenesis
b6fb6944f6 first step towards making the render process const 2022-05-19 05:17:00 +02:00
fgenesis
7a60f493a5 Re-enable double->float cast warning and fix all instances where this fired 2017-01-19 23:31:56 +01:00
Valentin Ochs
f9357e7fca Merge branch 'gccwarn' into controllerfixup 2017-01-17 11:15:47 +01:00
Valentin Ochs
fe0ab0418b Get rid of a lot of gcc warnings
Mostly signed/unsigned comparisons. Also some bugs, but I don't remember
where :D
2017-01-14 18:10:20 +01:00
fgenesis
0dc30e668d Merge branch 'experimental' into controllerfixup
# Conflicts:
#	Aquaria/Avatar.cpp
#	Aquaria/Continuity.cpp
#	Aquaria/DSQ.cpp
#	Aquaria/DSQ.h
#	Aquaria/Game.cpp
#	Aquaria/Game.h
#	Aquaria/Main.cpp
#	Aquaria/UserSettings.cpp
#	BBGE/Base.cpp
#	BBGE/Base.h
#	BBGE/Core.cpp
#	BBGE/Core.h
#	BBGE/DebugFont.cpp
#	BBGE/Shader.cpp
#	BBGE/SoundManager.h
2017-01-13 12:19:23 +01:00
fgenesis
8af953cb63 Replace spaces with tabs (future self: i'm sorry)
In most places, that is. Left some files unchanges because they are a mess.
2017-01-12 22:51:46 +01:00
Valentin Ochs
dcd21b57bd Merge pull request #41 2017-01-12 22:14:26 +01:00
fgenesis
0d8a5c191c More graphics init cleanup. Remove aspect ratio check. Fix screen transition effect that broke in prev. commits. 2016-11-15 13:00:30 +01:00
fgenesis
c943759ce1 Getting closer to mutliple inputs actually working
Split logic and state from ActionMapper into another class,
of which one exists per input set.
2016-07-17 22:25:24 +02:00
fgenesis
8472718fb7 Major include refactor; changes to pretty much everything
This untangles some of the gigantic kitchen sink headers
in an attempt to split things into smaller files.
Also don't include gl.h, glext.h, windows.h,
and other such nonsense *everywhere*.

Lots of cleanups on the way too. More dead/unused code removal.

Remove incrFlag(), decrFlag() Lua functions.
2016-07-09 04:18:40 +02:00
Nicolas Braud-Santoni
eb128e65a4 Remove commented-out code 2016-05-05 19:57:50 +02:00
Nicolas Braud-Santoni
276265be1d Eliminating obsolete #ifdefs and friends (#26)
The following options have been applied globally, using unifdef(1):
```c
 #undef BBGE_BUILD_DIRECTX

 #define BBGE_BUILD_OPENGL 1
 #define GL_GLEXT_LEGACY   1
 #define HAVE_PUTENV       1
 #define TIXML_USE_STL     1
 #define BBGE_BUILD_SDL    1
```
2016-05-05 03:49:41 +02:00
fgenesis
69e25640fb Reload shaders on resolution change. 2013-10-25 01:44:34 +02:00
fgenesis
6962a3e3ab Improvements to shader API; use handles instead of raw pointers. 2013-06-15 04:11:11 +02:00
fgenesis
836de14093 Implement multi-pass postprocessing shader.
This allows attaching multiple shader programs, processing the entire
screen as texture. Chaining shaders works, each shader will use
the output of the previous shader as input.
2013-06-15 02:38:49 +02:00
fgenesis
3485199bec temp commit - work on shaders 2013-06-15 00:58:32 +02:00
fgenesis
8c80cf6318 Add shader interface API to Lua API 2013-05-12 00:06:26 +02:00
fgenesis
9b63b400d5 Misc code cleanups, little SkeletalSprite loading improvement.
- Removed some unused member variables.

- The BBGE_BUILD_WIDESCREEN define is now gone.

- Added an TiXMLDocument cache to prevent parsing the same file
once for each entity on the map with the same skeletal.

- Removed Lua func entity_warpToPathStart, which was essentially a no-op
because Entity::followingPath was always NULL. Removed related code.

- Set texture wrap only when required.

(Some changes taken from https://bitbucket.org/mattbierner/ios-aquaria,
special thanks for changeset 72d6460d9e60)
2012-02-19 04:57:04 +01:00
fgenesis
3096eaf5e2 initial commit. This is icculus version 5542b94cae02a6333845854bbbd1abe0a259f1a4 2011-08-03 22:05:33 +02:00