Sha256: 5d4deed8484bed006f4d8835a240d41c2960543fc3ca6dd869168d555a9834e6

Contents?: true

Size: 798 Bytes

Versions: 2

Compression:

Stored size: 798 Bytes

Contents

module GL
  def self.CreateBuffer
    @_b ||= ' '*8
    ::GL.GenBuffers(1, @_b)
    @_b.unpack('L')[0]
  end

  def self.CreateTexture
    @_b ||= ' '*8
    ::GL.GenTextures(1, @_b)
    @_b.unpack('L')[0]
  end

  def self.CreateVertexArray
    @_b ||= ' '*8
    ::GL.GenVertexArrays(1, @_b)
    @_b.unpack('L')[0]
  end

  def self.CreateFramebuffer
    @_b ||= ' '*8
    ::GL.GenFramebuffers(1, @_b)
    @_b.unpack('L')[0]
  end

  def self.CreateRenderbuffer
    @_b ||= ' '*8
    ::GL.GenRenderbuffers(1, @_b)
    @_b.unpack('L')[0]
  end

  def self.BufferData_easy(target, data, usage)
    ptr = array_to_ptr_easy(data)
    ::GL.BufferData(target, ptr.size, ptr, usage)
  end

  def self.GetParameter(pname)
    @_b ||= ' '*8
    ::GL.GetIntegerv(pname, @_b)
    @_b.unpack('L')[0]
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mittsu-opengl-0.5.1 lib/mittsu/opengl/gl_extensions.rb
mittsu-opengl-0.5.0 lib/mittsu/opengl/gl_extensions.rb