star-4v_s

An invariant property of diffuse random walks
git clone git://git.meso-star.fr/star-4v_s.git
Log | Files | Refs | README | LICENSE

commit 372a1886184ad1a96aed51966e8c6030130a3390
parent 763bf9ea47a5aa49c8519086fb3e15ea49cf670b
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 14 Apr 2016 12:34:44 +0200

Update the obj import routine

Replace the iteration on the loaded s3d_shape by the invocation of
s3daw_attach_to_scene.

Diffstat:
Msrc/s4vs.c | 9+--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/s4vs.c b/src/s4vs.c @@ -126,7 +126,6 @@ import_obj(const char* filename, struct s3d_scene** out_scene) struct s3d_device* s3d = NULL; struct s3d_scene* scene = NULL; struct s3daw* s3daw = NULL; - size_t i, count; const int VERBOSE = 0; res_T res = RES_OK; ASSERT(out_scene); @@ -135,14 +134,8 @@ import_obj(const char* filename, struct s3d_scene** out_scene) CALL(s3d_device_create(NULL, NULL, VERBOSE, &s3d)); CALL(s3daw_create(NULL, NULL, NULL, NULL, s3d, VERBOSE, &s3daw)); CALL(s3daw_load(s3daw, filename)); - CALL(s3daw_get_shapes_count(s3daw, &count)); CALL(s3d_scene_create(s3d, &scene)); - - FOR_EACH(i, 0, count) { - struct s3d_shape* shape; - CALL(s3daw_get_shape(s3daw, i, &shape)); - CALL(s3d_scene_attach_shape(scene, shape)); - } + CALL(s3daw_attach_to_scene(s3daw, scene)); #undef CALL exit: