Modified for OmegaLib 6
Modified to add a flag for compileGLObjects