Skip to content

Fix texture conversion in the GL backend#2956

Open
goodartistscopy wants to merge 1 commit intobkaradzic:masterfrom
goodartistscopy:patch-2
Open

Fix texture conversion in the GL backend#2956
goodartistscopy wants to merge 1 commit intobkaradzic:masterfrom
goodartistscopy:patch-2

Conversation

@goodartistscopy
Copy link
Contributor

The line as currently written disallows conversions (except swizzle) because convert can't be true if compressed isn't.

The line as currently written disallows conversions (except swizzle) because `convert` can't be true if `compressed` isn't.
Copy link
Owner

@bkaradzic bkaradzic left a comment

Choose a reason for hiding this comment

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

Specify which format -> format conversion fails?

Flipping logic would disallow decompressing textures.

@goodartistscopy
Copy link
Contributor Author

Conversion is fine but it's never called, because compressed == false prevents convert == true.
The same logic at texture creation is even written without compressed (line 5735):

    const bool compressed = bimg::isCompressed(bimg::TextureFormat::Enum(m_requestedFormat) );
    const bool convert    = false
        || m_textureFormat != m_requestedFormat
        || swizzle
        ;

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.

2 participants