[quake3-bugzilla] [Bug 5379] Interlaced Stereo Rendering

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Sun Jul 1 14:55:50 EDT 2012


https://bugzilla.icculus.org/show_bug.cgi?id=5379

--- Comment #7 from Bruno Ferreira <brferreira at myopera.com> 2012-07-01 14:55:48 EDT ---
(In reply to comment #6)
> Hi, I'd like to see this in ioquake3, but I have a few comments.
> 
> 1. If SDL_GL_SetAttribute(SDL_GL_STEREO, 1), SDL requires the graphics card to
> be quad buffered, and ioquake3 won't start if it isn't. Does the interlaced
> stereo stuff really need quad buffers? It always seems to draw to:
> +        qglDrawBuffer( GL_BACK );
> so currently, when you set r_stereoEnabled to 2, in sdl_glimp.c it will call
> SDL_GL_SetAttribute(SDL_GL_STEREO, 1);
> 
> If the graphics card doesnt need quad buffers for interlaced stereo rendering,
> you should change sdl_glimp.c so that this does only get called when
> r_stereoEnabled == 1
> 
> 2. You are using a RC_DRAW_BUFFER command to apply the stencil to the picture
> by hacking a check for GL_BACK_LEFT into RB_DrawBuffer. That's awful. You
> should add a new renderer command like RC_STENCIL and then add this via
> RE_BeginFrame in tr_cmds.c around line 428
> 
> 3. Does the stencil stuff for the interlaced rendering not also conflict with
> stencil shadows in the q3 engine?
> 
> 4. You're creating a new stencil in every frame. Wouldn't it suffice to write
> it once and then use it as often as you like?
> 
> 5. Please document the change to the cvar in the README file

The code copies what would be rendered every frame to the stencil buffer, then
every 2nd frame it renders the relevant content from that buffer to the screen.
As it copies the content after everything is rendered, it should not interfere
with stencil shadows (which should also be rendered in 3d), though I haven't
tested both features turned on. 

About the RC_STENCIL that should be created, yes, that is a good option; and I
might also add a couple other modes, changing the behavior of the cvar: adding
side-by-side rendering and top-and-bottom rendering. So when that is finished,
I'll add everything to the README.

-- 
Configure bugmail: https://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the quake3-bugzilla mailing list