Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
251eae00
Commit
251eae00
authored
Jun 24, 2005
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* More greenline prevention (opengl sucks ! :D )
parent
11493d77
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
38 deletions
+34
-38
modules/video_output/opengl.c
modules/video_output/opengl.c
+34
-38
No files found.
modules/video_output/opengl.c
View file @
251eae00
...
...
@@ -69,10 +69,6 @@
#define VLCGL_TYPE VLCGL_RGB_TYPE
#endif
#ifndef GL_CLAMP_TO_EDGE
# define GL_CLAMP_TO_EDGE 0x812F
#endif
/* OpenGL effects */
#define OPENGL_EFFECT_NONE 1
#define OPENGL_EFFECT_CUBE 2
...
...
@@ -96,6 +92,10 @@ static int InitTextures( vout_thread_t * );
static
int
SendEvents
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define SPEED_TEXT N_( "OpenGL cube rotation speed" )
/*****************************************************************************
* Module descriptor
*****************************************************************************/
...
...
@@ -589,10 +589,10 @@ static void DisplayVideo( vout_thread_t *p_vout, picture_t *p_pic )
{
glEnable
(
VLCGL_TARGET
);
glBegin
(
GL_POLYGON
);
glTexCoord2f
(
0
.
0
,
0
.
0
);
glVertex2f
(
-
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
,
0
.
0
);
glVertex2f
(
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
,
f_height
);
glVertex2f
(
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
0
.
0
,
f_height
);
glVertex2f
(
-
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
0
.
5
,
0
.
5
);
glVertex2f
(
-
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
-
0
.
5
,
0
.
5
);
glVertex2f
(
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
-
0
.
5
,
f_height
-
0
.
5
);
glVertex2f
(
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
0
.
5
,
f_height
-
0
.
5
);
glVertex2f
(
-
1
.
0
,
-
1
.
0
);
glEnd
();
}
else
...
...
@@ -603,40 +603,36 @@ static void DisplayVideo( vout_thread_t *p_vout, picture_t *p_pic )
glBegin
(
GL_QUADS
);
/* Front */
glTexCoord2f
(
0
,
0
);
glVertex3f
(
-
1
.
0
,
1
.
0
,
1
.
0
);
glTexCoord2f
(
0
,
f_height
);
glVertex3f
(
-
1
.
0
,
-
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
,
f_height
);
glVertex3f
(
1
.
0
,
-
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
,
0
);
glVertex3f
(
1
.
0
,
1
.
0
,
1
.
0
);
glTexCoord2f
(
0
.
5
,
0
.
5
);
glVertex3f
(
-
1
.
0
,
1
.
0
,
1
.
0
);
glTexCoord2f
(
0
.
5
,
f_height
-
0
.
5
);
glVertex3f
(
-
1
.
0
,
-
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
-
0
.
5
,
f_height
-
0
.
5
);
glVertex3f
(
1
.
0
,
-
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
-
0
.
5
,
0
.
5
);
glVertex3f
(
1
.
0
,
1
.
0
,
1
.
0
);
/* Left */
glTexCoord2f
(
0
,
0
);
glVertex3f
(
-
1
.
0
,
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
0
,
f_height
);
glVertex3f
(
-
1
.
0
,
-
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
f_width
,
f_height
);
glVertex3f
(
-
1
.
0
,
-
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
,
0
);
glVertex3f
(
-
1
.
0
,
1
.
0
,
1
.
0
);
glTexCoord2f
(
0
.
5
,
0
.
5
);
glVertex3f
(
-
1
.
0
,
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
0
.
5
,
f_height
-
0
.
5
);
glVertex3f
(
-
1
.
0
,
-
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
f_width
-
0
.
5
,
f_height
-
0
.
5
);
glVertex3f
(
-
1
.
0
,
-
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
-
0
.
5
,
0
.
5
);
glVertex3f
(
-
1
.
0
,
1
.
0
,
1
.
0
);
/* Back */
glTexCoord2f
(
0
,
0
);
glVertex3f
(
1
.
0
,
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
0
,
f_height
);
glVertex3f
(
1
.
0
,
-
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
f_width
,
f_height
);
glVertex3f
(
-
1
.
0
,
-
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
f_width
,
0
);
glVertex3f
(
-
1
.
0
,
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
0
.
5
,
0
.
5
);
glVertex3f
(
1
.
0
,
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
0
.
5
,
f_height
-
0
.
5
);
glVertex3f
(
1
.
0
,
-
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
f_width
-
0
.
5
,
f_height
-
0
.
5
);
glVertex3f
(
-
1
.
0
,
-
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
f_width
-
0
.
5
,
0
.
5
);
glVertex3f
(
-
1
.
0
,
1
.
0
,
-
1
.
0
);
/* Right */
glTexCoord2f
(
0
,
0
);
glVertex3f
(
1
.
0
,
1
.
0
,
1
.
0
);
glTexCoord2f
(
0
,
f_height
);
glVertex3f
(
1
.
0
,
-
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
,
f_height
);
glVertex3f
(
1
.
0
,
-
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
f_width
,
0
);
glVertex3f
(
1
.
0
,
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
0
.
5
,
0
.
5
);
glVertex3f
(
1
.
0
,
1
.
0
,
1
.
0
);
glTexCoord2f
(
0
.
5
,
f_height
-
0
.
5
);
glVertex3f
(
1
.
0
,
-
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
-
0
.
5
,
f_height
-
0
.
5
);
glVertex3f
(
1
.
0
,
-
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
f_width
-
0
.
5
,
0
.
5
);
glVertex3f
(
1
.
0
,
1
.
0
,
-
1
.
0
);
/* Top */
glTexCoord2f
(
0
,
0
);
glVertex3f
(
-
1
.
0
,
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
0
,
f_height
);
glVertex3f
(
-
1
.
0
,
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
,
f_height
);
glVertex3f
(
1
.
0
,
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
,
0
);
glVertex3f
(
1
.
0
,
1
.
0
,
-
1
.
0
);
/* Bottom */
glTexCoord2f
(
0
,
0
);
glVertex3f
(
-
1
.
0
,
-
1
.
0
,
1
.
0
);
glTexCoord2f
(
0
,
f_height
);
glVertex3f
(
-
1
.
0
,
-
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
f_width
,
f_height
);
glVertex3f
(
1
.
0
,
-
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
f_width
,
0
);
glVertex3f
(
1
.
0
,
-
1
.
0
,
1
.
0
);
glTexCoord2f
(
0
.
5
,
0
.
5
);
glVertex3f
(
-
1
.
0
,
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
0
.
5
,
f_height
-
0
.
5
);
glVertex3f
(
-
1
.
0
,
1
.
0
,
1
.
0
);
glTexCoord2f
(
f_width
-
0
.
5
,
f_height
-
0
.
5
);
glVertex3f
(
1
.
0
,
1
.
0
,
1
.
0
);
glTexCoord2f
(
0
.
5
,
f_height
-
0
.
5
);
glVertex3f
(
-
1
.
0
,
-
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
f_width
-
0
.
5
,
f_height
-
0
.
5
);
glVertex3f
(
1
.
0
,
-
1
.
0
,
-
1
.
0
);
glTexCoord2f
(
f_width
-
0
.
5
,
0
.
5
);
glVertex3f
(
1
.
0
,
-
1
.
0
,
1
.
0
);
glEnd
();
}
...
...
@@ -696,12 +692,12 @@ static int InitTextures( vout_thread_t *p_vout )
/* Set the texture parameters */
glTexParameterf
(
VLCGL_TARGET
,
GL_TEXTURE_PRIORITY
,
1
.
0
);
glTexParameteri
(
VLCGL_TARGET
,
GL_TEXTURE_MAG_FILTER
,
GL_LINEAR
);
glTexParameteri
(
VLCGL_TARGET
,
GL_TEXTURE_MIN_FILTER
,
GL_LINEAR
);
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_MAG_FILTER
,
GL_LINEAR
);
glTexParameteri
(
VLCGL_TARGET
,
GL_TEXTURE_MIN_FILTER
,
GL_LINEAR
);
glTexEnvf
(
GL_TEXTURE_ENV
,
GL_TEXTURE_ENV_MODE
,
GL_MODULATE
);
#ifdef SYS_DARWIN
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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