| 517 | } |
| 518 | |
| 519 | void Image::ClampRegion(Offset3D& offset, Extent3D& extent) const |
| 520 | { |
| 521 | offset.x = std::max(offset.x, 0); |
| 522 | offset.y = std::max(offset.y, 0); |
| 523 | offset.z = std::max(offset.z, 0); |
| 524 | |
| 525 | extent.width = std::min(extent.width, GetExtent().width); |
| 526 | extent.height = std::min(extent.height, GetExtent().height); |
| 527 | extent.depth = std::min(extent.depth, GetExtent().depth); |
| 528 | } |
| 529 | |
| 530 | |
| 531 | } // /namespace LLGL |