public override void Render(SharpDX.Toolkit.Graphics.SpriteBatch _spriteBatch) { _spriteBatch.Draw(tex, new RectangleF(gridx * 32, gridy * 32, width * 32, height * 32), Color.White); }
public override void Render(SharpDX.Direct3D11.DeviceContext devCont) { Device dev = Engine.g_device; /// Clear the layout to the engine devCont.InputAssembler.InputLayout = null; /// set the type of primitive(triangleList) devCont.InputAssembler.PrimitiveTopology = PrimitiveTopology.PointList; /// set the position of the mesh base on the world matrix /// all the change pass to the shader m_shader.SetThePositions(m_WorldMatrix); /// Execute all the passes of the shader m_shader.Execute(devCont); /// Render devCont.Draw(m_numParticles, 0); }