class Roglew::FramebufferARB
Attributes
handle[R]
id[R]
Public Class Methods
finalize(handle, id)
click to toggle source
# File lib/roglew/extensions/GL_ARB_framebuffer_object/framebuffer.rb, line 13 def self.finalize(handle, id) proc do #puts "releasing framebuffer #{id}" handle.bind { |context| context.delete_framebuffers(id) } end end
new(handle)
click to toggle source
# File lib/roglew/extensions/GL_ARB_framebuffer_object/framebuffer.rb, line 7 def initialize(handle) @handle = handle @id = handle.bind { |context| context.gen_framebuffers } ObjectSpace.define_finalizer(self, self.class.finalize(@handle, @id)) end
Public Instance Methods
bind(target, deferred = nil, &block)
click to toggle source
target: one of GL::DRAW_FRAMEBUFFER, GL::READ_FRAMEBUFFER or GL::FRAMEBUFFER
# File lib/roglew/extensions/GL_ARB_framebuffer_object/framebuffer.rb, line 21 def bind(target, deferred = nil, &block) create_binding(deferred, target, &block) end