commit c88b6bf5d17cafdbc5367c369358c8fb9c47c134
parent 5c1321502d8b51168f1fa189ec71a8fc1b2a4e94
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Fri, 23 Sep 2016 14:42:00 +0200
Clean tests
Diffstat:
9 files changed, 197 insertions(+), 112 deletions(-)
diff --git a/src/test_ssol_geometries.h b/src/test_ssol_geometries.h
@@ -22,64 +22,6 @@ struct desc {
};
/*******************************************************************************
- * Square plane
- ******************************************************************************/
-static const float square_walls [] = {
- -1.f, -1.f, 0.f,
- 1.f, -1.f, 0.f,
- 1.f, 1.f, 0.f,
- -1.f, 1.f, 0.f
-};
-const unsigned square_walls_nverts = sizeof(square_walls) / sizeof(float[3]);
-
-const unsigned square_walls_ids [] = { 0, 2, 1, 2, 0, 3 };
-const unsigned square_walls_ntris = sizeof(square_walls_ids) / sizeof(unsigned[3]);
-
-static const struct desc square_walls_desc = { square_walls, square_walls_ids };
-
-/*******************************************************************************
-* Rectangle plane
-******************************************************************************/
-static const float rect_walls [] = {
- -10.f, -1.f, 0.f,
- 10.f, -1.f, 0.f,
- 10.f, 1.f, 0.f,
- -10.f, 1.f, 0.f
-};
-const unsigned rect_walls_nverts = sizeof(rect_walls) / sizeof(float[3]);
-
-const unsigned rect_walls_ids [] = { 0, 2, 1, 2, 0, 3 };
-const unsigned rect_walls_ntris = sizeof(rect_walls_ids) / sizeof(unsigned[3]);
-
-static const struct desc rect_walls_desc = { rect_walls, rect_walls_ids };
-
-/*******************************************************************************
- * Box
- ******************************************************************************/
-static const float box_walls [] = {
- 552.f, 0.f, 0.f,
- 0.f, 0.f, 0.f,
- 0.f, 559.f, 0.f,
- 552.f, 559.f, 0.f,
- 552.f, 0.f, 548.f,
- 0.f, 0.f, 548.f,
- 0.f, 559.f, 548.f,
- 552.f, 559.f, 548.f
-};
-const unsigned box_walls_nverts = sizeof(box_walls) / sizeof(float[3]);
-
-const unsigned box_walls_ids [] = {
- 0, 1, 2, 2, 3, 0, /* Bottom */
- 4, 5, 6, 6, 7, 4, /* Top */
- 1, 2, 6, 6, 5, 1, /* Left */
- 0, 3, 7, 7, 4, 0, /* Right */
- 2, 3, 7, 7, 6, 2 /* Back */
-};
-const unsigned box_walls_ntris = sizeof(box_walls_ids) / sizeof(unsigned[3]);
-
-static const struct desc box_walls_desc = { box_walls, box_walls_ids };
-
-/*******************************************************************************
* Callbacks
******************************************************************************/
static INLINE void
diff --git a/src/test_ssol_rect2D_geometry.h b/src/test_ssol_rect2D_geometry.h
@@ -0,0 +1,49 @@
+/* Copyright (C) CNRS 2016
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include "test_ssol_geometries.h"
+
+/*******************************************************************************
+* Rectangle polygon
+******************************************************************************/
+#if !defined(HALF_X)
+#error "Missing the HALF_X macro defining the rectangle size"
+#endif
+#if !defined(HALF_Y)
+#error "Missing the HALF_Y macro defining the rectangle size"
+#endif
+#if !defined(POLYGON_NAME)
+#error "Missing the POLYGON_NAME macro defining the polygon name"
+#endif
+
+#define EDGES__ CONCAT(POLYGON_NAME, _EDGES__)
+#define POLY_NVERTS__ CONCAT(POLYGON_NAME, _NVERTS__)
+
+/* should be const but scpr expects non-const data */
+static double EDGES__ [] = {
+ -HALF_X, -HALF_Y,
+ -HALF_X, HALF_Y,
+ HALF_X, HALF_Y,
+ HALF_X, -HALF_Y,
+};
+
+const unsigned POLY_NVERTS__ = sizeof(EDGES__) / sizeof(double[2]);
+
+#undef EDGES__
+#undef POLY_NVERTS__
+
+#undef HALF_X
+#undef HALF_Y
+#undef POLYGON_NAME
diff --git a/src/test_ssol_rect_geometry.h b/src/test_ssol_rect_geometry.h
@@ -0,0 +1,59 @@
+/* Copyright (C) CNRS 2016
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include "test_ssol_geometries.h"
+
+/*******************************************************************************
+* Rectangle plane
+******************************************************************************/
+#if !defined(HALF_X)
+#error "Missing the HALF_X macro defining the rectangle size"
+#endif
+#if !defined(HALF_Y)
+#error "Missing the HALF_Y macro defining the rectangle size"
+#endif
+#if !defined(PLANE_NAME)
+#error "Missing the DARRAY_NAME macro defining the rectangle name"
+#endif
+
+#define EDGES__ CONCAT(PLANE_NAME, _EDGES__)
+#define TRG_IDS__ CONCAT(PLANE_NAME, _TRG_IDS__)
+#define RECT_DESC__ CONCAT(PLANE_NAME, _DESC__)
+#define RECT_NVERTS__ CONCAT(PLANE_NAME, _NVERTS__)
+#define RECT_NTRIS__ CONCAT(PLANE_NAME, _NTRIS__)
+
+static const float EDGES__ [] = {
+ (float) -HALF_X, (float) -HALF_Y, 0.f,
+ (float) HALF_X, (float) -HALF_Y, 0.f,
+ (float) HALF_X, (float) HALF_Y, 0.f,
+ (float) -HALF_X, (float) HALF_Y, 0.f
+};
+
+const unsigned RECT_NVERTS__ = sizeof(EDGES__) / sizeof(float[3]);
+
+const unsigned TRG_IDS__ [] = { 0, 2, 1, 2, 0, 3 };
+const unsigned RECT_NTRIS__ = sizeof(TRG_IDS__) / sizeof(unsigned[3]);
+
+static const struct desc RECT_DESC__ = { EDGES__, TRG_IDS__ };
+
+#undef EDGES__
+#undef TRG_IDS__
+#undef RECT_DESC__
+#undef RECT_NVERTS__
+#undef RECT_NTRIS__
+
+#undef HALF_X
+#undef HALF_Y
+#undef PLANE_NAME
diff --git a/src/test_ssol_shape.c b/src/test_ssol_shape.c
@@ -15,7 +15,11 @@
#include "ssol.h"
#include "test_ssol_utils.h"
-#include "test_ssol_geometries.h"
+
+#define PLANE_NAME SQUARE
+#define HALF_X 1
+#define HALF_Y 1
+#include "test_ssol_rect_geometry.h"
#include <rsys/logger.h>
@@ -67,20 +71,20 @@ main(int argc, char** argv)
attribs[2].usage = SSOL_TEXCOORD;
attribs[2].get = get_uv;
- CHECK(ssol_mesh_setup(NULL, box_walls_ntris, get_ids, box_walls_nverts,
- attribs, 1, (void*)&box_walls_desc), RES_BAD_ARG);
- CHECK(ssol_mesh_setup(shape, 0, get_ids, box_walls_nverts, attribs, 1,
- (void*)&box_walls_desc), RES_BAD_ARG);
- CHECK(ssol_mesh_setup(shape, box_walls_ntris, NULL, box_walls_nverts,
- attribs, 1, (void*)&box_walls_desc), RES_BAD_ARG);
- CHECK(ssol_mesh_setup(shape, box_walls_ntris, get_ids, 0, attribs, 1,
- (void*)&box_walls_desc), RES_BAD_ARG);
- CHECK(ssol_mesh_setup(shape, box_walls_ntris, get_ids, box_walls_nverts,
- NULL, 1, (void*)&box_walls_desc), RES_BAD_ARG);
- CHECK(ssol_mesh_setup(shape, box_walls_ntris, get_ids, box_walls_nverts,
- attribs, 0, (void*)&box_walls_desc), RES_BAD_ARG);
- CHECK(ssol_mesh_setup(shape, box_walls_ntris, get_ids, box_walls_nverts,
- attribs, 3, (void*)&box_walls_desc), RES_OK);
+ CHECK(ssol_mesh_setup(NULL, SQUARE_NTRIS__, get_ids, SQUARE_NVERTS__,
+ attribs, 1, (void*)&SQUARE_DESC__), RES_BAD_ARG);
+ CHECK(ssol_mesh_setup(shape, 0, get_ids, SQUARE_NVERTS__, attribs, 1,
+ (void*)&SQUARE_DESC__), RES_BAD_ARG);
+ CHECK(ssol_mesh_setup(shape, SQUARE_NTRIS__, NULL, SQUARE_NVERTS__,
+ attribs, 1, (void*)&SQUARE_DESC__), RES_BAD_ARG);
+ CHECK(ssol_mesh_setup(shape, SQUARE_NTRIS__, get_ids, 0, attribs, 1,
+ (void*)&SQUARE_DESC__), RES_BAD_ARG);
+ CHECK(ssol_mesh_setup(shape, SQUARE_NTRIS__, get_ids, SQUARE_NVERTS__,
+ NULL, 1, (void*)&SQUARE_DESC__), RES_BAD_ARG);
+ CHECK(ssol_mesh_setup(shape, SQUARE_NTRIS__, get_ids, SQUARE_NVERTS__,
+ attribs, 0, (void*)&SQUARE_DESC__), RES_BAD_ARG);
+ CHECK(ssol_mesh_setup(shape, SQUARE_NTRIS__, get_ids, SQUARE_NVERTS__,
+ attribs, 3, (void*)&SQUARE_DESC__), RES_OK);
CHECK(ssol_shape_ref_put(shape), RES_OK);
diff --git a/src/test_ssol_solver1.c b/src/test_ssol_solver1.c
@@ -15,10 +15,14 @@
#include "ssol.h"
#include "test_ssol_utils.h"
-#include "test_ssol_geometries.h"
#include "test_ssol_materials.h"
#include "test_ssol_postprocess.h"
+#define HALF_X 1
+#define HALF_Y 1
+#define PLANE_NAME SQUARE
+#include "test_ssol_rect_geometry.h"
+
#include "ssol_solver_c.h"
#include <rsys/logger.h>
@@ -107,8 +111,8 @@ main(int argc, char** argv)
CHECK(ssol_shape_create_mesh(dev, &square), RES_OK);
attribs[0].usage = SSOL_POSITION;
attribs[0].get = get_position;
- CHECK(ssol_mesh_setup(square, square_walls_ntris, get_ids,
- square_walls_nverts, attribs, 1, (void*)&square_walls_desc), RES_OK);
+ CHECK(ssol_mesh_setup(square, SQUARE_NTRIS__, get_ids,
+ SQUARE_NVERTS__, attribs, 1, (void*)&SQUARE_DESC__), RES_OK);
CHECK(ssol_material_create_mirror(dev, &m_mtl), RES_OK);
shader.normal = get_shader_normal;
@@ -189,11 +193,11 @@ main(int argc, char** argv)
#define N 5000
CHECK(ssol_solve(scene, rng, N, tmp), RES_OK);
CHECK(pp_sum(tmp, "cible", &m, &std), RES_OK);
+ logger_print(&logger, LOG_OUTPUT, "\nP = %g +/- %g\n", m, std);
#define DNI_cos (1000 * cos(PI / 4))
CHECK(eq_eps(m, 4 * DNI_cos, 4 * DNI_cos * 1e-2), 1);
#define SQR(x) ((x)*(x))
CHECK(eq_eps(std, sqrt((SQR(12 * DNI_cos) / 3 - SQR(4 * DNI_cos)) / N), 1e-1), 1);
- logger_print(&logger, LOG_OUTPUT, "\nP = %g +/- %g\n", m, std);
CHECK(fclose(tmp), 0);
/* sample primary mirror only; variance is low */
@@ -206,9 +210,9 @@ main(int argc, char** argv)
tmp = tmpfile();
CHECK(ssol_solve(scene, rng, N, tmp), RES_OK);
CHECK(pp_sum(tmp, "cible", &m, &std), RES_OK);
+ logger_print(&logger, LOG_OUTPUT, "\nP = %g +/- %g\n", m, std);
CHECK(eq_eps(m, 4 * DNI_cos, 4 * DNI_cos * 1e-4), 1);
CHECK(eq_eps(std, 0, 1e-4), 1);
- logger_print(&logger, LOG_OUTPUT, "\nP = %g +/- %g\n", m, std);
CHECK(fclose(tmp), 0);
/* check atmosphere model; with no absorbtion result is unchanged */
diff --git a/src/test_ssol_solver2.c b/src/test_ssol_solver2.c
@@ -15,10 +15,19 @@
#include "ssol.h"
#include "test_ssol_utils.h"
-#include "test_ssol_geometries.h"
#include "test_ssol_materials.h"
#include "test_ssol_postprocess.h"
+#define PLANE_NAME SQUARE
+#define HALF_X 1
+#define HALF_Y 1
+#include "test_ssol_rect_geometry.h"
+
+#define POLYGON_NAME POLY
+#define HALF_X 1
+#define HALF_Y 1
+#include "test_ssol_rect2D_geometry.h"
+
#include "ssol_solver_c.h"
#include <rsys/logger.h>
@@ -60,8 +69,6 @@ main(int argc, char** argv)
double intensities[3] = { 1, 0.8, 1 };
double transform1[12]; /* 3x4 column major matrix */
double transform2[12]; /* 3x4 column major matrix */
- double polygon[] = { -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0 };
- const size_t npolygon_verts = sizeof(polygon) / sizeof(double[2]);
FILE* tmp;
double m, std;
@@ -102,14 +109,14 @@ main(int argc, char** argv)
CHECK(ssol_shape_create_mesh(dev, &square), RES_OK);
attribs[0].usage = SSOL_POSITION;
attribs[0].get = get_position;
- CHECK(ssol_mesh_setup(square, square_walls_ntris, get_ids,
- square_walls_nverts, attribs, 1, (void*)&square_walls_desc), RES_OK);
+ CHECK(ssol_mesh_setup(square, SQUARE_NTRIS__, get_ids,
+ SQUARE_NVERTS__, attribs, 1, (void*) &SQUARE_DESC__), RES_OK);
CHECK(ssol_shape_create_punched_surface(dev, &quad_square), RES_OK);
carving.get = get_polygon_vertices;
carving.operation = SSOL_AND;
- carving.nb_vertices = npolygon_verts;
- carving.context = &polygon;
+ carving.nb_vertices = POLY_NVERTS__;
+ carving.context = &POLY_EDGES__;
quadric.type = SSOL_QUADRIC_PLANE;
punched.nb_carvings = 1;
punched.quadric = &quadric;
@@ -149,11 +156,11 @@ main(int argc, char** argv)
#define N 10000
CHECK(ssol_solve(scene, rng, N, tmp), RES_OK);
CHECK(pp_sum(tmp, "cible", &m, &std), RES_OK);
+ logger_print(&logger, LOG_OUTPUT, "\nP = %g +/- %g\n", m, std);
#define DNI_cos (1000 * cos(PI / 4))
CHECK(eq_eps(m, 4 * DNI_cos, 4 * DNI_cos * 1e-4), 1);
#define SQR(x) ((x)*(x))
CHECK(eq_eps(std, sqrt((SQR(4 * DNI_cos) - SQR(4 * DNI_cos)) / N), 1e-4), 1);
- logger_print(&logger, LOG_OUTPUT, "\nP = %g +/- %g\n", m, std);
/* free data */
CHECK(ssol_instance_ref_put(heliostat), RES_OK);
diff --git a/src/test_ssol_solver3.c b/src/test_ssol_solver3.c
@@ -15,10 +15,19 @@
#include "ssol.h"
#include "test_ssol_utils.h"
-#include "test_ssol_geometries.h"
#include "test_ssol_materials.h"
#include "test_ssol_postprocess.h"
+#define PLANE_NAME SQUARE
+#define HALF_X 1
+#define HALF_Y 1
+#include "test_ssol_rect_geometry.h"
+
+#define POLYGON_NAME POLY
+#define HALF_X 10
+#define HALF_Y 10
+#include "test_ssol_rect2D_geometry.h"
+
#include "ssol_solver_c.h"
#include <rsys/logger.h>
@@ -57,8 +66,6 @@ main(int argc, char** argv)
double wavelengths[3] = { 1, 2, 3 };
double intensities[3] = { 1, 0.8, 1 };
double transform[12]; /* 3x4 column major matrix */
- double polygon[] = { -10.0, -10.0, -10.0, 10.0, 10.0, 10.0, 10.0, -10.0 };
- const size_t npolygon_verts = sizeof(polygon) / sizeof(double[2]);
FILE* tmp;
double m, std;
@@ -94,14 +101,14 @@ main(int argc, char** argv)
CHECK(ssol_shape_create_mesh(dev, &square), RES_OK);
attribs[0].usage = SSOL_POSITION;
attribs[0].get = get_position;
- CHECK(ssol_mesh_setup(square, square_walls_ntris, get_ids,
- square_walls_nverts, attribs, 1, (void*) &square_walls_desc), RES_OK);
+ CHECK(ssol_mesh_setup(square, SQUARE_NTRIS__, get_ids,
+ SQUARE_NVERTS__, attribs, 1, (void*) &SQUARE_DESC__), RES_OK);
CHECK(ssol_shape_create_punched_surface(dev, &quad_square), RES_OK);
carving.get = get_polygon_vertices;
carving.operation = SSOL_AND;
- carving.nb_vertices = npolygon_verts;
- carving.context = &polygon;
+ carving.nb_vertices = POLY_NVERTS__;
+ carving.context = &POLY_EDGES__;
quadric.type = SSOL_QUADRIC_PLANE;
punched.nb_carvings = 1;
punched.quadric = &quadric;
diff --git a/src/test_ssol_solver4.c b/src/test_ssol_solver4.c
@@ -15,10 +15,19 @@
#include "ssol.h"
#include "test_ssol_utils.h"
-#include "test_ssol_geometries.h"
#include "test_ssol_materials.h"
#include "test_ssol_postprocess.h"
+#define PLANE_NAME SQUARE
+#define HALF_X 0.1
+#define HALF_Y 0.1
+#include "test_ssol_rect_geometry.h"
+
+#define POLYGON_NAME POLY
+#define HALF_X 10
+#define HALF_Y 10
+#include "test_ssol_rect2D_geometry.h"
+
#include "ssol_solver_c.h"
#include <rsys/logger.h>
@@ -57,8 +66,6 @@ main(int argc, char** argv)
double wavelengths[3] = { 1, 2, 3 };
double intensities[3] = { 1, 0.8, 1 };
double transform[12]; /* 3x4 column major matrix */
- double polygon[] = { -10.0, -10.0, -10.0, 10.0, 10.0, 10.0, 10.0, -10.0 };
- const size_t npolygon_verts = sizeof(polygon) / sizeof(double[2]);
FILE* tmp;
double m, std;
@@ -94,14 +101,14 @@ main(int argc, char** argv)
CHECK(ssol_shape_create_mesh(dev, &square), RES_OK);
attribs[0].usage = SSOL_POSITION;
attribs[0].get = get_position;
- CHECK(ssol_mesh_setup(square, square_walls_ntris, get_ids,
- square_walls_nverts, attribs, 1, (void*) &square_walls_desc), RES_OK);
+ CHECK(ssol_mesh_setup(square, SQUARE_NTRIS__, get_ids,
+ SQUARE_NVERTS__, attribs, 1, (void*) &SQUARE_DESC__), RES_OK);
CHECK(ssol_shape_create_punched_surface(dev, &quad_square), RES_OK);
carving.get = get_polygon_vertices;
carving.operation = SSOL_AND;
- carving.nb_vertices = npolygon_verts;
- carving.context = &polygon;
+ carving.nb_vertices = POLY_NVERTS__;
+ carving.context = &POLY_EDGES__;
quadric.type = SSOL_QUADRIC_PARABOL;
quadric.data.parabol.focal = FOCAL;
punched.nb_carvings = 1;
@@ -118,7 +125,6 @@ main(int argc, char** argv)
CHECK(ssol_object_create(dev, quad_square, m_mtl, m_mtl, &m_object), RES_OK);
CHECK(ssol_object_instantiate(m_object, &heliostat), RES_OK);
- CHECK(ssol_instance_set_receiver(heliostat, "heliostat", NULL), RES_OK);
CHECK(ssol_scene_attach_instance(scene, heliostat), RES_OK);
CHECK(ssol_object_create(dev, square, v_mtl, v_mtl, &t_object), RES_OK);
diff --git a/src/test_ssol_solver5.c b/src/test_ssol_solver5.c
@@ -15,10 +15,19 @@
#include "ssol.h"
#include "test_ssol_utils.h"
-#include "test_ssol_geometries.h"
#include "test_ssol_materials.h"
#include "test_ssol_postprocess.h"
+#define HALF_X 10
+#define HALF_Y 0.1
+#define PLANE_NAME RECT
+#include "test_ssol_rect_geometry.h"
+
+#define POLYGON_NAME POLY
+#define HALF_X 10
+#define HALF_Y 10
+#include "test_ssol_rect2D_geometry.h"
+
#include "ssol_solver_c.h"
#include <rsys/logger.h>
@@ -38,7 +47,7 @@ main(int argc, char** argv)
struct ssol_device* dev;
struct ssp_rng* rng;
struct ssol_scene* scene;
- struct ssol_shape* square;
+ struct ssol_shape* rect;
struct ssol_vertex_data attribs[1];
struct ssol_shape* quad_square;
struct ssol_carving carving;
@@ -57,8 +66,6 @@ main(int argc, char** argv)
double wavelengths[3] = { 1, 2, 3 };
double intensities[3] = { 1, 0.8, 1 };
double transform[12]; /* 3x4 column major matrix */
- double polygon[] = { -10.0, -10.0, -10.0, 10.0, 10.0, 10.0, 10.0, -10.0 };
- const size_t npolygon_verts = sizeof(polygon) / sizeof(double[2]);
FILE* tmp;
double m, std;
@@ -91,17 +98,17 @@ main(int argc, char** argv)
/* create scene content */
- CHECK(ssol_shape_create_mesh(dev, &square), RES_OK);
+ CHECK(ssol_shape_create_mesh(dev, &rect), RES_OK);
attribs[0].usage = SSOL_POSITION;
attribs[0].get = get_position;
- CHECK(ssol_mesh_setup(square, rect_walls_ntris, get_ids,
- rect_walls_nverts, attribs, 1, (void*) &rect_walls_desc), RES_OK);
+ CHECK(ssol_mesh_setup(rect, RECT_NTRIS__, get_ids,
+ RECT_NVERTS__, attribs, 1, (void*) &RECT_DESC__), RES_OK);
CHECK(ssol_shape_create_punched_surface(dev, &quad_square), RES_OK);
carving.get = get_polygon_vertices;
carving.operation = SSOL_AND;
- carving.nb_vertices = npolygon_verts;
- carving.context = &polygon;
+ carving.nb_vertices = POLY_NVERTS__;
+ carving.context = &POLY_EDGES__;
quadric.type = SSOL_QUADRIC_PARABOLIC_CYLINDER;
quadric.data.parabol.focal = FOCAL;
punched.nb_carvings = 1;
@@ -120,7 +127,7 @@ main(int argc, char** argv)
CHECK(ssol_object_instantiate(m_object, &heliostat), RES_OK);
CHECK(ssol_scene_attach_instance(scene, heliostat), RES_OK);
- CHECK(ssol_object_create(dev, square, v_mtl, v_mtl, &t_object), RES_OK);
+ CHECK(ssol_object_create(dev, rect, v_mtl, v_mtl, &t_object), RES_OK);
CHECK(ssol_object_instantiate(t_object, &target), RES_OK);
CHECK(ssol_instance_set_transform(target, transform), RES_OK);
CHECK(ssol_instance_set_receiver(target, "cible", NULL), RES_OK);
@@ -145,7 +152,7 @@ main(int argc, char** argv)
CHECK(ssol_instance_ref_put(target), RES_OK);
CHECK(ssol_object_ref_put(m_object), RES_OK);
CHECK(ssol_object_ref_put(t_object), RES_OK);
- CHECK(ssol_shape_ref_put(square), RES_OK);
+ CHECK(ssol_shape_ref_put(rect), RES_OK);
CHECK(ssol_shape_ref_put(quad_square), RES_OK);
CHECK(ssol_material_ref_put(m_mtl), RES_OK);
CHECK(ssol_material_ref_put(v_mtl), RES_OK);