rice: avoid redundant gl calls