Skip to content

Instantly share code, notes, and snippets.

@SimonDanisch
Created June 19, 2014 18:22
Show Gist options
  • Save SimonDanisch/d355288b802883e78ea9 to your computer and use it in GitHub Desktop.
Save SimonDanisch/d355288b802883e78ea9 to your computer and use it in GitHub Desktop.
mesh =
[
:indexes => GLBuffer{GLuint}(convert(Ptr{GLuint}, pointer(indices)), sizeof(indices), 1, GL_ELEMENT_ARRAY_BUFFER, GL_STATIC_DRAW),
:vertex => GLBuffer{Float32}(convert(Ptr{Float32}, pointer(xyz)), sizeof(xyz), 3,GL_ARRAY_BUFFER, GL_STATIC_DRAW),
:normal => GLBuffer{Float32}(convert(Ptr{Float32}, pointer(normals)), sizeof(normals), 3,GL_ARRAY_BUFFER, GL_STATIC_DRAW),
:tangent => GLBuffer{Float32}(convert(Ptr{Float32}, pointer(tangents)), sizeof(tangents), 3,GL_ARRAY_BUFFER, GL_STATIC_DRAW),
:binormal => GLBuffer{Float32}(convert(Ptr{Float32}, pointer(binormals)), sizeof(binormals), 3,GL_ARRAY_BUFFER, GL_STATIC_DRAW),
:view => cam.view,
:projection => cam.projection,
:viewposition => cam.eyeposition,
:light_position => Float32[1,1,0],
:SurfaceColor => Float32[0.9, 0.2, 0.1, 1.0],
:P => Float32[0.2, 0.9],
:A => Float32[0.8, 0.8],
:Scale => Float32[0.5, 0.5, 0.5],
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment