{
int x, y;
vlc_value_t val;
+
+ Lock( p_vout );
NSRect bounds = [self bounds];
[[self openGLContext] makeCurrentContext];
y = bounds.size.width * VOUT_ASPECT_FACTOR / p_vout->render.i_aspect;
}
- Lock( p_vout );
glViewport( ( bounds.size.width - x ) / 2,
( bounds.size.height - y ) / 2, x, y );
- Unlock( p_vout );
if( p_vout->p_sys->b_got_frame )
{
/* Ask the opengl module to redraw */
vout_thread_t * p_parent;
p_parent = (vout_thread_t *) p_vout->p_parent;
+ Unlock( p_vout );
if( p_parent && p_parent->pf_display )
{
p_parent->pf_display( p_parent, NULL );
}
else
{
- Lock( p_vout );
glClear( GL_COLOR_BUFFER_BIT );
Unlock( p_vout );
}
+ [super reshape];
+}
+
+- (void) update
+{
+ Lock( p_vout );
+ [super update];
+ Unlock( p_vout );
}
- (void) drawRect: (NSRect) rect
{
- [[self openGLContext] makeCurrentContext];
Lock( p_vout );
+ [[self openGLContext] makeCurrentContext];
glFlush();
+ [super drawRect:rect];
Unlock( p_vout );
}
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
OpenGL providers can call pf_display to force redraw. Currently,
the OS X provider uses it to get a smooth window resizing */
- 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;
- }
-
glClear( GL_COLOR_BUFFER_BIT );
if( p_sys->i_effect == OPENGL_EFFECT_NONE )