Skip to content

Commit 9542ae8

Browse files
authored
Update for Makie 0.22 / GeometryBasics 0.5 (#24)
* bump version * expand faceviews before creating Shape
1 parent 41a1f12 commit 9542ae8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RadeonProRender_jll = "e92fa02b-1b7a-5e4e-a5cb-14fe26dfc45b"
1515
[compat]
1616
CEnum = "0.4, 0.5"
1717
Colors = "0.9, 0.10, 0.11, 0.12"
18-
GeometryBasics = "0.4.1"
18+
GeometryBasics = "0.4.1, 0.5"
1919
RadeonProRender_jll = "=3.1.5"
2020
julia = "1.6"
2121

src/highlevel-api.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ Default shape constructor which works with every Geometry from the package
281281
GeometryTypes (Meshes and geometry primitives alike).
282282
"""
283283
function Shape(context::Context, meshlike; kw...)
284-
m = uv_normal_mesh(meshlike; kw...)
284+
m = expand_faceviews(uv_normal_mesh(meshlike; kw...))
285285
return Shape(context, decompose(Point3f, m), decompose_normals(m), faces(m), decompose_uv(m))
286286
end
287287

@@ -300,7 +300,7 @@ function Shape(context::Context, vertices, normals, faces, uvs)
300300

301301
nraw = decompose(Vec3f, normals)
302302
@assert eltype(nraw) == Vec3f
303-
303+
304304
if isnothing(uvs)
305305
uvraw = C_NULL
306306
uvlength = 0
@@ -318,10 +318,10 @@ function Shape(context::Context, vertices, normals, faces, uvs)
318318

319319

320320
foreach(i -> checkbounds(vertices, i + 1), iraw)
321-
rpr_mesh = rprContextCreateMesh(context,
322-
vraw, length(vertices), sizeof(Point3f),
323-
nraw, length(normals), sizeof(Vec3f),
324-
uvraw, uvlength, uvbytesize,
321+
rpr_mesh = rprContextCreateMesh(context,
322+
vraw, length(vertices), sizeof(Point3f),
323+
nraw, length(normals), sizeof(Vec3f),
324+
uvraw, uvlength, uvbytesize,
325325
iraw, sizeof(rpr_int), iraw, sizeof(rpr_int), iraw, sizeof(rpr_int), facelens, length(faces)
326326
)
327327

0 commit comments

Comments
 (0)