MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
mln_vulkan_borrowed_texture_descriptor Struct Reference

#include <texture.h>

Data Fields

mln_render_target_extent extent
 
uint32_t physical_width
 
uint32_t physical_height
 
mln_vulkan_context_descriptor context
 
void * image
 
void * image_view
 
uint32_t format
 
uint32_t initial_layout
 
uint32_t final_layout
 

Detailed Description

Vulkan caller-owned texture session attachment options.

Field Documentation

◆ context

mln_vulkan_context_descriptor mln_vulkan_borrowed_texture_descriptor::context

Borrowed Vulkan context. All handles are required.

◆ extent

mln_render_target_extent mln_vulkan_borrowed_texture_descriptor::extent

Logical texture extent. The map viewport uses width and height, and the renderer uses scale_factor. The physical size below is stated separately rather than derived from these.

◆ final_layout

uint32_t mln_vulkan_borrowed_texture_descriptor::final_layout

Backend-native VkImageLayout value left after rendering succeeds.

◆ format

uint32_t mln_vulkan_borrowed_texture_descriptor::format

Backend-native VkFormat value for image. VK_FORMAT_UNDEFINED is invalid.

◆ image

void* mln_vulkan_borrowed_texture_descriptor::image

Borrowed VkImage. Required.

The image must be a 2D, single-sample color image with VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT. Its dimensions must equal physical_width and physical_height. Include VK_IMAGE_USAGE_SAMPLED_BIT when the host will sample from the image after rendering.

A VkImage handle exposes no queryable extent, so the session takes the stated physical size as given and cannot detect a mismatch. The session builds a framebuffer at that size, and Vulkan leaves a framebuffer larger than its attachment undefined, so the caller guarantees this relationship.

◆ image_view

void* mln_vulkan_borrowed_texture_descriptor::image_view

Borrowed VkImageView for image. Required.

The view must be a 2D color view that matches image and format.

◆ initial_layout

uint32_t mln_vulkan_borrowed_texture_descriptor::initial_layout

Backend-native VkImageLayout value expected at render-pass begin.

Use VK_IMAGE_LAYOUT_UNDEFINED when the previous image contents may be discarded.

◆ physical_height

uint32_t mln_vulkan_borrowed_texture_descriptor::physical_height

Physical image height in device pixels. Must be positive.

◆ physical_width

uint32_t mln_vulkan_borrowed_texture_descriptor::physical_width

Physical image width in device pixels. Must be positive.


The documentation for this struct was generated from the following file: