summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2014-02-18 15:46:10 +0000
committerEmil Velikov <[email protected]>2014-04-28 19:13:38 +0100
commit31a3b58cb7302ae1cc473626da4fba727da37d33 (patch)
tree98f395d3f090db2a1d99451b7e1ec94a162aff16 /src/glx
parent5f280d0c4416627810de73a6c68c422453d2b7d9 (diff)
glx/apple: explicitly assign struct components for glx_*_vtable
... to improve readability of code. Set applegl_screen_vtable as a static const. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/applegl_glx.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/glx/applegl_glx.c b/src/glx/applegl_glx.c
index a67416ec3f4..4e2d5d021ae 100644
--- a/src/glx/applegl_glx.c
+++ b/src/glx/applegl_glx.c
@@ -109,15 +109,15 @@ applegl_get_proc_address(const char *symbol)
}
static const struct glx_context_vtable applegl_context_vtable = {
- applegl_destroy_context,
- applegl_bind_context,
- applegl_unbind_context,
- applegl_wait_gl,
- applegl_wait_x,
- DRI_glXUseXFont,
- NULL, /* bind_tex_image, */
- NULL, /* release_tex_image, */
- applegl_get_proc_address,
+ .destroy = applegl_destroy_context,
+ .bind = applegl_bind_context,
+ .unbind = applegl_unbind_context,
+ .wait_gl = applegl_wait_gl,
+ .wait_x = applegl_wait_x,
+ .use_x_font = DRI_glXUseXFont,
+ .bind_tex_image = NULL,
+ .release_tex_image = NULL,
+ .get_proc_address = applegl_get_proc_address,
};
struct glx_context *
@@ -164,8 +164,11 @@ applegl_create_context(struct glx_screen *psc,
return gc;
}
-struct glx_screen_vtable applegl_screen_vtable = {
- applegl_create_context
+static const struct glx_screen_vtable applegl_screen_vtable = {
+ .create_context = applegl_create_context,
+ .create_context_attribs = NULL,
+ .query_renderer_integer = NULL,
+ .query_renderer_string = NULL,
};
_X_HIDDEN struct glx_screen *