1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-01-03 02:39:03 +00:00

primitive-based rendering of the Berger sphere (very poor)

This commit is contained in:
Zeno Rogue
2020-07-24 23:39:30 +02:00
parent 2dff2df4fe
commit 94cac21716
5 changed files with 221 additions and 7 deletions

View File

@@ -1573,10 +1573,13 @@ EX void enable_flat_model() {
#if HDR
/** \brief enable the 'flat' model for drawing HUD. Use RAII so it will be switched back later */
namespace stretch { extern ld factor; }
struct flat_model_enabler {
projection_configuration bak;
flat_model_enabler() { bak = pconf; enable_flat_model(); }
~flat_model_enabler() { pconf = bak; calcparam(); }
ld sf;
flat_model_enabler() { bak = pconf; sf = stretch::factor; stretch::factor = 0; enable_flat_model(); }
~flat_model_enabler() { pconf = bak; stretch::factor = sf; calcparam(); }
};
#endif