Example #1
0
 internal FrameBuffer(GraphicsContext graphics)
 {
     this.handle       = 0;
     this.state        = new FrameBufferState();
     this.state.status = true;
     PsmGraphicsContext.GetScreenInfo(graphics.handle, out this.state.width, out this.state.height, out this.state.colorFormat, out this.state.depthFormat, out this.state.multiSampleMode);
 }
Example #2
0
        private void DefaultConstruct()
        {
            int errorCode = PsmFrameBuffer.Create(out this.handle);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
            this.state = new FrameBufferState();
        }
Example #3
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;
        }
Example #4
0
 protected virtual void Dispose(bool disposing)
 {
     if (this.handle != 0)
     {
         if (disposing)
         {
             this.state = null;
         }
         PsmFrameBuffer.Delete(this.handle);
         this.handle = 0;
     }
 }