pub struct InstanceBuilder { /* private fields */ }Implementations§
Source§impl InstanceBuilder
impl InstanceBuilder
pub fn new(window: Option<Arc<dyn WindowTraits>>) -> Self
Sourcepub fn app_name(self, app_name: impl Into<String>) -> Self
pub fn app_name(self, app_name: impl Into<String>) -> Self
Set the application name that will be passed to Vulkan via VkApplicationInfo.
Sourcepub fn engine_name(self, engine_name: impl Into<String>) -> Self
pub fn engine_name(self, engine_name: impl Into<String>) -> Self
Set the engine name that will be passed to Vulkan via VkApplicationInfo.
Sourcepub fn app_version(self, version: Version) -> Self
pub fn app_version(self, version: Version) -> Self
Set the application version reported to Vulkan.
Sourcepub fn engine_version(self, version: Version) -> Self
pub fn engine_version(self, version: Version) -> Self
Set the engine version reported to Vulkan.
Sourcepub fn require_api_version(self, version: Version) -> Self
pub fn require_api_version(self, version: Version) -> Self
Require a minimum Vulkan API version for instance creation.
Sourcepub fn minimum_instance_version(self, version: Version) -> Self
pub fn minimum_instance_version(self, version: Version) -> Self
Set the minimum instance API version that must be supported by the system.
Sourcepub fn enable_layer(self, layer: ExtensionName) -> Self
pub fn enable_layer(self, layer: ExtensionName) -> Self
Enable the given instance layer for creation (e.g. validation layers).
Sourcepub fn enable_extension(self, extension: ExtensionName) -> Self
pub fn enable_extension(self, extension: ExtensionName) -> Self
Enable the given Vulkan instance extension for creation.
Sourcepub fn enable_validation_layers(self, enable: bool) -> Self
pub fn enable_validation_layers(self, enable: bool) -> Self
Explicitly enable or disable validation layers.
Sourcepub fn request_validation_layers(self, request: bool) -> Self
pub fn request_validation_layers(self, request: bool) -> Self
Request validation layers when available on the system (will be used if present).
Sourcepub fn use_default_debug_messenger(self) -> Self
pub fn use_default_debug_messenger(self) -> Self
Use the default debug messenger which prints messages to stdout.
pub fn use_default_tracing_messenger(self) -> Self
Sourcepub fn set_debug_messenger(
self,
callback: PFN_vkDebugUtilsMessengerCallbackEXT,
) -> Self
pub fn set_debug_messenger( self, callback: PFN_vkDebugUtilsMessengerCallbackEXT, ) -> Self
Set a custom debug messenger callback function.
Sourcepub fn debug_user_data(self, debug_user_data: DebugUserData) -> Self
pub fn debug_user_data(self, debug_user_data: DebugUserData) -> Self
Provide a user data pointer that will be passed to the debug callback.
Sourcepub fn headless(self, headless: bool) -> Self
pub fn headless(self, headless: bool) -> Self
Indicate that no windowing surface will be created (headless mode).
Sourcepub fn debug_messenger_severity(
self,
severity: DebugUtilsMessageSeverityFlagsEXT,
) -> Self
pub fn debug_messenger_severity( self, severity: DebugUtilsMessageSeverityFlagsEXT, ) -> Self
Set the severity flags for the debug messenger (e.g. WARNING | ERROR).
Sourcepub fn add_debug_messenger_severity(
self,
severity: DebugUtilsMessageSeverityFlagsEXT,
) -> Self
pub fn add_debug_messenger_severity( self, severity: DebugUtilsMessageSeverityFlagsEXT, ) -> Self
Add additional severity flags to the debug messenger.
Sourcepub fn debug_messenger_type(
self,
message_type: DebugUtilsMessageTypeFlagsEXT,
) -> Self
pub fn debug_messenger_type( self, message_type: DebugUtilsMessageTypeFlagsEXT, ) -> Self
Set the types of debug messages the messenger should receive (general/validation/perf).
Sourcepub fn add_debug_messenger_type(
self,
message_type: DebugUtilsMessageTypeFlagsEXT,
) -> Self
pub fn add_debug_messenger_type( self, message_type: DebugUtilsMessageTypeFlagsEXT, ) -> Self
Add additional debug message types to the messenger configuration.