mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-04 03:04:48 +12:00
implement viewports
This commit is contained in:
parent
db08f73530
commit
d80ddafb24
3 changed files with 31 additions and 2 deletions
|
@ -41,7 +41,7 @@ struct RenderTarget {
|
|||
const u32 startOffset = (inputAddress - location) / sizePerPixel(format);
|
||||
const u32 x0 = (startOffset % (size.x() * 8)) / 8;
|
||||
const u32 y0 = (startOffset / (size.x() * 8)) * 8;
|
||||
return Math::Rect<u32>{x0, y0, x0 + width, y0 + height};
|
||||
return Math::Rect<u32>{x0, size.y() - y0, x0 + width, size.y() - height - y0};
|
||||
}
|
||||
|
||||
// For 2 textures to "match" we only care about their locations, formats, and dimensions to match
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue