Skip to content

Add direct-to-display (VK_KHR_display) support to Simple Engine (#252) - #462

Open
gpx1000 wants to merge 2 commits into
KhronosGroup:mainfrom
gpx1000:fix/252-direct-to-display
Open

Add direct-to-display (VK_KHR_display) support to Simple Engine (#252)#462
gpx1000 wants to merge 2 commits into
KhronosGroup:mainfrom
gpx1000:fix/252-direct-to-display

Conversation

@gpx1000

@gpx1000 gpx1000 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Implemented Direct-to-Display toggle it on with ENV var SIMPLE_ENGINE_DIRECT_DISPLAY=1. Adds a tutorial chapter covering it.

Fixes #252

…nosGroup#252)

Implemented Direct-to-Display toggle it on with ENV var
SIMPLE_ENGINE_DIRECT_DISPLAY=1. Adds a tutorial chapter covering it.
Comment thread attachments/simple_engine/platform.cpp Outdated
Comment thread attachments/simple_engine/platform.cpp Outdated
Comment thread attachments/simple_engine/platform.cpp Outdated
Comment thread attachments/simple_engine/platform.cpp Outdated
Comment thread attachments/simple_engine/platform.cpp
Comment thread attachments/simple_engine/platform.cpp Outdated
Comment thread attachments/simple_engine/platform.cpp
Comment thread attachments/simple_engine/platform.cpp Outdated
Comment thread attachments/simple_engine/platform.cpp
Comment thread en/Building_a_Simple_Engine/Advanced_Topics/Direct_To_Display.adoc Outdated

// Prefer the mode with the highest pixel count (typically the display's native resolution).
VkDisplayModePropertiesKHR bestMode = modeProperties[0];
uint64_t bestPixels = static_cast<uint64_t>(bestMode.parameters.visibleRegion.width) * bestMode.parameters.visibleRegion.height;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even

VkDisplayModePropertiesKHR bestMode = {};
uint64_t bestPixels = 0;

would suffice, as you loop over all modeProperties anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

direct to display mode

2 participants