Files
live-wallpaper/samples/test.lua
Diego Lopes 52dc6fc757 Add GStreamer support for video textures and update related files
- Introduced GStreamerTexture class for handling video frames.
- Updated texture loading methods to include FromGStreamer.
- Modified effect handling to support GStreamer textures.
- Updated launch configuration and added new sample scripts.
2026-03-20 21:54:43 -04:00

29 lines
592 B
Lua

effect = nil
video = nil
function _create()
video = Texture.FromGStreamer("filesrc location=/media/diego/Data/Projects/live-wallpaper/samples/video.mp4")
local fxSrc = [[in vec2 vPosition;
uniform sampler2D uTexture;
void main() {
vec2 uv = vPosition * 0.5 + 0.5;
uv.y = 1.0 - uv.y;
FragColor = texture(uTexture, uv);
}
]]
effect = Effect.new(fxSrc)
end
function _update(dt)
end
function _render()
gl.Clear(0, 0, 0, 1.0)
effect:Use()
effect:SetTexture("uTexture", video, 0)
effect:Render()
end