Skip to content

Instantly share code, notes, and snippets.

@triplefox
Created January 17, 2015 06:51
Show Gist options
  • Save triplefox/59a54a1697ebca769cbf to your computer and use it in GitHub Desktop.
Save triplefox/59a54a1697ebca769cbf to your computer and use it in GitHub Desktop.
type
GLFloatBufferPart{.unchecked.} = array[0..0, GLfloat]
GLFloatBuffer* = ref tuple
data : ptr GLFloatBufferPart
samples : int
bytes : int
# i want to expand this to all the GL numeric types through a generic:
type
BufferPart[T]{.unchecked.} = array[0..0, T]
Buffer[T]* = ref tuple
data : ptr BufferPart[T]
samples : int
bytes : int
# Compiler gives this error: implementation of "BufferPart" expected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment