# HG changeset patch # User sam@sambook-windows.localdomain # Date 1719353670 -25200 # Node ID 2addc5f6804f4e8454ee1667ea72fa8cab4fe822 # Parent d88f0286681b280b37d3cb2a298346952497d8d6# Parent 73eaec7e1690c8ed81fc5fca859c44149e9420af merge diff -r d88f0286681b -r 2addc5f6804f semicongine/engine.nim --- a/semicongine/engine.nim Wed Jun 26 05:14:00 2024 +0700 +++ b/semicongine/engine.nim Wed Jun 26 05:14:30 2024 +0700 @@ -197,6 +197,12 @@ func Limits*(engine: Engine): VkPhysicalDeviceLimits = engine.device.physicalDevice.properties.limits +func MaxFramebufferSampleCount*(engine: Engine, maxSamples = VK_SAMPLE_COUNT_8_BIT): VkSampleCountFlagBits = + let available = VkSampleCountFlags( + engine.Limits.framebufferColorSampleCounts.uint32 and engine.Limits.framebufferDepthSampleCounts.uint32 + ).toEnums + return min(max(available), maxSamples) + proc UpdateInputs*(engine: Engine): bool = UpdateInputs(engine.window.PendingEvents())