feat: add explicit camera clear modes
This commit is contained in:
@@ -11,6 +11,13 @@ enum class CameraProjectionType {
|
||||
Orthographic
|
||||
};
|
||||
|
||||
enum class CameraClearMode {
|
||||
Auto = 0,
|
||||
ColorAndDepth,
|
||||
DepthOnly,
|
||||
None
|
||||
};
|
||||
|
||||
class CameraComponent : public Component {
|
||||
public:
|
||||
std::string GetName() const override { return "Camera"; }
|
||||
@@ -36,6 +43,9 @@ public:
|
||||
bool IsPrimary() const { return m_primary; }
|
||||
void SetPrimary(bool value) { m_primary = value; }
|
||||
|
||||
CameraClearMode GetClearMode() const { return m_clearMode; }
|
||||
void SetClearMode(CameraClearMode value) { m_clearMode = value; }
|
||||
|
||||
const Math::Color& GetClearColor() const { return m_clearColor; }
|
||||
void SetClearColor(const Math::Color& value) { m_clearColor = value; }
|
||||
|
||||
@@ -50,6 +60,7 @@ private:
|
||||
float m_farClipPlane = 1000.0f;
|
||||
float m_depth = 0.0f;
|
||||
bool m_primary = true;
|
||||
CameraClearMode m_clearMode = CameraClearMode::Auto;
|
||||
Math::Color m_clearColor = Math::Color(0.192f, 0.302f, 0.475f, 1.0f);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user