GLchar** problem

Saaa empty at
Thu Oct 30 12:44:06 PDT 2008

glshaderSource needs a GLchar** and all I get from cast(char[]) 
read(filename) is a single *

How do I get this extra pointer ? :D

The C code is:

char *file;
shader = glCreateShader(GL_FRAGMENT_SHADER);
file = textFileRead("program.frag");
const char * filep = file;
glShaderSource(f, 1, &filep,NULL);

my D attempt:

char[] file;
GLuint shader;
glShaderSource(f, 1, cast(char **) toStringz(file),null);
//let gc collect file

Error: Access Violation :)

More information about the Digitalmars-d-learn mailing list