ManaPlus
fboinfo.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2012-2019 The ManaPlus Developers
4  * Copyright (C) 2019-2021 Andrei Karas
5  *
6  * This file is part of The ManaPlus Client.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * any later version.
12  *
13  * This program 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
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef RESOURCES_FBOINFO_H
23 #define RESOURCES_FBOINFO_H
24 
25 #ifdef USE_OPENGL
26 
27 #include "localconsts.h"
28 
29 #ifdef ANDROID
30 #include <GLES/gl.h>
31 #include <GLES/glext.h>
32 #else // ANDROID
33 #ifdef HAVE_GLEXT
34 #define NO_SDL_GLEXT
35 #endif // HAVE_GLEXT
36 PRAGMA48(GCC diagnostic push)
37 PRAGMA48(GCC diagnostic ignored "-Wshadow")
38 // ignore -Wredundant-decls for SDL 1.2
39 PRAGMA45(GCC diagnostic push)
40 PRAGMA45(GCC diagnostic ignored "-Wredundant-decls")
41 #include <SDL_opengl.h>
42 PRAGMA45(GCC diagnostic pop)
43 PRAGMA48(GCC diagnostic pop)
44 #ifdef HAVE_GLEXT
45 PRAGMA45(GCC diagnostic push)
46 PRAGMA45(GCC diagnostic ignored "-Wredundant-decls")
47 #include <GL/glext.h>
48 PRAGMA45(GCC diagnostic pop)
49 #endif // HAVE_GLEXT
50 #if defined(__APPLE__)
51 #include <OpenGL/glext.h>
52 #elif !defined(__native_client__)
53 // avoid SDL 2 issue
54 #ifdef GL_GLEXT_VERSION
55 #undef GL_GLEXT_VERSION
56 #endif
57 PRAGMA45(GCC diagnostic push)
58 PRAGMA45(GCC diagnostic ignored "-Wredundant-decls")
59 #include <GL/glext.h>
60 PRAGMA45(GCC diagnostic pop)
61 #endif // defined(__APPLE__)
62 #endif // ANDROID
63 
64 struct FBOInfo final
65 {
66  constexpr2 FBOInfo() :
67  fboId(0),
68  textureId(0),
69  rboId(0)
70  {
71  }
72 
73  A_DELETE_COPY(FBOInfo)
74 
75  GLuint fboId;
76  GLuint textureId;
77  GLuint rboId;
78 };
79 
80 #endif // USE_OPENGL
81 #endif // RESOURCES_FBOINFO_H
PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") PRAGMA45(GCC diagnostic pop) PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") PRAGMA45(GCC diagnostic pop) struct FBOInfo
Definition: fboinfo.h:39
#define constexpr2
Definition: localconsts.h:49
#define final
Definition: localconsts.h:46
#define PRAGMA48(str)
Definition: localconsts.h:199
#define A_DELETE_COPY(func)
Definition: localconsts.h:53