I’d like to use DV-resolution video files as textures:
- Video needs to be decoded into raw RGB pixels;
- The texture needs to be updated every frame;
- Fast!
Given the current speed of loading textures from
static image files (e.g. JPGs, PNGs) into JOGL isn’t
that fast: ~0.8s ± 0.2s for a 512x384 PNG into
and bound to a GL_TEXTURE_2D, using JDK5 and
Pentium-M 1.3GHz.
I’m wondering if a native approach might be better
given the performance requirements, so it’d be
something like (on Win32):
MPEG2/WMV files -> [Native] DirectShow -> [Native] Raw pixels -> [Native] glTexSubImage2D() -> [JOGL] Do rendering
So the question I have is, can I update a texture
in C++ that’s been created in JOGL? Thanks!
I know some of you will suggest JMF, but the
truth is that Sun is not developing JMF anymore,
after v2.1.1, and it doesn’t handle MPEG2, QT MP4
and WMV files, so JMF is not an option for me.
.rex