Starglider 4
2010-01-30 21:18:50 UTC
Hi,
I integrated some old code into my engine to load and display
3ds models. The auxDIBImageload function was depricated,
so I injected LoadBitmapFile() to replace it, leaving
everything else intact. Here's the code:
AUX_RGBImageRec *TextureImage[1];
// Set the pointer to NULL
memset(TextureImage,0,sizeof(void *)*1);
// Load the bitmap and assign our pointer to it
// TextureImage[0] = auxDIBImageLoad(name);
BITMAPINFOHEADER *bih;
unsigned char* image;
image=LoadBitmapFile(name,bih);
TextureImage[0]->sizeX=bih->biWidth;
TextureImage[0]->sizeY=bih->biHeight;
int s=bih->biSizeImage;
memcpy_s(TextureImage[0]+sizeof(GLint)*2,s,image,s);
I'm not sure what to do with the dest. buffer size (s).
Please help me out.
//M
I integrated some old code into my engine to load and display
3ds models. The auxDIBImageload function was depricated,
so I injected LoadBitmapFile() to replace it, leaving
everything else intact. Here's the code:
AUX_RGBImageRec *TextureImage[1];
// Set the pointer to NULL
memset(TextureImage,0,sizeof(void *)*1);
// Load the bitmap and assign our pointer to it
// TextureImage[0] = auxDIBImageLoad(name);
BITMAPINFOHEADER *bih;
unsigned char* image;
image=LoadBitmapFile(name,bih);
TextureImage[0]->sizeX=bih->biWidth;
TextureImage[0]->sizeY=bih->biHeight;
int s=bih->biSizeImage;
memcpy_s(TextureImage[0]+sizeof(GLint)*2,s,image,s);
I'm not sure what to do with the dest. buffer size (s).
Please help me out.
//M