Skip to content

Provide reasonable non-zero defaults for some structure fields #13

Description

@jherico

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions