KhronosGroup / KhronosGroup/OpenXR-Hpp

Provide reasonable non-zero defaults for some structure fields

Open
#13 2 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
C++
Stars
50
Forks
23
PR merge metrics
No merged PRs in 30d

Description

This would probably be something that would require some small amount of maintaining a customizer structure in the generation code, but there are a number of places where structures will be initialized to 0 when 1 would be a much better choice. The most apparent I can think of is within the `SwapchainCreateInfo`, where I can't think of a good reason not to default `arraySize`, `sampleCount` and `faceCount` to 1, since 0 is never a valid value for any of these.

I'm also tempted to suggest that the `xr::ExtentXXX` structures default to 1 or 1.0f, but I'm less certain if there's ever a legitimate use case for setting those values to 0.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the generation code and inspect how the customizer structure controls default initialization for SwapchainCreateInfo. Check the arraySize, sampleCount, and faceCount fields first, then assess whether the xr::ExtentXXX structures should also receive non-zero defaults; done means the chosen defaults are generated consistently without changing fields whose zero value is valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.