1 | /* gskglcompilerprivate.h |
2 | * |
3 | * Copyright 2020 Christian Hergert <chergert@redhat.com> |
4 | * |
5 | * This library is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU Lesser General Public |
7 | * License as published by the Free Software Foundation; either |
8 | * version 2.1 of the License, or (at your option) any later version. |
9 | * |
10 | * This library is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | * Lesser General Public License for more details. |
14 | * |
15 | * You should have received a copy of the GNU Lesser General Public |
16 | * License along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * |
18 | * SPDX-License-Identifier: LGPL-2.1-or-later |
19 | */ |
20 | |
21 | #ifndef __GSK_GL_COMPILER_PRIVATE_H__ |
22 | #define __GSK_GL_COMPILER_PRIVATE_H__ |
23 | |
24 | #include "gskgltypesprivate.h" |
25 | |
26 | G_BEGIN_DECLS |
27 | |
28 | typedef enum _GskGLCompilerKind |
29 | { |
30 | GSK_GL_COMPILER_ALL, |
31 | GSK_GL_COMPILER_FRAGMENT, |
32 | GSK_GL_COMPILER_VERTEX, |
33 | } GskGLCompilerKind; |
34 | |
35 | #define GSK_TYPE_GL_COMPILER (gsk_gl_compiler_get_type()) |
36 | |
37 | G_DECLARE_FINAL_TYPE (GskGLCompiler, gsk_gl_compiler, GSK, GL_COMPILER, GObject) |
38 | |
39 | GskGLCompiler * gsk_gl_compiler_new (GskGLDriver *driver, |
40 | gboolean debug); |
41 | void gsk_gl_compiler_set_preamble (GskGLCompiler *self, |
42 | GskGLCompilerKind kind, |
43 | GBytes *preamble_bytes); |
44 | void gsk_gl_compiler_set_preamble_from_resource (GskGLCompiler *self, |
45 | GskGLCompilerKind kind, |
46 | const char *resource_path); |
47 | void gsk_gl_compiler_set_source (GskGLCompiler *self, |
48 | GskGLCompilerKind kind, |
49 | GBytes *source_bytes); |
50 | void gsk_gl_compiler_set_source_from_resource (GskGLCompiler *self, |
51 | GskGLCompilerKind kind, |
52 | const char *resource_path); |
53 | void gsk_gl_compiler_set_suffix (GskGLCompiler *self, |
54 | GskGLCompilerKind kind, |
55 | GBytes *suffix_bytes); |
56 | void gsk_gl_compiler_set_suffix_from_resource (GskGLCompiler *self, |
57 | GskGLCompilerKind kind, |
58 | const char *resource_path); |
59 | void gsk_gl_compiler_bind_attribute (GskGLCompiler *self, |
60 | const char *name, |
61 | guint location); |
62 | void gsk_gl_compiler_clear_attributes (GskGLCompiler *self); |
63 | GskGLProgram * gsk_gl_compiler_compile (GskGLCompiler *self, |
64 | const char *name, |
65 | const char *clip, |
66 | GError **error); |
67 | |
68 | G_END_DECLS |
69 | |
70 | #endif /* __GSK_GL_COMPILER_PRIVATE_H__ */ |
71 | |