[gtk/wip/chergert/glproto: 120/526] wrap matrix setter
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 120/526] wrap matrix setter
- Date: Tue, 16 Feb 2021 01:14:27 +0000 (UTC)
commit 9cbeb850bef4e1ef55bf8f01a6bd130cc754f700
Author: Christian Hergert <chergert redhat com>
Date: Sat Dec 26 14:18:18 2020 -0800
wrap matrix setter
gsk/next/gskglprogram.c | 13 +++++
gsk/next/gskglprogramprivate.h | 117 +++++++++++++++++++++--------------------
2 files changed, 73 insertions(+), 57 deletions(-)
---
diff --git a/gsk/next/gskglprogram.c b/gsk/next/gskglprogram.c
index b459022037..52b962ff8c 100644
--- a/gsk/next/gskglprogram.c
+++ b/gsk/next/gskglprogram.c
@@ -323,6 +323,19 @@ gsk_gl_program_set_uniform_rounded_rect (GskGLProgram *self,
rounded_rect);
}
+void
+gsk_gl_program_set_uniform_matrix (GskGLProgram *self,
+ guint key,
+ const graphene_matrix_t *matrix)
+{
+ g_assert (GSK_IS_GL_PROGRAM (self));
+
+ gsk_gl_command_queue_set_uniform_matrix (self->command_queue,
+ self->id,
+ get_uniform_location (self, key),
+ matrix);
+}
+
void
gsk_gl_program_begin_draw (GskGLProgram *self,
const graphene_rect_t *viewport)
diff --git a/gsk/next/gskglprogramprivate.h b/gsk/next/gskglprogramprivate.h
index b717102c7b..c8218a16e3 100644
--- a/gsk/next/gskglprogramprivate.h
+++ b/gsk/next/gskglprogramprivate.h
@@ -29,63 +29,66 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GskGLProgram, gsk_gl_program, GSK, GL_PROGRAM, GObject)
-GskGLProgram *gsk_gl_program_new (GskGLCommandQueue *command_queue,
- const char *name,
- int program_id);
-gboolean gsk_gl_program_add_uniform (GskGLProgram *self,
- const char *name,
- guint key);
-void gsk_gl_program_delete (GskGLProgram *self);
-void gsk_gl_program_set_uniform1i (GskGLProgram *self,
- guint key,
- int value0);
-void gsk_gl_program_set_uniform2i (GskGLProgram *self,
- guint key,
- int value0,
- int value1);
-void gsk_gl_program_set_uniform3i (GskGLProgram *self,
- guint key,
- int value0,
- int value1,
- int value2);
-void gsk_gl_program_set_uniform4i (GskGLProgram *self,
- guint key,
- int value0,
- int value1,
- int value2,
- int value3);
-void gsk_gl_program_set_uniform1f (GskGLProgram *self,
- guint key,
- float value0);
-void gsk_gl_program_set_uniform2f (GskGLProgram *self,
- guint key,
- float value0,
- float value1);
-void gsk_gl_program_set_uniform3f (GskGLProgram *self,
- guint key,
- float value0,
- float value1,
- float value2);
-void gsk_gl_program_set_uniform4f (GskGLProgram *self,
- guint key,
- float value0,
- float value1,
- float value2,
- float value3);
-void gsk_gl_program_set_uniform_color (GskGLProgram *self,
- guint key,
- const GdkRGBA *color);
-void gsk_gl_program_set_uniform_texture (GskGLProgram *self,
- guint key,
- GLenum texture_target,
- GLenum texture_slot,
- guint texture_id);
-void gsk_gl_program_set_uniform_rounded_rect (GskGLProgram *self,
- guint key,
- const GskRoundedRect *rounded_rect);
-void gsk_gl_program_begin_draw (GskGLProgram *self,
- const graphene_rect_t *viewport);
-void gsk_gl_program_end_draw (GskGLProgram *self);
+GskGLProgram *gsk_gl_program_new (GskGLCommandQueue *command_queue,
+ const char *name,
+ int program_id);
+gboolean gsk_gl_program_add_uniform (GskGLProgram *self,
+ const char *name,
+ guint key);
+void gsk_gl_program_delete (GskGLProgram *self);
+void gsk_gl_program_set_uniform1i (GskGLProgram *self,
+ guint key,
+ int value0);
+void gsk_gl_program_set_uniform2i (GskGLProgram *self,
+ guint key,
+ int value0,
+ int value1);
+void gsk_gl_program_set_uniform3i (GskGLProgram *self,
+ guint key,
+ int value0,
+ int value1,
+ int value2);
+void gsk_gl_program_set_uniform4i (GskGLProgram *self,
+ guint key,
+ int value0,
+ int value1,
+ int value2,
+ int value3);
+void gsk_gl_program_set_uniform1f (GskGLProgram *self,
+ guint key,
+ float value0);
+void gsk_gl_program_set_uniform2f (GskGLProgram *self,
+ guint key,
+ float value0,
+ float value1);
+void gsk_gl_program_set_uniform3f (GskGLProgram *self,
+ guint key,
+ float value0,
+ float value1,
+ float value2);
+void gsk_gl_program_set_uniform4f (GskGLProgram *self,
+ guint key,
+ float value0,
+ float value1,
+ float value2,
+ float value3);
+void gsk_gl_program_set_uniform_matrix (GskGLProgram *self,
+ guint key,
+ const graphene_matrix_t *matrix);
+void gsk_gl_program_set_uniform_color (GskGLProgram *self,
+ guint key,
+ const GdkRGBA *color);
+void gsk_gl_program_set_uniform_texture (GskGLProgram *self,
+ guint key,
+ GLenum texture_target,
+ GLenum texture_slot,
+ guint texture_id);
+void gsk_gl_program_set_uniform_rounded_rect (GskGLProgram *self,
+ guint key,
+ const GskRoundedRect *rounded_rect);
+void gsk_gl_program_begin_draw (GskGLProgram *self,
+ const graphene_rect_t *viewport);
+void gsk_gl_program_end_draw (GskGLProgram *self);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]