Commit 78efcb29 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Fix the fourcc of OpenGL on Mac Intel. We should check why it's set wrong on PPC.

* Revert the Quartz disabling.
parent e97a64ef
...@@ -83,13 +83,14 @@ vlc_module_begin(); ...@@ -83,13 +83,14 @@ vlc_module_begin();
set_subcategory( SUBCAT_INTERFACE_GENERAL ); set_subcategory( SUBCAT_INTERFACE_GENERAL );
add_bool( "macosx-embedded", 1, NULL, EMBEDDED_TEXT, EMBEDDED_LONGTEXT, add_bool( "macosx-embedded", 1, NULL, EMBEDDED_TEXT, EMBEDDED_LONGTEXT,
VLC_FALSE ); VLC_FALSE );
#if defined( __ppc__ ) || defined (__ppc64__)
add_submodule(); add_submodule();
set_description( _("Quartz video") ); set_description( _("Quartz video") );
set_capability( "video output", 100 ); set_capability( "video output", 100 );
set_category( CAT_VIDEO); set_category( CAT_VIDEO);
set_subcategory( SUBCAT_VIDEO_VOUT ); set_subcategory( SUBCAT_VIDEO_VOUT );
set_callbacks( E_(OpenVideoQT), E_(CloseVideoQT) ); set_callbacks( E_(OpenVideoQT), E_(CloseVideoQT) );
add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT, add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT,
VLC_FALSE ); VLC_FALSE );
add_bool( "macosx-stretch", 0, NULL, STRETCH_TEXT, STRETCH_LONGTEXT, add_bool( "macosx-stretch", 0, NULL, STRETCH_TEXT, STRETCH_LONGTEXT,
...@@ -100,7 +101,6 @@ vlc_module_begin(); ...@@ -100,7 +101,6 @@ vlc_module_begin();
VLC_TRUE ); VLC_TRUE );
add_bool( "macosx-background", 0, NULL, BACKGROUND_TEXT, BACKGROUND_LONGTEXT, add_bool( "macosx-background", 0, NULL, BACKGROUND_TEXT, BACKGROUND_LONGTEXT,
VLC_FALSE ); VLC_FALSE );
#endif
add_submodule(); add_submodule();
set_description( "Mac OS X OpenGL" ); set_description( "Mac OS X OpenGL" );
set_capability( "opengl provider", 100 ); set_capability( "opengl provider", 100 );
......
...@@ -268,10 +268,15 @@ static int Init( vout_thread_t *p_vout ) ...@@ -268,10 +268,15 @@ static int Init( vout_thread_t *p_vout )
p_sys->p_vout->pf_init( p_sys->p_vout ); p_sys->p_vout->pf_init( p_sys->p_vout );
#if defined( __APPLE__ ) || (VLCGL_FORMAT == YCBCR_MESA) /* TODO: We use YCbCr on Mac which is Y422, but on OSX it seems to == YUY2. Verify */
#if defined( __ppc__ ) || defined( __ppc64__ ) || (VLCGL_FORMAT == YCBCR_MESA)
p_vout->output.i_chroma = VLC_FOURCC('Y','U','Y','2'); p_vout->output.i_chroma = VLC_FOURCC('Y','U','Y','2');
i_pixel_pitch = 2; i_pixel_pitch = 2;
#elif (VLCGL_FORMAT == GL_YCBCR_422_APPLE)
p_vout->output.i_chroma = VLC_FOURCC('Y','4','2','2');
i_pixel_pitch = 2;
#elif VLCGL_FORMAT == GL_RGB #elif VLCGL_FORMAT == GL_RGB
# if VLCGL_TYPE == GL_UNSIGNED_BYTE # if VLCGL_TYPE == GL_UNSIGNED_BYTE
p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4'); p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4');
...@@ -737,13 +742,13 @@ static int InitTextures( vout_thread_t *p_vout ) ...@@ -737,13 +742,13 @@ static int InitTextures( vout_thread_t *p_vout )
for( i_index = 0; i_index < 2; i_index++ ) for( i_index = 0; i_index < 2; i_index++ )
{ {
glBindTexture( VLCGL_TARGET, p_sys->p_textures[i_index] ); glBindTexture( VLCGL_TARGET, p_sys->p_textures[i_index] );
/* Set the texture parameters */ /* Set the texture parameters */
glTexParameterf( VLCGL_TARGET, GL_TEXTURE_PRIORITY, 1.0 ); glTexParameterf( VLCGL_TARGET, GL_TEXTURE_PRIORITY, 1.0 );
glTexParameteri( VLCGL_TARGET, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); glTexParameteri( VLCGL_TARGET, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
glTexParameteri( VLCGL_TARGET, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); glTexParameteri( VLCGL_TARGET, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
glTexParameteri( VLCGL_TARGET, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); glTexParameteri( VLCGL_TARGET, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glTexParameteri( VLCGL_TARGET, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); glTexParameteri( VLCGL_TARGET, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
...@@ -754,7 +759,7 @@ static int InitTextures( vout_thread_t *p_vout ) ...@@ -754,7 +759,7 @@ static int InitTextures( vout_thread_t *p_vout )
our buffer */ our buffer */
glEnable( GL_UNPACK_CLIENT_STORAGE_APPLE ); glEnable( GL_UNPACK_CLIENT_STORAGE_APPLE );
glPixelStorei( GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE ); glPixelStorei( GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE );
#if 0 #if 0
/* Use VRAM texturing */ /* Use VRAM texturing */
glTexParameteri( VLCGL_TARGET, GL_TEXTURE_STORAGE_HINT_APPLE, glTexParameteri( VLCGL_TARGET, GL_TEXTURE_STORAGE_HINT_APPLE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment