Solutons Lounge

DisplayMode::OnRenderSizeChanged: How to sync with renderer? – Rhino Developer


I am building a test custom renderer in order to understand how the rhino rendering pipeline works.
Now I am focused on the render resize event. Based on the SampleRealTimeRenderer example, I have managed to make almost everything working:

  • Any type of resize in the viewport area
  • Any type of resize in the tool bar areas, etc
  • Minimize/Maximize/Restore the whole Rhino window
  • Horizontal/Vertical resize of the whole Rhino window

What does not work is the diagonal resize of the Rhino window.
If it try it, the whole window hangs and becomes unresponsive. I have to press alt+tab to the VS in order to see my cursor turn back to normal instead of the “diagonal” arrow symbol.

There are three cases when the diagonal rhino window resize works as smoothly as in the SampleRealTimeRenderer:

  • When change the size of the window very-very slowly
  • When I insert a breakpoint in the DisplayMode and the press continue, but this allows me very little change of the size just like case 1 above
  • When the scene geometry is large. In this case I don’t get crash or hang. If I render just a cube I immediately have my system hang.

I know, that without the actual code, there cannot be any significant help, but somehow I suspect that there is something related with the synchronization between DisplayMode and the renderer.

Any tip/advice/example on this would be more than useful
Thanks!



Source link

Exit mobile version