Exemplo n.º 1
0
        public SoftRenderObject GetRenderObject(int instanceId)
        {
            SoftDevice device = SoftDevice.StaticDevice;

            if (device != null)
            {
                return(device.GetRenderObject(instanceId));
            }
            return(null);
        }
Exemplo n.º 2
0
        /*
         * private void DestroyRenderObjects() {
         *  if (m_RenderObjMap != null) {
         *      var iter = m_RenderObjMap.GetEnumerator();
         *      while (iter.MoveNext()) {
         *          if (iter.Current.Value != null)
         *              iter.Current.Value.Dispose();
         *      }
         *      iter.Dispose();
         *      m_RenderObjMap.Clear();
         *  }
         * }*/

        protected override void OnFree(bool isManual)
        {
            base.OnFree(isManual);

            // DestroyRenderObjects();

            if (m_RenerTarget != null)
            {
                m_RenerTarget.Dispose();
                m_RenerTarget = null;
            }
            m_StaticDevice = null;
        }
Exemplo n.º 3
0
 public SoftDevice(int deviceWidth, int deviceHeight)
 {
     m_RenerTarget  = new RenderTarget(deviceWidth, deviceHeight);
     m_StaticDevice = this;
 }