BUG #14971. Fix invalid sprintf() in vtkPNGWriter.

Using snprintf() instead of sprintf() to avoid memory overwrites. Also
avoid determining the filename when simply writing to memory.

Change-Id: I9f9591e6cb183ed68a86722fd6a52b761abf7758
vtkTesting: Refactor RegressionTest, eliminating hard-coded cout

The new method RegressionTestAndCaptureOutput may be called instead,
passing in cout whenever output should go to stdout. The existing
method RegressionTest simply delegates to the new method, with output
still going to cout, just like it always has.

Elaborate on the documentation of these methods, too.

Change-Id: Iceb6708af6d7eca889ee998f061525e2fdd36a3b
Try adding support for ARB_instanced_arrays

Convert the colors array back to unsigned char, try adding support
for ARB_instanced_arays. Fix up wireframe and picking for when
the fast path is being used. Previously that would fail.

Change-Id: Iada6b55f01ca7f2c3f68362f3e7da7e99fa15eeb
vtkTesting: If test fails with back buffer, try front buffer too

Typically, the image testing is done using the back buffer
to avoid accidentally capturing overlapping window artifacts
in the image when using the front buffer. However, some graphics
drivers do not have up to date contents in the back buffer,
causing "failed" tests even though, upon visual inspection, the
front buffer looks perfectly valid...

So: if the test failed using the back buffer, re-test using the
front buffer. This way, more tests pass on dashboards run with
the Intel HD built-in graphics drivers.

Emit the output from whichever regression testing call has the
smallest image difference.

Change-Id: Ibb1326a5494ca91a34cb619d134fce63f51bd8eb
FIX: Set the hue range for the default lookup table.

The old lookup table would not show up anything on the screen.

Change-Id: I9eabbdc0b7e218e2ac9979d132549a6a647b8f32
Handle case with no lights on

With no lights we drop back to a shader that does not do lighting
equations, much like the 2D maper does by default. New valid image is
a 3D scene rendered without any lighting applied. Different than
the old backend which would still apply lighting equations just with
no lights. If you really want to generate that old style image, create a
light and set its color to black, or intensity to zero, etc. Having a
light that is on will cause the lighting equations to be used even if it
is black  (ZOMG you could have a black light)

Change-Id: I7a8aed9dd060b27528ab5746c4a0d2f3dfaa360a
Merge topic 'try_glyph_extension' into master

23ceef01 Try adding support for ARB_instanced_arrays
Restore test deps for matplotlib tests

These are needed for the tests, fix compilation errors seen on the
default OpenGL dashboards.

Change-Id: Ic8b761cb8ad553f96a32cf29673ce4d9a0757d0f
Merge topic 'pv-plot-bar-lut' into master

bf8a001b FIX: Set the hue range for the default lookup table.
Merge topic 'fix-matplotlib' into master

3ae161f7 Restore test deps for matplotlib tests
Disable some widget tests building for OpenGL2

A few of the volume rendering classes are currently excluded when
building the OpenGL2 backend, these should be restored once this
changes.

Change-Id: I35fcb41313639c23c08033ffa6d19703430d1e37
now 000 is reserved as the no value (background) color

Change-Id: I785da81295112a9e037bc7f0a09d06d2a22430bf
Fix gcc warning about possible use of uninitialized variable

As best as I can tell, in regular use, it's basically a false positive,
but I think cases could be contrived where the compiler is right.

/Common/DataModel/vtkPolyhedron.cxx: In member function 'int vtkPolyhedron::vtkInternal::OrderDisconnectedContourPoints(vtkIdSetType&, vtkPoints*, vtkIdVectorType&, vtkIdVectorType&)':
/Common/DataModel/vtkPolyhedron.cxx:1195:19: warning: 'o' may be used uninitialized in this function [-Wmaybe-uninitialized]
       e[0] = x[0] - o[0];
                   ^

Defensively added initialization to zero in the error case.

Also fixed some comments, added some const and static.

Change-Id: Id2b6e8d69a07c7f248b7656b791d57ff9a92ccf4
Added check for null before dereference, for bug #14671

Change-Id: I30de6f43d8b208b7cdce2bbdf37b1593708148e2
cleanup all uses of fclose() in vtkSTLReader, for bug #14515

Based on patch from Adrian Winterstein.

Now, the file is only closed in the function where it was opened before (RequestData()).
Instead of closing it sometimes inside a subfunction.

Also moved some variable declarations closer to usage.

Change-Id: Ic2a222a879e9a60164bcc83d1a383e0ba8e02683
Removed dead code in test by using #if 0

Fixes clang -Wunreachable-code warning.

Change-Id: I3a8d7e2796b7d057c4328ea713dabfad39607933
Moved unused var suppression to suppressed dead code warning

Fixes clang -Wunreachable-code warning.

Change-Id: I1b063eec43c720c7718dfd2ed83bb8a08ddfc485
Removed unneeded break statements in switches

Fixes clang -Wunreachable-code-break warning.

Change-Id: Iae2b1f43827c2dc606b808b4a27c6b62f2f1989f
Merge topic 'widget-volume-gl2' into master

9b17ebdd Disable some widget tests building for OpenGL2
Merge topic 'address_no_lights_on' into master

27f77f8c Handle case with no lights on