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

Fix clip state corruption #4157

Merged
merged 7 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [Unreleased]

- Fixed the broken OpenGL state cleanup for clip_planes which may cause plots to disappear randomly [#4157](https://github.com/MakieOrg/Makie.jl/pull/4157)
- Reduce updates for image/heatmap, improving performance [#4130](https://github.com/MakieOrg/Makie.jl/pull/4130).

## [0.21.7] - 2024-08-19
Expand Down
7 changes: 3 additions & 4 deletions GLMakie/src/GLAbstraction/GLRender.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ function setup_clip_planes(robj)
for i in 0:min(7, N-1)
glEnable(GL_CLIP_DISTANCE0 + UInt32(i))
end
# TODO: This crashes?
# for i in N:7
# glDisable(GL_CLIP_DISTANCE0 + UInt32(i))
# end
for i in max(0, N):7
glDisable(GL_CLIP_DISTANCE0 + UInt32(i))
end
end


Expand Down
6 changes: 5 additions & 1 deletion MakieCore/src/basic_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ function mixin_generic_plot_attributes()
inspector_clear = automatic
"Sets a callback function `(inspector, plot, index) -> ...` which replaces the default `show_data` methods."
inspector_hover = automatic
"TODO: docs"
"""
Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 `Plane3f` planes here,
behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the
parent plot or scene. You can remove parent `clip_planes` by passing `Plane3f[]`.
"""
clip_planes = automatic
end
end
Expand Down
1 change: 1 addition & 0 deletions docs/makedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ pages = [
"reference/scene/lighting.md",
"reference/scene/matcap.md",
"reference/scene/SSAO.md",
"reference/scene/clip_planes.md",
]
],
"Tutorials" => [
Expand Down
Loading