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
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
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
Fixed inconsistent #include style, from <> to ""

Change-Id: I7ea711a7d46c5e1c53e50f997495965acae1aa46
Fixed inconsistent #include style, changed <> to ""

Change-Id: I76848acf2f0939f63df6c3194b302eebd6a68009
fix dashboards that lack multisampling

Change-Id: I61fbc19314c98b3571988e40c49afad6b33ba787
Fix error in glyphing and extend to mac

Add better support for divisors and matricies in the VAO helper
as wel.

Change-Id: Ibd66fbfece6de534d7311c60b7edb2f94f485f93
Fix fast path on apple

Move the handling of divisor into the vao helper. Also deal with
matrices there. On my aplpe (which lacks vao support) these have
to be manually bound so having the falback code in the VAO helper
handle it.  On some systems that have VAO extensions and instanced
array extensions the VAO extension does not handle the instanced
aray extension.  So we force emulation of VAOs when glyphing
triangles which is where the use of instance arrays can hit.

Change-Id: Idc68e47c8743b2772a4a0e63621eceb1f778c5a3
Merge topic 'glyphing_fix' into master

cbe3f4b8 Fix fast path on apple
a9827d1d Fix error in glyphing and extend to mac
Merge topic 'bug14515' into master

e579693c cleanup all uses of fclose() in vtkSTLReader, for bug #14515
Merge topic 'bug14671' into master

64e66d78 Added check for null before dereference, for bug #14671
Merge topic 'use-front-buffer-if-back-buffer-fails' into master

e136e01e vtkTesting: If test fails with back buffer, try front buffer too
37c4a68b vtkTesting: Refactor RegressionTest, eliminating hard-coded cout
Merge topic 'misc-dashboard-warnings' into master

87526dc1 Removed unneeded break statements in switches
273205df Moved unused var suppression to suppressed dead code warning
af894567 Removed dead code in test by using #if 0