v0.4.2: improved performance by skipping the drawing of offscreen gizmos
This commit is contained in:
parent
d6cf212b74
commit
59f74216fe
|
@ -72,7 +72,7 @@ public class Group extends Gizmo {
|
||||||
public void draw() {
|
public void draw() {
|
||||||
for (int i=0; i < length; i++) {
|
for (int i=0; i < length; i++) {
|
||||||
Gizmo g = members.get( i );
|
Gizmo g = members.get( i );
|
||||||
if (g != null && g.exists && g.visible) {
|
if (g != null && g.exists && g.isVisible()) {
|
||||||
g.draw();
|
g.draw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,7 +235,7 @@ public class Visual extends Gizmo {
|
||||||
public boolean isVisible() {
|
public boolean isVisible() {
|
||||||
Camera c = camera();
|
Camera c = camera();
|
||||||
|
|
||||||
if (c == null) return false;
|
if (c == null || !visible) return false;
|
||||||
|
|
||||||
float cx = c.scroll.x;
|
float cx = c.scroll.x;
|
||||||
float cy = c.scroll.y;
|
float cy = c.scroll.y;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user