texelbox / cage-tool Goto Github PK
View Code? Open in Web Editor NEWC++/OpenGL tool for cage-based deformation, including functionality for cage generation. Originally developed as a fall 2019 term project for CPSC589 @ University of Calgary.
C++/OpenGL tool for cage-based deformation, including functionality for cage generation. Originally developed as a fall 2019 term project for CPSC589 @ University of Calgary.
I am encountering an issue while porting the cage-tool project from Windows to Ubuntu 22.04. The project was originally built for Windows, but I'm trying to run it on Ubuntu. I have made some modifications to the CMakeLists.txt file and fixed some build errors, but the program is still crashing shortly after startup.
RenderEngine
object, specifically when compiling shaders using the ShaderTools::compileShaders
function.RenderEngine
constructor.ShaderTools::compileShaders
function and starts loading the shader source files.loadshader
function.__strlen_avx2
function, which is a low-level string length function optimized for AVX2 instructions.CMakeLists.txt
# Set the minimum required version
cmake_minimum_required(VERSION 3.22)
# Define project name and specify the languages used
project(CageTool LANGUAGES CXX)
# Specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# List the source files for ImGui
set(IMGUI_SOURCES
include/imgui/imgui.cpp
include/imgui/imgui_demo.cpp
include/imgui/imgui_draw.cpp
include/imgui/imgui_widgets.cpp
include/imgui/imgui_impl_glfw.cpp
include/imgui/imgui_impl_opengl3.cpp
)
# Create a static library for ImGui
add_library(ImGui STATIC ${IMGUI_SOURCES})
target_include_directories(ImGui PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include/imgui
)
# Find packages
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
find_package(glfw3 REQUIRED)
# Explicitly set OpenGL preference (new policy in CMake 3.11 and later)
set(OpenGL_GL_PREFERENCE GLVND)
# List source files
set(SOURCES
src/main.cpp
src/Camera.cpp
src/InputHandler.cpp
src/lodepng.cpp
src/MeshObject.cpp
src/ObjectLoader.cpp
src/Program.cpp
src/RenderEngine.cpp
src/ShaderTools.cpp
src/Texture.cpp
)
# Define project's executable
add_executable(${PROJECT_NAME} ${SOURCES})
# Link project with required libraries
target_link_libraries(${PROJECT_NAME}
OpenGL::GL
GLEW::GLEW
glfw
ImGui
)
# Include directories
target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include/GLFW
${CMAKE_CURRENT_SOURCE_DIR}/include/glm
)
RenderEngine
constructor in RenderEngine.cpp
:RenderEngine::RenderEngine(GLFWwindow *window, std::shared_ptr<Camera> camera) : window(window), camera(camera) {
// ...
trivialProgram = ShaderTools::compileShaders("shaders/trivial.vert", "shaders/trivial.frag");
mainProgram = ShaderTools::compileShaders("shaders/main.vert", "shaders/main.frag");
lightProgram = ShaderTools::compileShaders("shaders/light.vert", "shaders/light.frag");
pickingProgram = ShaderTools::compileShaders("shaders/picking.vert", "shaders/picking.frag");
// ...
}
ShaderTools::compileShaders
function in ShaderTools.cpp
:GLuint ShaderTools::compileShaders(const char* vertexFilename, const char* fragmentFilename) {
// ...
const GLchar * vertex_shader_source [] = {loadshader(vertexFilename)};
const GLchar * fragment_shader_source [] = {loadshader(fragmentFilename)};
// ...
}
Program received signal SIGSEGV, Segmentation fault.
__strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:74
74 ../sysdeps/x86_64/multiarch/strlen-avx2.S: No such file or directory.
(gdb) backtrace
#0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:74
#1 0x00007ffff4d3998c in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.535.161.07
#2 0x00007ffff4d39f14 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.535.161.07
#3 0x00005555555b7435 in ShaderTools::compileShaders(char const*, char const*) ()
#4 0x00005555555b5763 in RenderEngine::RenderEngine(GLFWwindow*, std::shared_ptr<Camera>) ()
...
Any suggestions or insights on how to resolve this issue and successfully port the cage-tool project to Ubuntu would be greatly appreciated. Please let me know if you need any additional information or code snippets to further investigate the problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.