summaryrefslogtreecommitdiff
path: root/servers/visual/visual_server_viewport.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/visual/visual_server_viewport.h')
-rw-r--r--servers/visual/visual_server_viewport.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/servers/visual/visual_server_viewport.h b/servers/visual/visual_server_viewport.h
index 4e3015c020..555b40a103 100644
--- a/servers/visual/visual_server_viewport.h
+++ b/servers/visual/visual_server_viewport.h
@@ -90,7 +90,8 @@ public:
}
CanvasKey(const RID &p_canvas, int p_layer, int p_sublayer) {
canvas = p_canvas;
- stacking = ((int64_t)p_layer << 32) + p_sublayer;
+ int64_t sign = p_layer < 0 ? -1 : 1;
+ stacking = sign * (((int64_t)ABS(p_layer)) << 32) + p_sublayer;
}
int get_layer() const { return stacking >> 32; }
};
@@ -146,6 +147,7 @@ public:
private:
Color clear_color;
+ void _draw_3d(Viewport *p_viewport, ARVRInterface::Eyes p_eye);
void _draw_viewport(Viewport *p_viewport, ARVRInterface::Eyes p_eye = ARVRInterface::EYE_MONO);
public: