Esempio n. 1
0
        public BufferLayout(IDisposableResource parent, IShader shader, IBufferLayoutDesc desc)
            : base(parent)
        {
            try
            {
                var video = parent.FindParentOrSelfWithException<Video>();
                com = new BufferLayoutCom();
                var error = com.Init(video.com, ((Shader)shader).vertex.com, ((BufferLayoutDesc)desc).com);

                if (error == BufferLayoutErrors.InputLayout) Debug.ThrowError("BufferLayout", "Failed to create InputLayout");
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }
Esempio n. 2
0
        public BufferLayout(IDisposableResource parent, IShader shader, IBufferLayoutDesc desc)
            : base(parent)
        {
            try
            {
                var video = parent.FindParentOrSelfWithException <Video>();
                com = new BufferLayoutCom();
                var error = com.Init(video.com, ((Shader)shader).vertex.com, ((BufferLayoutDesc)desc).com);

                if (error == BufferLayoutErrors.InputLayout)
                {
                    Debug.ThrowError("BufferLayout", "Failed to create InputLayout");
                }
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }
Esempio n. 3
0
        public BufferLayout(IDisposableResource parent, IShader shader, IBufferLayoutDesc desc)
            : base(parent)
        {
            try
            {
                var video = parent.FindParentOrSelfWithException <Video>();

                com = new BufferLayoutCom();
                var error = com.Init(video.com, ((BufferLayoutDesc)desc).com);

                switch (error)
                {
                case BufferLayoutErrors.VertexDeclaration: Debug.ThrowError("BufferLayout", "Failed to create vertex declaration"); break;
                }
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }
Esempio n. 4
0
        public BufferLayout(IDisposableResource parent, IShader shader, IBufferLayoutDesc desc)
            : base(parent)
        {
            try
            {
                var video = parent.FindParentOrSelfWithException<Video>();

                com = new BufferLayoutCom();
                var error = com.Init(video.com, ((BufferLayoutDesc)desc).com);

                switch (error)
                {
                    case BufferLayoutErrors.VertexDeclaration: Debug.ThrowError("BufferLayout", "Failed to create vertex declaration"); break;
                }
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }