Hi, first post here!
Been reading png files in SDL and using them as textures...
Now, would like to include in my game 2 short videos made in Blender, in dvi and mp4 formats.
Went over NeHe lesson 35 but when I try to read the dvi file, it gives null pointer for lpbi, see below.
Is it possible to include video files in OpenGL and how, please? ;-)))
void GrabAVIFrame(int frame) // Grabs A Frame From The Stream
{
LPBITMAPINFOHEADER lpbi; // Holds The Bitmap Header Information
lpbi = (LPBITMAPINFOHEADER)AVIStreamGetFrame(pgf, frame); // Grab Data From The AVI Stream
pdata=(char *)lpbi+lpbi->biSize+lpbi->biClrUsed * sizeof(RGBQUAD); // Pointer To Data Returned By AVIStreamGetFrame
// Convert Data To Requested Bitmap Format
DrawDibDraw (hdd, hdc, 0, 0, 256, 256, lpbi, pdata, 0, 0, width, height, 0);
flipIt(data); // Swap The Red And Blue Bytes (GL Compatability)
// Update The Texture
glTexSubImage2D (GL_TEXTURE_2D, 0, 0, 0, 256, 256, GL_RGB, GL_UNSIGNED_BYTE, data);
}