Derelict2 openGL3 issues

David d at dav1d.de
Sat Apr 21 04:01:36 PDT 2012


Am 21.04.2012 01:16, schrieb Stephen Jones:
>      glBufferData(GL_ARRAY_BUFFER, v.length * GL_FLOAT.sizeof, &v, GL_STATIC_DRAW);

Error spotted!

This has to be:

glBufferData(GL_ARRAY_BUFFER, v.length * float.sizeof, v.ptr, 
GL_STATIC_DRAW);

float.sizeof is just cosmetic, the important thing is v.ptr, &v returns 
a pointer to a D array not the raw data in memory.


More information about the Digitalmars-d-learn mailing list