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

ShaderAbstractions.Buffer in Mesh doesn't change the plot if value is changed in the buffer #4576

Open
koehlerson opened this issue Nov 7, 2024 · 0 comments
Labels
bug mesh (and poly)

Comments

@koehlerson
Copy link
Contributor

  • [ x ] what version of Makie are you running? (]st -m Makie)
    • v0.21.16
  • [ x ] can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie)
    • yes
  • [ x ] What platform + GPU are you on?
    • linux, nvidia geforce gt 640

I want to use a ShaderAbstractions.Buffer to update positions of a GeometryBasics.Mesh. If the following is typed in the REPL, the position remains the same for the first vertex in the plot

MWE:

vertices = Point2f[(0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 1.0)]
vertices_buf = Buffer(vertices)
triangles = [1, 2, 3, 3, 4, 1]
triangles = Makie.to_triangles(triangles)
colors = [:red, :green, :blue, :orange]
gmesh = GeometryBasics.Mesh(vertices_buf, triangles)
f, ax, pl = mesh(gmesh, color=colors, shading=NoShading)
vertices_buf[1] = Point2f(-1, -1)

@SimonDanisch suspects something in the float64->float32 conversion pipeline that strips away the Buffer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mesh (and poly)
Projects
None yet
Development

No branches or pull requests

2 participants