Exemplo n.º 1
0
 void Init(Image image, bool isalpha)
 {
     this.isalpha = isalpha;
     g            = GraphicsHelperFactory.GetInstance();
     this.width   = image.Width;
     this.height  = image.Height;
     if (isalpha)
     {
         GlReference = LoadImageToOpenGlAsAlpha(image);
     }
     else
     {
         GlReference = LoadImageToOpenGl(image);
     }
 }
Exemplo n.º 2
0
        public void Render()
        {
            SelectionModel  selectionmodel = SelectionModel.GetInstance();
            IGraphicsHelper graphics       = GraphicsHelperFactory.GetInstance();

            for (int i = 0; i < selectionmodel.SelectedObjects.Count; i++)
            {
                Entity entity = selectionmodel.SelectedObjects[i];

                graphics.PushMatrix();

                if (entity.Parent != null)
                {
                    (entity as EntityGroup).ApplyTransforms();
                }

                entity.DrawSelected();
                graphics.PopMatrix();
            }
        }