From 31e272c5d91927ef1b251e8c8c2768d2aa64f38f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <thomas94@gmx.net> Date: Mon, 23 Jan 2023 14:24:31 +0100 Subject: [PATCH] Fix incorrect camera path buffer size --- include/neural-graphics-primitives/camera_path.h | 2 +- src/camera_path.cu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/neural-graphics-primitives/camera_path.h b/include/neural-graphics-primitives/camera_path.h index 856087f..8d3fe24 100644 --- a/include/neural-graphics-primitives/camera_path.h +++ b/include/neural-graphics-primitives/camera_path.h @@ -132,8 +132,8 @@ struct CameraPath { #ifdef NGP_GUI ImGuizmo::MODE m_gizmo_mode = ImGuizmo::LOCAL; ImGuizmo::OPERATION m_gizmo_op = ImGuizmo::TRANSLATE; - int imgui(char path_filename_buf[128], float frame_milliseconds, Eigen::Matrix<float, 3, 4>& camera, float slice_plane_z, float scale, float fov, float aperture_size, float bounding_radius, const Eigen::Matrix<float, 3, 4>& first_xform, int glow_mode, float glow_y_cutoff); bool imgui_viz(ImDrawList* list, Eigen::Matrix<float, 4, 4>& view2proj, Eigen::Matrix<float, 4, 4>& world2proj, Eigen::Matrix<float, 4, 4>& world2view, Eigen::Vector2f focal, float aspect); + int imgui(char path_filename_buf[1024], float frame_milliseconds, Eigen::Matrix<float, 3, 4>& camera, float slice_plane_z, float scale, float fov, float aperture_size, float bounding_radius, const Eigen::Matrix<float, 3, 4>& first_xform, int glow_mode, float glow_y_cutoff); #endif }; diff --git a/src/camera_path.cu b/src/camera_path.cu index 5f3a3ff..853f495 100644 --- a/src/camera_path.cu +++ b/src/camera_path.cu @@ -147,7 +147,7 @@ int CameraPath::imgui(char path_filename_buf[1024], float frame_milliseconds, Ma int n = std::max(0, int(keyframes.size()) - 1); int read = 0; // 1=smooth, 2=hard - ImGui::InputText("##PathFile", path_filename_buf, sizeof(path_filename_buf)); + ImGui::InputText("##PathFile", path_filename_buf, 1024); ImGui::SameLine(); static std::string camera_path_load_error_string = ""; -- GitLab