Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
a910b4e7
Commit
a910b4e7
authored
Dec 20, 2012
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify/reorder a bit non shader rendering (openg).
parent
b4eb37b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
26 deletions
+13
-26
modules/video_output/opengl.c
modules/video_output/opengl.c
+13
-26
No files found.
modules/video_output/opengl.c
View file @
a910b4e7
...
...
@@ -756,34 +756,23 @@ static void DrawWithoutShaders(vout_display_opengl_t *vgl,
right
[
0
],
top
[
0
]
};
for
(
unsigned
j
=
0
;
j
<
vgl
->
chroma
->
plane_count
;
j
++
)
{
glActiveTexture
(
GL_TEXTURE0
+
j
);
glClientActiveTexture
(
GL_TEXTURE0
+
j
);
glEnableClientState
(
GL_VERTEX_ARRAY
);
glEnableClientState
(
GL_TEXTURE_COORD_ARRAY
);
glEnable
(
vgl
->
tex_target
);
glActiveTexture
(
GL_TEXTURE0
+
0
);
glClientActiveTexture
(
GL_TEXTURE0
+
0
);
glEnable
(
vgl
->
tex_target
);
glBindTexture
(
vgl
->
tex_target
,
vgl
->
texture
[
0
][
0
]
);
glBindTexture
(
vgl
->
tex_target
,
vgl
->
texture
[
0
][
j
]);
glTexCoordPointer
(
2
,
GL_FLOAT
,
0
,
textureCoord
);
}
glActiveTexture
(
GL_TEXTURE0
);
glClientActiveTexture
(
GL_TEXTURE0
);
glEnableClientState
(
GL_VERTEX_ARRAY
);
glEnableClientState
(
GL_TEXTURE_COORD_ARRAY
);
glTexCoordPointer
(
2
,
GL_FLOAT
,
0
,
textureCoord
);
glVertexPointer
(
2
,
GL_FLOAT
,
0
,
vertexCoord
);
glDrawArrays
(
GL_TRIANGLE_STRIP
,
0
,
4
);
for
(
unsigned
j
=
0
;
j
<
vgl
->
chroma
->
plane_count
;
j
++
)
{
glActiveTexture
(
GL_TEXTURE0
+
j
);
glClientActiveTexture
(
GL_TEXTURE0
+
j
);
glDisable
(
vgl
->
tex_target
);
glDisableClientState
(
GL_TEXTURE_COORD_ARRAY
);
glDisableClientState
(
GL_VERTEX_ARRAY
);
}
glActiveTexture
(
GL_TEXTURE0
);
glClientActiveTexture
(
GL_TEXTURE0
);
glDisableClientState
(
GL_TEXTURE_COORD_ARRAY
);
glDisableClientState
(
GL_VERTEX_ARRAY
);
glDisable
(
vgl
->
tex_target
);
}
static
void
DrawWithShaders
(
vout_display_opengl_t
*
vgl
,
...
...
@@ -869,12 +858,12 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
DrawWithoutShaders
(
vgl
,
left
,
top
,
right
,
bottom
);
}
glActiveTexture
(
GL_TEXTURE0
+
0
);
glClientActiveTexture
(
GL_TEXTURE0
+
0
);
glEnable
(
GL_TEXTURE_2D
);
glEnable
(
GL_BLEND
);
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
glActiveTexture
(
GL_TEXTURE0
+
0
);
glClientActiveTexture
(
GL_TEXTURE0
+
0
);
for
(
int
i
=
0
;
i
<
vgl
->
region_count
;
i
++
)
{
gl_region_t
*
glr
=
&
vgl
->
region
[
i
];
const
GLfloat
vertexCoord
[]
=
{
...
...
@@ -899,11 +888,9 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
vgl
->
VertexAttribPointer
(
vgl
->
GetAttribLocation
(
vgl
->
program
[
1
],
"vertex_position"
),
2
,
GL_FLOAT
,
0
,
0
,
vertexCoord
);
}
else
{
glEnableClientState
(
GL_VERTEX_ARRAY
);
glEnableClientState
(
GL_TEXTURE_COORD_ARRAY
);
glColor4f
(
1
.
0
f
,
1
.
0
f
,
1
.
0
f
,
glr
->
alpha
);
glEnable
(
GL_TEXTURE_COORD_ARRAY
);
glEnable
(
GL_VERTEX_ARRAY
);
glTexCoordPointer
(
2
,
GL_FLOAT
,
0
,
textureCoord
);
glEnableClientState
(
GL_TEXTURE_COORD_ARRAY
);
glVertexPointer
(
2
,
GL_FLOAT
,
0
,
vertexCoord
);
}
...
...
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