Ejemplo n.º 1
0
        public static void TestSaveImageToDesktop()
        {
            string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

            path += "\\test.ppm";
            PipelineTest.EstablishTestScene <Camera_Orthographic>(out var pipeline, out var charBuffer, out var camera);
            PipelineTest.DrawOneFrame(pipeline,
                                      new RenderEntity[] { new RenderEntity(new Transform(), Model.Plane(1f), Material.NewMaterial(ShaderDefault.Instance)) },
                                      camera, charBuffer);
            pipeline.RenderTarget.SaveAsPPM(path);
        }
Ejemplo n.º 2
0
        private static unsafe void Main(string[] args)
        {
            WindowHeight = 50;
            CRenderSettings.IsCountFrames = true;
            CRenderSettings.IsShowFPS     = true;
            WriteLine("Press any key to run test");
            ReadKey();

            //PipelineTest.TestRenderTriangle();
            PipelineTest.TestDrawLine();
            //PipelineTest.TestRenderFrames();

            ReadKey();
        }
Ejemplo n.º 3
0
        private static void Main(string[] args)
        {
            WriteLine("Press any key to run test");
            ReadKey();
            CursorVisible = false;
            CRenderSettings.SetFontSize(10);
            CRenderSettings.IsCountFrames = true;
            CRenderSettings.IsShowFPS     = true;

            //PPMTest.TestSaveImageToDesktop();
            PipelineTest.TestRenderFaces();
            //PipelineTest.TestRenderCube();
            //PipelineTest.TestRenderTriangle();
            //PipelineTest.TestDrawLine();
            //PipelineTest.TestRenderFrames();
            //RasterizerTest.TestRasterize();

            ReadKey();
        }