| 251 | //-------------------------------------------------------------------------- |
| 252 | |
| 253 | void GBitmap::copyRect(const GBitmap *src, const RectI &srcRect, const Point2I &dstPt, const U32 srcMipLevel, const U32 dstMipLevel) |
| 254 | { |
| 255 | if(src->getFormat() != getFormat()) |
| 256 | return; |
| 257 | if(srcRect.extent.x + srcRect.point.x > src->getWidth(srcMipLevel) || srcRect.extent.y + srcRect.point.y > src->getHeight(srcMipLevel)) |
| 258 | return; |
| 259 | if(srcRect.extent.x + dstPt.x > getWidth(dstMipLevel) || srcRect.extent.y + dstPt.y > getHeight(dstMipLevel)) |
| 260 | return; |
| 261 | |
| 262 | for(U32 i = 0; i < srcRect.extent.y; i++) |
| 263 | { |
| 264 | dMemcpy(getAddress(dstPt.x, dstPt.y + i, dstMipLevel), |
| 265 | src->getAddress(srcRect.point.x, srcRect.point.y + i, srcMipLevel), |
| 266 | mBytesPerPixel * srcRect.extent.x); |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | //-------------------------------------------------------------------------- |
| 271 | void GBitmap::allocateBitmap(const U32 in_width, const U32 in_height, const bool in_extrudeMipLevels, const GFXFormat in_format ) |
no test coverage detected