I want to make a texture, but I want to load it from resource, using HBITMAP and BITMAP and not auxDIBImageLoad function. I did something like this, but it didn’t work:
HBITMAP hBmp = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BITMAP));
BITMAP bmp;
GetObject(hBmp, sizeof(bmp), &bmp);
There is a BITMAPINFO structure at the start of the data. If the bitmap has a color lookup table then it follows, and then the pixel data follows that. You pass the pixel data to the glTexImage function.