/// <summary> /// 使用中のリソースをすべてクリーンアップします。 /// </summary> /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param> protected virtual void Dispose(bool disposing) { if (Disposed) { return; } Disposed = true; if (DrawerAry != null) { DrawerAry.Clear(); DrawerAry.Dispose(); DrawerAry = null; } if (Camera != null) { Camera.Dispose(); Camera = null; } if (Cad3D != null) { Cad3D.Clear(); Cad3D.Dispose(); Cad3D = null; } }
/// <summary> /// コンストラクタ /// </summary> public MainLogic() { Disposed = false; Camera = new CCamera(); DrawerAry = new CDrawerArray(); Cad3D = new CCadObj3D(); // Glutのアイドル時処理でなく、タイマーで再描画イベントを発生させる MyTimer.Tick += (sender, e) => { Glut.glutPostRedisplay(); }; MyTimer.Interval = 1000 / 60; }