diff --git a/example/particle-filter/pf-nonlinear-example.cpp b/example/particle-filter/pf-nonlinear-example.cpp index 98dbbe2137..d0756a66db 100644 --- a/example/particle-filter/pf-nonlinear-example.cpp +++ b/example/particle-filter/pf-nonlinear-example.cpp @@ -618,7 +618,7 @@ int main(const int argc, const char *argv[]) // first video device which is available #ifdef VISP_HAVE_DISPLAY std::shared_ptr d; - vpImage Idisp(800, 800, vpRGBa(255)); + vpImage Idisp(800, 800, vpRGBa(static_cast(255))); if (args.m_useDisplay) { d = vpDisplayFactory::createDisplay(Idisp, 800, 50, "Projection of the markers"); } diff --git a/modules/gui/include/visp3/gui/vpDisplayFactory.h b/modules/gui/include/visp3/gui/vpDisplayFactory.h index 16891d353a..7dbd9db3e9 100644 --- a/modules/gui/include/visp3/gui/vpDisplayFactory.h +++ b/modules/gui/include/visp3/gui/vpDisplayFactory.h @@ -60,7 +60,7 @@ namespace vpDisplayFactory * \return A newly allocated vpDisplay specialization * if a GUI library is available or nullptr otherwise. */ -vpDisplay *displayFactory() +vpDisplay *allocateDisplay() { #if defined(VISP_HAVE_DISPLAY) #ifdef VISP_HAVE_X11 diff --git a/tutorial/grabber/tutorial-grabber-1394-writer.cpp b/tutorial/grabber/tutorial-grabber-1394-writer.cpp index 9200e9d847..3a51467b60 100644 --- a/tutorial/grabber/tutorial-grabber-1394-writer.cpp +++ b/tutorial/grabber/tutorial-grabber-1394-writer.cpp @@ -12,7 +12,7 @@ int main(int argc, char **) using namespace VISP_NAMESPACE_NAME; #endif #ifdef VISP_HAVE_DISPLAY - vpDisplay *d = vpDisplayFactory::displayFactory(); + vpDisplay *d = vpDisplayFactory::allocateDisplay(); #else std::cout << "No image viewer is available..." << std::endl; #endif diff --git a/tutorial/grabber/tutorial-grabber-v4l2-threaded.cpp b/tutorial/grabber/tutorial-grabber-v4l2-threaded.cpp index a2d5c49357..ca1bf9f916 100644 --- a/tutorial/grabber/tutorial-grabber-v4l2-threaded.cpp +++ b/tutorial/grabber/tutorial-grabber-v4l2-threaded.cpp @@ -59,7 +59,7 @@ void displayFunction(std::mutex &mutex_capture, vpImage &frame, t t_CaptureState capture_state_; bool display_initialized_ = false; - vpDisplay *d_ = vpDisplayFactory::displayFactory(); + vpDisplay *d_ = vpDisplayFactory::allocateDisplay(); do { mutex_capture.lock(); diff --git a/tutorial/grabber/tutorial-video-reader.cpp b/tutorial/grabber/tutorial-video-reader.cpp index 5dec916e84..ba0412ec5e 100644 --- a/tutorial/grabber/tutorial-video-reader.cpp +++ b/tutorial/grabber/tutorial-video-reader.cpp @@ -47,7 +47,7 @@ int main(int argc, char **argv) std::cout << "Video dimension: " << I.getWidth() << " " << I.getHeight() << std::endl; #ifdef VISP_HAVE_DISPLAY - vpDisplay *d = vpDisplayFactory::displayFactory(I); + vpDisplay *d = vpDisplayFactory::allocateDisplay(I); #else std::cout << "No image viewer is available..." << std::endl; #endif diff --git a/tutorial/grabber/tutorial-video-recorder.cpp b/tutorial/grabber/tutorial-video-recorder.cpp index 32b3e79de9..336a8c16dc 100644 --- a/tutorial/grabber/tutorial-video-recorder.cpp +++ b/tutorial/grabber/tutorial-video-recorder.cpp @@ -80,7 +80,7 @@ int main(int argc, const char *argv[]) std::cout << "Image size: " << I.getWidth() << " " << I.getHeight() << std::endl; #if defined(VISP_HAVE_DISPLAY) - vpDisplay *d = vpDisplayFactory::displayFactory(); + vpDisplay *d = vpDisplayFactory::allocateDisplay(); d->init(I, 0, 0, "Camera view"); #endif vpVideoWriter writer; diff --git a/tutorial/image/tutorial-draw-circle.cpp b/tutorial/image/tutorial-draw-circle.cpp index 02e5893277..8e529d2672 100644 --- a/tutorial/image/tutorial-draw-circle.cpp +++ b/tutorial/image/tutorial-draw-circle.cpp @@ -16,7 +16,7 @@ int main() try { { #if defined(VISP_HAVE_DISPLAY) - vpDisplay *d = vpDisplayFactory::displayFactory(I, vpDisplay::SCALE_AUTO); + vpDisplay *d = vpDisplayFactory::allocateDisplay(I, vpDisplay::SCALE_AUTO); #else std::cout << "No gui available to display gray level image..." << std::endl; #endif @@ -64,7 +64,7 @@ int main() //! [Circle draw color] #if defined(VISP_HAVE_DISPLAY) - vpDisplay *d = vpDisplayFactory::displayFactory(I_rgb, vpDisplay::SCALE_AUTO); + vpDisplay *d = vpDisplayFactory::allocateDisplay(I_rgb, vpDisplay::SCALE_AUTO); #else std::cout << "No gui available to display color image..." << std::endl; #endif diff --git a/tutorial/robot/mbot/raspberry/visp/mbot-apriltag-ibvs.cpp b/tutorial/robot/mbot/raspberry/visp/mbot-apriltag-ibvs.cpp index 1c43c012dc..49addfa573 100644 --- a/tutorial/robot/mbot/raspberry/visp/mbot-apriltag-ibvs.cpp +++ b/tutorial/robot/mbot/raspberry/visp/mbot-apriltag-ibvs.cpp @@ -121,7 +121,7 @@ int main(int argc, const char **argv) vpImage O; #ifdef VISP_HAVE_DISPLAY if (display_on) { - d = vpDisplayFactory::displayFactory(I); + d = vpDisplayFactory::allocateDisplay(I); } #endif diff --git a/tutorial/robot/mbot/raspberry/visp/mbot-apriltag-pbvs.cpp b/tutorial/robot/mbot/raspberry/visp/mbot-apriltag-pbvs.cpp index 57328f50d7..9ed3e50003 100644 --- a/tutorial/robot/mbot/raspberry/visp/mbot-apriltag-pbvs.cpp +++ b/tutorial/robot/mbot/raspberry/visp/mbot-apriltag-pbvs.cpp @@ -110,7 +110,7 @@ int main(int argc, const char **argv) vpImage O; #ifdef VISP_HAVE_DISPLAY if (display_on) { - d = vpDisplayFactory::displayFactory(I); + d = vpDisplayFactory::allocateDisplay(I); } #endif