Skip to content

Set number of samples to 0 if 1 is requested

Cory Quammen requested to merge cory.quammen/vtk:fix_multisampling_off into master

Some graphics drivers report the number of samples as 1 when multisampling is off. Set the number of samples to 0 in this case to ensure that a non-multisampling storage format is allocated for the FBO renderbuffer.

Doing so avoids problems in code that attempts to read from the FBO with glCopyTexImage2D, which fails if the FBO is bound to a renderbuffer with multisampling enabled.

Fixes paraview/paraview#17461 (closed), paraview/paraview#17521 (closed), paraview/paraview#17522 (closed), paraview/paraview#17523 (closed), paraview/paraview#17587 (closed).

Edited by Cory Quammen

Merge request reports