running render outside render_frame

I’d like to process some render commands outside of the normal render pipeline (it should be called in some “world_update” method). Reason is that I’m performing some GPU computations using fragment shader and copy to vertex buffer functionality I’m working on.

However, I’m not sure if it is possible and how simple/difficult it is to run this commands outside normal pipeline.

Any help?

Not sure what you mean. You mean as in an offscreen buffer?

That is possible. Look for the new FilterManager class in panda 1.5.0 which makes filter managing a lot easier. Otherwise, if you want to do it manually, check out some of the samples like the Shadow example, or the Glow example (the Advanced one, not the one that uses automatic shaders).

Well, yes. I am doing render to offscreen buffer and then copy this render buffer to vertex buffer.

I have a task that does some game logic updates (say, velocity or whatever). The thing is that the render to vertex buffer, I’ve mentioned earlier, is actually a game logic update (it computes objects positions on the GPU using fragment shaders). So it should be called in the game logic update task (which, I assume, can tick slower/faster than rendering) and not in standard render-pipeline.

Is it more clear now?
Any advice?

Panda’s not really set up to make this easy. Panda’s design is to maximize parallelism between the CPU and the GPU: you set up a series of offscreen buffers and the scene graphs that should fill them, and then let Panda tell the GPU to go off and do that. While that’s working, the CPU can start working on the next frame.

It’s difficult to interrupt this process for a back-and-forth communication between the CPU and the GPU in the middle of the frame. In order to do this, you’ll have to write some C++ code and integrate it with the GraphicsEngine class.

David

Fine, I just wanted to be sure that it’s not already done. I’m not affraid to add/change functionality in panda. And I will try to do this.

Thanks for answers.