blob: b6eb73aa5d30eaedd007aa8bb5edfbb4e9ba8f61 [file] [log] [blame]
José Fonseca05c3d032011-05-18 09:33:37 +01001/**************************************************************************
2 *
3 * Copyright 2011 Jose Fonseca
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 *
24 **************************************************************************/
25
Jose Fonseca9653f952015-05-19 16:32:43 +010026#pragma once
José Fonseca05c3d032011-05-18 09:33:37 +010027
28
29#include <ostream>
30
José Fonseca2e3fff62011-05-19 10:45:04 +010031#include "glimports.hpp"
32
33
José Fonsecac24f98f2014-02-28 13:51:15 +000034#ifndef ARRAYSIZE
35#define ARRAYSIZE(_x) (sizeof(_x)/sizeof((_x)[0]))
36#endif
37
38
José Fonsecab4a3d142011-10-27 07:43:19 +010039namespace image {
José Fonseca96404a72011-05-24 09:13:56 +010040 class Image;
41}
42
Jose Fonsecae8ba0792015-05-01 12:38:03 +010043class StateWriter;
44
José Fonseca96404a72011-05-24 09:13:56 +010045
José Fonseca05c3d032011-05-18 09:33:37 +010046namespace glstate {
47
48
José Fonsecac24f98f2014-02-28 13:51:15 +000049extern const GLenum
50textureTargets[];
51
52extern const unsigned
53numTextureTargets;
54
55
56GLenum
57getTextureBinding(GLenum target);
58
José Fonseca2e3fff62011-05-19 10:45:04 +010059const char *enumToString(GLenum pname);
60
Jose Fonsecae8ba0792015-05-01 12:38:03 +010061void
62dumpCurrentContext(StateWriter &writer);
José Fonseca05c3d032011-05-18 09:33:37 +010063
José Fonseca0a6855c2014-12-31 14:39:39 +000064bool
65getDrawableBounds(GLint *width, GLint *height);
66
Rob Clarkd4bf2202017-01-30 13:10:36 -050067int
68getDrawBufferImageCount(void);
69
José Fonsecab4a3d142011-10-27 07:43:19 +010070image::Image *
Rob Clarkd4bf2202017-01-30 13:10:36 -050071getDrawBufferImage(int n);
José Fonseca96404a72011-05-24 09:13:56 +010072
José Fonseca05c3d032011-05-18 09:33:37 +010073
José Fonseca2e3fff62011-05-19 10:45:04 +010074} /* namespace glstate */
José Fonseca05c3d032011-05-18 09:33:37 +010075
76