Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occured while compiling your code. #12

Open
Jiyu-Yao opened this issue Jun 8, 2024 · 6 comments
Open

An error occured while compiling your code. #12

Jiyu-Yao opened this issue Jun 8, 2024 · 6 comments

Comments

@Jiyu-Yao
Copy link

Jiyu-Yao commented Jun 8, 2024

Thank you for your excellent work!
When I try to compile your code,I get some trouble.Could you please check for the error?If you have encountered it,please tell me the solution.Thank you!

CMake Warning at CMakeLists.txt:36 (find_package):
By not providing "Findrealsense2.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"realsense2", but CMake did not find one.

Could not find a package configuration file provided by "realsense2" with
any of the following names:

realsense2Config.cmake
realsense2-config.cmake

Add the installation prefix of "realsense2" to CMAKE_PREFIX_PATH or set
"realsense2_DIR" to a directory containing one of the above files. If
"realsense2" provides a separate development package or SDK, be sure it has
been installed.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/yjy/Photo-SLAM/build
Consolidate compiler generated dependencies of target imgui
Consolidate compiler generated dependencies of target simple_knn
[ 17%] Built target imgui
Consolidate compiler generated dependencies of target cuda_rasterizer
[ 24%] Built target simple_knn
[ 40%] Built target cuda_rasterizer
Consolidate compiler generated dependencies of target gaussian_mapper
[ 42%] Building CXX object CMakeFiles/gaussian_mapper.dir/src/gaussian_model.cpp.o
/home/yjy/Photo-SLAM/src/gaussian_model.cpp: In member function ‘at::Tensor GaussianModel::replaceTensorToOptimizer(at::Tensor&, int)’:
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:571:27: error: ‘to_string’ is not a member of ‘c10::guts’
571 | auto key = c10::guts::to_string(param.unsafeGetTensorImpl());
| ^~~~~~~~~
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:571:27: note: suggested alternatives:
In file included from /usr/include/c++/9/string:55,
from /usr/include/c++/9/stdexcept:39,
from /usr/include/c++/9/array:39,
from /usr/include/c++/9/tuple:39,
from /usr/include/c++/9/bits/unique_ptr.h:37,
from /usr/include/c++/9/memory:80,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:18,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/usr/include/c++/9/bits/basic_string.h:6601:3: note: ‘std::to_string’
6601 | to_string(long double __val)
| ^~~~~~~~~
/usr/include/c++/9/bits/basic_string.h:6549:3: note: ‘std::to_string’
6549 | to_string(int __val)
| ^~~~~~~~~
In file included from /home/yjy/libtorch/include/ATen/ThreadLocalState.h:14,
from /home/yjy/libtorch/include/torch/csrc/autograd/graph_task.h:2,
from /home/yjy/libtorch/include/torch/csrc/autograd/function.h:6,
from /home/yjy/libtorch/include/torch/csrc/autograd/custom_function.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/autograd.h:5,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/all.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/torch.h:3,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:24,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/home/yjy/libtorch/include/c10/core/impl/TorchDispatchModeTLS.h:61:21: note: ‘c10::impl::to_string’
61 | C10_API std::string to_string(TorchDispatchModeKey mode_key);
| ^~~~~~~~~
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:581:22: error: ‘to_string’ is not a member of ‘c10::guts’
581 | key = c10::guts::to_string(param.unsafeGetTensorImpl());
| ^~~~~~~~~
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:581:22: note: suggested alternatives:
In file included from /usr/include/c++/9/string:55,
from /usr/include/c++/9/stdexcept:39,
from /usr/include/c++/9/array:39,
from /usr/include/c++/9/tuple:39,
from /usr/include/c++/9/bits/unique_ptr.h:37,
from /usr/include/c++/9/memory:80,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:18,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/usr/include/c++/9/bits/basic_string.h:6601:3: note: ‘std::to_string’
6601 | to_string(long double __val)
| ^~~~~~~~~
/usr/include/c++/9/bits/basic_string.h:6549:3: note: ‘std::to_string’
6549 | to_string(int __val)
| ^~~~~~~~~
In file included from /home/yjy/libtorch/include/ATen/ThreadLocalState.h:14,
from /home/yjy/libtorch/include/torch/csrc/autograd/graph_task.h:2,
from /home/yjy/libtorch/include/torch/csrc/autograd/function.h:6,
from /home/yjy/libtorch/include/torch/csrc/autograd/custom_function.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/autograd.h:5,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/all.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/torch.h:3,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:24,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/home/yjy/libtorch/include/c10/core/impl/TorchDispatchModeTLS.h:61:21: note: ‘c10::impl::to_string’
61 | C10_API std::string to_string(TorchDispatchModeKey mode_key);
| ^~~~~~~~~
/home/yjy/Photo-SLAM/src/gaussian_model.cpp: In member function ‘void GaussianModel::prunePoints(at::Tensor&)’:
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:598:31: error: ‘to_string’ is not a member of ‘c10::guts’
598 | auto key = c10::guts::to_string(param.unsafeGetTensorImpl());
| ^~~~~~~~~
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:598:31: note: suggested alternatives:
In file included from /usr/include/c++/9/string:55,
from /usr/include/c++/9/stdexcept:39,
from /usr/include/c++/9/array:39,
from /usr/include/c++/9/tuple:39,
from /usr/include/c++/9/bits/unique_ptr.h:37,
from /usr/include/c++/9/memory:80,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:18,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/usr/include/c++/9/bits/basic_string.h:6601:3: note: ‘std::to_string’
6601 | to_string(long double __val)
| ^~~~~~~~~
/usr/include/c++/9/bits/basic_string.h:6549:3: note: ‘std::to_string’
6549 | to_string(int __val)
| ^~~~~~~~~
In file included from /home/yjy/libtorch/include/ATen/ThreadLocalState.h:14,
from /home/yjy/libtorch/include/torch/csrc/autograd/graph_task.h:2,
from /home/yjy/libtorch/include/torch/csrc/autograd/function.h:6,
from /home/yjy/libtorch/include/torch/csrc/autograd/custom_function.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/autograd.h:5,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/all.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/torch.h:3,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:24,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/home/yjy/libtorch/include/c10/core/impl/TorchDispatchModeTLS.h:61:21: note: ‘c10::impl::to_string’
61 | C10_API std::string to_string(TorchDispatchModeKey mode_key);
| ^~~~~~~~~
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:609:30: error: ‘to_string’ is not a member of ‘c10::guts’
609 | key = c10::guts::to_string(param.unsafeGetTensorImpl());
| ^~~~~~~~~
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:609:30: note: suggested alternatives:
In file included from /usr/include/c++/9/string:55,
from /usr/include/c++/9/stdexcept:39,
from /usr/include/c++/9/array:39,
from /usr/include/c++/9/tuple:39,
from /usr/include/c++/9/bits/unique_ptr.h:37,
from /usr/include/c++/9/memory:80,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:18,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/usr/include/c++/9/bits/basic_string.h:6601:3: note: ‘std::to_string’
6601 | to_string(long double __val)
| ^~~~~~~~~
/usr/include/c++/9/bits/basic_string.h:6549:3: note: ‘std::to_string’
6549 | to_string(int __val)
| ^~~~~~~~~
In file included from /home/yjy/libtorch/include/ATen/ThreadLocalState.h:14,
from /home/yjy/libtorch/include/torch/csrc/autograd/graph_task.h:2,
from /home/yjy/libtorch/include/torch/csrc/autograd/function.h:6,
from /home/yjy/libtorch/include/torch/csrc/autograd/custom_function.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/autograd.h:5,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/all.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/torch.h:3,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:24,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/home/yjy/libtorch/include/c10/core/impl/TorchDispatchModeTLS.h:61:21: note: ‘c10::impl::to_string’
61 | C10_API std::string to_string(TorchDispatchModeKey mode_key);
| ^~~~~~~~~
/home/yjy/Photo-SLAM/src/gaussian_model.cpp: In member function ‘void GaussianModel::densificationPostfix(at::Tensor&, at::Tensor&, at::Tensor&, at::Tensor&, at::Tensor&, at::Tensor&, at::Tensor&)’:
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:670:31: error: ‘to_string’ is not a member of ‘c10::guts’
670 | auto key = c10::guts::to_string(param.unsafeGetTensorImpl());
| ^~~~~~~~~
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:670:31: note: suggested alternatives:
In file included from /usr/include/c++/9/string:55,
from /usr/include/c++/9/stdexcept:39,
from /usr/include/c++/9/array:39,
from /usr/include/c++/9/tuple:39,
from /usr/include/c++/9/bits/unique_ptr.h:37,
from /usr/include/c++/9/memory:80,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:18,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/usr/include/c++/9/bits/basic_string.h:6601:3: note: ‘std::to_string’
6601 | to_string(long double __val)
| ^~~~~~~~~
/usr/include/c++/9/bits/basic_string.h:6549:3: note: ‘std::to_string’
6549 | to_string(int __val)
| ^~~~~~~~~
In file included from /home/yjy/libtorch/include/ATen/ThreadLocalState.h:14,
from /home/yjy/libtorch/include/torch/csrc/autograd/graph_task.h:2,
from /home/yjy/libtorch/include/torch/csrc/autograd/function.h:6,
from /home/yjy/libtorch/include/torch/csrc/autograd/custom_function.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/autograd.h:5,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/all.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/torch.h:3,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:24,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/home/yjy/libtorch/include/c10/core/impl/TorchDispatchModeTLS.h:61:21: note: ‘c10::impl::to_string’
61 | C10_API std::string to_string(TorchDispatchModeKey mode_key);
| ^~~~~~~~~
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:675:123: error: no matching function for call to ‘cat(, int)’
675 | vg().clone(), torch::zeros_like(extension_tensor)}, /dim=/0));
| ^

In file included from /home/yjy/libtorch/include/ATen/Functions.h:529,
from /home/yjy/libtorch/include/ATen/ExpandUtils.h:4,
from /home/yjy/libtorch/include/torch/csrc/autograd/input_metadata.h:3,
from /home/yjy/libtorch/include/torch/csrc/autograd/function.h:7,
from /home/yjy/libtorch/include/torch/csrc/autograd/custom_function.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/autograd.h:5,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/all.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/torch.h:3,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:24,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/home/yjy/libtorch/include/ATen/ops/cat.h:26:19: note: candidate: ‘at::Tensor at::cat(const ITensorListRef&, int64_t)’
26 | inline at::Tensor cat(const at::ITensorListRef & tensors, int64_t dim=0) {
| ^~~
/home/yjy/libtorch/include/ATen/ops/cat.h:26:50: note: no known conversion for argument 1 from ‘’ to ‘const ITensorListRef&’ {aka ‘const c10::IListRefat::Tensor&’}
26 | inline at::Tensor cat(const at::ITensorListRef & tensors, int64_t dim=0) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/home/yjy/libtorch/include/ATen/ops/cat.h:40:19: note: candidate: ‘at::Tensor at::cat(at::TensorList, at::Dimname)’
40 | inline at::Tensor cat(at::TensorList tensors, at::Dimname dim) {
| ^~~
/home/yjy/libtorch/include/ATen/ops/cat.h:40:38: note: no known conversion for argument 1 from ‘’ to ‘at::TensorList’ {aka ‘c10::ArrayRefat::Tensor’}
40 | inline at::Tensor cat(at::TensorList tensors, at::Dimname dim) {
| ~~~~~~~~~~~~~~~^~~~~~~
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:676:129: error: no matching function for call to ‘cat(, int)’
676 | sq().clone(), torch::zeros_like(extension_tensor)}, /dim=/0));
| ^

In file included from /home/yjy/libtorch/include/ATen/Functions.h:529,
from /home/yjy/libtorch/include/ATen/ExpandUtils.h:4,
from /home/yjy/libtorch/include/torch/csrc/autograd/input_metadata.h:3,
from /home/yjy/libtorch/include/torch/csrc/autograd/function.h:7,
from /home/yjy/libtorch/include/torch/csrc/autograd/custom_function.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/autograd.h:5,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/all.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/torch.h:3,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:24,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/home/yjy/libtorch/include/ATen/ops/cat.h:26:19: note: candidate: ‘at::Tensor at::cat(const ITensorListRef&, int64_t)’
26 | inline at::Tensor cat(const at::ITensorListRef & tensors, int64_t dim=0) {
| ^~~
/home/yjy/libtorch/include/ATen/ops/cat.h:26:50: note: no known conversion for argument 1 from ‘’ to ‘const ITensorListRef&’ {aka ‘const c10::IListRefat::Tensor&’}
26 | inline at::Tensor cat(const at::ITensorListRef & tensors, int64_t dim=0) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/home/yjy/libtorch/include/ATen/ops/cat.h:40:19: note: candidate: ‘at::Tensor at::cat(at::TensorList, at::Dimname)’
40 | inline at::Tensor cat(at::TensorList tensors, at::Dimname dim) {
| ^~~
/home/yjy/libtorch/include/ATen/ops/cat.h:40:38: note: no known conversion for argument 1 from ‘’ to ‘at::TensorList’ {aka ‘c10::ArrayRefat::Tensor’}
40 | inline at::Tensor cat(at::TensorList tensors, at::Dimname dim) {
| ~~~~~~~~~~~~~~~^~~~~~~
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:681:30: error: ‘to_string’ is not a member of ‘c10::guts’
681 | key = c10::guts::to_string(param.unsafeGetTensorImpl());
| ^~~~~~~~~
/home/yjy/Photo-SLAM/src/gaussian_model.cpp:681:30: note: suggested alternatives:
In file included from /usr/include/c++/9/string:55,
from /usr/include/c++/9/stdexcept:39,
from /usr/include/c++/9/array:39,
from /usr/include/c++/9/tuple:39,
from /usr/include/c++/9/bits/unique_ptr.h:37,
from /usr/include/c++/9/memory:80,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:18,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/usr/include/c++/9/bits/basic_string.h:6601:3: note: ‘std::to_string’
6601 | to_string(long double __val)
| ^~~~~~~~~
/usr/include/c++/9/bits/basic_string.h:6549:3: note: ‘std::to_string’
6549 | to_string(int __val)
| ^~~~~~~~~
In file included from /home/yjy/libtorch/include/ATen/ThreadLocalState.h:14,
from /home/yjy/libtorch/include/torch/csrc/autograd/graph_task.h:2,
from /home/yjy/libtorch/include/torch/csrc/autograd/function.h:6,
from /home/yjy/libtorch/include/torch/csrc/autograd/custom_function.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/autograd.h:5,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/all.h:7,
from /home/yjy/libtorch/include/torch/csrc/api/include/torch/torch.h:3,
from /home/yjy/Photo-SLAM/include/gaussian_model.h:24,
from /home/yjy/Photo-SLAM/src/gaussian_model.cpp:16:
/home/yjy/libtorch/include/c10/core/impl/TorchDispatchModeTLS.h:61:21: note: ‘c10::impl::to_string’
61 | C10_API std::string to_string(TorchDispatchModeKey mode_key);
| ^~~~~~~~~
make[2]: *** [CMakeFiles/gaussian_mapper.dir/build.make:104:CMakeFiles/gaussian_mapper.dir/src/gaussian_model.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:248:CMakeFiles/gaussian_mapper.dir/all] 错误 2
make: *** [Makefile:91:all] 错误 2

@HuajianUP
Copy link
Owner

Hi Jiyu,

We notice that the system is not compatible with the latest Pytorch. Please use the tested version.

wget https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcu118.zip -O libtorch-cu118.zip
unzip libtorch-cu118.zip && rm libtorch-cu118.zip

# in CMakeLists.txt
set(Torch_DIR ./libtorch/share/cmake/Torch)

@Jiyu-Yao
Copy link
Author

Hi Jiyu,

We notice that the system is not compatible with the latest Pytorch. Please use the tested version.

wget https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcu118.zip -O libtorch-cu118.zip
unzip libtorch-cu118.zip && rm libtorch-cu118.zip

# in CMakeLists.txt
set(Torch_DIR ./libtorch/share/cmake/Torch)

Thank you so much about your kind reply!
I've noticed this issue and I compile your code successfully in docker with the dockerfile provided by #2 (comment).
However, when I try to run it, it seems another error occurred. So confusing it is that seems nobody have met this before. Could you please check for it and provide some suggestion?
Thanks a lot!
2024-06-11 12-52-19 的屏幕截图

@xiangw369 xiangw369 mentioned this issue Jun 12, 2024
@xiangw369
Copy link

Please tell me how to solve this situation? Thanks!

Pass 'Combine redundant instructions' is not initialized.
Verify if there is a pass dependency cycle.
Required Passes:

@HuajianUP
Copy link
Owner

HuajianUP commented Jun 16, 2024

Hi Xiang, Sorry, I don't get your questions. Is it the same problem as #5? Please provide further details.

@LeihanChen
Copy link

@HuajianUP @Jiyu-Yao Hi all, I encountered the same issue with the dockerfile provided by #2 (comment), hard to debug with the segmentation fault, any updates with this issue?
屏幕截图 2024-08-09 151843
屏幕截图 2024-08-09 152043

@ZCWzy
Copy link

ZCWzy commented Aug 24, 2024

have same question, too

I changed release mode to debug mode in cmakelist and then realized that the problem seems to be here

[Current thread is 1 (Thread 0x7a29337fe000 (LWP 185084))]
(gdb) bt
#0 0x00007a29315edf92 in ??? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
...
#7 0x00007a2ad9521ff2 in ImGui_ImplOpenGL3_RenderDrawData (draw_data=0x7a292c0cd638) at /Photo-SLAM/viewer/imgui/imgui_impl_opengl3.cpp: ? 593
#8 0x00007a2af3fb63f5 in ImGuiViewer::run (this=0x5c14d212ceb0) at /Photo-SLAM/viewer/imgui_viewer.cpp:485
#9 0x00005c14be9d30ba in std::__invoke_impl<void, void (ImGuiViewer::*)(), ImGuiViewer*> (
    __f=@0x5c14d25e1f30: (void (ImGuiViewer::*)(ImGuiViewer * const)) 0x7a2af3fb35bc <ImGuiViewer::run()>, 
    __t=@0x5c14d25e1f28: 0x5c14d212ceb0) at /usr/include/c++/11/bits/invoke.h:74
#10 0x00005c14be9d2cc3 in std::__invoke<void (ImGuiViewer::*)(), ImGuiViewer*> (
    __fn=@0x5c14d25e1f30: (void (ImGuiViewer::*)(ImGuiViewer * const)) 0x7a2af3fb35bc <ImGuiViewer::run()>)
    at /usr/include/c++/11/bits/invoke.h:96

in imgui_viewer.cpp remove line 485 such as

//--------------ImGui Rendering--------------
ImGui::Render();
// ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());

//--------------Draw main window SLAM--------------
// Set relative viewpoint
glPushMatrix();

The code can output the rebuild results normally, but it cannot display the build map in real time. Maybe there is a slight problem with this part

I found that

      GL_CALL(glDrawElementsBaseVertex(
          GL_TRIANGLES,
           (GLsizei)pcmd->ElemCount, 
           sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, 
           (void*)(intptr_t)(pcmd->IdxOffset * sizeof(ImDrawIdx)), 
           (GLint)pcmd->VtxOffset)
           );

pcmd->IdxOffset and pcmd->VtxOffset both is 0,They may represent base addresses in memory

I noticed that the vtfofffset and idxoffset just don't seem to be quite right here.

    ImGui_ImplOpenGL3_SetupRenderState(draw_data, fb_width, fb_height, vertex_array_object);

    // Will project scissor/clipping rectangles into framebuffer space
    ImVec2 clip_off = draw_data->DisplayPos;         // (0,0) unless using multi-viewports
    ImVec2 clip_scale = draw_data->FramebufferScale; // (1,1) unless using retina display which are often (2,2)

    // Render command lists
    for (int n = 0; n < draw_data->CmdListsCount; n++)
    {
        const ImDrawList* cmd_list = draw_data->CmdLists[n];

  
       // std::cout<< draw_data->CmdLists[n]->CmdBuffer[0].VtxOffset<<std::endl; // 0
       // std::cout<< draw_data->CmdLists[n]->CmdBuffer[0].IdxOffset<<std::endl; // 0
       // std::cout<<"~~~~~~~"<<std::endl;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants