[gtk+/wip/ebassi/gsk-renderer: 442/545] gsk: Add getter for program id in ShaderBuilder
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/ebassi/gsk-renderer: 442/545] gsk: Add getter for program id in ShaderBuilder
- Date: Mon, 17 Oct 2016 13:48:21 +0000 (UTC)
commit 2187f0939169edea5d8e866b95c93c7ab5570e23
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sun Jul 3 22:53:16 2016 +0100
gsk: Add getter for program id in ShaderBuilder
Since we store it into the ShaderBuilder instance we should also allow
getting the program id.
gsk/gskshaderbuilder.c | 8 ++++++++
gsk/gskshaderbuilderprivate.h | 1 +
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gsk/gskshaderbuilder.c b/gsk/gskshaderbuilder.c
index 5142e43..b17c41a 100644
--- a/gsk/gskshaderbuilder.c
+++ b/gsk/gskshaderbuilder.c
@@ -395,3 +395,11 @@ gsk_shader_builder_get_attribute_location (GskShaderBuilder *builder,
return -1;
}
+
+int
+gsk_shader_builder_get_program (GskShaderBuilder *builder)
+{
+ g_return_val_if_fail (GSK_IS_SHADER_BUILDER (builder), -1);
+
+ return builder->program_id;
+}
diff --git a/gsk/gskshaderbuilderprivate.h b/gsk/gskshaderbuilderprivate.h
index f5f7ff8..ce069ed 100644
--- a/gsk/gskshaderbuilderprivate.h
+++ b/gsk/gskshaderbuilderprivate.h
@@ -35,6 +35,7 @@ int gsk_shader_builder_create_program (GskShad
int fragment_id,
GError **error);
+int gsk_shader_builder_get_program (GskShaderBuilder *builder);
int gsk_shader_builder_get_uniform_location (GskShaderBuilder *builder,
GQuark uniform_quark);
int gsk_shader_builder_get_attribute_location (GskShaderBuilder *builder,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]