private void DefaultConstruct() { int errorCode = PsmFrameBuffer.Create(out this.handle); if (errorCode != 0) { Error.ThrowNativeException(errorCode); } this.state = new FrameBufferState(); }
protected FrameBuffer(FrameBuffer buffer) { int errorCode = PsmFrameBuffer.AddRef(buffer.handle); if (errorCode != 0) { Error.ThrowNativeException(errorCode); } this.handle = buffer.handle; this.state = buffer.state; }
protected virtual void Dispose(bool disposing) { if (this.handle != 0) { if (disposing) { this.state = null; } PsmFrameBuffer.Delete(this.handle); this.handle = 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); }