diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-11-22 09:29:27 -0800 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-11-22 09:29:27 -0800 |
commit | 28846536cbe01090844cdb35001fbc2834a1118b (patch) | |
tree | 1eb6a8b194ea2346aabb4de193b1e8105a21309e /gdk/gdkglcontextprivate.h | |
parent | 3f0c84f7adef8432a65c856d0d5f7ab5270117cc (diff) | |
download | gtk+-28846536cbe01090844cdb35001fbc2834a1118b.tar.gz |
gdkgl: Clean up program-manipulating code
Abstract the program ID and locations into a "program struct" which
we then use.
Diffstat (limited to 'gdk/gdkglcontextprivate.h')
-rw-r--r-- | gdk/gdkglcontextprivate.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/gdk/gdkglcontextprivate.h b/gdk/gdkglcontextprivate.h index 9a4ee46977..ebe5e18883 100644 --- a/gdk/gdkglcontextprivate.h +++ b/gdk/gdkglcontextprivate.h @@ -49,19 +49,22 @@ struct _GdkGLContextClass }; typedef struct { + guint program; + guint position_location; + guint uv_location; + guint map_location; +} GdkGLContextProgram; + +typedef struct { guint vertex_array_object; guint tmp_framebuffer; guint tmp_vertex_buffer; guint tmp_uv_buffer; - guint current_program; - guint texture_quad_program; - guint texture_quad_program_position_location; - guint texture_quad_program_uv_location; - guint texture_quad_program_map_location; - guint texture_quad_rect_program; - guint texture_quad_rect_program_position_location; - guint texture_quad_rect_program_uv_location; - guint texture_quad_rect_program_map_location; + + GdkGLContextProgram texture_2d_quad_program; + GdkGLContextProgram texture_rect_quad_program; + + GdkGLContextProgram *current_program; } GdkGLContextPaintData; GdkGLContextPaintData *gdk_gl_context_get_paint_data (GdkGLContext *context); |