Example #1
0
 def _update(self):
     
     # Enable now
     gl.glBindRenderbuffer(gl.GL_RENDERBUFFER, self._handle)
     
     # Get data
     shape, format =  self._shape, self._format
     if shape is None or format is None:
         return
     # Check size
     MAX = gl.glGetIntegerv(gl.GL_MAX_RENDERBUFFER_SIZE)
     if shape[0] > MAX or shape[1] > MAX:
         raise FrameBufferError('Cannot create a render buffer of %ix%i (max is %i).' % (shape[1], shape[0], MAX))
     # Set 
     gl.glRenderbufferStorage(gl.GL_RENDERBUFFER, format, shape[1], shape[0])
Example #2
0
 def _deactivate(self):
     gl.glBindRenderbuffer(gl.GL_RENDERBUFFER, 0)
Example #3
0
 def _deactivate(self):
     gl.glBindRenderbuffer(gl.GL_RENDERBUFFER, 0)
Example #4
0
 def _activate(self):
     gl.glBindRenderbuffer(gl.GL_RENDERBUFFER, self._handle)
Example #5
0
 def _activate(self):
     gl.glBindRenderbuffer(gl.GL_RENDERBUFFER, self._handle)