commit bba582069c141d1b292d5e462c955392e9608d70
parent 71401c573c36f3519de415fa788d94342d6f8dcb
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 15 Oct 2018 15:29:23 +0200
Upd how vertex attribs are fetched in sdis_scene_boundary_project_position
Use the new Star-2D function s2d_segment_get_vertex_attrib function to
retrieve the vertex attribs of a segment.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/sdis_scene.c b/src/sdis_scene.c
@@ -231,8 +231,8 @@ sdis_scene_boundary_project_position
/* Retrieve the segment vertices */
S2D(scene_view_get_primitive(scn->s2d_view, (unsigned int)iprim, &prim));
- S2D(primitive_get_attrib(&prim, S2D_POSITION, 0, &a)); d2_set_f2(V[0], a.value);
- S2D(primitive_get_attrib(&prim, S2D_POSITION, 1, &a)); d2_set_f2(V[1], a.value);
+ S2D(segment_get_vertex_attrib(&prim, 0, S2D_POSITION, &a)); d2_set_f2(V[0], a.value);
+ S2D(segment_get_vertex_attrib(&prim, 1, S2D_POSITION, &a)); d2_set_f2(V[1], a.value);
/* Compute the parametric coordinate of the project of `pos' onto the
* segment.*/