Ejemplo n.º 1
0
 public override void Recalculate()
 {
     Position = ((Maxes - Mins) / 2) + Mins;
     PrimaryEditor.ContextView.Control.MakeCurrent();
     if (MyVBO != null)
     {
         MyVBO.Destroy();
     }
     MyVBO = new VBO();
     MyVBO.Prepare();
     MyVBO.Tex = PrimaryEditor.ContextView.Textures.GetTexture(Texture);
     MyVBO.AddSide(new Location(0, 0, 1), Coords[0]);
     MyVBO.AddSide(new Location(0, 0, -1), Coords[1]);
     MyVBO.AddSide(new Location(1, 0, 0), Coords[2]);
     MyVBO.AddSide(new Location(-1, 0, 0), Coords[3]);
     MyVBO.AddSide(new Location(0, 1, 0), Coords[4]);
     MyVBO.AddSide(new Location(0, -1, 0), Coords[5]);
     MyVBO.GenerateVBO();
 }