private void DestroyFramebuffer() { AssertNotDisposed(); AssertValidContext(); __renderbuffergraphicsContext.MakeCurrent(null); var ctx = ((IGraphicsContextInternal)__renderbuffergraphicsContext).Implementation as iPhoneOSGraphicsContext; // FIXME: MonoTouch needs to allow null arguments to // RenderBufferStorage, but it doesn't right now. // So we call it manually. //ctx.EAGLContext.RenderBufferStorage((uint)All.Renderbuffer, null); var selector = new Selector("renderbufferStorage:fromDrawable:"); Messaging.bool_objc_msgSend_UInt32_IntPtr( ctx.EAGLContext.Handle, selector.Handle, (uint)All.Renderbuffer, IntPtr.Zero); _glapi.DeleteFramebuffers(1, ref _framebuffer); _framebuffer = 0; _glapi.DeleteRenderbuffers(1, ref _colorbuffer); _colorbuffer = 0; _glapi.DeleteRenderbuffers(1, ref _depthbuffer); _depthbuffer = 0; }
private void DestroyFramebuffer() { AssertNotDisposed(); AssertValidContext(); __renderbuffergraphicsContext.MakeCurrent(null); _glapi.DeleteFramebuffers(1, ref _framebuffer); _framebuffer = 0; _glapi.DeleteRenderbuffers(1, ref _colorbuffer); _colorbuffer = 0; _glapi.DeleteRenderbuffers(1, ref _depthbuffer); _depthbuffer = 0; }