LPBITMAPINFOHEADER lpbi;
// Grab Data From The AVI Stream
lpbi=(LPBITMAPINFOHEADER)AVIStreamGetFrame(GetFramePointer, FrameToGrab);
// Pointer To Data Returned By AVIStreamGetFrame
pTexture=(char *)lpbi+lpbi->biSize+lpbi->biClrUsed * sizeof(RGBQUAD);
// Convert Data To Requested Bitmap Format
DrawDibDraw (hdd, hdc, 0, 0, 1024, 512, lpbi, pTexture, 0, 0, oWidth, oHeight, 0);
// Swap The Red And Blue Bytes (GL Compatability)
flipIt(pTextureResized);
// Update The Texture
glTexSubImage2D (GL_TEXTURE_2D, 0, 0, 0, 1024, 512, GL_RGB, GL_UNSIGNED_BYTE, pTextureResized);
But i want a specific color (of the grabbed frame) to be transparent e.g. the red color RGB(255,0,0).
How do i do that?
[edited by - Xces on April 16, 2002 8:42:07 AM]
Lesson36 :: A color as Alpha in HBITMAP?
Heya,
If you are familiar with lesson36 then you know that it grabs frames from an avi file using the following code:
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement