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

Ensure gl context is cleared in ol/source/Raster #14414

Merged
merged 2 commits into from
Jan 2, 2023

Conversation

mike-000
Copy link
Contributor

@mike-000 mike-000 commented Dec 26, 2022

Fixes #14408
Fixes #14409

Reset the frameState.renderTargets when setting the frameState.layerIndex before getting the imageData for each input layer. This ensures the gl context is cleared as it would be when rendered directly from the map.

As well as fixing the above issues this also fixes drawing over the same uncleared context when multiple WebGL sources are used in an ol/source/Raster. A new test returns the alpha of each of three sources as red, green and blue which previously would have returned white due to each being draw over the other sources.

@github-actions
Copy link

📦 Preview the website for this branch here: https://deploy-preview-14414--ol-site.netlify.app/.

@mike-000 mike-000 marked this pull request as ready for review December 26, 2022 19:27
@mike-000 mike-000 marked this pull request as draft December 30, 2022 17:41
@mike-000 mike-000 changed the title Clear gl context before renderFrame() in ol/source/Raster Ensure gl context is cleared in ol/source/Raster Dec 30, 2022
@mike-000 mike-000 marked this pull request as ready for review December 30, 2022 18:05
Copy link
Member

@tschaub tschaub left a comment

Choose a reason for hiding this comment

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

Thanks, @mike-000

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.

Region Growing using a GeoTIFF Duplicate layer when moving or zooming map
2 participants