Jump to content

  • Log In with Google      Sign In   
  • Create Account

OpenGL & AVI/MPEG playback problem


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 emmicart   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 November 2001 - 08:46 PM

Greetings, In my current OpenGL application, I need to be able to play an AVI/MPEG file at any time (basic 2D rendering of the video, no need for any 3D video-texture). My problem is that when I do play the AVI file, I''m loosing some of my textures (both in software rendering and with my GeForce 2 MX OpenGL driver). I''ve tried to play the video in a separate process too, the results are the same. I''m using DirectShow to render the video file in a separate window, displayed just over the OpenGL rendering window. This seems to conflict with the OpenGL drivers. But when I launch the AVI from the Mediaplayer while my OpenGL app is running, I don''t loose any texture. Do you know how I could solve this problem ? Thanks, Emmanuel.

Sponsor:

#2 xeos   Members   -  Reputation: 122

Like
Likes
Like

Posted 19 November 2001 - 12:44 AM

I don''t know if you''ve found this, but there''s a recent NeHe tutorial dealing with video. I haven''t gone throught it yet (I''ve got far more important things at the moment to do ), but it should help you out. I think it uses Video For Windows instead of DirectShow.

You can find it at http://nehe.gamedev.net/tutorials/lesson36.asp

I seem to remember somebody saying that it''s generally a bad idea to use OpenGL and a MS rendering API together...

Simon Wilson,
XEOS Digital Development

#3 emmicart   Members   -  Reputation: 122

Like
Likes
Like

Posted 19 November 2001 - 12:55 AM

Greetings,

Sure, I took a look at this excellent tutorial, but it mainly
explains how to render a video to a texture. In my case, I
want to render the video + sound streams in my window.

After some more experiments, it appears that even if I launch
the Mediaplayer application while my app is running, I also
loose textures (either in software & hardware mode) !!!

I''ve found a workaround to my problem: after the video has finished to play, I recreate the OpenGL rendering context.
But this involves reloading all the textures, which can be
a pain and is really not elegant ... But it works.

If someone has a better way to do it, please let me know.

Thanks,
Emmanuel.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS