예제 #1
0
 /// <summary>
 /// 创建渲染贴图,加入到dicRendertexture里面
 /// </summary>
 /// <param name="eRenderTextureType"></param>
 /// <param name="camera"></param>
 /// <param name="nWidth"></param>
 /// <param name="nHeight"></param>
 public void CreateXRenderTexture(EnumRenderTextureType eRenderTextureType, Camera camera, int nWidth, int nHeight)
 {
     if (this.m_dicRenderTexture.ContainsKey(eRenderTextureType))
     {
         this.m_log.Error(string.Format("m_dicRenderTexture.ContainsKey(eRenderTextureType) == true:{0}", eRenderTextureType.ToString()));
     }
     else
     {
         XRenderTexture value = new XRenderTexture(camera, nWidth, nHeight);
         this.m_dicRenderTexture.Add(eRenderTextureType, value);
     }
 }
예제 #2
0
        public XRenderTexture GetRenderTexture(EnumRenderTextureType eRenderTextureType)
        {
            XRenderTexture xRenderTexture = null;
            XRenderTexture result;

            if (this.m_dicRenderTexture.TryGetValue(eRenderTextureType, out xRenderTexture))
            {
                result = xRenderTexture;
            }
            else
            {
                result = null;
            }
            return(result);
        }