示例#1
0
        public TextureAnimationEditor()
        {
            InitializeComponent();

            viewport      = new ViewportControl();
            viewport.Dock = DockStyle.Fill;
            viewport.AnimationTrackEnabled = false;
            viewport.AddRenderer(this);
            viewport.EnableHelpDisplay = false;
            Controls.Add(viewport);
            viewport.BringToFront();

            toolStripComboBox1.SelectedIndex = 0;

            BitmapList.ImageSize       = new Size(64, 64);
            BitmapList.ColorDepth      = ColorDepth.Depth32Bit;
            textureList.LargeImageList = BitmapList;

            //toolStripComboBox1.SelectedIndex = 4;

            FormClosing += (sender, args) =>
            {
                BitmapList.Dispose();
                viewport.Dispose();
                ReleaseResource();
            };
        }
示例#2
0
文件: Viewport.cs 项目: Ploaj/HSDLib
        public CommonViewport()
        {
            Text = "Viewport";

            //_glViewport = new GLControl(new GraphicsMode(new ColorFormat(8, 8, 8, 8), 24, 8, 16));
            glViewport             = new ViewportControl();
            glViewport.Dock        = DockStyle.Fill;
            glViewport.EnableFloor = true;

            glViewport.AddRenderer(this);

            Controls.Add(glViewport);

            FormClosing += (sender, args) =>
            {
                if (args.CloseReason == CloseReason.UserClosing)
                {
                    args.Cancel = true;
                    //MainForm.Instance.TryClose(this);
                }
            };
        }