Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
7bc4719a
Commit
7bc4719a
authored
Feb 09, 2004
by
Eric Petit
Browse files
macosx/* : macosx-opengl-effect now accept cube and transparent-cube
parent
88366257
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/gui/macosx/macosx.m
View file @
7bc4719a
...
...
@@ -2,7 +2,7 @@
* macosx.m: MacOS X module for vlc
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: macosx.m,v 1.2
0
2004/02/09 1
3:28:31
titer Exp $
* $Id: macosx.m,v 1.2
1
2004/02/09 1
7:42:12
titer Exp $
*
* Authors: Colin Delacroix
<colin
@
zoy.org
>
* Eugenio Jarosiewicz
<ej0
@
cise.ufl.edu
>
...
...
@@ -61,10 +61,12 @@ void E_(CloseVideo) ( vlc_object_t * );
#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") );
...
...
modules/gui/macosx/vout.m
View file @
7bc4719a
...
...
@@ -2,7 +2,7 @@
* vout.m: MacOS X video output module
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: vout.m,v 1.
79
2004/02/09 1
4:02:25
titer Exp $
* $Id: vout.m,v 1.
80
2004/02/09 1
7:42:12
titer Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
...
...
@@ -1305,7 +1305,7 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
[[
self
openGLContext
]
update
];
/* Black bac
j
ground */
/* Black bac
k
ground */
glClearColor
(
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
);
/* Check if the user asked for useless visual effects */
...
...
@@ -1317,16 +1317,33 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
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
{
...
...
@@ -1535,7 +1552,7 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment