CRenderer: Make use of in-class initializers
Same behavior, less code.
This commit is contained in:
parent
f88122b2ed
commit
9441933ce2
|
@ -7,7 +7,6 @@
|
||||||
#include <Common/Math/CTransform4f.h>
|
#include <Common/Math/CTransform4f.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
@ -17,11 +16,6 @@ uint32 CRenderer::sNumRenderers = 0;
|
||||||
|
|
||||||
// ************ INITIALIZATION ************
|
// ************ INITIALIZATION ************
|
||||||
CRenderer::CRenderer()
|
CRenderer::CRenderer()
|
||||||
: mOptions(ERenderOption::EnableUVScroll | ERenderOption::EnableBackfaceCull)
|
|
||||||
, mBloomMode(EBloomMode::NoBloom)
|
|
||||||
, mDrawGrid(true)
|
|
||||||
, mInitialized(false)
|
|
||||||
, mContextIndex(-1)
|
|
||||||
{
|
{
|
||||||
sNumRenderers++;
|
sNumRenderers++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,20 +48,23 @@ enum class EBloomMode
|
||||||
*/
|
*/
|
||||||
class CRenderer
|
class CRenderer
|
||||||
{
|
{
|
||||||
FRenderOptions mOptions;
|
FRenderOptions mOptions{ERenderOption::EnableUVScroll | ERenderOption::EnableBackfaceCull};
|
||||||
EBloomMode mBloomMode;
|
EBloomMode mBloomMode{EBloomMode::NoBloom};
|
||||||
bool mDrawGrid;
|
bool mDrawGrid = true;
|
||||||
CColor mClearColor;
|
CColor mClearColor;
|
||||||
uint32 mContextIndex;
|
uint32 mContextIndex = UINT32_MAX;
|
||||||
bool mInitialized;
|
bool mInitialized = false;
|
||||||
uint32 mViewportWidth, mViewportHeight;
|
uint32 mViewportWidth = 0;
|
||||||
uint32 mBloomWidth, mBloomHeight;
|
uint32 mViewportHeight = 0;
|
||||||
float mBloomHScale, mBloomVScale;
|
uint32 mBloomWidth = 0;
|
||||||
|
uint32 mBloomHeight = 0;
|
||||||
|
float mBloomHScale = 0.0f;
|
||||||
|
float mBloomVScale = 0.0f;
|
||||||
|
|
||||||
CFramebuffer mSceneFramebuffer;
|
CFramebuffer mSceneFramebuffer;
|
||||||
CFramebuffer mPostProcessFramebuffer;
|
CFramebuffer mPostProcessFramebuffer;
|
||||||
CFramebuffer mBloomFramebuffers[3];
|
CFramebuffer mBloomFramebuffers[3];
|
||||||
GLint mDefaultFramebuffer;
|
GLint mDefaultFramebuffer = 0;
|
||||||
|
|
||||||
CRenderBucket mBackgroundBucket;
|
CRenderBucket mBackgroundBucket;
|
||||||
CRenderBucket mMidgroundBucket;
|
CRenderBucket mMidgroundBucket;
|
||||||
|
|
Loading…
Reference in New Issue