Framebuffer into texture in stereo?

New Message Reply Date view Thread view Subject view Author view

From: Seppo Äyräväine (Seppo.Ayravainen++at++hut.fi)
Date: 03/05/2002 07:32:54


Hi,

I need to display a stereo view of scene B, mapped as a texture into a
simple rectangular geometry in scene A. For that, I've created two (one
per eye) extra channels per pipe to render the scene B image into the
backbuffers. In short, I do this (on one pipe/window case for
simplicity):

1. Clear extra left channel
2. Draw extra left channel
3. Subload the texture from framebuffer
4. Clear normal left channel
5. Draw normal left channel (with loaded texture applied)
6. Clear extra right channel
7. Draw extra right channel
8. Subload the texture from framebuffer (here it goes wrong)
9. Clear normal right channel
10. Draw normal right channel (with loaded texture applied)
11. Swap buffers

Now the left eye's texture is correctly loaded, but the right eye's
texture comes from the left backbuffer, instead of the right one.

How can I tell Performer to read the texture from the right eye's
backbuffer, or should setting glDrawBuffer(GL_BACK_RIGHT) do the trick
(which it doesn't seem to)?

Or am I totally lost here and this approach will never work in stereo?

I'm running this on an Onyx2/Performer 2.4/VR Juggler 1.0.5, and have
made new application and draw manager classes (based on vjPf...) to
Juggler to handle the extra channels and draw callbacks.

I first tried to use pbuffers, but never got them to work (in either O2
or Onyx2/IR) - except in the demo that rendered something into a file
offscreen (got nothing but BadMatch's discussed here earlier) :(

Thanks in advance for any help,
Seppo Äyräväinen

--
 Seppo Äyräväinen <Seppo.Ayravainen++at++hut.fi>
 Researcher, Helsinki University of Technology
 TML laboratory / Virtual Reality team (http://eve.hut.fi/)


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Mar 05 2002 - 07:29:23 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.