MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / GetDataPtrOffset

Method GetDataPtrOffset

deps/LLGL/sources/Core/Image.cpp:508–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508std::size_t Image::GetDataPtrOffset(const Offset3D& offset) const
509{
510 const auto bpp = static_cast<std::size_t>(GetBytesPerPixel());
511 const auto x = static_cast<std::size_t>(offset.x);
512 const auto y = static_cast<std::size_t>(offset.y);
513 const auto z = static_cast<std::size_t>(offset.z);
514 const auto w = static_cast<std::size_t>(GetExtent().width);
515 const auto h = static_cast<std::size_t>(GetExtent().height);
516 return (bpp * (x + (y + z * h) * w));
517}
518
519void Image::ClampRegion(Offset3D& offset, Extent3D& extent) const
520{

Callers

nothing calls this directly

Calls 1

GetBytesPerPixelFunction · 0.85

Tested by

no test coverage detected