summaryrefslogtreecommitdiff
path: root/servers/visual/visual_server_raster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/visual/visual_server_raster.cpp')
-rw-r--r--servers/visual/visual_server_raster.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index a547da9b61..3fc90fd46d 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -6302,7 +6302,7 @@ void VisualServerRaster::_render_no_camera(Viewport *p_viewport,Camera *p_camera
else
environment=p_scenario->fallback_environment;
- rasterizer->set_camera(Transform(),CameraMatrix());
+ rasterizer->set_camera(Transform(),CameraMatrix(),false);
rasterizer->begin_scene(p_viewport->viewport_data,environment,p_scenario->debug);
rasterizer->set_viewport(viewport_rect);
rasterizer->end_scene();
@@ -6318,7 +6318,8 @@ void VisualServerRaster::_render_camera(Viewport *p_viewport,Camera *p_camera, S
/* STEP 1 - SETUP CAMERA */
CameraMatrix camera_matrix;
-
+ bool ortho=false;
+
switch(p_camera->type) {
case Camera::ORTHOGONAL: {
@@ -6330,6 +6331,7 @@ void VisualServerRaster::_render_camera(Viewport *p_viewport,Camera *p_camera, S
p_camera->vaspect
);
+ ortho=true;
} break;
case Camera::PERSPECTIVE: {
@@ -6341,12 +6343,13 @@ void VisualServerRaster::_render_camera(Viewport *p_viewport,Camera *p_camera, S
p_camera->vaspect
);
+ ortho=false;
} break;
}
- rasterizer->set_camera(p_camera->transform, camera_matrix);
+ rasterizer->set_camera(p_camera->transform, camera_matrix,ortho);
Vector<Plane> planes = camera_matrix.get_projection_planes(p_camera->transform);
@@ -7358,7 +7361,7 @@ void VisualServerRaster::_draw_cursors_and_margins() {
rasterizer->canvas_end_rect();
};
-void VisualServerRaster::flush() {
+void VisualServerRaster::sync() {
//do none
}