public override void Draw3D(Camera3D camera, GameObjectTag DrawTag) { PointEffect.SetFromCamera(camera); PointEffect.SetFromObject(this); Render.DrawModel(PointModel, PointEffect.MyEffect); base.Draw3D(camera, DrawTag); }
public override void Draw3D(Camera3D camera, GameObjectTag DrawTag) { if (EditorSelected) { RingEffect.SetFromCamera(camera); RingEffect.SetFromObject(this);; Render.DrawModel(RingModel, RingEffect.MyEffect); base.Draw3D(camera, DrawTag); } }
public static void DrawModel(Model model, EffectValue effect, Camera3D camera, Basic3DObject obj) { if (model != null && effect.get() != null) { _3DEffect effect3D = (_3DEffect)effect.Holder; effect3D.SetFromObject(obj); effect3D.SetFromCamera(camera); DrawModel(model, effect3D.MyEffect); } }
public override void Draw3D(Camera3D camera, GameObjectTag DrawTag) { if (MyModel.get() != null && MyEffect.get() != null) { Game1.graphicsDevice.BlendState = BlendState.AlphaBlend; _3DEffect effect3D = (_3DEffect)MyEffect.Holder; effect3D.SetFromObject(this); effect3D.SetFromCamera(camera); Render.DrawModel(MyModel.get(), MyEffect.get()); } base.Draw3D(camera, DrawTag); }
public override void Draw3D(Camera3D camera, GameObjectTag DrawTag) { ColorEffectHolder.SetFromObject(this); ColorEffectHolder.SetFromCamera(camera); foreach (EffectPass pass in ColorEffectHolder.MyEffect.CurrentTechnique.Passes) { pass.Apply(); Game1.graphics.GraphicsDevice.DrawUserIndexedPrimitives <VertexPositionColor>( PrimitiveType.LineList, PointList, 0, // vertex buffer offset to add to each element of the index buffer PointCount, // number of vertices in pointList Indicies, // the index buffer 0, // first index element to read PointCount / 2 // number of primitives to draw ); } }