Skip to content

ludus::graphics::rhi::HostedFrame

Ludus Wiki · API overview · Browse API

Struct

A presented game frame that the consumer holds until ReleaseFrame().
The native image stays valid until the frame is released and its generation is retired. Use only the field of the consumer's API.

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/hosted_surface.h

#include <ludus/graphics/rhi/hosted_surface.h>
struct ludus::graphics::rhi::HostedFrame final

Fields

Generation

foundation::uint32 ludus::graphics::rhi::HostedFrame::Generation = 0
Generation of the image.

Related types: foundation::uint32

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/hosted_surface.h

Image

foundation::uint32 ludus::graphics::rhi::HostedFrame::Image = 0
Index of the image in its generation.

Related types: foundation::uint32

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/hosted_surface.h

Sequence

foundation::uint64 ludus::graphics::rhi::HostedFrame::Sequence = 0
The game's frame number; increases from frame to frame.

Related types: foundation::uint64

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/hosted_surface.h

Width

foundation::uint32 ludus::graphics::rhi::HostedFrame::Width = 0
Image width in pixels. Show it 1:1; there is no scaling.

Related types: foundation::uint32

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/hosted_surface.h

Height

foundation::uint32 ludus::graphics::rhi::HostedFrame::Height = 0
Image height in pixels.

Related types: foundation::uint32

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/hosted_surface.h

Format

platform::HostedImageFormat ludus::graphics::rhi::HostedFrame::Format = platform::HostedImageFormat::Rgba8Unorm
Pixel encoding; RGBA8 unorm, top-left origin.

Related types: platform::HostedImageFormat

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/hosted_surface.h

MetalTexture

NativeMetalTexture ludus::graphics::rhi::HostedFrame::MetalTexture {nullptr}
Metal: the IOSurface-backed id<MTLTexture> on the consumer's device, sampled read-only.

Related types: NativeMetalTexture

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/hosted_surface.h

VulkanImage

NativeVulkanImage ludus::graphics::rhi::HostedFrame::VulkanImage {0}
Vulkan: the imported VkImage (2D, one mip and layer, VK_FORMAT_R8G8B8A8_UNORM, sampled usage).

Related types: NativeVulkanImage

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/hosted_surface.h

VulkanLayout

foundation::uint32 ludus::graphics::rhi::HostedFrame::VulkanLayout = 0
Vulkan: the image layout once acquired, HOSTED_VULKAN_SHADER_READ_LAYOUT; zero on Metal.
AcquireFrame() has already transferred the image to the identity's queue family on its queue, so commands submitted there afterwards sample it with no barrier of their own.

Related types: foundation::uint32

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/hosted_surface.h