cogl: Port Shader away from CoglObject
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193>
This commit is contained in:

committed by
Marge Bot

parent
c1e6948e42
commit
3aaae11d6b
@ -187,7 +187,7 @@ on_paint (ClutterActor *actor,
|
||||
static void
|
||||
set_shader_num (int new_no)
|
||||
{
|
||||
CoglHandle shader;
|
||||
CoglShader *shader;
|
||||
CoglHandle program;
|
||||
CoglPipeline *pipeline;
|
||||
CoglContext *ctx =
|
||||
@ -207,7 +207,7 @@ set_shader_num (int new_no)
|
||||
|
||||
program = cogl_create_program ();
|
||||
cogl_program_attach_shader (program, shader);
|
||||
cogl_object_unref (shader);
|
||||
g_object_unref (shader);
|
||||
cogl_program_link (program);
|
||||
|
||||
uniform_no = cogl_program_get_uniform_location (program, "tex");
|
||||
|
@ -31,7 +31,8 @@ paint (TestState *state)
|
||||
CoglTexture *tex;
|
||||
CoglColor color;
|
||||
GError *error = NULL;
|
||||
CoglHandle shader, program;
|
||||
CoglShader *shader;
|
||||
CoglHandle program;
|
||||
|
||||
cogl_color_init_from_4ub (&color, 0, 0, 0, 255);
|
||||
cogl_framebuffer_clear (test_fb, COGL_BUFFER_BIT_COLOR, &color);
|
||||
@ -71,7 +72,7 @@ paint (TestState *state)
|
||||
cogl_program_attach_shader (program, shader);
|
||||
cogl_program_link (program);
|
||||
|
||||
cogl_object_unref (shader);
|
||||
g_object_unref (shader);
|
||||
|
||||
/* Draw something without the program */
|
||||
cogl_framebuffer_draw_rectangle (test_fb, pipeline,
|
||||
|
@ -87,7 +87,7 @@ static CoglPipeline *
|
||||
create_pipeline_for_shader (TestState *state, const char *shader_source)
|
||||
{
|
||||
CoglPipeline *pipeline;
|
||||
CoglHandle shader;
|
||||
CoglShader *shader;
|
||||
CoglHandle program;
|
||||
|
||||
pipeline = cogl_pipeline_new (test_ctx);
|
||||
@ -100,7 +100,7 @@ create_pipeline_for_shader (TestState *state, const char *shader_source)
|
||||
|
||||
cogl_pipeline_set_user_program (pipeline, program);
|
||||
|
||||
cogl_object_unref (shader);
|
||||
g_object_unref (shader);
|
||||
cogl_object_unref (program);
|
||||
|
||||
return pipeline;
|
||||
|
Reference in New Issue
Block a user