Skip to content

Commit

Permalink
make WGLMakie compile + fix benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch committed Dec 16, 2024
1 parent 5e4c8b8 commit fc1eaf3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion WGLMakie/src/lines.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function create_lines_data(plot, attr)
uniforms[:highclip] = attr._highclip[]
uniforms[:lowclip] = attr._lowclip[]
uniforms[:nan_color] = attr.nan_color[]
color = attr.color_scaled[]
color = attr.scaled_color[]
else
for name in [:nan_color, :highclip, :lowclip]
uniforms[name] = RGBAf(0, 0, 0, 0)
Expand Down
17 changes: 10 additions & 7 deletions WGLMakie/src/new-scatter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ function assemble_scatter_robj(attr)
needs_mapping = !(attr._colorrange[] isa Nothing)
dfield = attr.sdf_marker_shape[] === Cint(Makie.DISTANCEFIELD)
atlas = attr.atlas_1024_32[]
distancefield = dfield ? NoDataTextureAtlas(size(atlas.data)) : nothing
_color = needs_mapping ? nothing : attr.color[]
intensity = needs_mapping ? attr.color[] : false
distancefield = dfield ? NoDataTextureAtlas(size(atlas.data)) : false
color_norm = needs_mapping ? attr._colorrange[] : false

uniform_dict = Dict(
:pos => attr.positions_transformed_f32c[],
:color_map => needs_mapping ? attr.colormap[] : false,
:color => _color,
:intensity => intensity,
:color_norm => color_norm,
:colormap => needs_mapping ? Sampler(attr.colormap[]) : false,
:color => attr.color[],
:colorrange => Vec2f(color_norm),
:highclip => attr._highclip[],
:lowclip => attr._lowclip[],
:nan_color => attr.nan_color[],

:rotation => attr.rotation[],

Expand Down Expand Up @@ -117,6 +117,9 @@ function create_shader(scene::Scene, plot::Scatter)
:depth_shift,
:atlas_1024_32,
:markerspace,
:nan_color,
:_highclip,
:_lowclip,
]

register_computation!(attr, inputs, [:wgl_renderobject]) do args, changed, last
Expand Down

0 comments on commit fc1eaf3

Please sign in to comment.