gsk: Add getter for program id in ShaderBuilder

Since we store it into the ShaderBuilder instance we should also allow
getting the program id.
This commit is contained in:
Emmanuele Bassi 2016-07-03 22:53:16 +01:00
parent 8bb0c9a226
commit 12db9ee164
2 changed files with 9 additions and 0 deletions

View File

@ -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;
}

View File

@ -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,