Gif or video

Started by leopaule103, August 25, 2021, 16:32:45

Previous topic - Next topic

leopaule103

Hello, I would like to know how to play a video or a gif with lwjgl ?

kappa

Having look at the java bindings for either GStreamer or VLC might be a good starting place but you'll have to figure out how to hook them up to LWJGL (potential example).

Lightbuffer

Quote from: leopaule103 on August 25, 2021, 16:32:45
Hello, I would like to know how to play a video or a gif with lwjgl ?
I'm not sure about how to play video, but gifs can be played using by loading all frames from a GIF for example by either using this decoder or I think I saw there is a way to read GIFs using stb bindings. After all frames are loaded to separate textures (or frames are stored in memory and you update the data of the GL texture), you just bind them depending on animation time. It's probably not the best solution at all, but at least it works.