summaryrefslogtreecommitdiff
path: root/gsk/gskglshaderprivate.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2020-09-18 17:46:57 +0200
committerAlexander Larsson <alexl@redhat.com>2020-09-29 09:51:16 +0200
commit7ea755e206c36960db05f0e0660c6f5f20b692c6 (patch)
tree56a83de7a5cd4f40d8f4ab539f4b3211015a4f12 /gsk/gskglshaderprivate.h
parent6e9b58b6f081f3cf1cba697adada8cd3bc2438d5 (diff)
downloadgtk+-7ea755e206c36960db05f0e0660c6f5f20b692c6.tar.gz
Add GskGLShaderNode and GskGLShader
A GskGLShader is an abstraction of a GLSL fragment shader that can produce pixel values given inputs: * N (currently max 4) textures * Current arguments for the shader uniform Uniform types are: float,(u)int,bool,vec234) There is also a builder for the uniform arguments which are passed around as immutable GBytes in the built form. A GskGLShaderNode is a render node that renders a GskGLShader inside a specified rectangular bounds. It renders its child nodes as textures and passes those as texture arguments to the shader. You also pass it a uniform arguments object.
Diffstat (limited to 'gsk/gskglshaderprivate.h')
-rw-r--r--gsk/gskglshaderprivate.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gsk/gskglshaderprivate.h b/gsk/gskglshaderprivate.h
new file mode 100644
index 0000000000..3dc82c35dc
--- /dev/null
+++ b/gsk/gskglshaderprivate.h
@@ -0,0 +1,19 @@
+#ifndef __GSK_GLSHADER_PRIVATE_H__
+#define __GSK_GLSHADER_PRIVATE_H__
+
+#include <gsk/gskglshader.h>
+
+G_BEGIN_DECLS
+
+typedef struct {
+ char *name;
+ GskGLUniformType type;
+ gsize offset;
+} GskGLUniform;
+
+const GskGLUniform *gsk_gl_shader_get_uniforms (GskGLShader *shader,
+ int *n_uniforms);
+
+G_END_DECLS
+
+#endif /* __GSK_GLSHADER_PRIVATE_H__ */