4 * An object oriented GL/GLES Abstraction/Utility Layer
6 * Copyright (C) 2011 Intel Corporation.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library. If not, see
20 * <http://www.gnu.org/licenses/>.
23 * Robert Bragg <robert@linux.intel.com>
27 #if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
28 #error "Only <cogl/cogl.h> can be included directly."
31 #ifndef __COGL_ONSCREEN_TEMPLATE_H__
32 #define __COGL_ONSCREEN_TEMPLATE_H__
34 #include <cogl/cogl-swap-chain.h>
38 typedef struct _CoglOnscreenTemplate CoglOnscreenTemplate;
40 #define COGL_ONSCREEN_TEMPLATE(OBJECT) ((CoglOnscreenTemplate *)OBJECT)
42 #define cogl_onscreen_template_new cogl_onscreen_template_new_EXP
43 CoglOnscreenTemplate *
44 cogl_onscreen_template_new (CoglSwapChain *swap_chain);
47 * cogl_onscreen_template_set_samples_per_pixel:
48 * @onscreen: A #CoglOnscreenTemplate template framebuffer
49 * @n: The minimum number of samples per pixel
51 * Requires that any future CoglOnscreen framebuffers derived from
52 * this template must support making at least @n samples per pixel
53 * which will all contribute to the final resolved color for that
56 * By default this value is usually set to 0 and that is referred to
57 * as "single-sample" rendering. A value of 1 or greater is referred
58 * to as "multisample" rendering.
60 * <note>There are some semantic differences between single-sample
61 * rendering and multisampling with just 1 point sample such as it
62 * being redundant to use the cogl_framebuffer_resolve_samples() and
63 * cogl_framebuffer_resolve_samples_region() apis with single-sample
70 cogl_onscreen_template_set_samples_per_pixel (
71 CoglOnscreenTemplate *onscreen_template,
75 * cogl_onscreen_template_set_swap_throttled:
76 * @onscreen_template: A #CoglOnscreenTemplate template framebuffer
77 * @throttled: Whether throttling should be enabled
79 * Requests that any future #CoglOnscreen framebuffers derived from this
80 * template should enable or disable swap throttling according to the given
81 * @throttled argument.
87 cogl_onscreen_template_set_swap_throttled (
88 CoglOnscreenTemplate *onscreen_template,
92 * cogl_is_onscreen_template:
93 * @object: A #CoglObject pointer
95 * Gets whether the given object references a #CoglOnscreenTemplate.
97 * Return value: %TRUE if the object references a #CoglOnscreenTemplate
98 * and %FALSE otherwise.
100 * Stability: unstable
103 cogl_is_onscreen_template (void *object);
107 #endif /* __COGL_ONSCREEN_TEMPLATE_H__ */