mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-22 05:15:51 +12:00
Texture caching stuff pt1
This commit is contained in:
parent
0c6c455d4d
commit
fe6fc4cfa3
6 changed files with 52 additions and 1 deletions
|
@ -104,4 +104,19 @@ public:
|
|||
const SurfaceType& operator[](size_t i) const {
|
||||
return buffer[i];
|
||||
}
|
||||
|
||||
void invalidateRegion(u32 start, u32 size) {
|
||||
if (size == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
boost::icl::right_open_interval<u32> interval(start, start + size);
|
||||
|
||||
for (auto& e : buffer) {
|
||||
if (e.valid && boost::icl::intersects(e.range, interval)) {
|
||||
e.valid = false;
|
||||
e.free();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue