From 7fea0de319d5ee3c952496b0f9b0d3194c35745a Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Tue, 24 Jan 2012 12:38:04 +0100 Subject: [PATCH] fbo: fix documentation --- kivy/graphics/fbo.pyx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/kivy/graphics/fbo.pyx b/kivy/graphics/fbo.pyx index fa12742d2..48479a580 100644 --- a/kivy/graphics/fbo.pyx +++ b/kivy/graphics/fbo.pyx @@ -208,7 +208,7 @@ cdef class Fbo(RenderContext): self.fbo = FBO() self.fbo.bind() # do any drawing command - self.fbo.unbind() + self.fbo.release() # then, your fbo texture is available at print self.fbo.texture @@ -245,7 +245,15 @@ cdef class Fbo(RenderContext): self._viewport[2], self._viewport[3]) cpdef clear_buffer(self): - '''Clear the framebuffer with the :data:`clear_color` + '''Clear the framebuffer with the :data:`clear_color`. + + You need to bound the framebuffer yourself before calling this + method:: + + fbo.bind() + fbo.clear_buffer() + fbo.release() + ''' glClearColor(self._clear_color[0], self._clear_color[1], self._clear_color[2], self._clear_color[3])