From 74c2ab07ec76f34c8ef530c5312366eb3bb23d11 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Thu, 8 Mar 2012 12:22:50 +0100 Subject: [PATCH] graphics/fbo: fix bad renaming. --- kivy/graphics/fbo.pxd | 4 ++-- kivy/graphics/fbo.pyx | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/kivy/graphics/fbo.pxd b/kivy/graphics/fbo.pxd index 4e27ca9f3..e043a1db4 100644 --- a/kivy/graphics/fbo.pxd +++ b/kivy/graphics/fbo.pxd @@ -8,8 +8,8 @@ cdef class Fbo(RenderContext): cdef int _depthbuffer_attached cdef int _push_viewport cdef float _clear_color[4] - cdef GLuint _buffer_id - cdef GLuint _depthbuffer_id + cdef GLuint buffer_id + cdef GLuint depthbuffer_id cdef GLint _viewport[4] cdef Texture _texture cdef int _is_bound diff --git a/kivy/graphics/fbo.pyx b/kivy/graphics/fbo.pyx index f7e28e087..4f3c30723 100644 --- a/kivy/graphics/fbo.pyx +++ b/kivy/graphics/fbo.pyx @@ -167,8 +167,8 @@ cdef class Fbo(RenderContext): print 'XXXD Delete fbo', self self._texture = None get_context().dealloc_fbo(self) - self._buffer_id = -1 - self._depthbuffer_id = -1 + self.buffer_id = -1 + self.depthbuffer_id = -1 cdef void create_fbo(self): cdef GLuint f_id = 0 @@ -182,19 +182,19 @@ cdef class Fbo(RenderContext): # create framebuffer glGenFramebuffers(1, &f_id) - self._buffer_id = f_id - glBindFramebuffer(GL_FRAMEBUFFER, self._buffer_id) + self.buffer_id = f_id + glBindFramebuffer(GL_FRAMEBUFFER, self.buffer_id) # if we need depth, create a renderbuffer if self._depthbuffer_attached: glGenRenderbuffers(1, &f_id) - self._depthbuffer_id = f_id - glBindRenderbuffer(GL_RENDERBUFFER, self._depthbuffer_id) + self.depthbuffer_id = f_id + glBindRenderbuffer(GL_RENDERBUFFER, self.depthbuffer_id) glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, self._width, self._height) glBindRenderbuffer(GL_RENDERBUFFER, 0) glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, - GL_RENDERBUFFER, self._depthbuffer_id) + GL_RENDERBUFFER, self.depthbuffer_id) # attach the framebuffer to our texture glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, @@ -240,8 +240,8 @@ cdef class Fbo(RenderContext): self._is_bound = 1 # stack our fbo to the last binded fbo - fbo_stack.append(self._buffer_id) - glBindFramebuffer(GL_FRAMEBUFFER, self._buffer_id) + fbo_stack.append(self.buffer_id) + glBindFramebuffer(GL_FRAMEBUFFER, self.buffer_id) # if asked, push the viewport if self._push_viewport: @@ -316,7 +316,7 @@ cdef class Fbo(RenderContext): def remove_reload_observer(self, callback): '''Remove a callback from the observer list, previously added by - :func:`add_reload_observer`. + :func:`add_reload_observer`. .. versionadded:: 1.1.2