weigao95 / surfelwarp

SurfelWarp: Efficient Non-Volumetric Dynamic Reconstruction
https://sites.google.com/view/surfelwarp/home
BSD 3-Clause "New" or "Revised" License
276 stars 71 forks source link

support online rendering #37

Closed xiaotaw closed 4 years ago

xiaotaw commented 4 years ago

Hi, I noticed surfelwarp support offline rendering. It's very cool to display rendered images (e.g. live_abedo.png) on screen, instead of saving into local files.

Simply comment out glfwWindowHint(GLFW_VISIBLE, GL_FALSE);, it just displays a black window. HAHA

Thank you!

weigao95 commented 4 years ago

You need to delete the glBindFramebuffer in the drawing function. Here is a tutorial: https://learnopengl.com/Advanced-OpenGL/Framebuffers

xiaotaw commented 4 years ago

Done, Thx!

peteryuan123 commented 4 years ago

Hello, could you tell me which glBindFramebuffer should I delete? @xiaotaw

xiaotaw commented 4 years ago

Hello, could you tell me which glBindFramebuffer should I delete? @xiaotaw

Always set the second parameter to be 0, and the pics/images will be updated in windows. glBindFramebuffer(GL_FRAMEBUFFER, 0);

Note: Based on the current code, you also have to set 'offline rendering' with True.

peteryuan123 commented 4 years ago

Hello, could you tell me which glBindFramebuffer should I delete? @xiaotaw

Always set the second parameter to be 0, and the pics/images will be updated in windows. glBindFramebuffer(GL_FRAMEBUFFER, 0);

Note: Based on the current code, you also have to set 'offline rendering' with True.

Thanks, i tried but still failed. Maybe I should look through the whole project.

xiaotaw commented 4 years ago

@daxiong-123 try one more time? it should work:

  1. comment out glfwWindowHint(GLFW_VISIBLE, GL_FALSE) to make sure the blank window appears
  2. find function drawVisualizationMap in file RendererDraw.cpp, and modify glBindFramebuffer ( line 191)
  3. in the same function drawVisualizationMap, insert glfwSwapBuffers(mGLFWwindow); before cleanup code (line 218).
411066282 commented 3 years ago

@xiaotaw dear, could you share your whole modified code project to me? I just failed this, thank you very much! yaoyao-501@163.com

xiaotaw commented 3 years ago

@xiaotaw dear, could you share your whole modified code project to me? I just failed this, thank you very much! yaoyao-501@163.com

Here is my modified code. Hope its commit log would help. https://github.com/xiaotaw/surfelwarp

411066282 commented 2 years ago

@xiaotaw thank you very much! you are one good and kind guy!!!