On Wednesday, 17 June 2015 at 13:31:21 UTC, Marc Schütz wrote:
On Wednesday, 17 June 2015 at 13:04:28 UTC, ParticlePeter wrote:
I use wrapper functions taking void[] arrays to forward them comfortably to mentioned OpenGL functions. This works with static and dynamic build in arrays, but I don't see a way how I could access (cast) the raw data of a std.container.array to forward it to these wrapper functions. std.array(Range)(Range r) does a copy which I would like to avoid. Any advice ?

Would this work?

(&arr.front)[0 .. arr.length]

Unfortunately not:
Error: Vector!(float, 3) delegate() pure nothrow @property ref @safe cannot be sliced with []

Fyi, its an std.container.array!( gl3n.Vector!(float, 3) ) array.

Reply via email to