mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-09 07:35:41 +12:00
doormat
This commit is contained in:
parent
e41076522c
commit
c88ab423d3
2 changed files with 11 additions and 11 deletions
|
@ -59,7 +59,7 @@ public:
|
||||||
if constexpr (evictOnOverflow) { // Do a ring buffer if evictOnOverflow is true
|
if constexpr (evictOnOverflow) { // Do a ring buffer if evictOnOverflow is true
|
||||||
if constexpr (std::is_same<SurfaceType, ColourBuffer>() || std::is_same<SurfaceType, DepthBuffer>()) {
|
if constexpr (std::is_same<SurfaceType, ColourBuffer>() || std::is_same<SurfaceType, DepthBuffer>()) {
|
||||||
Helpers::panicDev("Colour/Depth buffer cache overflowed, currently stubbed to do a ring-buffer. This might snap in half");
|
Helpers::panicDev("Colour/Depth buffer cache overflowed, currently stubbed to do a ring-buffer. This might snap in half");
|
||||||
}
|
}
|
||||||
|
|
||||||
auto& e = buffer[evictionIndex];
|
auto& e = buffer[evictionIndex];
|
||||||
evictionIndex = (evictionIndex + 1) % capacity;
|
evictionIndex = (evictionIndex + 1) % capacity;
|
||||||
|
|
|
@ -58,13 +58,13 @@ struct ColourBuffer {
|
||||||
}
|
}
|
||||||
|
|
||||||
void free() {
|
void free() {
|
||||||
valid = false;
|
valid = false;
|
||||||
|
|
||||||
if (texture.exists() || fbo.exists()) {
|
if (texture.exists() || fbo.exists()) {
|
||||||
texture.free();
|
texture.free();
|
||||||
fbo.free();
|
fbo.free();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool matches(ColourBuffer& other) {
|
bool matches(ColourBuffer& other) {
|
||||||
return location == other.location && format == other.format &&
|
return location == other.location && format == other.format &&
|
||||||
|
@ -131,10 +131,10 @@ struct DepthBuffer {
|
||||||
|
|
||||||
void free() {
|
void free() {
|
||||||
valid = false;
|
valid = false;
|
||||||
if (texture.exists()) {
|
if (texture.exists()) {
|
||||||
texture.free();
|
texture.free();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool matches(DepthBuffer& other) {
|
bool matches(DepthBuffer& other) {
|
||||||
return location == other.location && format == other.format &&
|
return location == other.location && format == other.format &&
|
||||||
|
|
Loading…
Add table
Reference in a new issue