mirror of
https://github.com/lubosz/overte.git
synced 2025-08-10 15:14:28 +02:00
Conform to coding standards
This commit is contained in:
parent
c19b457401
commit
695c69fd34
2 changed files with 21 additions and 22 deletions
|
@ -17,7 +17,9 @@ RenderContext::RenderContext(ItemsConfig items, Tone tone, int drawStatus, bool
|
||||||
: _deferredDebugMode{ deferredDebugMode }, _deferredDebugSize{ deferredDebugSize },
|
: _deferredDebugMode{ deferredDebugMode }, _deferredDebugSize{ deferredDebugSize },
|
||||||
_args{ nullptr },
|
_args{ nullptr },
|
||||||
_drawStatus{ drawStatus }, _drawHitEffect{ drawHitEffect },
|
_drawStatus{ drawStatus }, _drawHitEffect{ drawHitEffect },
|
||||||
_items{ items }, _tone{ tone } {}
|
_items{ items }, _tone{ tone }
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void RenderContext::setOptions(bool occlusion, bool fxaa, bool showOwned) {
|
void RenderContext::setOptions(bool occlusion, bool fxaa, bool showOwned) {
|
||||||
_occlusionStatus = occlusion;
|
_occlusionStatus = occlusion;
|
||||||
|
|
|
@ -34,27 +34,24 @@ public:
|
||||||
public:
|
public:
|
||||||
class Counter {
|
class Counter {
|
||||||
public:
|
public:
|
||||||
Counter() {};
|
Counter() {}
|
||||||
Counter(const Counter& counter) {
|
Counter(const Counter& counter) : maxDrawn { counter.maxDrawn } {}
|
||||||
numFeed = numDrawn = 0;
|
|
||||||
maxDrawn = counter.maxDrawn;
|
|
||||||
};
|
|
||||||
|
|
||||||
void setCounts(const Counter& counter) {
|
void setCounts(const Counter& counter) {
|
||||||
numFeed = counter.numFeed;
|
numFeed = counter.numFeed;
|
||||||
numDrawn = counter.numDrawn;
|
numDrawn = counter.numDrawn;
|
||||||
};
|
};
|
||||||
|
|
||||||
int numFeed = 0;
|
int numFeed { 0 };
|
||||||
int numDrawn = 0;
|
int numDrawn { 0 };
|
||||||
int maxDrawn = -1;
|
int maxDrawn { -1 };
|
||||||
};
|
};
|
||||||
|
|
||||||
class State : public Counter {
|
class State : public Counter {
|
||||||
public:
|
public:
|
||||||
bool render = true;
|
bool render { true };
|
||||||
bool cull = true;
|
bool cull { true };
|
||||||
bool sort = true;
|
bool sort { true };
|
||||||
|
|
||||||
Counter counter{};
|
Counter counter{};
|
||||||
};
|
};
|
||||||
|
@ -76,16 +73,16 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
RenderContext(ItemsConfig items, Tone tone, int drawStatus, bool drawHitEffect, glm::vec4 deferredDebugSize, int deferredDebugMode);
|
RenderContext(ItemsConfig items, Tone tone, int drawStatus, bool drawHitEffect, glm::vec4 deferredDebugSize, int deferredDebugMode);
|
||||||
RenderContext() : RenderContext({}, {}, {}, {}, {}, {}) {};
|
RenderContext() {}
|
||||||
|
|
||||||
void setArgs(RenderArgs* args) { _args = args; }
|
void setArgs(RenderArgs* args) { _args = args; }
|
||||||
inline RenderArgs* getArgs() { return _args; }
|
RenderArgs* getArgs() { return _args; }
|
||||||
inline ItemsConfig& getItemsConfig() { return _items; }
|
ItemsConfig& getItemsConfig() { return _items; }
|
||||||
inline Tone& getTone() { return _tone; }
|
Tone& getTone() { return _tone; }
|
||||||
inline int getDrawStatus() { return _drawStatus; }
|
int getDrawStatus() { return _drawStatus; }
|
||||||
inline bool getDrawHitEffect() { return _drawHitEffect; }
|
bool getDrawHitEffect() { return _drawHitEffect; }
|
||||||
inline bool getOcclusionStatus() { return _occlusionStatus; }
|
bool getOcclusionStatus() { return _occlusionStatus; }
|
||||||
inline bool getFxaaStatus() { return _fxaaStatus; }
|
bool getFxaaStatus() { return _fxaaStatus; }
|
||||||
void setOptions(bool occlusion, bool fxaa, bool showOwned);
|
void setOptions(bool occlusion, bool fxaa, bool showOwned);
|
||||||
|
|
||||||
// Debugging
|
// Debugging
|
||||||
|
@ -98,8 +95,8 @@ protected:
|
||||||
// Options
|
// Options
|
||||||
int _drawStatus; // bitflag
|
int _drawStatus; // bitflag
|
||||||
bool _drawHitEffect;
|
bool _drawHitEffect;
|
||||||
bool _occlusionStatus = false;
|
bool _occlusionStatus { false };
|
||||||
bool _fxaaStatus = false;
|
bool _fxaaStatus = { false };
|
||||||
|
|
||||||
ItemsConfig _items;
|
ItemsConfig _items;
|
||||||
Tone _tone;
|
Tone _tone;
|
||||||
|
|
Loading…
Reference in a new issue