RGBA Bitmap ?

I do my rendered in Bitmap because I work with big rendered pictures (as 4096x4096).

So, I do that :

// ----------------------------------------
void* pBits;

BITMAPINFO bmpInfo = { { sizeof(BITMAPINFOHEADER), w, h, 1, 32 } };

hBmp = CreateDIBSection(NULL, & bmpInfo, DIB_RGB_COLORS, & pBits, NULL, NULL);

hdc = CreateCompatibleDC(GetDC(GetDesktopWindow()));

SelectObject(hdc, hBmp);

hrc = wglCreateContext(hdc);


I can read result pixels avec “pBits[x+y*W]”. I have RGB bits but not Alpha bits ! I need RGBA bits.

Note : I know glReadPixels (that return correct RGBA bits). I search a another way. I search a way where there is only one result (not in bitmap data + in “glReadPixels” data)

My question :
What is the best way to do a rendered of RGAB Bitmap ?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.