[MPlayer-dev-eng] patch for stereoscopic support

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Jun 16 10:05:25 CEST 2005


Hi,
On Thu, Jun 16, 2005 at 02:20:37AM -0300, Gabriel Winckler wrote:
> (This kind of thing is use for ONLY two reasons: amusement parks and
> engineers with lots of free time. We fit the second class, i think.)

Don't forget the engineers with lots of free time working in amusement
parks *gg*

> !!! ABOUT THE PATCH
> 
> This is a improved patch, much more clean (I hope), that extend the gl2,
> adding a "stereo" option. The resize and fullscreen works fine, just
> like the osd (magic!). It should work on windows, but I can't test.

A clean patch in my view is as small as possible, doesn't change
things like indentation and especially doesn't duplicate code.
I also have a strong dislike against using tabs unless the old code
already does at that place :-).
This patch need some optimization here IMHO, I will have a closer look at it
soon.

> If someone is interested, I can send samples of this videos, but you
> have to have a Nvidia Quadro or a ATI graphic card.

Probably won't work for me, so you would have to test. I guess that
would be no real problem though *g*

> +			glDrawBuffer(GL_BACK_LEFT);
> +			glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

You shouldn't clear it here but instead directly after doing the
flipping, for performance reasons.

> +	  if (quadbuffer_stereo)
> +		  vo_draw_text(image_width/2.0,image_height,draw_alpha_fnc);

Why using 2.0 (float) instead of just 2?

> +		if (!strcmp(arg,"stereo"))
> +		{
> +#ifdef GL_WIN32
> +			mp_msg(MSGT_VO, MSGL_INFO, "[gl2] Quad Buffer Stereo only tested on Linux.\n");
> +#endif 
> +			quadbuffer_stereo = 1;
> +		}
> +		else
> +		{
> +			mp_msg(MSGT_VO, MSGL_FATAL, "[gl2] Unknown subdevice: %s\n",arg);
> +			return ENOSYS;
> +		}

I guess this should use the new suboption parser.

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list