Ejemplo n.º 1
0
 public override void Dispose()
 {
     disposeChilderen();
     if (com != null)
     {
         com.Dispose();
         com = null;
     }
     base.Dispose();
 }
Ejemplo n.º 2
0
 public override void Dispose()
 {
     disposeChilderen();
     if (com != null)
     {
         com.Dispose();
         com = null;
     }
     base.Dispose();
 }
Ejemplo 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, ((Shader)shader).vertex.com, ((BufferLayoutDesc)desc).com);

                if (error == BufferLayoutErrors.InputLayout) Debug.ThrowError("BufferLayout", "Failed to create InputLayout");
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }
Ejemplo 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, ((Shader)shader).vertex.com, ((BufferLayoutDesc)desc).com);

                if (error == BufferLayoutErrors.InputLayout)
                {
                    Debug.ThrowError("BufferLayout", "Failed to create InputLayout");
                }
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }
Ejemplo n.º 5
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;
            }
        }
Ejemplo n.º 6
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;
            }
        }