shared GLES stuff, based on Robert Clark's KMS cube example