diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libdimension/render.c | 8 | ||||
-rw-r--r-- | tests/libdimension/tests.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/libdimension/render.c b/tests/libdimension/render.c index 1de9fba..440333c 100644 --- a/tests/libdimension/render.c +++ b/tests/libdimension/render.c @@ -45,7 +45,7 @@ dmnsn_new_test_scene(void) /* Set up the transformation matrix for the perspective camera */ dmnsn_matrix trans = dmnsn_scale_matrix( dmnsn_new_vector( - ((double)scene->canvas->x)/scene->canvas->y, 1.0, 1.0 + ((double)scene->canvas->width)/scene->canvas->height, 1.0, 1.0 ) ); trans = dmnsn_matrix_mul( @@ -63,7 +63,7 @@ dmnsn_new_test_scene(void) /* Create a perspective camera */ scene->camera = dmnsn_new_perspective_camera(); - dmnsn_set_perspective_camera_trans(scene->camera, trans); + scene->camera->trans = trans; /* Background color */ scene->background = dmnsn_color_from_sRGB((dmnsn_sRGB){ 0.0, 0.1, 0.2 }); @@ -106,11 +106,11 @@ dmnsn_new_test_scene(void) dmnsn_array *arrow_array = dmnsn_new_array(sizeof(dmnsn_object *)); - dmnsn_object *cylinder = dmnsn_new_cylinder(0.1, 0.1, false); + dmnsn_object *cylinder = dmnsn_new_cone(0.1, 0.1, false); cylinder->trans = dmnsn_scale_matrix(dmnsn_new_vector(1.0, 1.25, 1.0)); dmnsn_array_push(arrow_array, &cylinder); - dmnsn_object *cone = dmnsn_new_cylinder(0.1, 0.0, true); + dmnsn_object *cone = dmnsn_new_cone(0.1, 0.0, true); cone->trans = dmnsn_matrix_mul( dmnsn_translation_matrix(dmnsn_new_vector(0.0, 1.375, 0.0)), diff --git a/tests/libdimension/tests.c b/tests/libdimension/tests.c index 9d1d38c..e2e0d18 100644 --- a/tests/libdimension/tests.c +++ b/tests/libdimension/tests.c @@ -86,7 +86,7 @@ dmnsn_new_display(const dmnsn_canvas *canvas) swa.event_mask = StructureNotifyMask; display->win = XCreateWindow(display->dpy, RootWindow(display->dpy, display->vi->screen), - 0, 0, canvas->x, canvas->y, + 0, 0, canvas->width, canvas->height, 0, display->vi->depth, InputOutput, display->vi->visual, CWBorderPixel|CWColormap|CWEventMask, &swa); |