CRenderer: Make use of in-class initializers

Same behavior, less code.
This commit is contained in:
Lioncash 2020-06-19 18:51:43 -04:00
parent f88122b2ed
commit 9441933ce2
2 changed files with 12 additions and 15 deletions

View File

@ -7,7 +7,6 @@
#include <Common/Math/CTransform4f.h>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <vector>
#include <sstream>
@ -17,11 +16,6 @@ uint32 CRenderer::sNumRenderers = 0;
// ************ INITIALIZATION ************
CRenderer::CRenderer()
: mOptions(ERenderOption::EnableUVScroll | ERenderOption::EnableBackfaceCull)
, mBloomMode(EBloomMode::NoBloom)
, mDrawGrid(true)
, mInitialized(false)
, mContextIndex(-1)
{
sNumRenderers++;
}

View File

@ -48,20 +48,23 @@ enum class EBloomMode
*/
class CRenderer
{
FRenderOptions mOptions;
EBloomMode mBloomMode;
bool mDrawGrid;
FRenderOptions mOptions{ERenderOption::EnableUVScroll | ERenderOption::EnableBackfaceCull};
EBloomMode mBloomMode{EBloomMode::NoBloom};
bool mDrawGrid = true;
CColor mClearColor;
uint32 mContextIndex;
bool mInitialized;
uint32 mViewportWidth, mViewportHeight;
uint32 mBloomWidth, mBloomHeight;
float mBloomHScale, mBloomVScale;
uint32 mContextIndex = UINT32_MAX;
bool mInitialized = false;
uint32 mViewportWidth = 0;
uint32 mViewportHeight = 0;
uint32 mBloomWidth = 0;
uint32 mBloomHeight = 0;
float mBloomHScale = 0.0f;
float mBloomVScale = 0.0f;
CFramebuffer mSceneFramebuffer;
CFramebuffer mPostProcessFramebuffer;
CFramebuffer mBloomFramebuffers[3];
GLint mDefaultFramebuffer;
GLint mDefaultFramebuffer = 0;
CRenderBucket mBackgroundBucket;
CRenderBucket mMidgroundBucket;