summaryrefslogtreecommitdiff
path: root/bin/tests/test_render.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bin/tests/test_render.cpp')
-rw-r--r--bin/tests/test_render.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/tests/test_render.cpp b/bin/tests/test_render.cpp
index 9c3a287afa..b971d412aa 100644
--- a/bin/tests/test_render.cpp
+++ b/bin/tests/test_render.cpp
@@ -173,7 +173,10 @@ public:
// vs->camera_set_perspective( camera, 60.0,0.1, 100.0 );
viewport = vs->viewport_create();
- vs->viewport_attach_to_screen(viewport);
+ Size2i screen_size = OS::get_singleton()->get_window_size();
+ vs->viewport_set_size(viewport,screen_size.x,screen_size.y);
+ vs->viewport_attach_to_screen(viewport,Rect2(Vector2(),screen_size));
+ vs->viewport_set_active(viewport,true);
vs->viewport_attach_camera( viewport, camera );
vs->viewport_set_scenario( viewport, scenario );
vs->camera_set_transform(camera, Transform( Matrix3(), Vector3(0,3,30 ) ) );
@@ -192,7 +195,7 @@ public:
//*
lightaux = vs->light_create( VisualServer::LIGHT_DIRECTIONAL );
//vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_AMBIENT, Color(0.0,0.0,0.0) );
- vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_DIFFUSE, Color(1.0,1.0,1.0) );
+ vs->light_set_color( lightaux, Color(1.0,1.0,1.0) );
//vs->light_set_shadow( lightaux, true );
light = vs->instance_create2( lightaux, scenario );
Transform lla;
@@ -205,8 +208,8 @@ public:
//*
lightaux = vs->light_create( VisualServer::LIGHT_OMNI );
// vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_AMBIENT, Color(0.0,0.0,1.0) );
- vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_DIFFUSE, Color(1.0,1.0,0.0) );
- vs->light_set_param( lightaux, VisualServer::LIGHT_PARAM_RADIUS, 4 );
+ vs->light_set_color( lightaux, Color(1.0,1.0,0.0) );
+ vs->light_set_param( lightaux, VisualServer::LIGHT_PARAM_RANGE, 4 );
vs->light_set_param( lightaux, VisualServer::LIGHT_PARAM_ENERGY, 8 );
//vs->light_set_shadow( lightaux, true );
//light = vs->instance_create( lightaux );