CSPspEmu.Core.Gpu.Impl.Opengl.Modules.RenderbufferManager.GetDrawBufferTextureAndLock C# (CSharp) Method

GetDrawBufferTextureAndLock() public method

public GetDrawBufferTextureAndLock ( DrawBufferKey Key, Action Action ) : void
Key DrawBufferKey
Action Action
return void
        public void GetDrawBufferTextureAndLock(DrawBufferKey Key, Action<DrawBufferValue> Action)
        {
            var RenderBuffer = GetDrawBufferTexture(Key);
            if (RenderBuffer != null)
            {
                RenderBuffer.Lock();
                try
                {
                    Action(RenderBuffer);
                }
                finally
                {
                    RenderBuffer.Unlock();
                }
            }
            else
            {
                Action(null);
            }
        }