Skip to content

Commit

Permalink
compiles with Qt6 but sift-gpu not working
Browse files Browse the repository at this point in the history
  • Loading branch information
LiangliangNan committed Jan 17, 2025
1 parent 64f62b0 commit ddaee5f
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 70 deletions.
10 changes: 6 additions & 4 deletions 3rd_party/cmvs-pmvs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ ADD_LIBRARY(3rd_cmvs-pmvs STATIC
${3rd_cmvs-pmvs_SRC})

TARGET_LINK_LIBRARIES(3rd_cmvs-pmvs
${3rd_cmvs-pmvs_DEPS}
${3rd_cmvs-pmvs_ADDITIONAL_DEPS}
${SOLUTION_STATIC_LIB_DEPS}
${SOLUTION_GENERAL_DEPS})
3rd_nlopt
3rd_graclus
3rd_tinycthread
3rd_jpeg
3rd_clapack
)



Expand Down
3 changes: 0 additions & 3 deletions 3rd_party/cmvs-pmvs/pmvs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ SET(3rd_cmvs-pmvs_SRC
"pmvs/seed.cc"
)

SET(3rd_cmvs-pmvs_DEPS
nlopt
)
6 changes: 0 additions & 6 deletions 3rd_party/graclus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ INCLUDE("graclus_1.2.cmake")
ADD_LIBRARY(3rd_graclus STATIC
${3rd_graclus_SRC})

TARGET_LINK_LIBRARIES(3rd_graclus
${3rd_graclus_DEPS}
${3rd_graclus_ADDITIONAL_DEPS}
${SOLUTION_STATIC_LIB_DEPS}
${SOLUTION_GENERAL_DEPS})

set(METIS_INCLUDE_DIR ${MVSTUDIO_THIRD_PARTY}/graclus/metisLib)
target_include_directories(3rd_graclus PRIVATE ${METIS_INCLUDE_DIR})

Expand Down
3 changes: 0 additions & 3 deletions 3rd_party/graclus/graclus_1.2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,3 @@ SET(3rd_graclus_SRC
"multilevelLib/mlkkm.c"
"multilevelLib/wkkm.c"
)

SET(3rd_graclus_DEPS
)
3 changes: 0 additions & 3 deletions 3rd_party/png/3rd_png.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@ SET(3rd_image_png_SRC
"pngwtran.c"
"pngwutil.c"
)

SET(3rd_image_png_DEPS
)
6 changes: 0 additions & 6 deletions 3rd_party/png/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,5 @@ INCLUDE("3rd_png.cmake")
ADD_LIBRARY(3rd_png STATIC
${3rd_image_png_SRC})

TARGET_LINK_LIBRARIES(3rd_png
${3rd_image_png_DEPS}
${3rd_image_png_ADDITIONAL_DEPS}
${SOLUTION_STATIC_LIB_DEPS}
${SOLUTION_GENERAL_DEPS})

target_include_directories(3rd_png PRIVATE ${MVSTUDIO_THIRD_PARTY}/zlib ${CMAKE_BINARY_DIR}/3rd_party/zlib)
set_target_properties(3rd_png PROPERTIES FOLDER "3rd_party")
8 changes: 4 additions & 4 deletions 3rd_party/sba/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ ADD_LIBRARY(3rd_sba STATIC
${3rd_sba_SRC})

TARGET_LINK_LIBRARIES(3rd_sba
${3rd_sba_DEPS}
${3rd_sba_ADDITIONAL_DEPS}
${SOLUTION_STATIC_LIB_DEPS}
${SOLUTION_GENERAL_DEPS})
3rd_blas
3rd_f2c
3rd_clapack
)

set_target_properties(3rd_sba PROPERTIES FOLDER "3rd_party")
8 changes: 1 addition & 7 deletions 3rd_party/sba/sba-1.5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,4 @@ SET(3rd_sba_SRC
"sba_lapack.c"
"sba_levmar.c"
"sba_levmar_wrap.c"
)

SET(3rd_sba_DEPS
blas
f2c
clapack
)
)
6 changes: 0 additions & 6 deletions 3rd_party/tinycthread/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,4 @@ INCLUDE("tinycthread.cmake")
ADD_LIBRARY(3rd_tinycthread STATIC
${3rd_tinycthread_SRC})

TARGET_LINK_LIBRARIES(3rd_tinycthread
${3rd_tinycthread_DEPS}
${3rd_tinycthread_ADDITIONAL_DEPS}
${SOLUTION_STATIC_LIB_DEPS}
${SOLUTION_GENERAL_DEPS})

set_target_properties(3rd_tinycthread PROPERTIES FOLDER "3rd_party")
3 changes: 0 additions & 3 deletions 3rd_party/tinycthread/tinycthread.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ SET(3rd_tinycthread_SRC
"rwmutex.cpp"
"tinycthread.c"
)

SET(3rd_tinycthread_DEPS
)
4 changes: 2 additions & 2 deletions MVStudio/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ int main(int argc, char **argv)
#endif
QSurfaceFormat::setDefaultFormat(format);

Application app(argc, argv);

#ifndef _DEBUG
// splash screen
QPixmap pixmap(":/Resources/splash.png");
Expand All @@ -87,8 +89,6 @@ int main(int argc, char **argv)
}
#endif

QApplication app(argc, argv);

MainWindow window;
window.show();

Expand Down
32 changes: 9 additions & 23 deletions MVStudio/paint_canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "../libs/pointset/point_set.h"
#include "../libs/pointset/point_set_io.h"
#include "../libs/pointset/point_set_render.h"
#include "../libs/opengl/opengl_info.h"
#include "../libs/algo/image_matching.h"
#include "../libs/algo/sparse_reconstruction.h"
#include "../libs/algo/dense_reconstruction.h"
Expand Down Expand Up @@ -132,7 +131,8 @@ void PaintCanvas::setLightPosition(const vec3d& pos) {
float p[] = {static_cast<float>(light_pos_.x), static_cast<float>(light_pos_.y), static_cast<float>(light_pos_.z), 0.0f };
glLightfv(GL_LIGHT0, GL_POSITION, p);
glPopMatrix();


doneCurrent();
update_graphics();
}

Expand All @@ -154,20 +154,18 @@ void PaintCanvas::decreasePointSize() {
}

void PaintCanvas::draw() {
ogf_check_gl;
if (show_coord_sys_) {
glEnable(GL_MULTISAMPLE);
drawCornerAxis();
}

ogf_check_gl;
if (point_set_) {
glDisable(GL_MULTISAMPLE);
render_->draw();
}

if (show_coord_sys_) {
glEnable(GL_MULTISAMPLE);
drawCornerAxis();
}

ogf_check_gl;
// drawCameras();
}


Expand Down Expand Up @@ -316,7 +314,7 @@ void PaintCanvas::fitScreen() {


void PaintCanvas::drawCornerAxis()
{
{
glEnable(GL_MULTISAMPLE);

// The viewport and the scissor are changed to fit the lower left
Expand Down Expand Up @@ -350,19 +348,7 @@ void PaintCanvas::drawCornerAxis()
glMultMatrixd(camera()->orientation().inverse().matrix());

float axis_size = 0.9f; // other 0.2 space for drawing the x, y, z labels
drawAxis(axis_size);

// Draw text id
glColor3f(0, 0, 0);

// Liangliang: It seems the renderText() func disables multi-sample.
// Is this a bug in Qt ?
GLboolean anti_alias = glIsEnabled(GL_MULTISAMPLE);
const_cast<PaintCanvas*>(this)->renderText(axis_size, 0, 0, "X");
const_cast<PaintCanvas*>(this)->renderText(0, axis_size, 0, "Y");
const_cast<PaintCanvas*>(this)->renderText(0, 0, axis_size, "Z");
if (anti_alias)
glEnable(GL_MULTISAMPLE);
drawAxis(axis_size);

glMatrixMode(GL_PROJECTION);
glPopMatrix();
Expand Down

0 comments on commit ddaee5f

Please sign in to comment.