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(); }
public UnitOfWork(DXContext dXContext) { _dXContext = dXContext; }
public Repository(DXContext context) { this.context = context; this.dbSet = context.Set <TEntity>(); }
public ProducerRepo(DXContext dXContext) : base(dXContext) { _dXContext = dXContext; }
public MovieActorRepo(DXContext dXContext) : base(dXContext) { _dXContext = dXContext; }