KiCad PCB EDA Suite
Loading...
Searching...
No Matches
kiglad.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, see <https://www.gnu.org/licenses/>.
18 */
19
23
24#ifndef KIGLAD_H_
25#define KIGLAD_H_
26
27#ifdef _WIN32
28
29// GL/GLU needs APIENTRY, CALLBACK and WINGDIAPI defined on Windows.
30// Don't include <windows.h> to avoid name space pollution.
31// This is based on GLEW code.
32
33/* <windef.h> and <gl.h>*/
34#ifndef APIENTRY
35# if defined(__MINGW32__) || defined(__CYGWIN__) || (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
36# define APIENTRY __stdcall
37# else
38# define APIENTRY
39# endif
40#endif
41
42/* <winnt.h> */
43#ifndef CALLBACK
44# if defined(__MINGW32__) || defined(__CYGWIN__)
45# define CALLBACK __attribute__ ((__stdcall__))
46# elif (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
47# define CALLBACK __stdcall
48# else
49# define CALLBACK
50# endif
51#endif
52
53/* <wingdi.h> and <winnt.h> */
54#ifndef WINGDIAPI
55#define WINGDIAPI __declspec(dllimport)
56#endif
57
58#endif
59
60#include <glad/gl.h>
61
62#endif // KIGLAD_H_