Beispiel #1
0
        private void Form1_ResizeEnd(object sender, EventArgs e)
        {
            int tempMin = Math.Min(displayPB.Size.Width, displayPB.Size.Height);

            camera_Selected.Set_Resolution(new Size(tempMin, tempMin));

            RE.Initialize_Shaders(camera_Selected.fdBuffer);

            Render();
        }
Beispiel #2
0
        public Form1()
        {
            InitializeComponent();
            RE.Initialize();

            displayPB.BackgroundImage = new Bitmap(displayPB.Width, displayPB.Height);

            propPRLI.Value_Changed += PropPRLI_Value_Changed;


            //RE.World_Light_Intensity = 100;

            scenes = new List <Scene>();
            scenes.Add(new Scene("Main"));
            scene_Selected = scenes[0];

            int tempMin = Math.Min(displayPB.Size.Width, displayPB.Size.Height);

            scene_Selected.Cameras.Add(new Camera(new Vector3(0, 0, 5), new Vector3(0, 90, 0), new Size(tempMin, tempMin), 45, 45)); //new Size(displayPB.Size.Width * 2, displayPB.Size.Height * 2), 45, 45));
            camera_Selected = scene_Selected.Cameras[0];
            RE.Initialize_Shaders(camera_Selected.fdBuffer);
            camera_Selected.LookAt(new Vector3(0, 0, 0));

            light_Selected = new Light(new Size(4000, 4000), new Vector3(-10, 0, 0), new Vector3(0, 0, 0), 15, 70, true);
            scene_Selected.Lights.Add(light_Selected);
            light_Selected.LookAt(new Vector3(0, 0, 0));


            //light_Selected = new Light(new Size(2000, 2000), new Vector3(-10, 5, 5), new Vector3(0, 0, 0), 1, 80, true, 200);
            //scene_Selected.Lights.Add(light_Selected);
            //light_Selected.LookAt(new Vector3(0, 0, 0));


            //scene_Selected.Lights[1].LookAt(new Vector3(0, 0, 0));

            //camera_Selected.Render(scene_Selected);


            displayPB.MouseWheel += DisplayPB_MouseWheel;
        }