Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        internal void Present()
        {
            lock (deviceContext) {
                if (requestScreenShotPath != null)
                {
                    var path = requestScreenShotPath;
                    requestScreenShotPath = null;

                    BackbufferColor.SaveToFile(path);
                }

                display.SwapBuffers(Game.Parameters.VSyncInterval);

                display.Update();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        internal void Present(int syncInterval)
        {
            syncInterval = MathUtil.Clamp(syncInterval, 0, 3);

            lock (deviceContext) {
                if (requestScreenShotPath != null)
                {
                    var path = requestScreenShotPath;
                    requestScreenShotPath = null;

                    BackbufferColor.SaveToFile(path);
                    //Log.Message("screenshot saved: {0}", path );
                }

                display.SwapBuffers(syncInterval);
            }
        }