public override Image CopyToNewMemBitmap()
 {
     unsafe
     {
         //test only!
         //copy from gl to MemBitmap
         var outputBuffer = new PixelFarm.CpuBlit.MemBitmap(_w, _h);
         _glRenderSurface.CopySurface(0, 0, _w, _h, outputBuffer);
         return(outputBuffer);
     }
 }
Пример #2
0
        public void TestSaveCurrentFrameBuffer()
        {
            //attach spefic frame to the _pcx and make current before copy pixel

            //------------
            unsafe
            {
                //test only!
                //copy from gl to MemBitmap
                using (PixelFarm.CpuBlit.MemBitmap outputBuffer = new PixelFarm.CpuBlit.MemBitmap(_surface1.Width, _surface1.Height))
                {
                    _surface1.CopySurface(0, 0, _surface1.Width, _surface1.Height, outputBuffer);
                    //then save ....
                    //need to swap image buffer from opengl surface
                    outputBuffer.SaveImage("d:\\WImageTest\\outputfrom_framebuffer.png");
                }
            }
        }