Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions examples/app/vsgcameras/vsgcameras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,11 @@ int main(int argc, char** argv)
for (auto& [nodePath, camera] : scene_cameras)
{
// create a RenderGraph to add a secondary vsg::View on the top right part of the window.
auto projectionMatrix = camera->projectionMatrix;
auto projectionMatrix = vsg::Perspective::create(30.0, static_cast<double>(secondary_width) / static_cast<double>(secondary_height),
nearFarRatio * radius, radius * 4.5);
auto viewMatrix = vsg::TrackingViewMatrix::create(nodePath);
auto viewportState = vsg::ViewportState::create(x, y, secondary_width, secondary_height);
auto viewportState = vsg::ViewportState::create(x + 150, y, secondary_width, secondary_height);
viewportState->scissors[0].extent.width -= 150;

auto secondary_camera = vsg::Camera::create(projectionMatrix, viewMatrix, viewportState);

Expand Down