Multipassing

Hello there,

I want to render a scene twice, first with the OpenGL engine and after that, based on the resulting colors of the first pass, with my own shaders.

The first try was to just set a flag variable, that controls which shader is supposed to be used, but then my shaders does not use the pre-rendered vertex colors if the first pass.

The next approach was to render with openGL to a texture and then render this texture with my shader. I used the pbuffer for that, because it is the fastest technique and honestly, the thing with glCopyTexImage2D didn’t work. But with the pbuffer there are memory access problems, because I think it isn’t a real texture then, more something like an interface.

So does anyone understand the problem and maybe has an approach for me? Or does anyone know, how I can code the fixed openGL engine in my own shader?

Thx in advance

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.