Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
55f46a92
Commit
55f46a92
authored
Jun 02, 2011
by
Laurent Aimar
Browse files
Used opengl.h HasExtension() when applicable.
parent
abe86edd
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/video_output/opengl.c
View file @
55f46a92
...
...
@@ -154,12 +154,10 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
}
const
char
*
extensions
=
(
const
char
*
)
glGetString
(
GL_EXTENSIONS
);
if
(
!
extensions
)
extensions
=
""
;
/* Load extensions */
bool
supports_fp
=
false
;
if
(
strstr
(
extensions
,
"GL_ARB_fragment_program"
))
{
if
(
HasExtension
(
extensions
,
"GL_ARB_fragment_program"
))
{
vgl
->
GenProgramsARB
=
(
PFNGLGENPROGRAMSARBPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glGenProgramsARB"
);
vgl
->
BindProgramARB
=
(
PFNGLBINDPROGRAMARBPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glBindProgramARB"
);
vgl
->
ProgramStringARB
=
(
PFNGLPROGRAMSTRINGARBPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glProgramStringARB"
);
...
...
@@ -175,7 +173,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
bool
supports_multitexture
=
false
;
GLint
max_texture_units
=
0
;
if
(
strstr
(
extensions
,
"GL_ARB_multitexture"
))
{
if
(
HasExtension
(
extensions
,
"GL_ARB_multitexture"
))
{
vgl
->
ActiveTextureARB
=
(
PFNGLACTIVETEXTUREARBPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glActiveTextureARB"
);
vgl
->
MultiTexCoord2fARB
=
(
PFNGLMULTITEXCOORD2FARBPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glMultiTexCoord2fARB"
);
...
...
@@ -253,8 +251,8 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
#elif defined(MACOS_OPENGL)
supports_npot
=
true
;
#else
supports_npot
|=
strstr
(
extensions
,
"GL_APPLE_texture_2D_limited_npot"
)
!=
NULL
||
strstr
(
extensions
,
"GL_ARB_texture_non_power_of_two"
);
supports_npot
|=
HasExtension
(
extensions
,
"GL_APPLE_texture_2D_limited_npot"
)
||
HasExtension
(
extensions
,
"GL_ARB_texture_non_power_of_two"
);
#endif
/* Texture size */
...
...
modules/video_output/xcb/glx.c
View file @
55f46a92
...
...
@@ -364,14 +364,14 @@ static int Open (vlc_object_t *obj)
bool
is_swap_interval_set
=
false
;
#ifdef GLX_SGI_swap_control
if
(
strstr
(
glx_extensions
,
"GLX_SGI_swap_control"
))
{
if
(
HasExtension
(
glx_extensions
,
"GLX_SGI_swap_control"
))
{
PFNGLXSWAPINTERVALSGIPROC
SwapIntervalSGI
=
(
PFNGLXSWAPINTERVALSGIPROC
)
GetProcAddress
(
NULL
,
"glXSwapIntervalSGI"
);
if
(
!
is_swap_interval_set
&&
SwapIntervalSGI
)
is_swap_interval_set
=
!
SwapIntervalSGI
(
1
);
}
#endif
#ifdef GLX_EXT_swap_control
if
(
strstr
(
glx_extensions
,
"GLX_EXT_swap_control"
))
{
if
(
HasExtension
(
glx_extensions
,
"GLX_EXT_swap_control"
))
{
PFNGLXSWAPINTERVALEXTPROC
SwapIntervalEXT
=
(
PFNGLXSWAPINTERVALEXTPROC
)
GetProcAddress
(
NULL
,
"glXSwapIntervalEXT"
);
if
(
!
is_swap_interval_set
&&
SwapIntervalEXT
)
is_swap_interval_set
=
!
SwapIntervalEXT
(
dpy
,
sys
->
glwin
,
1
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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