コード例 #1
0
ファイル: WebRTC.cs プロジェクト: colorwlof/com.unity.webrtc
 public static void UpdateRendererTexture(IntPtr callback, Texture texture, uint rendererId)
 {
     if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D12)
     {
         throw new NotSupportedException(
                   "CommandBuffer.IssuePluginCustomTextureUpdateV2 method is Direct3D12 is not supported ");
     }
     _command.IssuePluginCustomTextureUpdateV2(callback, texture, rendererId);
     Graphics.ExecuteCommandBuffer(_command);
     _command.Clear();
 }
コード例 #2
0
        public static void UpdateRendererTexture(IntPtr callback, Texture texture, uint rendererId)
        {
#if !UNITY_2020_1_OR_NEWER
            if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D12)
            {
                throw new NotSupportedException(
                          "CommandBuffer.IssuePluginCustomTextureUpdateV2 method is not supported " +
                          "when using Direct3D12 on Unity2019 or older.");
            }
#endif
            _command.IssuePluginCustomTextureUpdateV2(callback, texture, rendererId);
            Graphics.ExecuteCommandBuffer(_command);
            _command.Clear();
        }
コード例 #3
0
ファイル: Sora.cs プロジェクト: torikizi/sora-unity-sdk
 // trackId で受信した映像を texutre にレンダリングする
 public void RenderTrackToTexture(uint trackId, UnityEngine.Texture texture)
 {
     commandBuffer.IssuePluginCustomTextureUpdateV2(sora_get_texture_update_callback(), texture, trackId);
     UnityEngine.Graphics.ExecuteCommandBuffer(commandBuffer);
     commandBuffer.Clear();
 }
コード例 #4
0
 public static void UpdateRendererTexture(IntPtr callback, Texture texture, uint rendererId)
 {
     _command.IssuePluginCustomTextureUpdateV2(callback, texture, rendererId);
     Graphics.ExecuteCommandBuffer(_command);
     _command.Clear();
 }