spark: port to opengles-compatible calls