OSDN Git Service

shader
[psychlops/silverlight.git] / test4 / MainPage.xaml.cs
index 2a1ef51..a125451 100644 (file)
@@ -1,4 +1,10 @@
 using Psychlops;\r
+using System;\r
+using System.Windows;\r
+using System.Windows.Media;\r
+using System.Windows.Media.Effects;\r
+using System.Windows.Media.Media3D;\r
+\r
 \r
 namespace PsychlopsSilverlight4test\r
 {\r
@@ -39,24 +45,25 @@ namespace PsychlopsSilverlight4test
                        //main_routine = main.psychlops_main();\r
 \r
                        Psychlops.Internal.Main.statusBar = AppStatusBar;\r
+                       Psychlops.Internal.Main.layoutRoot = LayoutRoot;\r
                        //Psychlops.Internal.Main.widgetStack = Controller;\r
                        AppStatusBar.Text = "Now starting Psychlops environment... please wait a minute";\r
 \r
-                       /*\r
-                       var ur = new System.Uri("Resources/Benham.png", System.UriKind.RelativeOrAbsolute);\r
-                       var                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             bitmap = new System.Windows.Media.Imaging.BitmapImage(ur);\r
-                       var img = new System.Windows.Controls.Image();\r
-                       img.Source = bitmap;\r
-                       System.Windows.Controls.Canvas.SetLeft(img, 100);\r
-                       System.Windows.Controls.Canvas.SetTop(img, 100);\r
-                       Controller.Children.Add(img);\r
-                        * */\r
-                        \r
-                        \r
+\r
+//eff__ = new Psychlops.Shader.GaborProgram();\r
+//rect__ = new System.Windows.Shapes.Rectangle();\r
+//rect__.Width = 200;\r
+//rect__.Height = 200;\r
+//rect__.Effect = eff__;\r
+//rect__.Fill = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.Blue);\r
                }\r
                protected void getFocusMouseEnter(object sender, System.Windows.Input.MouseEventArgs e) {\r
                        this.Focus();\r
+//if(!b) { LayoutRoot.Children.Add(rect__); b = true; }\r
                }\r
+//System.Windows.Shapes.Rectangle rect__;\r
+//Psychlops.Shader.GaborProgram eff__;\r
+//bool b = false;\r
 \r
                private void CompositionTarget_Rendering(object sender, System.EventArgs e)\r
                {\r
@@ -70,5 +77,8 @@ namespace PsychlopsSilverlight4test
                }\r
 \r
        }\r
+\r
+\r
+\r
 }\r
 \r