KiCad PCB EDA Suite
Loading...
Searching...
No Matches
kiglew.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
28#ifndef KIGLEW_H_
29#define KIGLEW_H_
30
31// Pull in the configuration options for wxWidgets
32#include <wx/platform.h>
33
34#if defined( __unix__ ) and not defined( __APPLE__ )
35
36 #ifdef KICAD_USE_EGL
37
38 #if wxUSE_GLCANVAS_EGL
39 // wxWidgets was compiled with the EGL canvas, so use the EGL header for GLEW
40 #include <GL/eglew.h>
41 #else
42 #error "KICAD_USE_EGL can only be used when wxWidgets is compiled with the EGL canvas"
43 #endif
44
45 #else // KICAD_USE_EGL
46
47 #if wxUSE_GLCANVAS_EGL
48 #error "KICAD_USE_EGL must be defined since wxWidgets has been compiled with the EGL canvas"
49 #else
50 // wxWidgets wasn't compiled with the EGL canvas, so use the X11 GLEW
51 #include <GL/glxew.h>
52 #endif
53
54 #endif // KICAD_USE_EGL
55
56#else // defined( __unix__ ) and not defined( __APPLE__ )
57
58 // Non-GTK platforms only need the normal GLEW include
59 #include <GL/glew.h>
60
61#endif // defined( __unix__ ) and not defined( __APPLE__ )
62
63#ifdef _WIN32
64
65 #include <GL/wglew.h>
66
67#endif // _WIN32
68
69#endif // KIGLEW_H_