Skip to content

Java bindings: Invalid check for ASTC input swizzle parameter #969

@javagl

Description

@javagl

(Just some sort of "TODO" for me, to keep track of this: )

The KtxAstcParams#setInputSwizzle function currently does a basic validity check for the given argument. This includes a check that the input only contains the characters rgba01. This breaks for the case where this value is initialized with its default value, which is a char[] array that contains only 0 values (in contrast to '0' characters).

For example:

KtxAstcParams a = new KtxAstcParams(); // All default
KtxAstcParams b = new KtxAstcParams(); // All default
b.setInputSwizzle(a.getInputSwizzle()); // This should work!

This will currently throw an IllegalArgumentException.

I'll try to fix this soon, either as a mini-PR, or as part of a larger PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions