GLchar** problem

torhu no at spam.invalid
Thu Oct 30 13:33:22 PDT 2008


Saaa wrote:
>>
>> Assuming the C code works, here's what you do in D.
>>
>> GLuint shader;
>> shader=glCreateShader(GL_FRAGMENT_SHADER);
>> char[] file=cast(char[])read(`program.frag`);
>> char* filep = toStringz(file);
>> glShaderSource(f, 1, &filep,null);
>>
> 
> erm.. ok, thanks :)
> Thought I tried this already.
> But, how is filep now an char** ? 

It's not filep that's a char**, it's &filep. You're taking the address 
of a pointer, so you end up with a pointer to a pointer.

If this code doesn't work, then something else is the matter.


More information about the Digitalmars-d-learn mailing list