Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let feature + metadata textures make copies #822

Merged
merged 12 commits into from
Feb 29, 2024

Conversation

j9liu
Copy link
Contributor

@j9liu j9liu commented Feb 28, 2024

This change looks a lot more intense than I intended to be, but here's a summary:

  • Created TextureView base class that FeatureIdTextureView and PropertyTexturePropertyView now inherit from. This is copy pasting the common code from both implementations.
  • Added TextureViewOptions, which includes the applyKhrTextureTransform flag from a previous PR. But now it includes makeImageCopy, which makes a CPU copy of the input image if true.
  • Added options parameter to various PropertyTextureView functions so that property views could be constructed with the desired options.
  • Added unit tests for the new options.

Copy link
Member

@kring kring left a comment

Choose a reason for hiding this comment

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

Looks good! A few suggested tweaks below. Actually, it's mostly just the one suggestion repeatedly.

CesiumGltf/include/CesiumGltf/FeatureIdTextureView.h Outdated Show resolved Hide resolved
CesiumGltf/include/CesiumGltf/PropertyTextureView.h Outdated Show resolved Hide resolved
CesiumGltf/include/CesiumGltf/PropertyTextureView.h Outdated Show resolved Hide resolved
CesiumGltf/include/CesiumGltf/TextureView.h Outdated Show resolved Hide resolved
CesiumGltf/src/FeatureIdTextureView.cpp Outdated Show resolved Hide resolved
CesiumGltf/src/TextureView.cpp Outdated Show resolved Hide resolved
CesiumGltf/src/TextureView.cpp Outdated Show resolved Hide resolved
CesiumGltf/src/TextureView.cpp Outdated Show resolved Hide resolved
@j9liu
Copy link
Contributor Author

j9liu commented Feb 29, 2024

Thanks @kring ! Merging with your approval.

@j9liu j9liu merged commit 356afb4 into main Feb 29, 2024
14 checks passed
@j9liu j9liu deleted the refactor-feature-metadata-textures branch February 29, 2024 15:30
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.

None yet

2 participants