auxDIBImageLoad only for files on hdd?

Post: #1

i want to load a file into memory (to modify it) and then i want to use the command auxDIBImageLoad. but something goes wrong.
a error message comes up: "Failed to open DIB file BM6". (without copying into memory, everything works fine).

Here is the part of the code:

glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

ifstream file;,ios_base::binary);

// to get the file size
file.seekg(0, ios_base::end);
ifstream::streamoff size = file.tellg();
file.seekg(0, ios_base::beg);

char *dat=(char*)malloc(size*sizeof(char));

int ganze=size/1024;
for (int i=0;i<ganze;i++)*1024,1024);

if (size-ganze*1024>0)*1024,size-ganze*1024);


_AUX_RGBImageRec *Image;
// this doesnt work:
Image = auxDIBImageLoadA ( (const char*) dat );

Thanks for help.

Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
This is a Macintosh programming forum. As such, you're unlikely to find an answer here. (It also has nothing to do with OpenGL or 3D).

I suggest the or Flipcode forums as better places to ask your question Wink
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenAL - Ogg files vs Caf files Fred9000 8 14,767 Aug 23, 2011 08:01 PM
Last Post: ipeku