Ejemplo n.º 1
0
        void testButtonClicked(object sender, EventArgs e)
        {
            DateTime startTime = DateTime.Now;
            DateTime currentTime = DateTime.Now;

            float frameCount = 0f;

            while (true)
            {
                _modelMatrix = Matrix4.Mult (_modelMatrix,
                                Matrix4.CreateRotationY (.05f));

                _view.Display ();
                frameCount++;
                currentTime = DateTime.Now;

                if (currentTime.Subtract (startTime).TotalSeconds > 10)
                    break;
            }

            float framesPerSecond = frameCount / ((float)currentTime.Subtract (startTime).TotalSeconds);

            _fpLabel.Text = "fps = " + framesPerSecond;

            GLCubeResult cubeResult = new GLCubeResult (_triangles/3, framesPerSecond);
            ResultData.Results.GLCubeResults.Add (cubeResult);

            postResults (cubeResult);
        }
Ejemplo n.º 2
0
 public void Insert(int index, GLCubeResult result)
 {
     _results.Insert (index, result);
 }
Ejemplo n.º 3
0
        void postResults(GLCubeResult cubeResult)
        {
            PerformanceTestingDataService service = new PerformanceTestingDataService ();
            PerformanceCubeResult result = new PerformanceCubeResult ()
            {
                DeviceDatabaseId = DeviceInfo.CurrentDevice.DatabaseId,
                DeviceDatabaseIdSpecified = true,
                NumberOfTriangles = cubeResult.NumberOfTriangles,
                NumberOfTrianglesSpecified = true,
                FramesPerSecond = cubeResult.FramesPerSecond,
                FramesPerSecondSpecified = true,
                IsMonoTouch = true,
                IsMonoTouchSpecified = true
            };

            service.AddPerformanceCubeResultAsync (result);
        }
Ejemplo n.º 4
0
 public void Add(GLCubeResult result)
 {
     _results.Add (result);
 }