class Roglew::BufferContext

Public Class Methods

new(buffer, deferred, target, &block) click to toggle source
Calls superclass method
# File lib/roglew/extensions/GL_VERSION_1_5/buffer_context.rb, line 11
def initialize(buffer, deferred, target, &block)
  @target = target
  super(buffer, deferred, &block)
end

Public Instance Methods

data(usage, buffer = nil, type = nil) click to toggle source
# File lib/roglew/extensions/GL_VERSION_1_5/buffer_context.rb, line 16
def data(usage, buffer = nil, type = nil)
  buffer_data(@target, usage, buffer, type)
end
sub_data(offset, type, buffer) click to toggle source
# File lib/roglew/extensions/GL_VERSION_1_5/buffer_context.rb, line 20
def sub_data(offset, type, buffer)
  buffer_sub_data(@target, offset, type, buffer)
end

Private Instance Methods

bind() click to toggle source
# File lib/roglew/extensions/GL_VERSION_1_5/buffer_context.rb, line 25
def bind
  glBindBuffer(@target, buffer.id)
end
unbind() click to toggle source
# File lib/roglew/extensions/GL_VERSION_1_5/buffer_context.rb, line 29
def unbind
  glBindBuffer(@target, 0)
end