Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
a06e4da7
Commit
a06e4da7
authored
Aug 14, 2004
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* opengl.c: use glTexSubImage2D instead of glTexImage2D
parent
2b8ade38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
modules/video_output/opengl.c
modules/video_output/opengl.c
+10
-4
No files found.
modules/video_output/opengl.c
View file @
a06e4da7
...
...
@@ -237,7 +237,7 @@ static int Init( vout_thread_t *p_vout )
p_vout
->
p_picture
[
0
].
p
->
p_pixels
=
p_sys
->
p_buffer
;
p_vout
->
p_picture
[
0
].
p
->
i_lines
=
p_vout
->
output
.
i_height
;
p_vout
->
p_picture
[
0
].
p
->
i_pixel_pitch
=
i_pixel_pitch
;
p_vout
->
p_picture
[
0
].
p
->
i_pitch
=
p_
sys
->
i_tex
_width
*
p_vout
->
p_picture
[
0
].
p
->
i_pitch
=
p_
vout
->
output
.
i
_width
*
p_vout
->
p_picture
[
0
].
p
->
i_pixel_pitch
;
p_vout
->
p_picture
[
0
].
p
->
i_visible_pitch
=
p_vout
->
output
.
i_width
*
p_vout
->
p_picture
[
0
].
p
->
i_pixel_pitch
;
...
...
@@ -259,6 +259,11 @@ static int Init( vout_thread_t *p_vout )
glTexEnvf
(
GL_TEXTURE_ENV
,
GL_TEXTURE_ENV_MODE
,
GL_MODULATE
);
/* Allocate the OpenGL texture */
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
3
,
p_sys
->
i_tex_width
,
p_sys
->
i_tex_height
,
0
,
VLCGL_RGB_FORMAT
,
VLCGL_RGB_TYPE
,
NULL
);
glDisable
(
GL_BLEND
);
glDisable
(
GL_DEPTH_TEST
);
glDepthMask
(
GL_FALSE
);
...
...
@@ -362,9 +367,10 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
glClear
(
GL_COLOR_BUFFER_BIT
);
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
3
,
p_sys
->
i_tex_width
,
p_sys
->
i_tex_height
,
0
,
VLCGL_RGB_FORMAT
,
VLCGL_RGB_TYPE
,
p_sys
->
p_buffer
);
/* Update the texture */
glTexSubImage2D
(
GL_TEXTURE_2D
,
0
,
0
,
0
,
p_vout
->
render
.
i_width
,
p_vout
->
render
.
i_height
,
VLCGL_RGB_FORMAT
,
VLCGL_RGB_TYPE
,
p_sys
->
p_buffer
);
if
(
p_sys
->
i_effect
==
OPENGL_EFFECT_NONE
)
{
...
...
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