{\r
InitializeComponent();\r
// Show fps counter\r
- //Canvas.default_buffer_frame = main_buffer;\r
+\r
Canvas.default_api_canvas = LayoutRoot;\r
Canvas.default_panel = this;\r
this.IsTabStop = true;\r
this.MouseEnter += getFocusMouseEnter;\r
System.Windows.Application.Current.Host.Settings.MaxFrameRate = 60;\r
System.Windows.Application.Current.Host.Settings.EnableFrameRateCounter = true;\r
- System.Windows.Application.Current.Host.Settings.EnableCacheVisualization = true;\r
+ System.Windows.Application.Current.Host.Settings.EnableCacheVisualization = false;\r
+ //<param name="enableGPUAcceleration" value="true"/>\r
System.Windows.Media.CompositionTarget.Rendering += new System.EventHandler(CompositionTarget_Rendering);\r
//main_routine = new System.ComponentModel.BackgroundWorker();\r
//main_routine.DoWork += new System.ComponentModel.DoWorkEventHandler(psychlops_main);\r
//main_routine.RunWorkerAsync();\r
\r
main = new PsychlopsMain();\r
+ Psychlops.Internal.Main.routine = new System.Threading.Thread(main.psychlops_main);\r
+ Psychlops.Internal.Main.routine.Start();\r
//main.initialize();\r
- Main.flag = new System.Threading.AutoResetEvent(false);\r
- Main.routine = new System.Threading.Thread(main.psychlops_main);\r
- Main.routine.Start();\r
//main_routine = main.psychlops_main();\r
-#if DEBUG\r
- DebugConsole = new System.Windows.Controls.TextBlock();\r
- TotalRoot.Children.Add(DebugConsole);\r
-#endif\r
+\r
+ Psychlops.Internal.Main.statusBar = AppStatusBar;\r
+ Psychlops.Internal.Main.widgetStack = Controller;\r
+ AppStatusBar.Text = System.Windows.Application.Current.Host.Settings.EnableGPUAcceleration.ToString();\r
}\r
protected void getFocusMouseEnter(object sender, System.Windows.Input.MouseEventArgs e) {\r
this.Focus();\r
}\r
\r
- int nextIntervalFrame = 1;\r
private void CompositionTarget_Rendering(object sender, System.EventArgs e)\r
{\r
if (Main.canvas != null) Main.canvas.executeFlip();\r
- Main.flag.Set();\r
- nextIntervalFrame--;\r
- if (nextIntervalFrame<=0)\r
- {\r
- //main_routine.MoveNext();\r
- //nextIntervalFrame = main_routine.Current;\r
- }\r
+ //if (nextIntervalFrame-- <= 0)\r
+ //{\r
+ // main_routine.MoveNext();\r
+ // nextIntervalFrame = main_routine.Current;\r
+ //}\r
}\r
\r
}\r