render mode detection (took from axel game lib)