renderer: enable GL clear by default #440
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GL Clear is expected to paint the screen with an arbitrary color before painting anything else, and that action is not expected to slow down things as far as I know. This is used make sure the non-drawn area are filled with something and prevent garbage do be displayed instead.
Enabling GL Clear by default has two benefits:
cheat
cvar, if it's disabled by default players are not able to hide the void when playing on regular games. Fun stuff is that people playing to Tremulous since more than a decade have reported issues on Unvanquished… that turned to be Arachnid2 void that was there since 2006, but such people only noticed it on Dæmon engine engine.lowest
preset to usefastsky
feature, which just skips rendering the sky, relying on the clear function instead (so clear must be enabled), I noticed very noticeable performance gain by doing this on low hardware (skybox rendering is known to be a bit costly in our engine). So,r_clear 1
+r_fastsky 1
gives a performance boost, while I never seenr_clear 0
giving a performance boost, even on very very very old hardware. Ifr_clear
is not enabled by default, togglingr_fastsky
in presets would be unpredictable.The drawback of enabling GL Clear is that it makes less obvious for the mapper he forgot to paint a wall, because the glitches makes obvious there is some void there. But instead of relying on glitches to debug maps, maybe we would want to use an explicit GL clear color (like red) when loading maps with
devmap
.For now, we may still enable GL Clear by default.