예제 #1
0
        public override void DebugReadbackImage(out int w, out int h, out NativeArray <byte> pixels)
        {
            var env    = World.TinyEnvironment();
            var config = env.GetConfigData <DisplayInfo>();

            pixels = new NativeArray <byte>(config.framebufferWidth * config.framebufferHeight * 4, Allocator.Persistent);
            unsafe
            {
                GLFWNativeCalls.debugReadback(config.framebufferWidth, config.framebufferHeight, pixels.GetUnsafePtr());
            }
            w = config.framebufferWidth;
            h = config.framebufferHeight;
        }