fbo: fix documentation

This commit is contained in:
Mathieu Virbel 2012-01-24 12:38:04 +01:00
parent 29d45d2913
commit 7fea0de319
1 changed files with 10 additions and 2 deletions

View File

@ -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])