public static void loadCubemapTexture ( final GVRContext context , ResourceCache < GVRImage > textureCache , final TextureCallback callback , final GVRAndroidResource resource , int priority , Map < String , Integer > faceIndexMap ) throws IllegalArgumentException { validatePriorityCallbackParameters ( context , callback , resource , priority ) ; final GVRImage cached = textureCache == null ? null : ( GVRImage ) textureCache . get ( resource ) ; if ( cached != null ) { Log . v ( "ASSET" , "Texture: %s loaded from cache" , cached . getFileName ( ) ) ; context . runOnGlThread ( new Runnable ( ) { @ Override public void run ( ) { callback . loaded ( cached , resource ) ; } } ) ; } else { TextureCallback actualCallback = ( textureCache == null ) ? callback : ResourceCache . wrapCallback ( textureCache , callback ) ; AsyncCubemapTexture . loadTexture ( context , CancelableCallbackWrapper . wrap ( GVRCubemapImage . class , actualCallback ) , resource , priority , faceIndexMap ) ; } }
Load a cubemap texture asynchronously .