public DepthStencilState(IDisposableResource parent, IDepthStencilStateDesc desc)
            : base(parent)
        {
            try
            {
                var video = parent.FindParentOrSelfWithException<Video>();

                com = new DepthStencilStateCom();
                var error = com.Init(video.com, ((DepthStencilStateDesc)desc).com);

                if (error == DepthStencilStateError.DepthStencil) Debug.ThrowError("DepthStencil", "Failed to create DepthStencil");
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }
Example #2
0
        public DepthStencilState(IDisposableResource parent, IDepthStencilStateDesc desc)
            : base(parent)
        {
            try
            {
                var video = parent.FindParentOrSelfWithException <Video>();

                com = new DepthStencilStateCom();
                var error = com.Init(video.com, ((DepthStencilStateDesc)desc).com);

                if (error == DepthStencilStateError.DepthStencil)
                {
                    Debug.ThrowError("DepthStencil", "Failed to create DepthStencil");
                }
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }