ManaPlus
safeopenglgraphics.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2004-2009 The Mana World Development Team
4  * Copyright (C) 2009-2010 The Mana Developers
5  * Copyright (C) 2011-2018 The ManaPlus Developers
6  *
7  * This file is part of The ManaPlus Client.
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 
23 #ifndef RENDER_SAFEOPENGLGRAPHICS_H
24 #define RENDER_SAFEOPENGLGRAPHICS_H
25 
26 #if defined USE_OPENGL && !defined ANDROID
27 
28 #include "render/graphics.h"
29 
30 #include "resources/fboinfo.h"
31 
32 #ifdef ANDROID
33 #include <GLES/gl.h>
34 #include <GLES/glext.h>
35 #else // ANDROID
36 #ifndef USE_SDL2
37 #define GL_GLEXT_PROTOTYPES 1
38 #endif // USE_SDL2
39 PRAGMA48(GCC diagnostic push)
40 PRAGMA48(GCC diagnostic ignored "-Wshadow")
41 #include <SDL_opengl.h>
42 PRAGMA48(GCC diagnostic pop)
43 #if defined(__APPLE__)
44 #include <OpenGL/glext.h>
45 #elif !defined(__native_client__)
46 #include <GL/glext.h>
47 #endif // defined(__APPLE__)
48 #endif // ANDROID
49 
51 {
52  public:
54 
56 
57  ~SafeOpenGLGraphics() override final;
58 
59  void testDraw() restrict2 override final;
60 
61  #include "render/graphicsdef.hpp"
63 
66 
69 
70  private:
71  bool mTexture;
74  float mFloatColor;
77 };
78 
79 #endif // defined USE_OPENGL && !defined ANDROID
80 #endif // RENDER_SAFEOPENGLGRAPHICS_H
#define A_DELETE_COPY(func)
Definition: localconsts.h:52
#define RENDER_GRAPHICSDEF_HPP
#define final
Definition: localconsts.h:45
#define RENDER_OPENGLGRAPHICSDEF1_HPP
#define RENDER_OPENGLGRAPHICSDEF_HPP
#define PRAGMA48(str)
Definition: localconsts.h:198
Definition: color.h:74
#define restrict2
Definition: localconsts.h:165