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; } }
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; } }
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; } }
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; } }