summaryrefslogtreecommitdiff
path: root/scene/main/viewport.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/viewport.h')
-rw-r--r--scene/main/viewport.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index f527fa4f5b..ce2bc991f5 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -140,6 +140,13 @@ public:
DEBUG_DRAW_WIREFRAME,
};
+ enum ClearMode {
+
+ CLEAR_MODE_ALWAYS,
+ CLEAR_MODE_NEVER,
+ CLEAR_MODE_ONLY_NEXT_FRAME
+ };
+
private:
friend class ViewportTexture;
@@ -182,7 +189,7 @@ private:
bool transparent_bg;
bool vflip;
- bool clear_on_new_frame;
+ ClearMode clear_mode;
bool filter;
bool gen_mipmaps;
@@ -395,9 +402,8 @@ public:
void set_vflip(bool p_enable);
bool get_vflip() const;
- void set_clear_on_new_frame(bool p_enable);
- bool get_clear_on_new_frame() const;
- void clear();
+ void set_clear_mode(ClearMode p_mode);
+ ClearMode get_clear_mode() const;
void set_update_mode(UpdateMode p_mode);
UpdateMode get_update_mode() const;
@@ -466,6 +472,7 @@ VARIANT_ENUM_CAST(Viewport::ShadowAtlasQuadrantSubdiv);
VARIANT_ENUM_CAST(Viewport::MSAA);
VARIANT_ENUM_CAST(Viewport::Usage);
VARIANT_ENUM_CAST(Viewport::DebugDraw);
+VARIANT_ENUM_CAST(Viewport::ClearMode);
VARIANT_ENUM_CAST(Viewport::RenderInfo);
#endif