1 /*
2  * This file is part of libplacebo.
3  *
4  * libplacebo is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * libplacebo is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with libplacebo. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #pragma once
19 
20 #include "../common.h"
21 #include "../log.h"
22 #include "../gpu.h"
23 
24 #include <epoxy/gl.h>
25 
26 #ifdef EPOXY_HAS_EGL
27 #include <epoxy/egl.h>
28 #endif
29 
30 struct gl_cb {
31     void (*callback)(void *priv);
32     void *priv;
33     GLsync sync;
34 };
35 
36 struct fbo_format {
37     pl_fmt fmt;
38     const struct gl_format *glfmt;
39 };
40 
41 // For locking/unlocking
42 bool gl_make_current(pl_opengl gl);
43 void gl_release_current(pl_opengl gl);
44