# Question about vtkOpenGLRenderWindow function added SetFrameBlitMode

**URL:** <https://discourse.vtk.org/t/question-about-vtkopenglrenderwindow-function-added-setframeblitmode/11456>\
**Category:** Development\
**Created:** [May 15, 2023, 10:02am UTC](https://discourse.vtk.org/t/question-about-vtkopenglrenderwindow-function-added-setframeblitmode/11456 "2023-05-15T10:02:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stavbodik](https://discourse.vtk.org/user_avatar/discourse.vtk.org/stavbodik/32/7081_2.png) [@stavbodik](https://discourse.vtk.org/u/stavbodik)\
**Post date:** [May 15, 2023, 10:02am UTC](https://discourse.vtk.org/t/question-about-vtkopenglrenderwindow-function-added-setframeblitmode/11456/1 "2023-05-15T10:02:21Z")

</div>

Hi All in this MR SetFrameBlitMode was added to vtkOpenGLRenderWindow 🙂

> <https://github.com/Kitware/VTK/commit/588247020e455b9c3f7bf37a64525c31c5071f52#diff-54934441d166fb8796b6cd59115e2fe913e3e628a714d5891c916672c48c27af>
>
> VTK will always render into a RenderFramebuffer If Swapbuffers is on it
> will als…o blit into DisplayFramebuffers which can then be used to blit
> to and draw destination. The render framebuffer may be multisampled. The
> display framebuffers are not so they could be considered resolve
> buffers.
> 
> Helper functions for GUI integration have been added to blt into the
> default hardware buffers or to blit into the current draw destination.
> 
> Add a ivar to control frame blit behavior. Defaults to blit to hardware,
> but also has blitToCurrent and NoBlit options.

I had a problem where rendering Volume with vtkFixedPointVolumeRayCastMapper on MAC with Windows Parallels and graphic card "Parallels display adapter (WDDM)) was rendering nothing.

The actual error (using opengl debbuger GLInterceptx) was :

invalid operation , glBlitFramebuffer error 0x0502

After reading a lot in google for this problem

[https://gitlab.kitware.com/paraview/paraview/-/issues/17303](https://gitlab.kitware.com/paraview/paraview/-/issues/17303)  
[https://gitlab.kitware.com/paraview/paraview/-/issues/19849](https://gitlab.kitware.com/paraview/paraview/-/issues/19849)  
[https://gitlab.kitware.com/vtk/vtk/-/issues/17831](https://gitlab.kitware.com/vtk/vtk/-/issues/17831)

I understand that new VTK versions uses OpenGL2 and using SetFrameBlitModeToBlitToHardware  
on the rendering window (vtkOpenGLRenderWindow) Solved the issue .

Also we can see here that this bug was not fixed yet in VTK

[https://gitlab.kitware.com/paraview/paraview/-/issues/17303](https://gitlab.kitware.com/paraview/paraview/-/issues/17303)

1.Can you please explain why/how this fixes the issue ?  
2. maybe this MR added an issue ?

Some one said :

“”  
The issue is that multisampling is being used but the size is mismatched between what VTK is rendering and the framebuffer. It is illegal to blit multisampled buffers of different sizes. Of course they should be the same size 🙂 There was a bug in cocoa resizing that was patched yesterday. Can you try it again with the current release branch from today?"  
"

1. Is it the same case ? because of the M1 graphic card architecture ?

2. What are differences between 🙂  
SetFrameBlitModeToBlitToHardware  
SetFrameBlitModeToBlitToCurrent

Thanks !

---

<div class="post-metadata">

**Author:** ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)\
**Post date:** [May 15, 2023, 11:20am UTC](https://discourse.vtk.org/t/question-about-vtkopenglrenderwindow-function-added-setframeblitmode/11456/2 "2023-05-15T11:20:48Z")

</div>

This issue you link is specific to macOS, could you open an issue for your specific usecase ?

---

<div class="post-metadata">

**Author:** ![stavbodik](https://discourse.vtk.org/user_avatar/discourse.vtk.org/stavbodik/32/7081_2.png) [@stavbodik](https://discourse.vtk.org/u/stavbodik)\
**Post date:** [May 15, 2023, 11:51am UTC](https://discourse.vtk.org/t/question-about-vtkopenglrenderwindow-function-added-setframeblitmode/11456/3 "2023-05-15T11:51:17Z")

</div>

What do you mean please ? I write that my case is also on mac but with windows parallels .
