예제 #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);
        }
예제 #2
0
파일: Program.cs 프로젝트: shbfeng/CRender
        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();
        }
예제 #3
0
파일: Program.cs 프로젝트: rscrsc/CRender
        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();
        }