[FFmpeg-devel] [PATCH 3/3] lavd: add opengl device
Kirill Gavrilov
gavr.mail at gmail.com
Tue Jan 14 05:55:24 CET 2014
On Mon, Jan 13, 2014 at 4:41 AM, Lukasz Marek <lukasz.m.luki at gmail.com>wrote:
> +static av_cold int opengl_read_limits(
> OpenGLContext *opengl)
> +{
> + GLuint i;
> + const GLubyte *ext = NULL;
> + GLint major = 0, minor = 0, ext_cnt = 0;
> +
> + glGetIntegerv(GL_MAJOR_VERSION, &major);
> + glGetIntegerv(GL_MINOR_VERSION, &minor);
> + glGetIntegerv(GL_NUM_EXTENSIONS, &ext_cnt);
> + glGetIntegerv(GL_MAX_TEXTURE_SIZE, &opengl->max_texture_size);
> + glGetIntegerv(GL_MAX_VIEWPORT_DIMS, &opengl->max_viewport_width);
> +
> + av_log(opengl, AV_LOG_DEBUG, "OpenGL version %d.%d\n", major, minor);
> + av_log(opengl, AV_LOG_DEBUG, "Max texture size: %d\n",
> opengl->max_texture_size);
> + av_log(opengl, AV_LOG_DEBUG, "Max viewport size: %dx%d\n",
> + opengl->max_viewport_width, opengl->max_viewport_height);
> +
> + for (i = 0; i < ext_cnt; i++) {
> + ext = opengl->glprocs.glGetStringi(GL_EXTENSIONS, i);
>
Maybe I have missed something, but it looks that current code will crash on
GLX without GL3.0-compatible context.
-----------------------------------------------
Kirill Gavrilov,
Software designer.
<kirill at sview.ru>
More information about the ffmpeg-devel
mailing list