string to char array?
anonymous via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Jun 5 12:41:02 PDT 2015
On Friday, 5 June 2015 at 19:30:58 UTC, Kyoji Klyden wrote:
> Okay, so it's primarily an interfacing with C problem that
> started all this? (My brain is just completely scrambled at
> this point xP )
Yeah, you wanted to call glShaderSource, which is a C function
and as such it's not aware of D slices. So things get more
complicated than they would be in D alone.
> So pretty much the slice gives you the pointer to the start of
> the array in memory and also how many elements are in the array.
Yes.
> Then depending on the array type it'll jump that many bytes for
> each element. (So 5 indexes in an int array, would start at
> address 0xblahblah00 , then go to 0xblahblah04, until it
> reaches 0xblahblah16(?) or something like that)
Yes.
> If I FINALLY have it right, then that makes alot of sense
> actually.
Sweet.
More information about the Digitalmars-d-learn
mailing list