Actually is not my implementation, I meant I integrated the code in my own Ogre project, so I really don't know how it was implemented. I read almost the entire design document you mentioned, but I can't tell the differences, that's why I was asking.crefvik wrote:Hi RigoCL,
I didn't look at your patch, but from the post it looks like you support anaglyph stereo. The first version I'm posting supports quad buffer, so I could try to work with you in order to incorporate anaglyph.
...
How did you implement stereo in your patch? Is it similar? I certainly appreciate any feedback - especially if you have stereo knowledge
...
All I can tell from the code I mentioned is that it supports several modes:
Code: Select all
/// Anaglyph red/cyan
SM_ANAGLYPH_RC,
/// Anaglyph yellow/blue
SM_ANAGLYPH_YB,
/// Dual output off-axis mode : suitable for two projectors with polarized filters or head mounted display
SM_DUALOUTPUT,
/// Verticaly interlaced mode
SM_INTERLACED_V,
/// Horizontaly interlaced mode
SM_INTERLACED_H,
/// Interlaced mode with a checkerboard pattern
SM_INTERLACED_CB,
Code: Select all
/*** Stereo : Global variables and defines */
Ogre::StereoManager *gStereoManager = NULL;
Ogre::Viewport *gLeftViewport = NULL;
Ogre::Viewport *gRightViewport = NULL;
Ogre::SceneManager *gSceneMgr;
#define SCREEN_DIST 10.0f
#define EYES_SPACING 0.06f
void createScene(void)
{
mStereoManager.init(gLeftViewport, gRightViewport, "stereo.cfg");
mStereoManager.createDebugPlane(mSceneMgr);
mStereoManager.enableDebugPlane(false);
...
}
The code inside the createScene() method was almost all the work I had to do to make this stereo version work.
So far now I've only been able to test Anaglyph mode, though I'm still not satisfied with the results, but I'm assuming I have to find the right values for "eye spacing" and "focal length".