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
f8b076b7
Commit
f8b076b7
authored
May 30, 2011
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made usage of glActiveTextureARB() a bit more obvious (opengl).
parent
8dac2e55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
modules/video_output/opengl.c
modules/video_output/opengl.c
+7
-5
No files found.
modules/video_output/opengl.c
View file @
f8b076b7
...
...
@@ -127,6 +127,7 @@ struct vout_display_opengl_t {
void
(
*
ProgramLocalParameter4fvARB
)(
GLenum
,
GLuint
,
const
GLfloat
*
);
/* multitexture */
bool
use_multitexture
;
void
(
*
ActiveTextureARB
)(
GLenum
);
void
(
*
MultiTexCoord2fARB
)(
GLenum
,
GLfloat
,
GLfloat
);
};
...
...
@@ -240,6 +241,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
}
vgl
->
chroma
=
vlc_fourcc_GetChromaDescription
(
vgl
->
fmt
.
i_chroma
);
vgl
->
use_multitexture
=
vgl
->
chroma
->
plane_count
>
1
;
bool
supports_npot
=
false
;
#if USE_OPENGL_ES == 2
...
...
@@ -471,7 +473,7 @@ picture_pool_t *vout_display_opengl_GetPool(vout_display_opengl_t *vgl, unsigned
for
(
int
i
=
0
;
i
<
VLCGL_TEXTURE_COUNT
;
i
++
)
{
glGenTextures
(
vgl
->
chroma
->
plane_count
,
vgl
->
texture
[
i
]);
for
(
unsigned
j
=
0
;
j
<
vgl
->
chroma
->
plane_count
;
j
++
)
{
if
(
vgl
->
chroma
->
plane_count
>
1
)
if
(
vgl
->
use_multitexture
)
vgl
->
ActiveTextureARB
(
GL_TEXTURE0_ARB
+
j
);
glBindTexture
(
vgl
->
tex_target
,
vgl
->
texture
[
i
][
j
]);
...
...
@@ -542,7 +544,7 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
#else
/* Update the texture */
for
(
unsigned
j
=
0
;
j
<
vgl
->
chroma
->
plane_count
;
j
++
)
{
if
(
vgl
->
chroma
->
plane_count
>
1
)
if
(
vgl
->
use_multitexture
)
vgl
->
ActiveTextureARB
(
GL_TEXTURE0_ARB
+
j
);
glBindTexture
(
vgl
->
tex_target
,
vgl
->
texture
[
0
][
j
]);
glPixelStorei
(
GL_UNPACK_ROW_LENGTH
,
picture
->
p
[
j
].
i_pitch
/
picture
->
p
[
j
].
i_pixel_pitch
);
...
...
@@ -569,7 +571,7 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
vgl
->
region_count
=
count
;
vgl
->
region
=
calloc
(
count
,
sizeof
(
*
vgl
->
region
));
if
(
vgl
->
chroma
->
plane_count
>
1
)
if
(
vgl
->
use_multitexture
)
vgl
->
ActiveTextureARB
(
GL_TEXTURE0_ARB
+
0
);
int
i
=
0
;
for
(
subpicture_region_t
*
r
=
subpicture
->
p_region
;
r
;
r
=
r
->
p_next
,
i
++
)
{
...
...
@@ -700,7 +702,7 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
#else
#if !defined(MACOS_OPENGL)
for
(
unsigned
j
=
0
;
j
<
vgl
->
chroma
->
plane_count
;
j
++
)
{
if
(
vgl
->
chroma
->
plane_count
>
1
)
if
(
vgl
->
use_multitexture
)
vgl
->
ActiveTextureARB
(
GL_TEXTURE0_ARB
+
j
);
glBindTexture
(
vgl
->
tex_target
,
vgl
->
texture
[
0
][
j
]);
}
...
...
@@ -736,7 +738,7 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
glDisable
(
vgl
->
tex_target
);
#if !USE_OPENGL_ES
if
(
vgl
->
chroma
->
plane_count
>
1
)
if
(
vgl
->
use_multitexture
)
vgl
->
ActiveTextureARB
(
GL_TEXTURE0_ARB
+
0
);
glEnable
(
GL_TEXTURE_2D
);
glEnable
(
GL_BLEND
);
...
...
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