* macosx.m: MacOS X module for vlc
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
- * $Id: macosx.m,v 1.20 2004/02/09 13:28:31 titer Exp $
+ * $Id: macosx.m,v 1.21 2004/02/09 17:42:12 titer Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
#define OPENGL_EFFECT_TEXT N_("OpenGL effect")
#define OPENGL_EFFECT_LONGTEXT N_("Use 'None' to display the video " \
"without any fantasy, 'Cube' to let the video play on " \
- "transparent faces of a rotating cube")
+ "the faces of a rotating cube, 'Transparent cube' do make this " \
+ "cube transparent" )
-static char * effect_list[] = { "none", "cube" };
-static char * effect_list_text[] = { N_("None"), N_("Cube") };
+static char * effect_list[] = { "none", "cube", "transparent-cube" };
+static char * effect_list_text[] = { N_("None"), N_("Cube"),
+ N_("Transparent cube") };
vlc_module_begin();
set_description( _("MacOS X interface, sound and video") );
* vout.m: MacOS X video output module
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
- * $Id: vout.m,v 1.79 2004/02/09 14:02:25 titer Exp $
+ * $Id: vout.m,v 1.80 2004/02/09 17:42:12 titer Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
[[self openGLContext] update];
- /* Black bacjground */
+ /* Black background */
glClearColor( 0.0, 0.0, 0.0, 0.0 );
/* Check if the user asked for useless visual effects */
else if( !strcmp( psz_effect, "cube" ) )
{
i_effect = OPENGL_EFFECT_CUBE;
+
+ glEnable( GL_DEPTH_TEST );
+ glPolygonMode( GL_FRONT, GL_FILL );
+ glPolygonMode( GL_BACK, GL_POINT );
+
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glFrustum( -1.0, 1.0, -1.0, 1.0, 3.0, 20.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glTranslatef( 0.0, 0.0, - 5.0 );
- glBlendFunc( GL_SRC_ALPHA, GL_ONE );
+ }
+ else if( !strcmp( psz_effect, "transparent-cube" ) )
+ {
+ i_effect = OPENGL_EFFECT_CUBE;
+
glEnable( GL_BLEND );
glEnable( GL_POLYGON_SMOOTH );
glDisable( GL_DEPTH_TEST );
+
+ glMatrixMode( GL_PROJECTION );
+ glLoadIdentity();
+ glFrustum( -1.0, 1.0, -1.0, 1.0, 3.0, 20.0 );
+ glMatrixMode( GL_MODELVIEW );
+ glLoadIdentity();
+ glTranslatef( 0.0, 0.0, - 5.0 );
+ glBlendFunc( GL_SRC_ALPHA, GL_ONE );
}
else
{
glBindTexture( GL_TEXTURE_RECTANGLE_EXT, i_texture );
if( i_effect == OPENGL_EFFECT_CUBE )
{
- glRotatef( 1.0, 0.5, 0.5, 1.0 );
+ glRotatef( 1.0, 0.3, 0.5, 0.7 );
[self drawCube];
}
else