Beispiel #1
0
        public D3DAnimRenderComponent()
        {
            disposer      = new DisposeWatcher();
            vertexBuffers = new EnumerableDisposableSetter <List <Buffer> >(disposer);
            indexBuffers  = new EnumerableDisposableSetter <List <Buffer> >(disposer);
            TextureViews  = new EnumerableDisposableSetter <List <ShaderResourceView> >(disposer);

            PerObjectBuffer      = new DisposableSetter <Buffer>(disposer);
            PerMaterialBuffer    = new DisposableSetter <Buffer>(disposer);
            PerArmatureBuffer    = new DisposableSetter <Buffer>(disposer);
            SamplerState         = new DisposableSetter <SamplerState>(disposer);
            DepthStencilState    = new DisposableSetter <DepthStencilState>();
            TransformWorldBuffer = new DisposableSetter <Buffer>();

            RasterizerState = new D3DRasterizerState(new RasterizerStateDescription()
            {
                FillMode = FillMode.Solid,
                CullMode = CullMode.Back,
            });

            VertexShader      = new DisposableSetter <VertexShader>(disposer);
            PixelShader       = new DisposableSetter <PixelShader>(disposer);
            Layout            = new DisposableSetter <InputLayout>();
            PrimitiveTopology = SharpDX.Direct3D.PrimitiveTopology.TriangleList;
            BlendingState     = new DisposableSetter <BlendState>();

            CanRender  = true;
            IsModified = true;
        }
Beispiel #2
0
 public D3DRenderComponent()
 {
     CanRender            = true;
     IsModified           = true;
     disposer             = new DisposeWatcher();
     TransformWorldBuffer = new DisposableSetter <SharpDX.Direct3D11.Buffer>(disposer);
     VertexBuffer         = new DisposableSetter <SharpDX.Direct3D11.Buffer>(disposer);
     IndexBuffer          = new DisposableSetter <SharpDX.Direct3D11.Buffer>(disposer);
     DepthStencilState    = new DisposableSetter <DepthStencilState>(disposer);
     BlendingState        = new DisposableSetter <BlendState>(disposer);
     Layout         = new DisposableSetter <InputLayout>(disposer);
     VertexShader   = new DisposableSetter <VertexShader>(disposer);
     PixelShader    = new DisposableSetter <PixelShader>(disposer);
     GeometryShader = new DisposableSetter <GeometryShader>(disposer);
 }