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

Update for Makie 0.22 / GeometryBasics 0.5 #24

Merged
merged 2 commits into from
Nov 19, 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
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "RadeonProRender"
uuid = "27029320-176d-4a42-b57d-56729d2ad457"
authors = ["Simon Danisch"]
version = "0.3.1"
version = "0.3.2"

[deps]
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
Expand All @@ -15,7 +15,7 @@ RadeonProRender_jll = "e92fa02b-1b7a-5e4e-a5cb-14fe26dfc45b"
[compat]
CEnum = "0.4, 0.5"
Colors = "0.9, 0.10, 0.11, 0.12"
GeometryBasics = "0.4.1"
GeometryBasics = "0.4.1, 0.5"
RadeonProRender_jll = "=3.1.5"
julia = "1.6"

Expand Down
12 changes: 6 additions & 6 deletions src/highlevel-api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ Default shape constructor which works with every Geometry from the package
GeometryTypes (Meshes and geometry primitives alike).
"""
function Shape(context::Context, meshlike; kw...)
m = uv_normal_mesh(meshlike; kw...)
m = expand_faceviews(uv_normal_mesh(meshlike; kw...))
return Shape(context, decompose(Point3f, m), decompose_normals(m), faces(m), decompose_uv(m))
end

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

nraw = decompose(Vec3f, normals)
@assert eltype(nraw) == Vec3f

if isnothing(uvs)
uvraw = C_NULL
uvlength = 0
Expand All @@ -318,10 +318,10 @@ function Shape(context::Context, vertices, normals, faces, uvs)


foreach(i -> checkbounds(vertices, i + 1), iraw)
rpr_mesh = rprContextCreateMesh(context,
vraw, length(vertices), sizeof(Point3f),
nraw, length(normals), sizeof(Vec3f),
uvraw, uvlength, uvbytesize,
rpr_mesh = rprContextCreateMesh(context,
vraw, length(vertices), sizeof(Point3f),
nraw, length(normals), sizeof(Vec3f),
uvraw, uvlength, uvbytesize,
iraw, sizeof(rpr_int), iraw, sizeof(rpr_int), iraw, sizeof(rpr_int), facelens, length(faces)
)

Expand Down
Loading