Hi!
I have the following code
lenx etc are GLints.
I get an error when compiling "invalid conversion Glubyte* to char*
How can I solve this?
Thanks!
I have the following code
Code:
/* open file */
fstream file (filename, ios::in | ios::binary);
if (!file)
{
PRINT_ERROR("Cannot open file (%s)\n",filename);
}
file.seekg (0, ios::beg);
/* read dimensions */
file.read(&hi,1);
file.read(&lo,1);
lenx = hi*256+lo;
file.read(&hi,1);
file.read(&lo,1);
leny = hi*256+lo;
file.read(&hi,1);
file.read(&lo,1);
lenz = hi*256+lo;
pixels = new GLubyte [lenx * leny * lenz];
if (pixels==NULL)
{
PRINT_ERROR("Read_data() : Out of memory (%s)\n",filename);
}
/*read data*/
file.read(pixels,lenx * leny * lenz);
lenx etc are GLints.
I get an error when compiling "invalid conversion Glubyte* to char*
How can I solve this?
Thanks!