This patch was inspired by Norman. Otherwise there is a segfault on Linux because the global variable tries to access OGL before a valid context is initialized.
- SkyContext.[ch]pp needs to query the window size, but apparently doesn't
do anything with it. We can hard wire a size and the cloud code seems to
behave fine.
- SkyLight.[ch]pp depends on glut_shapes so I copied over the code so it
can access those routines locally. (The routines that are used are
simply combining calls to libGLU.a
Note that SSG and OpenGL use different representations
of Matrices.
1) SSG is row major and OpenGL is column major
2) SSG uses a Z is up whereas conventionally OpenGL uses
Z is pointing into the screen
ie this just requires swapping the Y and the Z axis < columns >
and negating the new Y column
3) Now since SSG eventually calls OpenGL SSG must do this
for us behind the scenes or else things just wouldn't work
so inorder to get Clouds3D to render in the proper location
we should just need to use the Matrix that SSG uses for a Camera
Matrix and pass this directly to the Clouds3D Camers
Fixed texture translation so step and scroll values work with interpolation tables as well. Moved step/scroll calculation to utility function to improve code readability.
This update adds the ability to do multiple texture transforms (Steve B. thinks supporting them at the plib level would be inefficient, which is probably true).
Removed units (e.g. "_m") from texture translation property and variable names since the texture translation values are dimensionless.
Added the ability to specify a scroll factor for stepped texture animation that needs to scroll smoothly when approaching the step interval (e.g. odometer movement).