Jump to content
  • Advertisement
Sign in to follow this  

OpenGL OpenGL and Xvid/theora/anything??

This topic is 3121 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All, I hope this is the right forum... I'm currently learning game development using the DarkPlaces engine. What I'm working on is nothing special. In fact, it's just an experiment for me really. At the moment, I'm struggling with playing video in the game itself. For example, a developer logo at the start of the game. I've looked around and found various examples, but most of them were using Win32 lib's, which of course aren't cross-compatible. I understand that as I am only experimenting here, that even getting video to play in windows would be enough, however with DarkPlaces being cross platform, I'd like to keep it that way. Is there anyone here that can push me in the right direction, or offer any examples etc? I have already downloaded the xvid source, and libtheora. In fact, I also downloaded the "liboggplayer" that I found on this site. I'm just at a loss as to how to implement it. Thanks in advance for any help. Regards, Dave

Share this post

Link to post
Share on other sites
Hi V-Man,

Thankyou for replying :)

Okay, i'm looking in the darkplaces engine at the moment, and there is already a command for play video. At the moment this is used to play a .dpv file (DarkPlacesVideo), which is basically a string of tga's with no audio.

Anyways, looking into this, I found "cl_video_start"

static void cl_video_start( void )
int i;
clvideo_t *video;

cl_videotexturepool = R_AllocTexturePool();

for( video = cl_videos, i = 0 ; i < cl_num_videos ; i++, video++ )
if( video->state != CLVIDEO_UNUSED && !video->suspended )
LinkVideoTexture( video );

I followed the "LinkVideoTexture" call, and found this:

static void LinkVideoTexture( clvideo_t *video ) {
video->cpif.tex = R_LoadTexture2D( cl_videotexturepool, video->cpif.name,
video->cpif.width, video->cpif.height, NULL, TEXTYPE_BGRA, TEXF_PERSISTENT | TEXF_ALLOWUPDATES, NULL );
R_MakeTextureDynamic( video->cpif.tex, VideoUpdateCallback, video );
CL_LinkDynTexture( video->cpif.name, video->cpif.tex );

Is this basically doing the same? Obviously, I don't want to go creating a new GL texture if this already does it.



Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!