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

Function GetFlattenedImageBufferPos

deps/LLGL/sources/Core/ImageFlags.cpp:729–738  ·  view source on GitHub ↗

Returns the 1D flattened buffer position for a 3D image coordinate ('bpp' denotes the bytes per pixel)

Source from the content-addressed store, hash-verified

727
728// Returns the 1D flattened buffer position for a 3D image coordinate ('bpp' denotes the bytes per pixel)
729static std::size_t GetFlattenedImageBufferPos(
730 std::uint32_t x,
731 std::uint32_t y,
732 std::uint32_t z,
733 std::uint32_t rows,
734 std::uint32_t slices,
735 std::uint32_t bpp)
736{
737 return static_cast<std::size_t>(z * slices + y * rows + x) * bpp;
738}
739
740static std::size_t GetFlattenedImageBufferPosEnd(
741 const Offset3D& offset,

Callers 2

CopyImageBufferRegionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected