From e5572e9deb69a27567537bf4e85d796f1d6fa6d3 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Thu, 9 Oct 2014 19:20:33 -0700 Subject: [PATCH] don't render if alpha is 0 --- interface/src/ui/overlays/Circle3DOverlay.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/interface/src/ui/overlays/Circle3DOverlay.cpp b/interface/src/ui/overlays/Circle3DOverlay.cpp index 7cd385f963..62ddee4cf2 100644 --- a/interface/src/ui/overlays/Circle3DOverlay.cpp +++ b/interface/src/ui/overlays/Circle3DOverlay.cpp @@ -40,13 +40,18 @@ void Circle3DOverlay::render() { if (!_visible) { return; // do nothing if we're not visible } + + float alpha = getAlpha(); + + if (alpha == 0.0) { + return; // do nothing if our alpha is 0, we're not visible + } const float FULL_CIRCLE = 360.0f; const float SLICES = 180.0f; // The amount of segment to create the circle const float SLICE_ANGLE = FULL_CIRCLE / SLICES; //const int slices = 15; - float alpha = getAlpha(); xColor color = getColor(); const float MAX_COLOR = 255.0f; glColor4f(color.red / MAX_COLOR, color.green / MAX_COLOR, color.blue / MAX_COLOR, alpha);