i have this code and it works:
TextureImage = auxDIBImageLoad(“DATA/HARRY4.BMP”);
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 256, 256, GL_RGB, GL_UNSIGNED_BYTE, TextureImage->data);
but now i want to read the bitmap from my resource, with is linked to the exe.
HBITMAP asdasd = LoadBitmap(NULL,MAKEINTRESOURCE(IDB_BITMAP1));
void * was = &asdasd;
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 256, 256, GL_RGB, GL_UNSIGNED_BYTE, was);
but now my texture looks totally silli, like memory trash.
Does one of you know why, and how to solve this problem?
thanks in advance