Example #1
0
 public D3D11Material(string name, D3D11Shader shader, bool enableDepth, ImageBytes texture, Color4 color)
 {
     Name           = name;
     Shader         = shader;
     EnableDepth    = enableDepth;
     m_textureBytes = texture;
     Color          = color;
 }
Example #2
0
        public bool SetVertices(D3D11Device device, D3D11Shader shader)
        {
            var inputs = shader.InputElements.Value;

            if (inputs == null)
            {
                return(false);
            }
            if (!HasPositionAttribute)
            {
                return(false);
            }

            device.Context.InputAssembler.PrimitiveTopology = Topology;

            var vertices = GetVertexBuffer(device, inputs);

            device.Context.InputAssembler.SetVertexBuffers(0,
                                                           new VertexBufferBinding(vertices, Stride, 0));
            return(true);
        }
Example #3
0
 public D3D11Material(string name, D3D11Shader shader) : this(name, shader, true, default(ImageBytes), Color4.White)
 {
 }