示例#1
0
 /// <summary>
 /// Request readback of a texture.
 /// </summary>
 /// <param name="src"></param>
 /// <param name="mipmapIndex"></param>
 /// <returns></returns>
 public static UniversalAsyncGPUReadbackRequest Request(Texture src, int mipmapIndex = 0)
 {
     if (SystemInfo.supportsAsyncGPUReadback)
     {
         return(new UniversalAsyncGPUReadbackRequest()
         {
             isPlugin = false,
             uDisposd = false,
             uRequest = AsyncGPUReadback.Request(src, mipIndex: mipmapIndex),
         });
     }
     else
     {
         return(new UniversalAsyncGPUReadbackRequest()
         {
             isPlugin = true,
             oRequest = OpenGLAsyncReadbackRequest.CreateTextureRequest(RenderTextureRegistery.GetFor(src).ToInt32(), mipmapIndex)
         });
     }
 }
示例#2
0
 void Update()
 {
     OpenGLAsyncReadbackRequest.Update();
     RenderTextureRegistery.ClearDeadRefs();
 }