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
55f46a92
Commit
55f46a92
authored
Jun 02, 2011
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Used opengl.h HasExtension() when applicable.
parent
abe86edd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
modules/video_output/opengl.c
modules/video_output/opengl.c
+4
-6
modules/video_output/xcb/glx.c
modules/video_output/xcb/glx.c
+2
-2
No files found.
modules/video_output/opengl.c
View file @
55f46a92
...
@@ -154,12 +154,10 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
...
@@ -154,12 +154,10 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
}
}
const
char
*
extensions
=
(
const
char
*
)
glGetString
(
GL_EXTENSIONS
);
const
char
*
extensions
=
(
const
char
*
)
glGetString
(
GL_EXTENSIONS
);
if
(
!
extensions
)
extensions
=
""
;
/* Load extensions */
/* Load extensions */
bool
supports_fp
=
false
;
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
->
GenProgramsARB
=
(
PFNGLGENPROGRAMSARBPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glGenProgramsARB"
);
vgl
->
BindProgramARB
=
(
PFNGLBINDPROGRAMARBPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glBindProgramARB"
);
vgl
->
BindProgramARB
=
(
PFNGLBINDPROGRAMARBPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glBindProgramARB"
);
vgl
->
ProgramStringARB
=
(
PFNGLPROGRAMSTRINGARBPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glProgramStringARB"
);
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,
...
@@ -175,7 +173,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
bool
supports_multitexture
=
false
;
bool
supports_multitexture
=
false
;
GLint
max_texture_units
=
0
;
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
->
ActiveTextureARB
=
(
PFNGLACTIVETEXTUREARBPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glActiveTextureARB"
);
vgl
->
MultiTexCoord2fARB
=
(
PFNGLMULTITEXCOORD2FARBPROC
)
vlc_gl_GetProcAddress
(
vgl
->
gl
,
"glMultiTexCoord2fARB"
);
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,
...
@@ -253,8 +251,8 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
#elif defined(MACOS_OPENGL)
#elif defined(MACOS_OPENGL)
supports_npot
=
true
;
supports_npot
=
true
;
#else
#else
supports_npot
|=
strstr
(
extensions
,
"GL_APPLE_texture_2D_limited_npot"
)
!=
NULL
||
supports_npot
|=
HasExtension
(
extensions
,
"GL_APPLE_texture_2D_limited_npot"
)
||
strstr
(
extensions
,
"GL_ARB_texture_non_power_of_two"
);
HasExtension
(
extensions
,
"GL_ARB_texture_non_power_of_two"
);
#endif
#endif
/* Texture size */
/* Texture size */
...
...
modules/video_output/xcb/glx.c
View file @
55f46a92
...
@@ -364,14 +364,14 @@ static int Open (vlc_object_t *obj)
...
@@ -364,14 +364,14 @@ static int Open (vlc_object_t *obj)
bool
is_swap_interval_set
=
false
;
bool
is_swap_interval_set
=
false
;
#ifdef GLX_SGI_swap_control
#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"
);
PFNGLXSWAPINTERVALSGIPROC
SwapIntervalSGI
=
(
PFNGLXSWAPINTERVALSGIPROC
)
GetProcAddress
(
NULL
,
"glXSwapIntervalSGI"
);
if
(
!
is_swap_interval_set
&&
SwapIntervalSGI
)
if
(
!
is_swap_interval_set
&&
SwapIntervalSGI
)
is_swap_interval_set
=
!
SwapIntervalSGI
(
1
);
is_swap_interval_set
=
!
SwapIntervalSGI
(
1
);
}
}
#endif
#endif
#ifdef GLX_EXT_swap_control
#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"
);
PFNGLXSWAPINTERVALEXTPROC
SwapIntervalEXT
=
(
PFNGLXSWAPINTERVALEXTPROC
)
GetProcAddress
(
NULL
,
"glXSwapIntervalEXT"
);
if
(
!
is_swap_interval_set
&&
SwapIntervalEXT
)
if
(
!
is_swap_interval_set
&&
SwapIntervalEXT
)
is_swap_interval_set
=
!
SwapIntervalEXT
(
dpy
,
sys
->
glwin
,
1
);
is_swap_interval_set
=
!
SwapIntervalEXT
(
dpy
,
sys
->
glwin
,
1
);
...
...
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