public void Draw() { if (DataTexture != null) { XEffect.CurrentTechnique = XEffect.Techniques["Graph"]; XEffect.CurrentTechnique.Passes[0].Apply(); XDevice.Textures[0] = DataTexture.FrontTexture; XDevice.SamplerStates[0] = SamplerState.PointClamp; XDevice.BlendState = BlendState.AlphaBlend; XPlane.Draw(); } }
protected void Visualize(Texture texture, EffectTechnique technique, Viewport viewport, bool present = true, bool clear = true) { XDevice.SetRenderTarget(null); XDevice.Viewport = viewport; if (clear) { XDevice.Clear(Color.White); } MainSampler.SetValue(texture); XEffect.CurrentTechnique = technique; XEffect.CurrentTechnique.Passes[0].Apply(); MiniPlane.Draw(); if (present) { XDevice.Present(); } XDevice.Viewport = MainViewport; }