src/nagu/vbo

Types

BindedVBO[I; T] = ref VBOObj[true, I, T]
VBO[I; T] = ref VBOObj[false, I, T]
VBOTarget = enum
  vtArrayBuffer = 34962, vtElementArrayBuffer = 34963,
  vtPixelPackBuffer = 35051, vtPixelUnpackBuffer = 35052,
  vtUniformBuffer = 35345, vtTextureBuffer = 35882,
  vtTransformFeedbackBuffer = 35982, vtCopyReadBuffer = 36662,
  vtCopyWriteBuffer = 36663, vtDrawIndirectBuffer = 36671,
  vtShaderStorageBuffer = 37074, vtDispatchIndirectBuffer = 37102,
  vtQueryBuffer = 37266, vtAtomicCounterBuffer = 37568
VBOUsage = enum
  vuStreamDraw = 35040, vuStreamRead = 35041, vuStreamCopy = 35042,
  vuStaticDraw = 35044, vuStaticRead = 35045, vuStaticCopy = 35046,
  vuDynamicDraw = 35048, vuDynamicRead = 35049, vuDynamicCopy = 35050

Procs

proc `bind`[I: static int; T](vbo: var VBO[I, T]): BindedVBO[I, T]
proc data=[I: static int; T](vbo: var BindedVBO[I, T]; data: array[I, T])
func data[I: static int; T](vbo: VBO[I, T] | BindedVBO[I, T]): array[I, T]
func id[B: static bool; I: static int; T](vbo: VBOObj[B, I, T]): uint
proc init[I: static int; T](_: typedesc[VBO[I, T]]): VBO[I, T]
proc target=[I: static int; T](vbo: var BindedVBO[I, T]; target: VBOTarget)
func target[B: static bool; I: static int; T](vbo: VBOObj[B, I, T]): VBOTarget
func toBindedVBO[I: static int; T](vbo: VBO[I, T]): BindedVBO[I, T]
func toVBO[I: static int; T](vbo: BindedVBO[I, T]): VBO[I, T]
proc unbind[I: static int; T](vbo: var BindedVBO[I, T]): VBO[I, T]
proc usage=[I: static int; T](vbo: var BindedVBO[I, T]; usage: VBOUsage)
func usage[B: static bool; I: static int; T](vbo: VBOObj[B, I, T]): VBOUsage
proc use[I: static int; T](vbo: var VBO[I, T];
                           procedure: proc (vbo: var BindedVBO[I, T]))