示例#1
0
        private void DefaultConstruct()
        {
            int errorCode = PsmFrameBuffer.Create(out this.handle);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
            this.state = new FrameBufferState();
        }
示例#2
0
        protected FrameBuffer(FrameBuffer buffer)
        {
            int errorCode = PsmFrameBuffer.AddRef(buffer.handle);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
            this.handle = buffer.handle;
            this.state  = buffer.state;
        }
示例#3
0
 protected virtual void Dispose(bool disposing)
 {
     if (this.handle != 0)
     {
         if (disposing)
         {
             this.state = null;
         }
         PsmFrameBuffer.Delete(this.handle);
         this.handle = 0;
     }
 }
示例#4
0
        public void SetDepthTarget(RenderTarget target)
        {
            int depthBuffer = (target.Buffer == null) ? 0 : target.Buffer.handle;
            int status;
            int errorCode = PsmFrameBuffer.SetDepthTarget(this.handle, depthBuffer, target.Level, target.CubeFace, out status);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
            this.state.depthTarget = target;
            this.state.status      = (status != 0);
            this.state.Update();
            GraphicsContext.NotifyUpdate(GraphicsUpdate.FrameBuffer);
        }