14642e01fSmrg/*
235c4bbdfSmrg * Copyright (c) 2008-2012 Apple Inc.
34642e01fSmrg *
44642e01fSmrg * Permission is hereby granted, free of charge, to any person obtaining a
54642e01fSmrg * copy of this software and associated documentation files (the "Software"),
64642e01fSmrg * to deal in the Software without restriction, including without limitation
74642e01fSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
84642e01fSmrg * and/or sell copies of the Software, and to permit persons to whom the
94642e01fSmrg * Software is furnished to do so, subject to the following conditions:
104642e01fSmrg *
114642e01fSmrg * The above copyright notice and this permission notice shall be included in
124642e01fSmrg * all copies or substantial portions of the Software.
134642e01fSmrg *
144642e01fSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
154642e01fSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
164642e01fSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
174642e01fSmrg * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
184642e01fSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
194642e01fSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
204642e01fSmrg * DEALINGS IN THE SOFTWARE.
214642e01fSmrg */
224642e01fSmrg
234642e01fSmrg#ifndef CAPABILITIES_H
244642e01fSmrg#define CAPABILITIES_H
254642e01fSmrg
264642e01fSmrg#include <stdbool.h>
274642e01fSmrg
284642e01fSmrgenum { GLCAPS_INVALID_STENCIL_DEPTH = -1 };
294642e01fSmrgenum { GLCAPS_COLOR_BUF_INVALID_VALUE = -1 };
304642e01fSmrgenum { GLCAPS_COLOR_BUFFERS = 20 };
314642e01fSmrgenum { GLCAPS_STENCIL_BIT_DEPTH_BUFFERS = 20 };
324642e01fSmrgenum { GLCAPS_DEPTH_BUFFERS = 20 };
334642e01fSmrgenum { GLCAPS_INVALID_DEPTH_VALUE = 1 };
344642e01fSmrg
354642e01fSmrgstruct glColorBufCapabilities {
364642e01fSmrg    char r, g, b, a;
374642e01fSmrg    bool is_argb;
384642e01fSmrg};
394642e01fSmrg
404642e01fSmrgstruct glCapabilitiesConfig {
414642e01fSmrg    bool accelerated;
424642e01fSmrg    bool stereo;
434642e01fSmrg    int aux_buffers;
444642e01fSmrg    int buffers;
454642e01fSmrg    int total_depth_buffer_depths;
464642e01fSmrg    int depth_buffers[GLCAPS_DEPTH_BUFFERS];
474642e01fSmrg    int multisample_buffers;
484642e01fSmrg    int multisample_samples;
494642e01fSmrg    int total_stencil_bit_depths;
504642e01fSmrg    char stencil_bit_depths[GLCAPS_STENCIL_BIT_DEPTH_BUFFERS];
514642e01fSmrg    int total_color_buffers;
524642e01fSmrg    struct glColorBufCapabilities color_buffers[GLCAPS_COLOR_BUFFERS];
534642e01fSmrg    int total_accum_buffers;
544642e01fSmrg    struct glColorBufCapabilities accum_buffers[GLCAPS_COLOR_BUFFERS];
554642e01fSmrg    struct glCapabilitiesConfig *next;
564642e01fSmrg};
574642e01fSmrg
5835c4bbdfSmrgstruct glCapabilities {
594642e01fSmrg    struct glCapabilitiesConfig *configurations;
604642e01fSmrg    int total_configurations;
614642e01fSmrg};
624642e01fSmrg
6335c4bbdfSmrgbool
6435c4bbdfSmrggetGlCapabilities(struct glCapabilities *cap);
6535c4bbdfSmrgvoid
6635c4bbdfSmrgfreeGlCapabilities(struct glCapabilities *cap);
674642e01fSmrg
684642e01fSmrg#endif
69