qt5base-lts/examples/opengl/legacy
Edward Welbourne 29af390e3f Clean up some arithmetic code in an example
The square root of a sum of squares is easier to read and should be
computed more accurately if done for us by hypot().  Variables set
only once should be set as an initializer and declared const, to make
clear this is what's happening.  Loop variables can be local to loops.
Adding a value to, or subtracting one from, a multiple of itself just
multiplies it be one plus (or minus) the multiplier; assigning the
result to the same variable is clearer as a *= (especially when the
factors are now overt numeric constants).  An array of 16k floats all
updated in locksteck to the same value can be replaced by a single
float that holds that value.  Simple things should not be needlessly
made more complicated - especially in example code, which should be
pedagogic.

Change-Id: Idab585cd7df1399c250d4b9f1396a085ae8f3864
Reviewed-by: hjk <hjk@qt.io>
2017-07-14 13:36:46 +00:00
..
framebufferobject2 Be (somewhat more) consistent about the value of pi 2017-06-20 09:53:46 +00:00
grabber Be (somewhat more) consistent about the value of pi 2017-06-20 09:53:46 +00:00
hellogl Remove last traces of opengl es 1 support 2016-11-16 22:00:46 +00:00
overpainting Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00
pbuffers Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00
pbuffers2 Clean up some arithmetic code in an example 2017-07-14 13:36:46 +00:00
samplebuffers Be (somewhat more) consistent about the value of pi 2017-06-20 09:53:46 +00:00
shared Merge remote-tracking branch 'origin/5.6' into 5.7 2016-06-06 09:04:55 +02:00
legacy.pro Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00
README Modernize the OpenGL examples 2014-08-12 07:47:23 +02:00

This directory contains legacy examples that use the fixed pipeline
and thus are not compatible with OpenGL ES 2.0+ and the core profile of
OpenGL 3.0+. They also rely on the Qt OpenGL module (e.g. QGLWidget) which
is not advisable in new application.