GLchar** problem

Bill Baxter wbaxter at gmail.com
Thu Oct 30 13:34:04 PDT 2008


On Fri, Oct 31, 2008 at 5:20 AM, Saaa <empty at needmail.com> 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 isn't filep is still char*.  But &filep is a pointer to filep,
which is a (char*)*.
You realize that if you have TypeX x, then  typeof(&x) is TypeX*, right?

--bb


More information about the Digitalmars-d-learn mailing list