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
1858bcb8
Commit
1858bcb8
authored
12 years ago
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl: use ActiveTexture instead of ARB variant
parent
46d64803
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
modules/video_output/opengl.c
modules/video_output/opengl.c
+18
-18
No files found.
modules/video_output/opengl.c
View file @
1858bcb8
...
...
@@ -42,8 +42,8 @@
# define PFNGLPROGRAMSTRINGARBPROC typeof(glProgramStringARB)*
# define PFNGLDELETEPROGRAMSARBPROC typeof(glDeleteProgramsARB)*
# define PFNGLPROGRAMLOCALPARAMETER4FVARBPROC typeof(glProgramLocalParameter4fvARB)*
# define PFNGLACTIVETEXTURE
ARBPROC typeof(glActiveTextureARB
)*
# define PFNGLCLIENTACTIVETEXTURE
ARBPROC typeof(glClientActiveTextureARB
)*
# define PFNGLACTIVETEXTURE
PROC typeof(glActiveTexture
)*
# define PFNGLCLIENTACTIVETEXTURE
PROC typeof(glClientActiveTexture
)*
#endif
/* RV16 */
...
...
@@ -117,8 +117,8 @@ struct vout_display_opengl_t {
/* multitexture */
bool
use_multitexture
;
PFNGLACTIVETEXTURE
ARBPROC
ActiveTextureARB
;
PFNGLCLIENTACTIVETEXTURE
ARBPROC
ClientActiveTextureARB
;
PFNGLACTIVETEXTURE
PROC
ActiveTexture
;
PFNGLCLIENTACTIVETEXTURE
PROC
ClientActiveTexture
;
};
static
inline
int
GetAlignedSize
(
unsigned
size
)
...
...
@@ -187,14 +187,14 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
GLint
max_texture_units
=
0
;
if
(
HasExtension
(
extensions
,
"GL_ARB_multitexture"
))
{
#if !defined(MACOS_OPENGL)
vgl
->
ActiveTexture
ARB
=
(
PFNGLACTIVETEXTUREARBPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glActiveTextureARB
"
);
vgl
->
ClientActiveTexture
ARB
=
(
PFNGLCLIENTACTIVETEXTUREARBPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glClientActiveTextureARB
"
);
vgl
->
ActiveTexture
=
(
PFNGLACTIVETEXTUREPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glActiveTexture
"
);
vgl
->
ClientActiveTexture
=
(
PFNGLCLIENTACTIVETEXTUREPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glClientActiveTexture
"
);
#else
vgl
->
ActiveTexture
ARB
=
glActiveTextureARB
;
vgl
->
ClientActiveTexture
ARB
=
glClientActiveTextureARB
;
vgl
->
ActiveTexture
=
glActiveTexture
;
vgl
->
ClientActiveTexture
=
glClientActiveTexture
;
#endif
supports_multitexture
=
vgl
->
ActiveTexture
ARB
&&
vgl
->
ClientActiveTexture
ARB
;
supports_multitexture
=
vgl
->
ActiveTexture
&&
vgl
->
ClientActiveTexture
;
if
(
supports_multitexture
)
glGetIntegerv
(
GL_MAX_TEXTURE_UNITS_ARB
,
&
max_texture_units
);
}
...
...
@@ -458,7 +458,7 @@ picture_pool_t *vout_display_opengl_GetPool(vout_display_opengl_t *vgl, unsigned
glGenTextures
(
vgl
->
chroma
->
plane_count
,
vgl
->
texture
[
i
]);
for
(
unsigned
j
=
0
;
j
<
vgl
->
chroma
->
plane_count
;
j
++
)
{
if
(
vgl
->
use_multitexture
)
vgl
->
ActiveTexture
ARB
(
GL_TEXTURE0_ARB
+
j
);
vgl
->
ActiveTexture
(
GL_TEXTURE0
+
j
);
glBindTexture
(
vgl
->
tex_target
,
vgl
->
texture
[
i
][
j
]);
#if !USE_OPENGL_ES
...
...
@@ -514,7 +514,7 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
/* Update the texture */
for
(
unsigned
j
=
0
;
j
<
vgl
->
chroma
->
plane_count
;
j
++
)
{
if
(
vgl
->
use_multitexture
)
vgl
->
ActiveTexture
ARB
(
GL_TEXTURE0_ARB
+
j
);
vgl
->
ActiveTexture
(
GL_TEXTURE0
+
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
);
glTexSubImage2D
(
vgl
->
tex_target
,
0
,
...
...
@@ -540,7 +540,7 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
vgl
->
region
=
calloc
(
count
,
sizeof
(
*
vgl
->
region
));
if
(
vgl
->
use_multitexture
)
vgl
->
ActiveTexture
ARB
(
GL_TEXTURE0_ARB
+
0
);
vgl
->
ActiveTexture
(
GL_TEXTURE0
+
0
);
int
i
=
0
;
for
(
subpicture_region_t
*
r
=
subpicture
->
p_region
;
r
;
r
=
r
->
p_next
,
i
++
)
{
gl_region_t
*
glr
=
&
vgl
->
region
[
i
];
...
...
@@ -690,8 +690,8 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
right
[
j
],
top
[
j
],
right
[
j
],
bottom
[
j
],
};
vgl
->
ActiveTexture
ARB
(
GL_TEXTURE0_ARB
+
j
);
vgl
->
ClientActiveTexture
ARB
(
GL_TEXTURE0_ARB
+
j
);
vgl
->
ActiveTexture
(
GL_TEXTURE0
+
j
);
vgl
->
ClientActiveTexture
(
GL_TEXTURE0
+
j
);
glEnableClientState
(
GL_TEXTURE_COORD_ARRAY
);
glBindTexture
(
vgl
->
tex_target
,
vgl
->
texture
[
0
][
j
]);
glTexCoordPointer
(
2
,
GL_FLOAT
,
0
,
texCoord
);
...
...
@@ -703,8 +703,8 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
for
(
int
j
=
vgl
->
chroma
->
plane_count
;
j
>=
0
;
j
--
)
{
vgl
->
ActiveTexture
ARB
(
GL_TEXTURE0_ARB
+
j
);
vgl
->
ClientActiveTexture
ARB
(
GL_TEXTURE0_ARB
+
j
);
vgl
->
ActiveTexture
(
GL_TEXTURE0
+
j
);
vgl
->
ClientActiveTexture
(
GL_TEXTURE0
+
j
);
glDisableClientState
(
GL_TEXTURE_COORD_ARRAY
);
}
...
...
@@ -716,7 +716,7 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
glDisable
(
vgl
->
tex_target
);
if
(
vgl
->
use_multitexture
)
vgl
->
ActiveTexture
ARB
(
GL_TEXTURE0_ARB
+
0
);
vgl
->
ActiveTexture
(
GL_TEXTURE0
+
0
);
glEnable
(
GL_TEXTURE_2D
);
glEnable
(
GL_BLEND
);
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
...
...
This diff is collapsed.
Click to expand it.
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