basic texturing is implemented.

many changes to shader class.
gl calls are wrapped around a definition, checking for glerrors.