/// <summary> /// Gets the <see cref="ImageSubContent" /> by reference given the specified cube-face index and mipmap /// level index. /// </summary> /// <param name="cubeFaceIndex">The cube-face index.</param> /// <param name="mipMapIndex">The zero-based mipmap level index.</param> /// <returns>A <see cref="ImageSubContent" />.</returns> public readonly ref ImageSubContent SubImage(ImageCubeFaceIndex cubeFaceIndex, int mipMapIndex = 0) { fixed(ImageContent *imageContent = &this) { var ptr = (ImageSubContent *)&imageContent->_subImage[0]; var pointerOffset = ((int)cubeFaceIndex * (int)sokol_gfx.sg_cube_face.SG_CUBEFACE_NUM) + mipMapIndex; return(ref *(ptr + pointerOffset)); } }
/// <summary> /// Gets the <see cref="ImageSubContent" /> by reference given the specified cube-face index and mipmap /// level index. /// </summary> /// <param name="cubeFaceIndex">The cube-face index.</param> /// <param name="mipMapIndex">The zero-based mipmap level index.</param> /// <returns>A <see cref="ImageSubContent" />.</returns> public readonly ref ImageSubContent SubImage(ImageCubeFaceIndex cubeFaceIndex, int mipMapIndex = 0) { fixed(ImageContent *imageContent = &this) { var ptr = (ImageSubContent *)&imageContent->_subImage[0]; var pointerOffset = ((int)cubeFaceIndex * 6) + mipMapIndex; return(ref *(ptr + pointerOffset)); } }