José Fonseca | 05c3d03 | 2011-05-18 09:33:37 +0100 | [diff] [blame] | 1 | /************************************************************************** |
| 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 Fonseca | 9653f95 | 2015-05-19 16:32:43 +0100 | [diff] [blame] | 26 | #pragma once |
José Fonseca | 05c3d03 | 2011-05-18 09:33:37 +0100 | [diff] [blame] | 27 | |
| 28 | |
| 29 | #include <ostream> |
| 30 | |
José Fonseca | 2e3fff6 | 2011-05-19 10:45:04 +0100 | [diff] [blame] | 31 | #include "glimports.hpp" |
| 32 | |
| 33 | |
José Fonseca | c24f98f | 2014-02-28 13:51:15 +0000 | [diff] [blame] | 34 | #ifndef ARRAYSIZE |
| 35 | #define ARRAYSIZE(_x) (sizeof(_x)/sizeof((_x)[0])) |
| 36 | #endif |
| 37 | |
| 38 | |
José Fonseca | b4a3d14 | 2011-10-27 07:43:19 +0100 | [diff] [blame] | 39 | namespace image { |
José Fonseca | 96404a7 | 2011-05-24 09:13:56 +0100 | [diff] [blame] | 40 | class Image; |
| 41 | } |
| 42 | |
Jose Fonseca | e8ba079 | 2015-05-01 12:38:03 +0100 | [diff] [blame] | 43 | class StateWriter; |
| 44 | |
José Fonseca | 96404a7 | 2011-05-24 09:13:56 +0100 | [diff] [blame] | 45 | |
José Fonseca | 05c3d03 | 2011-05-18 09:33:37 +0100 | [diff] [blame] | 46 | namespace glstate { |
| 47 | |
| 48 | |
José Fonseca | c24f98f | 2014-02-28 13:51:15 +0000 | [diff] [blame] | 49 | extern const GLenum |
| 50 | textureTargets[]; |
| 51 | |
| 52 | extern const unsigned |
| 53 | numTextureTargets; |
| 54 | |
| 55 | |
| 56 | GLenum |
| 57 | getTextureBinding(GLenum target); |
| 58 | |
José Fonseca | 2e3fff6 | 2011-05-19 10:45:04 +0100 | [diff] [blame] | 59 | const char *enumToString(GLenum pname); |
| 60 | |
Jose Fonseca | e8ba079 | 2015-05-01 12:38:03 +0100 | [diff] [blame] | 61 | void |
| 62 | dumpCurrentContext(StateWriter &writer); |
José Fonseca | 05c3d03 | 2011-05-18 09:33:37 +0100 | [diff] [blame] | 63 | |
José Fonseca | 0a6855c | 2014-12-31 14:39:39 +0000 | [diff] [blame] | 64 | bool |
| 65 | getDrawableBounds(GLint *width, GLint *height); |
| 66 | |
Rob Clark | d4bf220 | 2017-01-30 13:10:36 -0500 | [diff] [blame] | 67 | int |
| 68 | getDrawBufferImageCount(void); |
| 69 | |
José Fonseca | b4a3d14 | 2011-10-27 07:43:19 +0100 | [diff] [blame] | 70 | image::Image * |
Rob Clark | d4bf220 | 2017-01-30 13:10:36 -0500 | [diff] [blame] | 71 | getDrawBufferImage(int n); |
José Fonseca | 96404a7 | 2011-05-24 09:13:56 +0100 | [diff] [blame] | 72 | |
José Fonseca | 05c3d03 | 2011-05-18 09:33:37 +0100 | [diff] [blame] | 73 | |
José Fonseca | 2e3fff6 | 2011-05-19 10:45:04 +0100 | [diff] [blame] | 74 | } /* namespace glstate */ |
José Fonseca | 05c3d03 | 2011-05-18 09:33:37 +0100 | [diff] [blame] | 75 | |
| 76 | |