Hello, I’m attempting to construct a MPEG class for my engine, which
uses SDL and OpenGL. I’ve been looking off of this example so far:

When I call my loading function, it causes a windows error when I run
my exe, which says ‘GeoTest.exe has encountered a problem and needs to

Here is my current loading function:

void GMovie::Open(string filename)
mMpeg = SMPEG_new(filename.c_str(), NULL,
0); //Open the MPEG

SMPEG_setdisplay(mMpeg, mSurface.mTexData, NULL, 

NULL); //Set the display surface
1); //Enable video playback

  • mMpeg is of type SMPEG*
  • mSurface is GTexture, and the mTexData member is SDL_Surface* (empty
    because I’ve not assigned anything to it)

If I can get this working… I’m not sure how I’d go about playing it.
Any suggestions?
– Tazar

The glmovie example in the SMPEG source archive shows how you can
use SMPEG with OpenGL. I believe there may be some bugs with it,
but it should get you started.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment