+ if( p_sys->p_vout->pf_unlock )
+ {
+ p_sys->p_vout->pf_unlock( p_sys->p_vout );
+ }
+}
+
+/*****************************************************************************
+ * DisplayVideo: displays previously rendered output
+ *****************************************************************************/
+static void DisplayVideo( vout_thread_t *p_vout, picture_t *p_pic )
+{
+ vout_sys_t *p_sys = p_vout->p_sys;
+ float f_width, f_height;
+
+ if( p_sys->p_vout->pf_lock &&
+ p_sys->p_vout->pf_lock( p_sys->p_vout ) )
+ {
+ msg_Warn( p_vout, "could not lock OpenGL provider" );
+ return;
+ }
+
+ /* glTexCoord works differently with GL_TEXTURE_2D and
+ GL_TEXTURE_RECTANGLE_EXT */
+#ifdef SYS_DARWIN
+ f_width = (float)p_vout->output.i_width;
+ f_height = (float)p_vout->output.i_height;
+#else
+ f_width = (float)p_vout->output.i_width / p_sys->i_tex_width;
+ f_height = (float)p_vout->output.i_height / p_sys->i_tex_height;
+#endif
+
+ /* Why drawing here and not in Render()? Because this way, the
+ OpenGL providers can call pf_display to force redraw. Currently,
+ the OS X provider uses it to get a smooth window resizing */
+
+ glClear( GL_COLOR_BUFFER_BIT );
+