Skip to content

Commit

Permalink
Merge pull request #89805 from AThousandShips/viewport_report
Browse files Browse the repository at this point in the history
Add missing `RenderInfoType` enum to `Viewport`
  • Loading branch information
akien-mga committed Mar 25, 2024
2 parents c4aa107 + 8a88e5e commit 17c66c0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doc/classes/Viewport.xml
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,16 @@
Represents the size of the [enum RenderInfo] enum.
</constant>
<constant name="RENDER_INFO_TYPE_VISIBLE" value="0" enum="RenderInfoType">
Visible render pass (excluding shadows).
</constant>
<constant name="RENDER_INFO_TYPE_SHADOW" value="1" enum="RenderInfoType">
Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits.
</constant>
<constant name="RENDER_INFO_TYPE_MAX" value="2" enum="RenderInfoType">
<constant name="RENDER_INFO_TYPE_CANVAS" value="2" enum="RenderInfoType">
Canvas item rendering. This includes all 2D rendering.
</constant>
<constant name="RENDER_INFO_TYPE_MAX" value="3" enum="RenderInfoType">
Represents the size of the [enum RenderInfoType] enum.
</constant>
<constant name="DEBUG_DRAW_DISABLED" value="0" enum="DebugDraw">
Objects are displayed normally.
Expand Down
1 change: 1 addition & 0 deletions scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4841,6 +4841,7 @@ void Viewport::_bind_methods() {

BIND_ENUM_CONSTANT(RENDER_INFO_TYPE_VISIBLE);
BIND_ENUM_CONSTANT(RENDER_INFO_TYPE_SHADOW);
BIND_ENUM_CONSTANT(RENDER_INFO_TYPE_CANVAS);
BIND_ENUM_CONSTANT(RENDER_INFO_TYPE_MAX);

BIND_ENUM_CONSTANT(DEBUG_DRAW_DISABLED);
Expand Down
1 change: 1 addition & 0 deletions scene/main/viewport.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class Viewport : public Node {
enum RenderInfoType {
RENDER_INFO_TYPE_VISIBLE,
RENDER_INFO_TYPE_SHADOW,
RENDER_INFO_TYPE_CANVAS,
RENDER_INFO_TYPE_MAX
};

Expand Down

0 comments on commit 17c66c0

Please sign in to comment.