mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-14 14:33:57 +01:00
Creation is change
- Indirect instancers mark pages as changed when instances are added
This commit is contained in:
parent
5b6463b8f1
commit
90e088aedc
@ -94,7 +94,7 @@ public abstract class AbstractInstancer<I extends Instance> implements Instancer
|
||||
private void addLocked(I instance, InstanceHandleImpl<I> handle) {
|
||||
instances.add(instance);
|
||||
handles.add(handle);
|
||||
changed.set(handle.index);
|
||||
setIndexChanged(handle.index);
|
||||
}
|
||||
|
||||
public int instanceCount() {
|
||||
@ -105,6 +105,10 @@ public abstract class AbstractInstancer<I extends Instance> implements Instancer
|
||||
if (index < 0 || index >= instanceCount()) {
|
||||
return;
|
||||
}
|
||||
setIndexChanged(index);
|
||||
}
|
||||
|
||||
protected void setIndexChanged(int index) {
|
||||
changed.set(index);
|
||||
}
|
||||
|
||||
|
@ -37,10 +37,7 @@ public class IndirectInstancer<I extends Instance> extends AbstractInstancer<I>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyDirty(int index) {
|
||||
if (index < 0 || index >= instanceCount()) {
|
||||
return;
|
||||
}
|
||||
public void setIndexChanged(int index) {
|
||||
changedPages.set(ObjectStorage.objectIndex2PageIndex(index));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user