Exemple #1
0
            public void Update(RenderTexture rtex)
            {
                if (!rtex.IsCreated())
                {
                    rtex.Create();
                }

                var ptr = rtex.GetNativeTexturePtr();

                if (rtData)
                {
                    if (nativeTexturePtr != ptr)
                    {
                        rtData.Release();
                    }
                }
                if (!rtData)
                {
                    rtData = rthsRenderTarget.Create();
                    rtData.Setup(ptr);
                    nativeTexturePtr = ptr;
                }
            }
            public void Update(RenderTexture rtex)
            {
                if (!rtex.IsCreated())
                {
                    rtex.Create();
                }

                if (rtData)
                {
                    if (rtData.isRelocated)
                    {
                        rtData.Release();
                        if (s_dbgVerboseLog)
                        {
                            Debug.Log(String.Format("Relocated RenderTexture \"{0}\"\n", rtex.name));
                        }
                    }
                }
                if (!rtData)
                {
                    rtData = rthsRenderTarget.Create();
                    rtData.Setup(rtex);
                }
            }