7 const char *short_description;
8 const char *long_description;
12 COGL_FEATURE_ID_TEXTURE_NPOT_BASIC,
13 "Non power of two textures (basic)",
14 "The hardware supports non power of two textures, but you also "
15 "need to check the COGL_FEATURE_ID_TEXTURE_NPOT_MIPMAP and "
16 "COGL_FEATURE_ID_TEXTURE_NPOT_REPEAT features to know if the "
17 "hardware supports npot texture mipmaps or repeat modes other "
18 "than COGL_RENDERER_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE respectively."
21 COGL_FEATURE_ID_TEXTURE_NPOT_MIPMAP,
22 "Non power of two textures (+ mipmap)",
23 "Mipmapping is supported in conjuntion with non power of two "
27 COGL_FEATURE_ID_TEXTURE_NPOT_REPEAT,
28 "Non power of two textures (+ repeat modes)",
29 "Repeat modes other than "
30 "COGL_RENDERER_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE are supported by "
31 "the hardware in conjunction with non power of two textures."
34 COGL_FEATURE_ID_TEXTURE_NPOT,
35 "Non power of two textures (fully featured)",
36 "Non power of two textures are supported by the hardware. This "
37 "is a equivalent to the COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, "
38 "COGL_FEATURE_ID_TEXTURE_NPOT_MIPMAP and "
39 "COGL_FEATURE_ID_TEXTURE_NPOT_REPEAT features combined."
42 COGL_FEATURE_ID_TEXTURE_RECTANGLE,
43 "Unnormalized coordinate, rectangle textures",
44 "Support for rectangular textures with non-normalized texture "
48 COGL_FEATURE_ID_TEXTURE_3D,
53 COGL_FEATURE_ID_OFFSCREEN,
54 "Offscreen rendering support",
55 "Offscreen rendering support"
58 COGL_FEATURE_ID_OFFSCREEN_MULTISAMPLE,
59 "Offscreen rendering with multisampling support",
60 "Offscreen rendering with multisampling support"
63 COGL_FEATURE_ID_ONSCREEN_MULTIPLE,
64 "Multiple onscreen framebuffers supported",
65 "Multiple onscreen framebuffers supported"
73 COGL_FEATURE_ID_ARBFP,
78 COGL_FEATURE_ID_UNSIGNED_INT_INDICES,
79 "Unsigned integer indices",
80 "COGL_RENDERER_INDICES_TYPE_UNSIGNED_INT is supported in cogl_indices_new()."
83 COGL_FEATURE_ID_DEPTH_RANGE,
84 "cogl_pipeline_set_depth_range() support",
85 "cogl_pipeline_set_depth_range() support",
88 COGL_FEATURE_ID_POINT_SPRITE,
89 "Point sprite coordinates",
90 "cogl_pipeline_set_layer_point_sprite_coords_enabled() is supported"
93 COGL_FEATURE_ID_MAP_BUFFER_FOR_READ,
94 "Mapping buffers for reading",
95 "Mapping buffers for reading"
98 COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE,
99 "Mapping buffers for writing",
100 "Mapping buffers for writing"
103 COGL_FEATURE_ID_MIRRORED_REPEAT,
104 "Mirrored repeat wrap modes",
105 "Mirrored repeat wrap modes"
110 get_winsys_name_for_id (CoglWinsysID winsys_id)
114 case COGL_WINSYS_ID_ANY:
115 g_return_val_if_reached ("ERROR");
116 case COGL_WINSYS_ID_STUB:
118 case COGL_WINSYS_ID_GLX:
120 case COGL_WINSYS_ID_EGL_XLIB:
121 return "EGL + Xlib platform";
122 case COGL_WINSYS_ID_EGL_NULL:
123 return "EGL + NULL window system platform";
124 case COGL_WINSYS_ID_EGL_GDL:
125 return "EGL + GDL platform";
126 case COGL_WINSYS_ID_EGL_WAYLAND:
127 return "EGL + Wayland platform";
128 case COGL_WINSYS_ID_EGL_KMS:
129 return "EGL + KMS platform";
130 case COGL_WINSYS_ID_EGL_ANDROID:
131 return "EGL + Android platform";
132 case COGL_WINSYS_ID_WGL:
133 return "EGL + Windows WGL platform";
134 case COGL_WINSYS_ID_SDL:
135 return "EGL + SDL platform";
137 g_return_val_if_reached ("Unknown");
141 feature_cb (CoglFeatureID feature, void *user_data)
144 for (i = 0; i < sizeof(features) / sizeof(features[0]); i++)
146 if (features[i].feature == feature)
148 printf (" » %s\n", features[i].short_description);
152 printf (" » Unknown feature %d\n", feature);
156 main (int argc, char **argv)
158 CoglRenderer *renderer;
159 CoglDisplay *display;
161 GError *error = NULL;
162 CoglWinsysID winsys_id;
163 const char *winsys_name;
165 ctx = cogl_context_new (NULL, &error);
167 fprintf (stderr, "Failed to create context: %s\n", error->message);
171 display = cogl_context_get_display (ctx);
172 renderer = cogl_display_get_renderer (display);
173 winsys_id = cogl_renderer_get_winsys_id (renderer);
174 winsys_name = get_winsys_name_for_id (winsys_id);
175 g_print ("Renderer: %s\n\n", winsys_name);
177 g_print ("Features:\n");
178 cogl_foreach_feature (ctx, feature_cb, NULL);