public OpenTKTestForm()
 {
     Thread.CurrentThread.CurrentUICulture = new CultureInfo(CultureInfo.CurrentCulture.LCID);
     InitializeComponent();
     GLSettings.InitFromSettings();
     AddOpenGLControl();
 }
예제 #2
0
        protected override void OnClosed(EventArgs e)
        {
            GlobalVariables.FormFast = null;
            GLSettings.Height        = this.Height;
            GLSettings.Width         = this.Width;

            GLSettings.SaveSettings();
            base.OnClosed(e);
        }
예제 #3
0
        public MultipleOGLControls()
        {
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(CultureInfo.CurrentCulture.LCID);
            InitializeComponent();


            AddOpenGLControl();

            if (!GLSettings.IsInitializedFromSettings)
            {
                GLSettings.InitFromSettings();
            }

            this.Height = GLSettings.Height;
            this.Width  = GLSettings.Width;
        }
예제 #4
0
        public OGLControl()
            : base()
        {
            if (!GLSettings.IsInitializedFromSettings)
            {
                GLSettings.InitFromSettings();
            }

            BackColor = GLSettings.BackColor;
            CreateMenu();
            GLrender = new OpenGLContext(this);
            System.Diagnostics.Debug.WriteLine("====> ThreadID OpenControl : " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString());
            timer.Elapsed += new System.Timers.ElapsedEventHandler(Timer_Tick);


            this.ModelViewMode = ModelViewMode.Camera;
        }
예제 #5
0
        public OpenTKForm(string title = "OpenTKForm")
        {
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(CultureInfo.CurrentCulture.LCID);
            InitializeComponent();


            AddOpenGLControl();

            if (!GLSettings.IsInitializedFromSettings)
            {
                GLSettings.InitFromSettings();
            }

            this.Height = GLSettings.Height;
            this.Width  = GLSettings.Width;
            this.Text   = title;
        }
예제 #6
0
        public OpenGLUC()
        {
            InitializeComponent();
            if (!GLSettings.IsInitializedFromSettings)
            {
                GLSettings.InitFromSettings();
            }


            InitComboBox();
            comboRenderMode.SelectedText = GLSettings.ViewMode;


            this.initGLControl();

            this.glControl1.Invalidate();
        }
 public void SaveSettings()
 {
     GLSettings.SaveSettings();
 }
 protected override void OnClosed(EventArgs e)
 {
     GLSettings.SaveSettings();
     base.OnClosed(e);
 }