Skip to content
  • Alexander Larsson's avatar
    GtkGLArea: Major reworking · 5ea3a102
    Alexander Larsson authored
    This restructures the way buffers are allocated and bound in a way
    that is more flexible.
    
    Buffer operation happens in three phases:
    create_buffer() - Creates the gl objects
    allocate_buffers() - Allocates space for the buffers at a given size
    attach_buffers() - Attaches the buffers to the framebuffer and makes
                       the framebuffer the default drawing target
    And destroy via
    delete_buffers()
    
    We call all these the first draw, and after that we allocate buffers
    each time the widget changes size until the buffers are deleted.
    We delete the buffers at unrealize.
    
    However, anyone that wants to manually control buffer allocation strategies
    can manually call allocate/delete_buffers().
    
    There are also some other changes:
    * Support for stencil buffers.
    * A manual render mode where ::draw doesn't render unless you manually
      invalidated the previous rendering.
    5ea3a102