Esempio n. 1
0
        void CompositionTarget_Rendering(object sender, object e)
        {
            scene.isphong = isphong == true?true:false;
            scene.isblinn = isblinn == true ? true : false;
            scene.camera  = new Vector3(camera[0, 0], camera[1, 0], camera[2, 0]);
            DateTime now = DateTime.Now;
            double   FPS = 1000 / (now - previousTime).TotalMilliseconds;

            previousTime = now;
            fps.Content  = ((int)FPS).ToString() + "FPS";
            scene.Clear(255, 255, 255, 255);

            object3D[0].Rotation = new Vector3(object3D[0].Rotation[0], object3D[0].Rotation[1] + 0.001, object3D[0].Rotation[2]);


            scene.Render(camera, object3D);
            scene.Present();
        }