Ejemplo n.º 1
0
        public virtual void Initialize(AetherEngine engine)
        {
            var   device = AetherContextMG.GetDevice(engine);
            float width  = (float)device.Viewport.Width;
            float height = (float)device.Viewport.Height;

            _aspectRatio = width / height;
            UpdateView();
            UpdateProjection();
        }
Ejemplo n.º 2
0
        public void Initialize(AetherEngine engine)
        {
            var device = AetherContextMG.GetDevice(engine);

            GenerateGeometry();
            Vector3 v = vertices[0].Position;

            _bb = new BoundingBox(v, v);
            for (int i = 1; i < vertices.Count; i++)//
            {
                v = vertices[i].Position;
                BoundingBox bb2 = new BoundingBox(v, v);
                BoundingBox.CreateMerged(ref _bb, ref bb2, out _bb);
            }
            InitializePrimitive(device);
        }
Ejemplo n.º 3
0
 public virtual void Initialize(AetherEngine engine)
 {
     this.GraphicsDevice = AetherContextMG.GetDevice(engine);
     this.DeviceContext  = engine.Context.DeviceContext;
     CreateEffect();
 }