fbo: allow the user to call bind/release

This commit is contained in:
Mathieu Virbel 2011-01-13 11:25:45 +01:00
parent 97ea6f4d49
commit 1ad67a3c4f
2 changed files with 4 additions and 4 deletions

View File

@ -15,9 +15,9 @@ cdef class Fbo(RenderContext):
cdef int _is_bound
cpdef clear_buffer(self)
cpdef bind(self)
cpdef release(self)
cdef bind(self)
cdef release(self)
cdef create_fbo(self)
cdef delete_fbo(self)
cdef apply(self)

View File

@ -180,7 +180,7 @@ cdef class Fbo(RenderContext):
projection_mat.view_clip(0.0, self._width, 0.0, self._height, -1.0, 1.0, 0)
self.set_state('projection_mat', projection_mat)
cdef bind(self):
cpdef bind(self):
if self._is_bound:
raise FboException('FBO is already binded.')
else:
@ -195,7 +195,7 @@ cdef class Fbo(RenderContext):
glGetIntegerv(GL_VIEWPORT, <GLint *>&self._viewport)
glViewport(0, 0, self._width, self._height)
cdef release(self):
cpdef release(self):
if self._is_bound == 0:
raise FboException('Cannot release a FBO not binded.')
else: