Skip to content

Commit

Permalink
Fixes for compiler warnings, upgraded fmt and farm_ng_core
Browse files Browse the repository at this point in the history
  • Loading branch information
isherman committed Jan 5, 2024
1 parent 72f09b1 commit a266826
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion components/pango_context/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if(BUILD_TESTS)
catch_discover_tests(layer_group_test)
endif()

target_link_libraries(${COMPONENT} PUBLIC pango_windowing pango_render pango_vars Sophus::sophus_image Sophus::sophus_sensor)
target_link_libraries(${COMPONENT} PUBLIC pango_windowing pango_render pango_vars farm_ng_core::sophus_image farm_ng_core::sophus_sensor)
target_link_libraries(${COMPONENT} PUBLIC pango_opengl)

find_package(assimp QUIET)
Expand Down
2 changes: 1 addition & 1 deletion components/pango_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/include"
DESTINATION ${CMAKE_INSTALL_PREFIX}
)

target_link_libraries(${COMPONENT} PUBLIC Sophus::sophus third_party)
target_link_libraries(${COMPONENT} PUBLIC farm_ng_core::sophus third_party)

find_package(Threads QUIET)
if(Threads_FOUND)
Expand Down
2 changes: 2 additions & 0 deletions components/pango_core/src/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,5 @@ Log& Log::instance()
}

} // namespace pangolin

template <> struct fmt::formatter<pangolin::Log::Kind> : ostream_formatter {};
2 changes: 1 addition & 1 deletion components/pango_image/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ get_filename_component(COMPONENT ${CMAKE_CURRENT_LIST_DIR} NAME)
find_package (Eigen3 REQUIRED QUIET)
target_compile_definitions(${COMPONENT} PUBLIC HAVE_EIGEN)

target_link_libraries(${COMPONENT} PUBLIC Sophus::sophus_image)
target_link_libraries(${COMPONENT} PUBLIC farm_ng_core::sophus_image)

option(BUILD_PANGOLIN_LIBPNG "Build support for libpng image input" ON)
if(BUILD_PANGOLIN_LIBPNG)
Expand Down
3 changes: 2 additions & 1 deletion components/pango_opengl/include/pangolin/gl/glplatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ const GLubyte* glErrorString(GLenum error);
if (gl_error != GL_NO_ERROR) { \
pangolin::Log::instance().log( \
pangolin::Log::Kind::Error, __FILE__, PANGO_FUNCTION, __LINE__, "", \
"GL Error ({}): {}", gl_error, pangolin::glErrorString(gl_error)); \
"GL Error ({}): {}", gl_error, \
reinterpret_cast<const char*>(pangolin::glErrorString(gl_error))); \
return false; \
} \
return true; \
Expand Down
2 changes: 1 addition & 1 deletion components/pango_opengl/include/pangolin/gl/glsl_program.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct GlSlProgram {
// for compile error messages only.
struct Source {
ShaderType shader_type = ShaderType::Annotated;
std::filesystem::path origin;
std::filesystem::path origin = {};
std::string glsl_code = "";
int origin_line = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion components/pango_render/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ foreach(basename ${component_file_basenames})
endif()
endforeach()

target_link_libraries(${COMPONENT} PUBLIC pango_core Sophus::sophus_image Sophus::sophus_sensor)
target_link_libraries(${COMPONENT} PUBLIC pango_core farm_ng_core::sophus_image farm_ng_core::sophus_sensor)

target_include_directories(${COMPONENT} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
Expand Down
2 changes: 1 addition & 1 deletion components/pango_windowing/src/display_headless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ PANGOLIN_REGISTER_FACTORY(HeadlessWindow)
{"w", "640", "Requested buffer width"},
{"h", "480", "Requested buffer height"},
{"window_title", "main", "Title (Unused)"},
{PARAM_GL_PROFILE, "Ignored for now"},
{PARAM_GL_PROFILE, "Ignored for now", ""},
}};
}
std::unique_ptr<WindowInterface> Open(const Uri& uri) override
Expand Down
2 changes: 1 addition & 1 deletion components/pango_windowing/src/display_wayland.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ PANGOLIN_REGISTER_FACTORY(WaylandWindow)
"Whether the window should be double buffered"},
{"sample_buffers", "1", ""},
{"samples", "1", ""},
{PARAM_GL_PROFILE, "Ignored for now"},
{PARAM_GL_PROFILE, "Ignored for now", ""},
}};
}

Expand Down
18 changes: 9 additions & 9 deletions components/pango_windowing/src/display_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,24 +426,24 @@ void X11Window::ProcessEvents()
case ButtonRelease: {
const int button = ev.xbutton.button - 1;
MouseSignal(MouseEvent{
(float)ev.xbutton.x, (float)ev.xbutton.y,
GetEventFlagsFromXState(ev.xkey.state), 1 << button,
{(float)ev.xbutton.x, (float)ev.xbutton.y,
GetEventFlagsFromXState(ev.xkey.state)}, 1 << button,
ev.xbutton.type == ButtonPress});
break;
}
case FocusOut:
break;
case MotionNotify:
if (ev.xmotion.state & (Button1Mask | Button2Mask | Button3Mask)) {
MouseMotionSignal(MouseMotionEvent{
MouseMotionSignal(MouseMotionEvent{{
(float)ev.xbutton.x,
(float)ev.xbutton.y,
GetEventFlagsFromXState(ev.xkey.state),
GetEventFlagsFromXState(ev.xkey.state)}
});
} else {
PassiveMouseMotionSignal(MouseMotionEvent{
PassiveMouseMotionSignal(MouseMotionEvent{{
(float)ev.xbutton.x, (float)ev.xbutton.y,
GetEventFlagsFromXState(ev.xkey.state)});
GetEventFlagsFromXState(ev.xkey.state)}});
}
break;
case KeyPress:
Expand Down Expand Up @@ -534,9 +534,9 @@ void X11Window::ProcessEvents()
}

if (key >= 0) {
KeyboardSignal(KeyboardEvent{
KeyboardSignal(KeyboardEvent{{
(float)ev.xkey.x, (float)ev.xkey.y,
GetEventFlagsFromXState(ev.xkey.state), (unsigned char)key,
GetEventFlagsFromXState(ev.xkey.state)}, (unsigned char)key,
ev.type == KeyPress});
}

Expand Down Expand Up @@ -594,7 +594,7 @@ PANGOLIN_REGISTER_FACTORY(X11Window)
"Whether the window should be double buffered"},
{"sample_buffers", "1", ""},
{"samples", "1", ""},
{PARAM_GL_PROFILE, "Ignored for now"},
{PARAM_GL_PROFILE, "Ignored for now", ""},
}};
}

Expand Down

0 comments on commit a266826

Please sign in to comment.