opengl: expose npot support in gl_api
[vlc.git] / modules / video_output / opengl / gl_api.h
blob2ddae3317871f6e2c2fd3397e87828a644330c32
1 /*****************************************************************************
2 * gl_api.h
3 *****************************************************************************
4 * Copyright (C) 2020 VLC authors and VideoLAN
5 * Copyright (C) 2020 Videolabs
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; either version 2.1 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this program; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
20 *****************************************************************************/
22 #ifndef VLC_GL_API_H
23 #define VLC_GL_API_H
25 #ifdef HAVE_CONFIG_H
26 # include "config.h"
27 #endif
29 #include <stdbool.h>
30 #include <vlc_common.h>
31 #include <vlc_opengl.h>
33 #include "gl_common.h"
35 struct vlc_gl_api {
36 opengl_vtable_t vt;
38 /* True if the current API is OpenGL ES, set by the caller */
39 bool is_gles;
41 /* Available gl extensions (from GL_EXTENSIONS) */
42 const char *extensions;
44 /* Non-power-of-2 texture size support */
45 bool supports_npot;
48 int
49 vlc_gl_api_Init(struct vlc_gl_api *api, vlc_gl_t *gl);
51 #endif