Example #1
0
        protected override void _Render(DXCamera camera)
        {
            EffectTechnique technique = _shader.DXEffect.GetTechniqueByIndex(0);
            EffectPass      usePass   = technique.GetPassByIndex(0);

            for (int i = 0; i < 5; i++)
            {
                if (_vertexBuffer2[i] != null && Program.DXSceneOptions.LevelVisibility[i])
                {
                    DXContext.InputAssembler.SetVertexBuffers(0, new VertexBufferBinding(_vertexBuffer2[i], Marshal.SizeOf(typeof(DXSKV)), 0));
                    DXContext.InputAssembler.SetIndexBuffer(_indexBuffer2[i], Format.R32_UInt, 0);
                    DXContext.InputAssembler.PrimitiveTopology = PrimitiveTopology.LineList;
                    DXContext.InputAssembler.InputLayout       = _inputLayout;

                    _shader.SetParameter("worldMatrix", Matrix.Identity);
                    _shader.SetParameter("viewMatrix", camera.ViewMatrix);
                    _shader.SetParameter("projectionMatrix", camera.ProjMatrix);
                    _shader.SetParameter("vp", camera.ViewMatrix * camera.ProjMatrix);

                    usePass.Apply(DXContext);

                    DXContext.DrawIndexed(IndexCount2[i], 0, 0);
                }
            }



            technique.Dispose();
            usePass.Dispose();
        }
Example #2
0
 public UnitOfWork(DXContext dXContext)
 {
     _dXContext = dXContext;
 }
Example #3
0
 public Repository(DXContext context)
 {
     this.context = context;
     this.dbSet   = context.Set <TEntity>();
 }
Example #4
0
 public ProducerRepo(DXContext dXContext) : base(dXContext)
 {
     _dXContext = dXContext;
 }
Example #5
0
 public MovieActorRepo(DXContext dXContext) : base(dXContext)
 {
     _dXContext = dXContext;
 }