FFGL access texture data

Just let it all out, buddy. You're among friends here.
Logarith
Posts: 7
Joined: Mon Jan 12, 2009 16:30

FFGL access texture data

Post by Logarith »

Hi,

is there a possibility to temporarily save the frame texture data for several Frames.
I tried to save it in a variable in the fragmentshader but that didn't work.
Is there a possibility inside the processOpenGL method to access the data directly?

Greetings
Flo

edwin
Team Resolume
Posts: 1207
Joined: Thu Oct 07, 2004 10:40

Re: FFGL access texture data

Post by edwin »

Hi Flo,
You can do such a thing in a fragment shader and neither does FFGL give have access to the original texture data. You can however create multiple textures yourself and copy the content of the framebuffer in it if you like.
So render a quad with the texture and then copy it to a texture using glCopyTexSubImage2D.

Logarith
Posts: 7
Joined: Mon Jan 12, 2009 16:30

Re: FFGL access texture data

Post by Logarith »

Thx Edwin,

it worked with glCopyTexSubImage, after several hours experiencing a lack of opengl knowledge :-)

Greetings

Flo

edwin
Team Resolume
Posts: 1207
Joined: Thu Oct 07, 2004 10:40

Re: FFGL access texture data

Post by edwin »

Cool, what kind of plugin are you building?

Logarith
Posts: 7
Joined: Mon Jan 12, 2009 16:30

Re: FFGL access texture data

Post by Logarith »

A fried of mine wanted a "stop motion" plugin which he told me was available in
Resolume 2 but not in 3.
Simply it holds the same frame for a specific time. The other frames are
cut out.
Dont know if I did the same thing as he wanted, sended it to him and I'll wait
for his answer if I did it correct.

edwin
Team Resolume
Posts: 1207
Joined: Thu Oct 07, 2004 10:40

Re: FFGL access texture data

Post by edwin »

Ahh.. i wanted to add that plugin mylelf as well. But so much todo, so little time.
Did you create other plugins as well, it's allways nice to see other people working on FreeFrame plugins.

Logarith
Posts: 7
Joined: Mon Jan 12, 2009 16:30

Re: FFGL access texture data

Post by Logarith »

No, this was my first plugin. But I have some cg courses in university so this is an interesting practice for me and I surely will develop others.
My friend liked the plugin very much, but he discovered an error which I dont know how to solve.
The problem is that if you use the effect, bypass it, change the clip and then check the bypass out for a short time frames of the old clip are shown. He said this was sometimes in Resolume 2 but he didnt see it til now in Resolume 3. To solve the problem, it would be necessary to know in the ProcessOpenGL method if either the clip has changed or if bypass has been pressed. Another possibilty would be the setTime method. But as I heard it isnt supported by Resolume at this time.


Greets flo
Last edited by Logarith on Tue Jan 20, 2009 22:29, edited 1 time in total.

edwin
Team Resolume
Posts: 1207
Joined: Thu Oct 07, 2004 10:40

Re: FFGL access texture data

Post by edwin »

The problem you mention will only occur when you use the effect on a layer or the composition. When applied to a single clip this won't be a problem. We've encountered similar problems.
The time feature hasn't been implemented by us yet, we will add this in a later stage. Right now you can check if processOpengl ( if plugin is bypassed the processOpenGL function isn't called) is called and keep track of the time yourself, if the time between callls to processOpenGl is called is bigger then a certain period you can take action. That would be a solution, there is no way at the moment to tell the plugin now that it's bypassed.

Rene
Posts: 388
Joined: Wed Jun 20, 2007 11:53
Location: Vienna, Austria

Re: FFGL access texture data

Post by Rene »

Hello,

do you think it makes sense to store texture data in a pixel buffer object (PBO) to increase performance? I'm not sure, but I guess usually texture data stored in a buffer is written back to the host's RAM, isn't it?

At startup Resolume checks for some OpenGL functions, does it check/require ARB_pixel_buffer_object extension to run?

edwin
Team Resolume
Posts: 1207
Joined: Thu Oct 07, 2004 10:40

Re: FFGL access texture data

Post by edwin »

We do check for the ARB_pixel_buffer_object extension but it's not a reason not to run.
A pixel buffer resides in VRAM, the pixel_buffer allows you to handle VRAM much like you would use normal RAM.
You can also just use glCopyTexImage to copy contents of the current framebuffer to a texture and use it whenever you need it again.
But tell me what you want to accomplish and maybe i can give you a direction in which to look.

Post Reply