SceneKit enhancement: Provide way to load materials asynchronously

Originator:me
Number:rdar://12226081 Date Originated:03-Sep-2012 06:41 PM
Status:Duplicate/12205372/Open Resolved:
Product:Mac OS X Product Version:10.8.2 (12C31a)
Classification:Enhancement Reproducible:Not Applicable
 
03-Sep-2012 06:41 PM Jonathon Mah:
In an Instruments profile of our project, the generation of mipmaps (glGenerateMipmapEXT_Exec) shows up as significant time. Therefore we'd like to use a lower-res material initially, have the mipmaps generated in the background, and then switch them in when they're ready.

The closest I'm able to get with current API is to use another SCNRenderer with a different, but shared, context. To prepare the material I set it on a plane in the second renderer's scene, and call -render on it. This works, but the renderer blocks the SCNView. Each renderer takes the global SCNTransaction lock.

I suspect it may be possible to prepare a material (generate mipmaps, generate and compile shaders) outside of any rendering, which would be great.

Also see: https://devforums.apple.com/thread/164611

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!