Jump to content
  • entry
    1
  • comments
    8
  • views
    3,559

Frustration


Niosop

2,625 views

 Share

So I finally figure out how to write data to a texture (using a buffer as an intermediate step and writing a bunch of GL_POINTS to it). I decide to write a Theora video player that will play onto this texture which you can assign to a material which you can assign to a model. After a bit of searching I find etheora, a library that makes it easy to decode theora video data. Takes a little bit to get the theora libs all compiled and set the proper include and library directories. Ok, scaffolding is all in place, etheora integrated now I just need to compile and run....wait, what's this? My cube is blank. Seems the etheora doesn't like the headers of the .ogg file I'm feeding it. No biggy, I'll grab a reference video off the net. Hmm, it likes these headers but doesn't like the data...wtf? Oh...it hasn't been updated in ages and is expecting a much older version of libtheora...joy.

 

That's the point I'm at. So I can either fix up the etheora code to use the new API or I can write my own decoder based on the reference implementation. Etheora has some really nice features...I think I'll go that route, but I'm tired so maybe I'll get some sleep and make a fresh start tomorrow.

 Share

8 Comments


Recommended Comments

BindTexture() would just allow me to bypass assigning a material and just assign a shader? I didn't know about glTexImage2D(), that will help a lot, thanks!

Link to comment

Or should I just build my own GL_TEXTURE_2D, use glTexImage2D() to blit it to the surface and use GetColorBuffer to get a TTexture I can use. That would work OK as well I think.

Link to comment

Ok, decoding is working (I think, hard to say for sure w/o visualization), now I just need to convert from Y'CbCr (4:2:0) to RGB and start blitting away to see if I have anything...

Link to comment

As Niosop says: "What would I pass as the "target" argument? The TTexture?" I agree, what do we provide for BindTexture() as argument?

Link to comment

Yay, a breakthrough. After finding and discarding several libraries, and then starting to write my own implementation, I've found the best thing since sliced bread (as far as Ogg/Theora is concerned). libtheoraplayer! Look it up on SourceForge, makes everything SOOOO simple. Will release a video of it in action later once I have something worth releasing. Although w/ that library I'm sure some of you could release something much sooner.

Link to comment

Finally all working. Very happy with the implementation, posted video on the showcase forum. Thanks Josh for pointing me to BindTexture() and glTexImage2D(), made the whole process almost trivial.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...