Fix preprocessor checks to compile against GLESv2
Limit texture units to 8 to avoid buffer overflows
Generate Mipmaps in GLES after texture is loaded