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
7373aed3
Commit
7373aed3
authored
Dec 20, 2012
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified a bit RGBA frament shader (opengl).
parent
cb6083b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
modules/video_output/opengl.c
modules/video_output/opengl.c
+4
-4
No files found.
modules/video_output/opengl.c
View file @
7373aed3
...
...
@@ -319,12 +319,12 @@ static void BuildRGBAFragmentShader(vout_display_opengl_t *vgl,
// Simple shader for RGBA
const
char
*
code
=
"#version 120
\n
"
"uniform sampler2D Texture
[3]
;"
"uniform sampler2D Texture;"
"uniform vec4 FillColor;"
"varying vec4 TexCoord0
,TexCoord1,TexCoord2
;"
"varying vec4 TexCoord0;"
"void main()"
"{ "
" gl_FragColor = texture2D(Texture
[0], TexCoord0.st)*
FillColor;"
" gl_FragColor = texture2D(Texture
, TexCoord0.st) *
FillColor;"
"}"
;
*
shader
=
vgl
->
CreateShader
(
GL_FRAGMENT_SHADER
);
vgl
->
ShaderSource
(
*
shader
,
1
,
&
code
,
NULL
);
...
...
@@ -897,7 +897,7 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
DrawWithShaders
(
vgl
,
left
,
top
,
right
,
bottom
);
// Change the program for overlays
vgl
->
UseProgram
(
vgl
->
program
[
1
]);
vgl
->
Uniform1i
(
vgl
->
GetUniformLocation
(
vgl
->
program
[
1
],
"Texture
[0]
"
),
0
);
vgl
->
Uniform1i
(
vgl
->
GetUniformLocation
(
vgl
->
program
[
1
],
"Texture"
),
0
);
}
else
{
DrawWithoutShaders
(
vgl
,
left
,
top
,
right
,
bottom
);
}
...
...
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