The following code works fine as a proc, but not as a template:
    
    
    proc BufferData*[T](target:BufferTarget, data:openarray[T], 
usage:BufferDataUsage)  =
        
glBufferData(target.GLenum,data.len*T.sizeof().GLsizeiptr,data.unsafeAddr,usage.GLenum)
    
    

Any obvious reason changing proc to template might go wrong there? It compiles 
fine, but doesn't run properly.

Reply via email to