public FormLightingExample() { InitializeComponent(); //if (CameraDictionary.Instance.ContainsKey(this.GetType().Name)) //{ // this.camera = CameraDictionary.Instance[this.GetType().Name]; //} //else { this.camera = new Camera(CameraType.Ortho, this.glCanvas1.Width, this.glCanvas1.Height); //CameraDictionary.Instance.Add(this.GetType().Name, this.camera); } rotator = new SatelliteRotator(this.camera); this.glCanvas1.MouseWheel += glCanvas1_MouseWheel; element = new LightingExample(); element.Initialize(); IUILayoutParam param = new IUILayoutParam( AnchorStyles.Left | AnchorStyles.Bottom, new Padding(10, 10, 10, 10), new Size(50, 50)); uiAxis = new SimpleUIAxis(param); uiAxis.Initialize(); this.glCanvas1.MouseWheel += glCanvas1_MouseWheel; this.glCanvas1.KeyPress += glCanvas1_KeyPress; this.glCanvas1.MouseDown += glCanvas1_MouseDown; this.glCanvas1.MouseMove += glCanvas1_MouseMove; this.glCanvas1.MouseUp += glCanvas1_MouseUp; this.glCanvas1.OpenGLDraw += glCanvas1_OpenGLDraw; this.glCanvas1.Resize += glCanvas1_Resize; this.Load += Form_Load; }
public FormLightingExample() { InitializeComponent(); //if (CameraDictionary.Instance.ContainsKey(this.GetType().Name)) //{ // this.camera = CameraDictionary.Instance[this.GetType().Name]; //} //else { this.camera = new Camera(CameraType.Ortho, this.glCanvas1.Width, this.glCanvas1.Height); //CameraDictionary.Instance.Add(this.GetType().Name, this.camera); } rotator = new SatelliteRotator(this.camera); this.glCanvas1.MouseWheel += glCanvas1_MouseWheel; element = new LightingExample(); element.Initialize(); //element.BeforeRendering += element_BeforeRendering; //element.AfterRendering += element_AfterRendering; IUILayoutParam param = new IUILayoutParam( AnchorStyles.Left | AnchorStyles.Bottom, new Padding(10, 10, 10, 10), new Size(50, 50)); uiAxis = new SimpleUIAxis(param); uiAxis.Initialize(); this.glCanvas1.MouseWheel += glCanvas1_MouseWheel; this.glCanvas1.KeyPress += glCanvas1_KeyPress; this.glCanvas1.MouseDown += glCanvas1_MouseDown; this.glCanvas1.MouseMove += glCanvas1_MouseMove; this.glCanvas1.MouseUp += glCanvas1_MouseUp; this.glCanvas1.OpenGLDraw += glCanvas1_OpenGLDraw; this.glCanvas1.Resize += glCanvas1_Resize; this.Load += Form_Load; }